All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: cfb_console: Fix 64 bits support problem
@ 2020-04-29  3:45 Peng Fan
  2020-04-29  6:25 ` Anatolij Gustschin
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan @ 2020-04-29  3:45 UTC (permalink / raw)
  To: u-boot

From: Ye Li <ye.li@nxp.com>

There are some integer to pointer convert. To support 64 bits system,
change the unsigned int to unsigned long.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/video/cfb_console.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 5442bac4c6..c8d7c7e2b5 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1179,9 +1179,9 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
 	y = __le32_to_cpu(img->header.height) - 1;
 	ncolors = __le32_to_cpu(img->header.colors_used);
 	bpp = VIDEO_PIXEL_SIZE;
-	fbp = (unsigned char *) ((unsigned int) video_fb_address +
-				 (y + yoff) * VIDEO_LINE_LEN +
-				 xoff * bpp);
+	fbp = (unsigned char *)((unsigned long)video_fb_address +
+				(y + yoff) * VIDEO_LINE_LEN +
+				xoff * bpp);
 
 	bm = (uchar *) img + __le32_to_cpu(img->header.data_offset);
 
@@ -1234,7 +1234,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
 				x = 0;
 				y--;
 				fbp = (unsigned char *)
-					((unsigned int) video_fb_address +
+					((unsigned long)video_fb_address +
 					 (y + yoff) * VIDEO_LINE_LEN +
 					 xoff * bpp);
 				continue;
@@ -1247,7 +1247,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff,
 				x += bm[2];
 				y -= bm[3];
 				fbp = (unsigned char *)
-					((unsigned int) video_fb_address +
+					((unsigned long)video_fb_address +
 					 (y + yoff) * VIDEO_LINE_LEN +
 					 xoff * bpp);
 				bm += 4;
@@ -2026,7 +2026,7 @@ static int cfg_video_init(void)
 	if (pGD == NULL)
 		return -1;
 
-	video_fb_address = (void *) VIDEO_FB_ADRS;
+	video_fb_address = (void *)(unsigned long)VIDEO_FB_ADRS;
 
 	cfb_do_flush_cache = cfb_fb_is_in_dram() && dcache_status();
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] video: cfb_console: Fix 64 bits support problem
  2020-04-29  3:45 [PATCH] video: cfb_console: Fix 64 bits support problem Peng Fan
@ 2020-04-29  6:25 ` Anatolij Gustschin
  0 siblings, 0 replies; 2+ messages in thread
From: Anatolij Gustschin @ 2020-04-29  6:25 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On Wed, 29 Apr 2020 11:45:14 +0800
Peng Fan peng.fan at nxp.com wrote:

> From: Ye Li <ye.li@nxp.com>
> 
> There are some integer to pointer convert. To support 64 bits system,
> change the unsigned int to unsigned long.

cfb_console is obsolete and shouldn't be used. Why are you not using
DM_VIDEO based drivers (video-uclass/vidconsole-uclass)? 

--
Anatolij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-29  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  3:45 [PATCH] video: cfb_console: Fix 64 bits support problem Peng Fan
2020-04-29  6:25 ` Anatolij Gustschin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.