[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240301095406.4xu2fadgwgswn6jj@basti-XPS-13-9310>
Date: Fri, 1 Mar 2024 10:54:06 +0100
From: Sebastian Fricke <sebastian.fricke@...labora.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: Yunfei Dong (董云飞) <Yunfei.Dong@...iatek.com>,
"nhebert@...omium.org" <nhebert@...omium.org>,
"benjamin.gaignard@...labora.com" <benjamin.gaignard@...labora.com>,
"nfraprado@...labora.com" <nfraprado@...labora.com>,
"nicolas.dufresne@...labora.com" <nicolas.dufresne@...labora.com>,
"hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"frkoenig@...omium.org" <frkoenig@...omium.org>,
"stevecho@...omium.org" <stevecho@...omium.org>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"daniel@...ll.ch" <daniel@...ll.ch>,
Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@...iatek.com>,
"hsinyi@...omium.org" <hsinyi@...omium.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] media: mediatek: vcodec: support 36bit physical address
Hey Yunfei,
On 01.03.2024 10:36, AngeloGioacchino Del Regno wrote:
>Il 01/03/24 10:23, Yunfei Dong (董云飞) ha scritto:
>>Hi AngeloGioacchino,
>>
>>Thanks for you reviewing.
>>On Fri, 2024-03-01 at 10:03 +0100, AngeloGioacchino Del Regno wrote:
>>>Il 01/03/24 03:01, Yunfei Dong ha scritto:
>>>>The physical address is beyond 32bit for mt8188 platform, need
>>>>to change the type from unsigned int to unsigned long in case of
>>>>the high bit missing.
>>>>
>>>>Signed-off-by: Yunfei Dong <yunfei.dong@...iatek.com>
>>>>---
>>>> .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 4
>>>>++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>>diff --git
>>>>a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_
>>>>lat_if.c
>>>>b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_
>>>>lat_if.c
>>>>index cf48d09b78d7..85df3e7c2983 100644
>>>>---
>>>>a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_
>>>>lat_if.c
>>>>+++
>>>>b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_
>>>>lat_if.c
>>>>@@ -1074,7 +1074,7 @@ static int
>>>>vdec_vp9_slice_setup_tile_buffer(struct vdec_vp9_slice_instance
>>>>*inst
>>>> unsigned int mi_row;
>>>> unsigned int mi_col;
>>>> unsigned int offset;
>>>>- unsigned int pa;
>>>>+ unsigned long pa;
>>>
>>>If you used the right type from the beginning, you wouldn't have to
>>>fix that ;-)
>>>
>>Yes, you are right, thanks for your remind.
>>>Is there any reason why you didn't - and still don't use the
>>>`phys_addr_t` type
>>>for the `pa` member?
>>>
>>pa is also iova, dma address. Change it to dma_addr_t looks much
>>better.
>>
>
>Ok, dma_addr_t looks good as well.
Ah alright, disregard my comment about unsigned long vs u64 then, but
please have a look at the other casts in the driver as well as you
currently cast to either:
- u64
- uint64_t
- unsigned long
Greetings,
Sebastian
>
>Cheers!
>
>>I will change it in next patch.
>>>Cheers,
>>>Angelo
>>>
>>Best Regards,
>>Yunfei Dong
>>>> unsigned int size;
>>>> struct vdec_vp9_slice_tiles *tiles;
>>>> unsigned char *pos;
>>>>@@ -1109,7 +1109,7 @@ static int
>>>>vdec_vp9_slice_setup_tile_buffer(struct vdec_vp9_slice_instance
>>>>*inst
>>>> pos = va + offset;
>>>> end = va + bs->size;
>>>> /* truncated */
>>>>- pa = (unsigned int)bs->dma_addr + offset;
>>>>+ pa = (unsigned long)bs->dma_addr + offset;
>>>> tb = instance->tile.va;
>>>> for (i = 0; i < rows; i++) {
>>>> for (j = 0; j < cols; j++) {
>>>
>>>
>
>
Powered by blists - more mailing lists