simplefb: print some info about the registered fb
PATCH 1/1 simplefb: print some info about the registered fb
This is similar to the output printed by efifb.
--- drivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/video/simplefb.c +8 -0
@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); +dev_info (&pdev->dev,"framebuffer at 0x%lx, mapped to 0x%p\n" , + info->fix.smem_start, info->screen_base); +dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, + info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret);
Signature · 1 line
1.8.4
PATCH 1/1 simplefb: print some info about the registered fb
This is similar to the output printed by efifb.
---
Hi,
Sorry for the resend, got the ml address wrong.
-t
drivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/video/simplefb.c +8 -0
@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); +dev_info (&pdev->dev,"framebuffer at 0x%lx, mapped to 0x%p\n" , + info->fix.smem_start, info->screen_base); +dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, + info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret);
Signature · 1 line
1.8.4
Quoted 1 line · Tom Gundersen
This is similar to the output printed by efifb.
Fine by me,
Hi Tom
Quoted 21 lines · Tom Gundersen
This is similar to the output printed by efifb.
Signed-off-by Tom Gundersen <[email protected]>Cc Stephen Warren <[email protected]>Cc David Herrmann <[email protected]>---
Hi,
Sorry for the resend, got the ml address wrong.
(quoted diff) +0
-1-t drivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/video/simplefb.c +0
-0
drivers/video/simplefb.c static int simplefb_probe(struct platform_device *pdev) · line 224
Quoted 5 lines
drivers/video/simplefb.c +2
-0@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); +dev_info (&pdev->dev,"framebuffer at 0x%lx, mapped to 0x%p\n" , + info->fix.smem_start, info->screen_base);
Could we get smem_len, too? Something like:
dev_info(&pdev->dev, "framebuffer at 0x%lx, 0x%lx bytes, mapped
to 0x%p\n",
info->fix.smem_start, (unsignedlong)info->fix.smem_len, info->screen_base);
(smem_len is __u32, so cast it to avoid truncation if it's defined as long somewhere. Not sure whether we actually have 16bit int somewhere, though)
Cheers
David
Quoted 12 lines
drivers/video/simplefb.c +6
-1+dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, + info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret); --1.8.4
PATCH v2 1/1 simplefb: print some info about the registered fb
This is similar to the output printed by efifb.
---
v2: also print smem_len as requested by David
drivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/video/simplefb.c +8 -0
@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); +dev_info (&pdev->dev,"framebuffer at 0x%lx, 0x%lx bytes, mapped to 0x%p\n" , + info->fix.smem_start, (unsigned long ) info->fix.smem_len, + info->screen_base); +dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret);
Signature · 1 line
1.8.4
drivers/video/simplefb.c static int simplefb_probe(struct platform_device *pdev) · line 224
Quoted 2 lines · Tom Gundersen
drivers/video/simplefb.c +2
-0+ dev_info(&pdev->dev, "framebuffer at 0x%lx, 0x%lx bytes, mapped to 0x%p\n", + info->fix.smem_start, (unsigned long) info->fix.smem_len,
Please drop the cast, and use 0x%x. __u32 is unsigned int everywhere (where it matters --- we don't do 16-bit ints).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH v3 1/1 simplefb: print some info about the registered fb
This is similar to the output printed by efifb.
---
v2: also print smem_len, as requested by David
v3: don't cast, as requested by Geert
drivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/video/simplefb.c +8 -0
@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); +dev_info (&pdev->dev,"framebuffer at 0x%lx, 0x%x bytes, mapped to 0x%p\n" , + info->fix.smem_start, info->fix.smem_len, + info->screen_base); +dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret);
Signature · 1 line
1.8.4
Quoted 8 lines · Tom Gundersen
This is similar to the output printed by efifb.
Signed-off-by Tom Gundersen <[email protected]>Acked-by Stephen Warren <[email protected]>Cc David Herrmann <[email protected]>---
v2: also printsmem_len, as requested by David
v3: don't cast, as requested by Geert
Jean-Christophe and Tomi,
What's the status of this, did either of you pick it up for 3.12 or 3.13?
Cheers,
Tom
Quoted 22 lines · Tom Gundersen
This is similar to the output printed by efifb.
Signed-off-by Tom Gundersen <[email protected]>Acked-by Stephen Warren <[email protected]>Cc David Herrmann <[email protected]>---
v2: also printsmem_len, as requested by David
v3: don't cast, as requested by Geertdrivers/video/simplefb.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/video/simplefb.c +1
-0@@ -220,6 +220,14 @@ static int simplefb_probe(struct platform_device *pdev) } info->pseudo_palette = (void *)(info +1 ); + dev_info(&pdev->dev, "framebuffer at 0x%lx, 0x%x bytes, mapped to 0x%p\n",
drivers/video/simplefb.c static int simplefb_probe(struct platform_device *pdev) · line 233
Quoted 10 lines
drivers/video/simplefb.c +7
-0+ info->fix.smem_start, info->fix.smem_len, + info->screen_base); +dev_info (&pdev->dev,"format=%s, mode=%dx%dx%d, linelength=%d\n" , + params.format->name, + info->var.xres, info->var.yres, + info->var.bits_per_pixel, info->fix.line_length); + ret =register_framebuffer (info);if (ret <0 ) {dev_err (&pdev->dev,"Unable to register simplefb: %d\n" , ret);
Thanks, queued for 3.13.
Tomi