From patchwork Mon Apr 25 10:53:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 12825579 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43AF7C4332F for ; Mon, 25 Apr 2022 10:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=bIneYRHSQ0yW76IvCYn9bIwtRH5WpCLf2Ajpnd5VbAY=; b=4BHDuUDrsHsCTE wrZpztjzNneRRgfptFLbfIK5RBxsflIcsfr1NChSJM1eidBMneZrAsqIsKRcOTr+tcYoL6WDS/wP5 kGT4hn0H5lIPY2WWHDRQ9+Vv0ogi9xlPhy+q6sg2Q70TLjbYdJPLo2wJzr89Em7nEw3zN1+0yQApo le+ExjRsyBNjNmB0aYoVz6KvD/MZmLVVMl0eJG4h9AP6wfEYKP6WplFIGQVvZP6f0s5oAk407qVb1 uXGzPFl1fosOblC6rPQRVmyZDd1wNlmVMoYOXuxAGwnCDvG/Ca4EG33fDQeRSgMGDCOanFX5GZ+s0 a876TWwLUls5EAzNDXyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niwLx-009CA4-KA; Mon, 25 Apr 2022 10:54:01 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niwLv-009C7t-5C for linux-rockchip@lists.infradead.org; Mon, 25 Apr 2022 10:54:00 +0000 Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:ad99:4ace:ca31:d49f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 856BE1F44328; Mon, 25 Apr 2022 11:53:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650884035; bh=hzcZXqIkMs9nS6rOMt1Lmuz1EhLkkGs74FZ6lSHHdTI=; h=From:To:Cc:Subject:Date:From; b=NUW0Zx9IDCo+f4uira4DkA+u/WKyaqg+k/c+dQaL5OPa+0F74BZjqYDGIZJ2HA1S3 9MbqUtwWGxG+5kRfaIH8oYWvlvYa822Cs51aWxZBdgURseislmR4d/CXY/80F+oz4L nf5SJQ8CZOTZcviKAs8854aKbFvhJoZG/1nf0J/ULwtop7HpsKAwTkjCgoEt/bymeR RKvBqBXcJ0jZthvJDTBhGWd2yOIo8E+3HAzmBmZJSElOwUjXvPw/GeYMUOJhSpP/82 e/nPH4DQONcNllNkr8/NVc3LCPDJx3eYI/jUuYe/gCCAJj+GTs3EetJLXRYX/3d8o+ 8puPGikdV/2pg== From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, gregkh@linuxfoundation.org Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, jon@nanocrew.net, aford173@gmail.com, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Date: Mon, 25 Apr 2022 12:53:46 +0200 Message-Id: <20220425105346.324864-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_035359_369864_969C5F34 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Always set pps_cb_qp_offset and pps_cr_qp_offset values in Hantro/G2 register whatever is V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT flag value. This fix a couple of tests in fluster. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c index 2c8eb0720db8..bb512389c1a5 100644 --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c @@ -194,13 +194,8 @@ static void set_params(struct hantro_ctx *ctx) hantro_reg_write(vpu, &g2_max_cu_qpd_depth, 0); } - if (pps->flags & V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT) { - hantro_reg_write(vpu, &g2_cb_qp_offset, pps->pps_cb_qp_offset); - hantro_reg_write(vpu, &g2_cr_qp_offset, pps->pps_cr_qp_offset); - } else { - hantro_reg_write(vpu, &g2_cb_qp_offset, 0); - hantro_reg_write(vpu, &g2_cr_qp_offset, 0); - } + hantro_reg_write(vpu, &g2_cb_qp_offset, pps->pps_cb_qp_offset); + hantro_reg_write(vpu, &g2_cr_qp_offset, pps->pps_cr_qp_offset); hantro_reg_write(vpu, &g2_filt_offset_beta, pps->pps_beta_offset_div2); hantro_reg_write(vpu, &g2_filt_offset_tc, pps->pps_tc_offset_div2);