Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF845C27C76 for ; Wed, 25 Jan 2023 17:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235601AbjAYR2L (ORCPT ); Wed, 25 Jan 2023 12:28:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235311AbjAYR2J (ORCPT ); Wed, 25 Jan 2023 12:28:09 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A94B2CFE7; Wed, 25 Jan 2023 09:28:04 -0800 (PST) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:ad6f:c6af:709d:745c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 885DB66003B1; Wed, 25 Jan 2023 17:28:02 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1674667682; bh=ftbq0IBc4A40w5QgdUFCSat4ox2AWsD9fPmQCdsmw6k=; h=From:To:Cc:Subject:Date:From; b=VB2gMay4GS5sLnQPt9uV9LenFUkipBbqBwJINSnafY3wku3dpqUw7K92UXmKNrDPZ 7QxG840PgQRqLsYJkQY0OM9Xtl7lBHcKFMIRbZUXo5QGf4mNB0Qz3vCJVXwm7S69NP YWOIZ0zKs/2h1U+ybVistGvQmVdR7lAR+8FhpPfyRPY7istkbKzbAaLfIsyQ8WHwed 9TqBeYF7FY8/cmMy5Vlu6+F+kKGQ8eAcRzEZVtRUCW64lfppbHRkj4kPZlPi4rS2qI Vv+pMmRvIBDVBAeE2Vj37Ww9m0aIQ530Psc6VVqegYI97BfyBSyye3b0JmQGJGBLFB +/3GKvF1aqM5g== From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.co.uk Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v4 0/2] media: verisilicon: HEVC: fix 10bits handling Date: Wed, 25 Jan 2023 18:27:53 +0100 Message-Id: <20230125172755.1498973-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When decoding a 10bits bitstreams HEVC driver should only expose 10bits pixel formats. To fulfill this requirement it is needed to call hantro_reset_raw_fmt() and to only change driver internal state in case of success. Fluster score (140/147) doesn't change after this series. version 4: - Split the change in 2 patches. - Change hantro_check_depth_match() prototype to avoid using ctx->bit_depth - Return the result of hantro_reset_raw_fmt() to the caller. - Only set ctx->bit_depth when hantro_reset_raw_fmt() returns is ok. Benjamin Gaignard (2): media: verisilicon: Do not change context bit depth before validating the format media: verisilicon: HEVC: Only propose 10 bits compatible pixels formats .../media/platform/verisilicon/hantro_drv.c | 46 +++++++++++++--- .../platform/verisilicon/hantro_postproc.c | 2 +- .../media/platform/verisilicon/hantro_v4l2.c | 53 +++++++++---------- .../media/platform/verisilicon/hantro_v4l2.h | 3 +- .../media/platform/verisilicon/imx8m_vpu_hw.c | 2 + 5 files changed, 68 insertions(+), 38 deletions(-) -- 2.34.1