From patchwork Fri Dec 23 19:38:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 36327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp480018wrn; Fri, 23 Dec 2022 11:40:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXusAhmvtNihnrubxlzqmYnEYF9uf/giclu5wZO+EGcpfTq1jEgZ0avKxxvwXqdPI3alPiCT X-Received: by 2002:a17:902:ce04:b0:189:b4d0:aee with SMTP id k4-20020a170902ce0400b00189b4d00aeemr14608519plg.67.1671824432779; Fri, 23 Dec 2022 11:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671824432; cv=none; d=google.com; s=arc-20160816; b=f9eaCDcJBBpFcMyTaxB3CsZOdb8eczcOz70CNwbuzO/hKb6xBwJFndJSvBgF0Aje3k 6XRMR5HO7R4KauDE6VBhT509HkrA2AgxVff8M8vMBQkzVke/c2i1xPicqujEXIJ1dBsk /lDUGqp0Da0B0Fzlpw/KMN43Eag1A1oTK8vGbx5YnPzVQdfqiuKy5oKryg+mISgCx5tr CaFNrV/Ojgef1oFpEZMWhH8gKV0yYVtaMGkZC+Vype9h92fu04Jxlg7ycakQkZ2VAugw JhyWDPkZWVfBJ+QOFq1wFar/xFRXFxLkqkZUCMW6NmDJsekBMLvw+EmTlh9vFyK4GGjE Mvuw== 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=9QL+0G22dK6/OqvVGvU4VSnYBx1f/kBI3ru4mcHdfCs=; b=LhiM8yusNRrnSxX/5NnyZC76oWLIgK+GXx7KTr7YtC1xSFF06HiSfVwbnMIiqEo+f8 sTAxbVnvEId/CQpofdNSXlvkcxf/3q5r2WGKsOXJp4Rg9VpJD6pMr9g2Owkx3JwDq0uJ cb81ldukfcvAS4/FLp5Kh1uWRNKsM58OcUZDFf+Gy1C/oImRnfUE9oXFzTr0HQR5/NPq aldj07ZwfayRiEoL1gx8+40HNnH6e5F88jrYgtS8aBr/0jB4jlPiY7A5gxUILHBytWQQ nidZ9OBT7A4GyeJOHxWDFjkhmEtWYr1Mk6tpbuL3MNQuGAga9gjK9tWiT/a/NVdsQUoX DtrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QJvWKvQj; 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=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170902ec9200b0019258fc1bc7si4258190plg.279.2022.12.23.11.40.20; Fri, 23 Dec 2022 11:40:32 -0800 (PST) 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=@collabora.com header.s=mail header.b=QJvWKvQj; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232626AbiLWTi7 (ORCPT + 99 others); Fri, 23 Dec 2022 14:38:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232623AbiLWTix (ORCPT ); Fri, 23 Dec 2022 14:38:53 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07A620F75; Fri, 23 Dec 2022 11:38:48 -0800 (PST) Received: from whitebuilder.lan (192-222-136-102.qc.cable.ebox.net [192.222.136.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2CA6A6602CE4; Fri, 23 Dec 2022 19:38:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671824327; bh=eBl4+2U4mQQRTAtyInaP2j+zvWYhkSkjm7NFsSgFaXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QJvWKvQjLgZgCirY7Ajy75zAiBEMylZ1tHA5Dv/UZvan9DxnC2Xe4FPZ3PIxO1K/w F38xN/A6OmP1IEuIsrcNkNDklBhJTfIKvMpcvaaPWtAVGcuiZYPN0qVOPsdkjvmVjo ef3k2PCz9jx2XhcpLMmYFP/cnb3bWRh6C5IQhiDTTC3iXksZZMjAbZT464r+z1f2QA zWWGONfBbyKwzmfv2BSU3FAbG9g3/fpifiw/+69wHfCENqpkR8p70h7vksoCfbvRRw P/GdIpznA4b/OROhL9Wss32R/UHS0hY5eGKa0EYVpkcAkKCFLZv1Bv9xzQpHmb33ub LAvyHe6xEy3Pw== From: Nicolas Dufresne To: Ezequiel Garcia , Mauro Carvalho Chehab , Greg Kroah-Hartman , Boris Brezillon , Hans Verkuil Cc: kernel@collabora.com, Nicolas Dufresne , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro Date: Fri, 23 Dec 2022 14:38:04 -0500 Message-Id: <20221223193807.914935-3-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221223193807.914935-1-nicolas.dufresne@collabora.com> References: <20221223193807.914935-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753034976531593473?= X-GMAIL-MSGID: =?utf-8?q?1753034976531593473?= This information is expressed by bits [29:16], but the actual implementation was reading bits [13:0] and shifting that 16 bits to the left. Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Nicolas Dufresne --- drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h index 15b9bee92016c..14530b81560ed 100644 --- a/drivers/staging/media/rkvdec/rkvdec-regs.h +++ b/drivers/staging/media/rkvdec/rkvdec-regs.h @@ -212,7 +212,7 @@ #define RKVDEC_REG_H264_ERRINFO_NUM 0x130 #define RKVDEC_SLICEDEC_NUM(x) ((x) & 0x3fff) #define RKVDEC_STRMD_DECT_ERR_FLAG BIT(15) -#define RKVDEC_ERR_PKT_NUM(x) (((x) & 0x3fff) << 16) +#define RKVDEC_ERR_PKT_NUM(x) ((x >> 16) & 0x3fff) #define RKVDEC_REG_H264_ERR_E 0x134 #define RKVDEC_H264_ERR_EN_HIGHBITS(x) ((x) & 0x3fffffff)