Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4393569ioa; Wed, 27 Apr 2022 02:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBNbdyijXn34noiYGalZh2jwR2jDYtw+OcslZJUPp6O0z1oIh2JTcoO8zcsF+XdJxjKSsZ X-Received: by 2002:a17:903:246:b0:153:87f0:a93e with SMTP id j6-20020a170903024600b0015387f0a93emr27925951plh.171.1651053216332; Wed, 27 Apr 2022 02:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053216; cv=none; d=google.com; s=arc-20160816; b=TZ9rDxjB++1A0zlhzKpZmhQka98YmuPLAizqW8nfCnA/eX+bUQ3GMVxDAyLub9bUyB YsSvtsiXxfiUiF7cljYLd6v69RRR6Qx7hHEbqFF+KzrtEQBubUhDe6hJC+PCcb6fbkzQ JFwtn9uWihGKVeXABhXltSPleZvtcSW+/zbJ4yZqGJBMZJq4uSE1YAPkBnqy1W4mKDOn BaZZaoAp/vosG8N6IUWJfnI5hv5al6x82579NaZ5VVXW8PgvR5g+R6HZecn/K++qIPpl tLLZBBb8GlZBy/mGyIHJd3mox7G2fvYRhcRRvan1J2ioOSE5+OW4s5CWVoSRnw5Sc0l/ djmA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=npBWUnzVOMcGEDa3WxfGMrvUgUZtdH/cwIpttM+zsSw=; b=uan48YcSQ8qaP76Ek/qIFdnd5SuN9sSkGcuo4q3V9Sed3txSdpq3CwCG7xDgvwwd9m EgLY0bna8l9zgbBvIa5BjmVz3ggKlc3n7k/Ho3W6eHKus9/L+eCBhwpX/UijaCbU+G4h dwoZ4KZC60KTfLpPkh1Rz812KFo338yL/4CG2toXfFyNDaH4JPyMZpCL8YgJQ8kbOWos E+Brrc2zshPZec1JUDdoLz198n1yjVM5wgD74iZ5EGoeZMbr8g5xHV+OmpSlHmIpyB/o D75KLqeVZtUAaUTckzEqUEoONCKGKEOfKkHs2lVmp3Khicb/3Eaps6mWRDOd3bx8dtYk D4Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=g5sJ06Er; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id kk16-20020a17090b4a1000b001d2a7b7f612si5734505pjb.8.2022.04.27.02.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:53:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=g5sJ06Er; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B6A6D2A6090; Wed, 27 Apr 2022 02:24:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351230AbiDZNyH (ORCPT + 99 others); Tue, 26 Apr 2022 09:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351179AbiDZNxw (ORCPT ); Tue, 26 Apr 2022 09:53:52 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BD4E0E9; Tue, 26 Apr 2022 06:50:44 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:8ccc:428d:6d90:c434]) (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 D48CF1F43AFF; Tue, 26 Apr 2022 14:50:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650981043; bh=CCDHj7pQZvESZdZWN4cCNttODXVw+AkYBsGRVPKNBSI=; h=From:To:Cc:Subject:Date:From; b=g5sJ06ErarEfsR+65HFsTR/u0T8G7iZ8X0qaQ8rwAjfugnHDiQPv3OGLnQ89gF1Uw Z/FZL4XZvK+vlQW2B+VBHyaq3nn6SvPofdyGl8W9P7xGDJXAUDSzf/SbeIy02IX0KE XGJpgaulJImaaLHQwnHXMFs6CFOT63MlzvVbiS/q1Rb8v0uukUuL/QE839madZ+k3X eS3B0Rfy3vAX4Y84P6vAL8rByNpZeg+tj8m2gTk3dBzJ0QzY4avPpHAKHWmp3vEltm aniSFOqb/zvsOOmY/50QjHRIDX2o2O5Dw5Z+4ikidntoTcBriOEJK3YWGiEMiZVaYk RhPvk0FcLViRg== 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 v2] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Date: Tue, 26 Apr 2022 15:50:34 +0200 Message-Id: <20220426135034.694655-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 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 CAINIT_G_SHARP_3 test 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 6deb31b7b993..503f4b028bc5 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); -- 2.32.0