Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3121401rwb; Mon, 15 Aug 2022 18:38:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hbUa0izTNwrm35R2k+0WlffgEn9GfYFFJWmVIlHjrlHsx0At2+NQgKkaifwhsHcRU1CIs X-Received: by 2002:a65:63c7:0:b0:429:793b:8f3a with SMTP id n7-20020a6563c7000000b00429793b8f3amr4280319pgv.524.1660613930432; Mon, 15 Aug 2022 18:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660613930; cv=none; d=google.com; s=arc-20160816; b=xJjv9VpCfi9sBGX8/40XdVzzbxUkEWU2iQCfGEmdCSHUKaMbvCuaBbKDd7yGNlE7E+ osL/sHq0dsyGLRRyQOedh3lZoowxIGszmlGfdyg5MgAAq+987H2E0psjLUNhN2Qu3yiG nVPq3D3ItNblMWWJXjRwP1CQwQt3E2iOYWzDicDM9KMPycCygAOusrbN0MpZQ4PFzEwt jZdD4qV85EXaZpqAsA0H7M1P/s+KCaXR3K6cy0mG/kVwdu0PtIokKfsfgBorFnSjUFSc d+jYx6DrgprJluvC4uRSTO1BCzy/l36EeVdDzhIKCLdVittUDFAufViQCCHjtVrqPW0w Nxbw== 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=63KcUMOQjW0uXHs5v65Lg/48BpwmAU47EMXhqPeV234=; b=dtb8nuvJnDHBcky5HymNBLoLho6UqmL/Uxe8Ejpo/thYvtg0C8nSyEITGSnN+YUfGD +zdBFK3W62F15XL8CmDQAoZ2NCQ82/up4q+TaCiNUFuIeNUOnEI5DnDkn/r7564CvDd/ EgZoLZKirDg2VAVoy1Au+SBqVR5vn7ytVM+UFa0/HUG43LlwnyiiclxWMi5RLlMfhnXE ZcK/NnIQw0Si/jw/yPWYhRs/UMRGAsRm8kpYDAU6M+pB7N/bzg5cVr72GOj/s3Mjj3F2 1OrnlsnvtgJOCzxeVeD5u9tqwIXyX0mrgI+lqbLIMpVC2NA5EAqlU0mLn9ianRAjlrhs O11A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P2gfnf5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a634548000000b0041ccbc553d9si11842823pgk.485.2022.08.15.18.38.39; Mon, 15 Aug 2022 18:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P2gfnf5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233939AbiHOX6G (ORCPT + 99 others); Mon, 15 Aug 2022 19:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355403AbiHOXwD (ORCPT ); Mon, 15 Aug 2022 19:52:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D13FA9410B; Mon, 15 Aug 2022 13:16:53 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E595760F9F; Mon, 15 Aug 2022 20:16:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D790C433D6; Mon, 15 Aug 2022 20:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594612; bh=Ggx5eMXhfYasjXBC9zesMgQQm7DndAkFwc/nvYHdF3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P2gfnf5ylMiSuUvxL3pjw1F0uQP4XluSLV4GcBdC10g/zSx3lQWGDhRAwd5yhKhUl 3h3zfNKAZ+23Dy7cxe3QVS6dGdFjpiG8LfPjuXZQRLN3+id+U0xzbbEN8HxN38dm/J O51FuTjAUBkzKvX67JIq5N+1N76Z3EX5vTk4vUzQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 0503/1157] media: cedrus: h265: Fix flag name Date: Mon, 15 Aug 2022 19:57:39 +0200 Message-Id: <20220815180459.816329895@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Jernej Skrabec [ Upstream commit 104a70e1d0bcef28db13c4192b8729086089651c ] Bit 21 in register 0x24 (slice header info 1) actually represents negated version of low delay flag. This can be seen in vendor Cedar library source code. While this flag is not part of the standard, it can be found in reference HEVC implementation. Fix macro name and change it to flag. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 4 +++- drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c index 44f385be9f6c..2febdf7a97fe 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c @@ -559,7 +559,6 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx, reg = VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_TC_OFFSET_DIV2(slice_params->slice_tc_offset_div2) | VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_BETA_OFFSET_DIV2(slice_params->slice_beta_offset_div2) | - VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_POC_BIGEST_IN_RPS_ST(decode_params->num_poc_st_curr_after == 0) | VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_CR_QP_OFFSET(slice_params->slice_cr_qp_offset) | VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_CB_QP_OFFSET(slice_params->slice_cb_qp_offset) | VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_QP_DELTA(slice_params->slice_qp_delta); @@ -572,6 +571,9 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx, V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED, slice_params->flags); + if (decode_params->num_poc_st_curr_after == 0) + reg |= VE_DEC_H265_DEC_SLICE_HDR_INFO1_FLAG_SLICE_NOT_LOW_DELAY; + cedrus_write(dev, VE_DEC_H265_DEC_SLICE_HDR_INFO1, reg); chroma_log2_weight_denom = pred_weight_table->luma_log2_weight_denom + diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h index bdb062ad8682..d81f7513ade0 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h @@ -377,13 +377,12 @@ #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED BIT(23) #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED BIT(22) +#define VE_DEC_H265_DEC_SLICE_HDR_INFO1_FLAG_SLICE_NOT_LOW_DELAY BIT(21) #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_TC_OFFSET_DIV2(v) \ SHIFT_AND_MASK_BITS(v, 31, 28) #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_BETA_OFFSET_DIV2(v) \ SHIFT_AND_MASK_BITS(v, 27, 24) -#define VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_POC_BIGEST_IN_RPS_ST(v) \ - ((v) ? BIT(21) : 0) #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_CR_QP_OFFSET(v) \ SHIFT_AND_MASK_BITS(v, 20, 16) #define VE_DEC_H265_DEC_SLICE_HDR_INFO1_SLICE_CB_QP_OFFSET(v) \ -- 2.35.1