Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2128096iof; Tue, 7 Jun 2022 20:40:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg6vCozpxjMf4zwVPiuphwc71Y8Gh93fJrdXYD00bAN6lR52WRkV8B0rvQpEZdpOzUhakP X-Received: by 2002:a17:90b:33cc:b0:1e8:70ea:140c with SMTP id lk12-20020a17090b33cc00b001e870ea140cmr17896588pjb.237.1654659654338; Tue, 07 Jun 2022 20:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654659654; cv=none; d=google.com; s=arc-20160816; b=TU57izvfmSfYaZgObm+nnQX9Y0tv/VFjZj7ZVbV+ALfaaU7LTdRgVHuR7/9RJAQRyW aCcF6LxHto7eOowMJrNNOs94UhQ6AqIkT3jN8+obz9XTXiiblZa4Vx5rmjdp36GSwiA5 MQVVRLRJt9S8KFzjB03bH5uprS46/FEl+HhhrIAk9nwPKkiK7hihtuzB9Xh9yYj41+i7 u/ubNi8/otabMI+y8ZY8eKWmsmUy7zsfcHfKyCiTXGhNowbsVNYiIJAosREYa763SaSP xpsce27koNwhhcVGhLpF6IxN2MUD0GIG/eFFYz9T7itSoMi4IPACM9he5KUt19u1N8kE LoXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iUdC2ubfqEiL8vc8ddT5sTE+n/uV+X/GnsTVSp1zmmI=; b=N8DoTdnJWzHsziB5uD1XB/F8fcRjAcXI+YFonxh4u++A/re1ECGvScyY16KnPA5kV0 id7lsfCtT49qL98CzSrH/sWZx6sE2jbNC5TWLsyljjoqnr+HVU04AxprkGv7f1kHZtxU ZP70TYKIHtmRPMBpAOqWHXAfZo4WcLCvYGT8IA+Q3iTJsg77XWjU5DqXyc+7xQFZ2E9L S5Sli45HT44wPmw8shW9YK+Xh5D9Z2hQAIrPEjuO+LslgM8r1GBMVdMK+UbqEUvUN2Uj /Hbe6mStm6LV+Xh9R22Q2+qUMl3TtbLbQ5q4ftdx7uzcQDPBpdqyDtq1Sf3VuGcyZy4s VWTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F3FlgPSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i14-20020a17090332ce00b00163ad368fe7si26417901plr.71.2022.06.07.20.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:40:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F3FlgPSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C860B2A7AA8; Tue, 7 Jun 2022 19:58:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379540AbiFGWOk (ORCPT + 99 others); Tue, 7 Jun 2022 18:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380067AbiFGVL1 (ORCPT ); Tue, 7 Jun 2022 17:11:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EBCE217616; Tue, 7 Jun 2022 11:53:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 451D2B81F6D; Tue, 7 Jun 2022 18:53:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD92CC385A2; Tue, 7 Jun 2022 18:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627981; bh=1IhMAlmpFLnSmrF7JaiDJvASdMM846kQitQkMmoRy58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F3FlgPSGG6bobwbWIxy0HVcYfBehF2X5sN3XcgILnml8+Ciqcw6Qj2AhWYZFJtlDy xObOPMzfi1YDxlMPOzjQIJxV5RQthFFx/C5YJpy9wwV8DHauwLFqho6ML+w2WEnqQS qS5r5k+kvldUGWZs6i2cMpUYgy/pdamj0z9ZWyeE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Gaignard , Ezequiel Garcia , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 164/879] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Date: Tue, 7 Jun 2022 18:54:42 +0200 Message-Id: <20220607165007.466874994@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benjamin Gaignard [ Upstream commit 46c836569196f377f87a3657b330cffaf94bd727 ] 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. The vendor code does the same to set these values. This fixes conformance test CAINIT_G_SHARP_3. Fluster HEVC score is increase by one with this patch. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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 c524af41baf5..2e7eec0372cd 100644 --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c @@ -180,13 +180,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); -- 2.35.1