Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3108987iog; Mon, 20 Jun 2022 11:29:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s8e4FiURJ2xZ4IQZIjmwF8lio8P/d0m+CtV6qclqzFwlBxMIBydOD3qTPfOPuKfb5iK4Qh X-Received: by 2002:a63:4f52:0:b0:3fe:4274:75e3 with SMTP id p18-20020a634f52000000b003fe427475e3mr22906303pgl.595.1655749749996; Mon, 20 Jun 2022 11:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655749749; cv=none; d=google.com; s=arc-20160816; b=J11xrfdsGAo9rQsQRcOzYRB6maSj8tJw3bWUVDa94kgXCCec+IQTzusl66eHD8dZi4 SriZX+a4/iF+aKmNKRZgdEU1p/mp5ReeaSoq9AZRPBCB9rjMh8YxhKv9mHW2pM5igtM8 7/eClXaIEWilHdCEO0hWg8i517e97hZxHOfPdxYOfMawIiFUpeTEZDIBYZZYeaUvtOjR feIRnyDMDffiIgMpblu29SU1if+VWeS9C2pn3siBc7hW3RiNofcIGryhkMZUs+eXOeUe JAy7q0hGxvJ9Dx60H2zHhyHJUxdGi/m4WESDBCVHmLpY9GXuvpZt1xarTdZZ63gHv9K3 3d+A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IIGvFdI/wJ4/LBOf7PZx+JpLogMq9gYH/QS1CnB4btI=; b=yDz4qI2jB+Uvl1GClMULyNE89+Xs78oUOdkyR4FfmQo6n4BDTHitVoM+MdRQAbp3ZI H+RHFSOeMHCh3+ohXGTd8puZqDYifXmLVtRaTP8xnCaDeQQxwbbew5bOhYuZEU0BBJgC lEPGVIYx0XDAIWwBJU6UZWQbSylkv8W9Mc0HhEl00d2utovVe88GClfmmi6SNUcNjd4L R5D8QA4Q6lnaEuUPGMj+QT/SmxlHfrp8fmnARkiLa1yJOtQEesv4MYGTDoBGsQU3roYD 3OQa1eSdEbr/yYbbH9h6xHNbDl/OMZ7iyKio/OGROX36Ybj+MjVZJbUiBQvTJHWPzLZB aXIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SniQDHgj; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170902e54500b0016213dc7805si20668770plf.324.2022.06.20.11.28.53; Mon, 20 Jun 2022 11:29:09 -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=@gmail.com header.s=20210112 header.b=SniQDHgj; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244474AbiFTRzl (ORCPT + 99 others); Mon, 20 Jun 2022 13:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244348AbiFTRze (ORCPT ); Mon, 20 Jun 2022 13:55:34 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2FE118B3F; Mon, 20 Jun 2022 10:55:32 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id q9so15692588wrd.8; Mon, 20 Jun 2022 10:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IIGvFdI/wJ4/LBOf7PZx+JpLogMq9gYH/QS1CnB4btI=; b=SniQDHgjVfXKBSGsUuDwSkfqHypta48g5YrJl77DFnz9lDLxN/KW8s3NVjF0xwIB1E MspMRJdwEUs/mTnQ2JalZYRQu7KIa/zJfFLUBAb9FuY9zj8M7tnNlFGU86Zcs5g7GVFA 2B2526v1crqcHHSumSR7pfRFshcdw1AydSmmr8cg1EN19U8bAsidLJBsPwSoRfnCFz4I iRG9oWQrRufKxNXX25H7wzYJB7xBAsZVi4ihZ/PldsdeOwUgTFG53NumpzRxOaBr9h2k o9eD6nUDWS5SZW91nRUOQ62Ma46UNNTiSE6DO/RTB387NMpx9ADSXSiVEZlPIEGXMku8 7dVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IIGvFdI/wJ4/LBOf7PZx+JpLogMq9gYH/QS1CnB4btI=; b=0cjfWA20i+g63quAcCCzYe15002B/exsjbDG2WpKK8Sb4emUlpzv5NBRZARP261V8L PlYZbX7qamYVqpVhpRBVoNTgQxF2qWACQsG2TPHQw6z5a3PesjwVo8FZpDtxww3M/lal VTvygq8LuoLmkVBItXRDhrDV6GVrOtghXYHm+Pskm9kxAf//n1G0vFiDsT92r6W7KanQ Hi6Ge8civj23UHfWFeeSI2akIsAGH9Mb68K4lmPF6HQvpw1bUGYR8kwoZ6rziX22H6pg QgO59kj8F0RdEcl3Lc30a9OhVDvpwcKuZ2tABct98C/HNd6YTif3virPex4a8AqRzRku qDEg== X-Gm-Message-State: AJIora+hBAdFX33PYVl9LEkWeurDcbKAFZe7BUraJNRqvRjMU7inHBX2 S4iBtzQcMqE1ZXtL4CWv6r3a2zm8wXY= X-Received: by 2002:a05:6000:2a4:b0:219:2aad:51ce with SMTP id l4-20020a05600002a400b002192aad51cemr23651238wry.719.1655747731160; Mon, 20 Jun 2022 10:55:31 -0700 (PDT) Received: from kista.localdomain (213-161-3-76.dynamic.telemach.net. [213.161.3.76]) by smtp.gmail.com with ESMTPSA id 184-20020a1c02c1000000b0039db31f6372sm19620752wmc.2.2022.06.20.10.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:55:30 -0700 (PDT) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, samuel@sholland.org Cc: mchehab@kernel.org, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 1/7] media: cedrus: h265: Fix flag name Date: Mon, 20 Jun 2022 19:55:11 +0200 Message-Id: <20220620175517.648767-2-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620175517.648767-1-jernej.skrabec@gmail.com> References: <20220620175517.648767-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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 --- 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 7b67cb4621cf..9ee6f0f111e5 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c @@ -576,7 +576,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); @@ -589,6 +588,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.36.1