From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796493850; b=uw1HuxlrVF6ELjKP8tY7T76GqwnyWRnjQtANXllS1Jzecb7rbcwNxtzh2Vcoe48uxsOF 79auNlZ8epeRlLncf11pVIByMcVuXlz3hG8rL8Ml80x9hjonvmctYUeS2zumBenZMU9dy 6nG8SQjJpczDagJ8PMzj5cFF3AaJaXXyCypsclHgboaWcP2yErVor+golgjO1JiqyZFoo 0qagCCW4k3icnPxx8loDXQDo3vofxDHG1Oj86WBSPFZQtwF37z/4TG+uZ79hbOB/qgoO/ heaOXBItVqWZsnLvp11HG+hHVFlOGrt3XgpAbWL5XSP4h3lCIG/3U9sMmgpfqY0uZvg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796493850; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: Content-Type:MIME-Version:Content-Transfer-Encoding; bh=PULJ6ylnP6HpxRy8V+Dcw6bm4fAHVCXF9u00rGwzEyc=; b=IaH49kDDyYGM6YVkd0qticB8T0S03zXBqinyOvjz46a9yoYl4ToFLXy/3Y4kojR1+jpp IGWKrA0lt7A8BOhlXuA4FUQRpt1ZtJYE7qPTAtX1GCSh2KfP+l2nFAN5Yhh3lm9wREcEt sgrlfemDAnbG3NGKOu4JQEVqMwNf7QxSj96ohJYlj/goN2q/rrpAYAgYgESvIoSpAcIMO m2JJ3KaATaVFBBcVh8SiGddTlSYXCZxCvS8abo5cfGMog4S87fVUBfU+s7MUSy35llOrT RaaSDs6ZEa3z0K60yXq7xTCX0ThXLtKPhQ4zkrzDHbf8PEL7iPgV+iWBiXMTbAMn9Kw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=A0UOBbi2; arc=none smtp.remote-ip=209.85.208.179 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 121B4606A32F for ; Sat, 5 Dec 2026 18:04:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 121B4606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=A0UOBbi2 Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-3afebb70b8dso16494441fa.0 for ; Sat, 05 Dec 2026 10:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796493848; x=1797098648; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=PULJ6ylnP6HpxRy8V+Dcw6bm4fAHVCXF9u00rGwzEyc=; b=A0UOBbi2hZEyI1w0tWnKCji1epVqdpmnFrvL/aX2gJhzf09FifzNTTqYs7KuzdUlom sb2yXZ8G6pQ0W/8mGx/u/z7P3A4V5RVsqcpybpw4C5ERSitu6nvUeqGBK5uXc7K9+77T +KD3/XBnk9NkVsaUq2Npqib8lF+IcBw1cdefNHfytjGpcXZsRhb5CxBVR4b34f2+Imo0 /mI0uDxqqCUskhvKJgeRRSLpAk2ZEkOhCBXE/r3YQieaC/ja/wcTkE34shuI/xIhUl8O l1Kfq5o2/8mGTkJQH1eqNpcUwMu1XnPQAVqSC1GznaEZb/6i0N2sEJgVsCSSePi1jZyV no+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796493848; x=1797098648; h=content-transfer-encoding:mime-version:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=PULJ6ylnP6HpxRy8V+Dcw6bm4fAHVCXF9u00rGwzEyc=; b=Sd6ZDYk6bZSP5wOUpG3CcGIGTT9gGd1foyDisYqwmzS9mg+YGfScoTSJM+7Nw2S+bF wb/eJ1DeMMYezCbGe2uNtcT/6DvG8TV64QL58RvErw2Psa1AcJZ+fkmxzpoXhyMTvVff SfhzXm+enRkx114iJm+h/kE+/pGRc45xCRxjv0Uuy384PYN7Y2EXQt/iM9CdfWpiYAv0 Q6bCT6EGyQhMX/gs9PMxuxBBMROii3gnwgojv+n8/77/zyonE+ZusUnnzvbXhzQcvvjr 2KlP11LneW5MnE4Wz4uBcxKxHi1uSsKDyR9qf1sB/4as84s/GsiFoJVrEsJ14RFa7i9t mKYA== X-Forwarded-Encrypted: i=1; AL+hErHV8QGuzr7dGuy4lKBPC33yE1wUrmYg4GwRRNLzSAgMur5UNxkfr+giVe/uQ4uLG16aFKsVvsXAYECKCk4=@vger.kernel.org X-Gm-Message-State: AB4q+uEdlHRfao/lBTPAH24kmDpIsMU6f0mx/QO0FqbHxRBxP1qc7iad FQC9SjjJTxHxf3ojDn0SHPOQhKlZkkhjtQ6RF1k+N8nTjmVS1w2UnoqKTMbyz/F/ X-Gm-Gg: AZFdTZezfGj9LWsquApcndB+XiD8YmicJwOQutJW3g9Zw/uJd4g92pyoYoHPnxTvcct YhdxfDpXqUKWz44Ow+6T4doKx3yygXvsD8FoZ++ivpVL3U84/UjPFs6qvslPQqNFAg8CrITuHv4 JgA28QADhU8b5ZFA7jH6S22rDaUoRK6B0hreXvTvWebQqAIU1E/o2vW4EwlxVwMPcuBMhLVS3Ni RhInNrbVAitOHV4jtx5pwPK5fjv1hPMzNW9+U3IsCTbrioyjd/E5v8Th1Gx30oQvnpX0JwukBa3 8y31IidcDhEcuYipX/7YyUDPeANG6izpRGMxaWP3uwsu8gbMYyumxljOOso+K8XCTD14Mi2FGm6 4qOzd3A/BsCFvyOC4i4zw6rHA1Y2LLfyX0zyIFRbcPHGIRgggidixK61/CfBtEFS3hERGiAqc75 +IH3dV5aInizfFqmm7aS4i3a085L/D5dWaVV3QFOBqL1iP1st4W6nuRrb6gQtPRveFq9vYyfPOX QDkP1iL5lPvF8/9IwVlkkHAvsgAxz8do9GGOnp4uKHzbbM3yhx+owYmEoMDWsIkhzG5mbP/Ozm+ TuVszx/c/xDteTRzp16kAt7dqG9iHvMU3NMFZa+hNuluvOyHmcZ6m3Nh94sDGxtjM+ujoqz5vFi zowoTbAAx57/MXuK8GlLiznM4QBSTKl3M1GFUe6kkCXpfHLELC1/Eu/RACbhx0XuHOHUpQAtzwW Nbtn+g0NXw+f6ekIe/0/5JEqbsQ1KIDxszluneqj4FXpK1OO8XKNLR X-Received: by 2002:a05:6512:1256:b0:5c1:b29a:1ba3 with SMTP id 2adb3069b0e04-5c3861d4c89mr1489287e87.29.1796493847951; Sat, 05 Dec 2026 10:04:07 -0800 (PST) Received: from kompukter-Systems ([193.25.177.41]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3b0036cb9f9sm20906591fa.5.2026.12.05.10.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 10:04:07 -0800 (PST) From: Andrey Derkach To: David Heidelberg Cc: Vikash Garodia , Dikshita Agarwal , Bryan O'Donoghue , Mauro Carvalho Chehab , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] media: venus: vdec: signal EOS with a real buffer Date: Sat, 5 Dec 2026 20:03:52 +0200 Message-ID: <20261205180353.1404720-1-gabin278@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260928-venus-vdec-eos-v1-1-6e9eb3ce9849@ixit.cz> References: <20260928-venus-vdec-eos-v1-0-6e9eb3ce9849@ixit.cz> <20260928-venus-vdec-eos-v1-1-6e9eb3ce9849@ixit.cz> Content-Type: text/plain; charset="us-ascii" X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, Sep 28, 2026 at 11:40:14PM +0200, David Heidelberg wrote: > Allocate a small buffer the first time a decoder instance is drained and > use its device address for the EOS command, so the firmware gets an > address that is mapped and outside the protected regions. The firmware > then drains normally: all frames are returned and the last capture > buffer carries V4L2_BUF_FLAG_LAST. Tested on a Xiaomi Mi 9 SE (SDM712, sdm845-venus-v2, firmware VIDEO.VE.5.0-00084), on the sdm670-mainline 7.3.7 tree with the phone's device tree, which is not upstream yet. That tree sends address 0 for the decoder EOS on HFI 4xx; I reverted that first, so the patch was tested against the upstream EOS path. With ffmpeg's h264_v4l2m2m, hevc_v4l2m2m and vp9_v4l2m2m decoders, a 1080p30 clip of 900 frames decodes to the end in each format, and every frame, the last one included, matches ffmpeg's software decoder. No driver or firmware errors are logged. With address 0, the HEVC drain never finished and the end of a VP9 session crashed the firmware. Tested-by: Andrey Derkach # Xiaomi Mi 9 SE (SDM712) The encoder has the same problem on this firmware: V4L2_ENC_CMD_STOP queues 0xdeadb000, the firmware rejects it with session error 1001, and an SMMU fault and a firmware crash follow. Giving the encoder a buffer the same way fixes it here: H.264, HEVC and VP8 encodes drain cleanly. I can send that as a patch on top of this series.