Re: [PATCH] media: mediatek: vcodec: support 36bit physical address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
  .../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 ;-)

Is there any reason why you didn't - and still don't use the `phys_addr_t` type
for the `pa` member?

Cheers,
Angelo

  	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++) {






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux