[PATCH v3 09/11] powerpc/mpc5121: shared DIU framebuffer support

Grant Likely grant.likely at secretlab.ca
Wed Feb 17 05:06:22 EST 2010


On Fri, Feb 5, 2010 at 6:42 AM, Anatolij Gustschin <agust at denx.de> wrote:
> MPC5121 DIU configuration/setup as initialized by the boot
> loader currently will get lost while booting Linux. As a
> result displaying the boot splash is not possible through
> the boot process.
>
> To prevent this we reserve configured DIU frame buffer
> address range while booting and preserve AOI descriptor
> and gamma table so that DIU continues displaying through
> the whole boot process. On first open from user space
> DIU frame buffer driver releases the reserved frame
> buffer area and continues to operate as usual.
>
> The patch also moves drivers/video/fsl-diu-fb.h file to
> include/linux as we use some DIU structures in platform
> code.
>
> 'diu_ops' callbacks in platform code borrowed from John's
> DIU code.
>
> Signed-off-by: John Rigby <jrigby at gmail.com>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> Cc: Grant Likely <grant.likely at secretlab.ca>
> ---
[...]
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index 72d68b3..29c7f31 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -34,7 +34,7 @@
>  #include <linux/of_platform.h>
>
>  #include <sysdev/fsl_soc.h>
> -#include "fsl-diu-fb.h"
> +#include <linux/fsl-diu-fb.h>
>
>  /*
>  * These parameters give default parameters
> @@ -178,6 +178,21 @@ static struct fb_videomode __devinitdata fsl_diu_mode_db[] = {
>                .sync           = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
>                .vmode          = FB_VMODE_NONINTERLACED
>        },
> +       {
> +               .name           = "800x480-60",
> +               .refresh        = 60,
> +               .xres           = 800,
> +               .yres           = 480,
> +               .pixclock       = 31250,
> +               .left_margin    = 86,
> +               .right_margin   = 42,
> +               .upper_margin   = 33,
> +               .lower_margin   = 10,
> +               .hsync_len      = 128,
> +               .vsync_len      = 2,
> +               .sync           = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
> +               .vmode          = FB_VMODE_NONINTERLACED
> +       },
>  };

This hunk bothers me.  It looks like the type of data that belongs
either in some common shared .c file, or encoded into the device tree.
 It seems to be data about the display panel, instead of data about
the framebuffer driver.  I know that the driver already uses this
pattern, but before I merge this patch and further rely on that
pattern, I think it is worth discussing.

Kumar, York, thoughts?

g.


More information about the Linuxppc-dev mailing list