From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.11 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796137351; b=3VBrZbnqsNrSc1fKoPGyl1FpI98/9aw4aHU7iDN9R/s97jMZwbWdzhzcIm2zIZokflPE 2JDa7H66m8l92Pap1bFDE0ufhyTNNt5mxm2AtistNkzTERQhS8sIOz9TIBHEmX+M2AHqz r5ThSFXr9vqYGRU8wmk1PeVmpMNO7NctWK4wOWP9acBUPr7xoEhomBt7o+PzTePv6/E0V LLwyeResY84av32qKdQ++8xwGFRMJGj56DeunsnAQ84m2pMZA56trMpDNprODMlRcEkTk STBLB2nPg+ycsKeEd6iyXCjTb27AJOC4FziCPTTh/u0/nMFwARk0cOTQ5MACHltoAUg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796137351; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=LDN3q+g2db5nsQeAX54RyeenFS0QpTJ6ME5QS8mUzDM=; b=hQgRT8rmve8W2vA/W3necJypQc17qkngypTba/1QctVmT6zDg+jRumFuRHY0oWK05iKi Z1KRgu5FXdwCRqClWswKzTdY7a3AxKa6KdZu+LTGTw/KJAPLHLNpX++ROwCrZ4lLOdac8 Vc1VKJYMILdo06rTso9IxRJJWUTTSjTJ9WW1AnZaKIAiUn5Sn9tnj/KZ0PEuvUs8Hrrs2 g9JA7FzFN9Un40Kk4UZJOrp2BnRI7VL4m3T7OprxGa8m1Q20gbvZiVANlziwFXsAQ+I4z SNwODIMrUHPpu//yHl7aVs99WcbqfzOqfqXMnJ4J8UysZySEaqSBEIOEASh6ZAjHLKw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=h62EuWi5; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.11 Received: from sender5-op-o11.zoho.com (sender5-op-o11.zoho.com [165.173.182.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9000E606A320; Tue, 1 Dec 2026 15:02:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9000E606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=h62EuWi5 ARC-Seal: i=1; a=rsa-sha256; t=1796137319; cv=none; d=zohomail.com; s=zohoarc; b=lm/chbWzPzsp/4wYyuwVzkc5nB2cAxO3KuGKfgvOR9nqjRbprOf4NDa6YFRJdbA1Gn3/9tI50j9/V4fniBrzUcPaYcezRMOC7RfFm53PKKWr9Z+lKEpCffakW95ELtpkfL0YtlS+lLxOpm3CLflWnNha8Cpys3h8p1xB9N7TJ5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796137319; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=LDN3q+g2db5nsQeAX54RyeenFS0QpTJ6ME5QS8mUzDM=; b=AnqI31l4Wee0GBBqnAJrCNSO11xt88PjMAn0qVGktlwrFDtlIc2xvZC/f/QwTtopXGPHtIlTNYbZNUReRmXE2P6kcye6v/ujGRI0PjND5IxFy8ayFcNjxnvEt9WNIJ0RoNy+SdE56ezShYFLloNIMxT7zi6Zsn58Y22aBNl/m1E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=benjamin.gaignard@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=h62EuWi5SOALjtcHNlCPqfEmYyybIjB6jJNYzmwVhhOCjNT3KNsyQn0w7YpEd/q4Yl8f9C5O9JlePXO71J6n7Hb9BavaEGmUmOnlVH2JG2z14+rD3yrRZ+kGQL9ifgwNQpD9FcUCMmrYo936HrXVRZ4X6rcAOV56GYhLM4KlXoA=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=LDN3q+g2db5nsQeAX54RyeenFS0QpTJ6ME5QS8mUzDM=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796137315715389.57474457209366; Tue, 1 Dec 2026 07:01:55 -0800 (PST) Message-ID: <11818069-341b-44df-8810-7c539c7e4c85@collabora.com> Date: Tue, 1 Dec 2026 16:01:51 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: verisilicon: av1: Fix the reference scale register order To: aiyengar1990@gmail.com, Nicolas Dufresne , Philipp Zabel , Mauro Carvalho Chehab , Heiko Stuebner , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20261201-av1-ref-scale-v1-1-f0a1002cd279@gmail.com> Content-Language: en-US From: Benjamin Gaignard In-Reply-To: <20261201-av1-ref-scale-v1-1-f0a1002cd279@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 01/12/2026 à 08:28, Arun Iyengar via B4 Relay a écrit : > From: Arun Iyengar > > The horizontal scale field is bits 16-31 and the vertical one bits 0-15. > The driver wrote the width ratio into the vertical field and the height > ratio into the horizontal one, so references whose width and height > ratios differ were scaled with the wrong factors. > > Fixes: 727a400686a2 ("media: verisilicon: Add Rockchip AV1 decoder") > Cc: stable@vger.kernel.org > Signed-off-by: Arun Iyengar Reviewed-by: Benjamin Gaignard > --- > Tested on RK3588 with five libaom streams whose references scale > differently in x and y: bit-exact with libdav1d, wrong before. > > Developed with Claude (Anthropic), which wrote the code and the commit > message. I reviewed every change. > --- > .../verisilicon/rockchip_vpu981_hw_av1_dec.c | 28 +++++++++++----------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c > index f143df99cdb5..3dcbd8095938 100644 > --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c > +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c > @@ -86,44 +86,44 @@ rockchip_vpu981_av1_dec_set_ref(struct hantro_ctx *ctx, int ref, int idx, > case 0: > hantro_reg_write(vpu, &av1_ref0_height, height); > hantro_reg_write(vpu, &av1_ref0_width, width); > - hantro_reg_write(vpu, &av1_ref0_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref0_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref0_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref0_ver_scale, scale_height); > break; > case 1: > hantro_reg_write(vpu, &av1_ref1_height, height); > hantro_reg_write(vpu, &av1_ref1_width, width); > - hantro_reg_write(vpu, &av1_ref1_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref1_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref1_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref1_ver_scale, scale_height); > break; > case 2: > hantro_reg_write(vpu, &av1_ref2_height, height); > hantro_reg_write(vpu, &av1_ref2_width, width); > - hantro_reg_write(vpu, &av1_ref2_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref2_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref2_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref2_ver_scale, scale_height); > break; > case 3: > hantro_reg_write(vpu, &av1_ref3_height, height); > hantro_reg_write(vpu, &av1_ref3_width, width); > - hantro_reg_write(vpu, &av1_ref3_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref3_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref3_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref3_ver_scale, scale_height); > break; > case 4: > hantro_reg_write(vpu, &av1_ref4_height, height); > hantro_reg_write(vpu, &av1_ref4_width, width); > - hantro_reg_write(vpu, &av1_ref4_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref4_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref4_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref4_ver_scale, scale_height); > break; > case 5: > hantro_reg_write(vpu, &av1_ref5_height, height); > hantro_reg_write(vpu, &av1_ref5_width, width); > - hantro_reg_write(vpu, &av1_ref5_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref5_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref5_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref5_ver_scale, scale_height); > break; > case 6: > hantro_reg_write(vpu, &av1_ref6_height, height); > hantro_reg_write(vpu, &av1_ref6_width, width); > - hantro_reg_write(vpu, &av1_ref6_ver_scale, scale_width); > - hantro_reg_write(vpu, &av1_ref6_hor_scale, scale_height); > + hantro_reg_write(vpu, &av1_ref6_hor_scale, scale_width); > + hantro_reg_write(vpu, &av1_ref6_ver_scale, scale_height); > break; > default: > pr_warn("AV1 invalid reference frame index\n"); > > --- > base-commit: 95c189b26efb07257888ccf9d873a5c366aafbc6 > change-id: 20261201-av1-ref-scale-3d240f01b6db > > Best regards, > -- > Arun Iyengar