lkml.org 
[lkml]   [2013]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] simplefb: print some info about the registered fb
From
Hi Tom

On Fri, Sep 6, 2013 at 1:49 PM, Tom Gundersen <teg@jklm.no> wrote:
> This is similar to the output printed by efifb.
>
> Signed-off-by: Tom Gundersen <teg@jklm.no>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: David Herrmann <dh.herrmann@gmail.com>
> ---
>
> Hi,
>
> Sorry for the resend, got the ml address wrong.
>
> -t
>
> drivers/video/simplefb.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
> index 8d78106..4196686 100644
> --- a/drivers/video/simplefb.c
> +++ b/drivers/video/simplefb.c
> @@ -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, (unsigned
long)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

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


\
 
 \ /
  Last update: 2013-09-07 13:41    [W:0.399 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site