From: Sascha Hauer <s.hauer@pengutronix.de>
To: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] i.MX Framebuffer: rename imxfb_mach_info to imx_fb_platform_data
Date: Wed, 20 Aug 2008 18:18:00 +0200 [thread overview]
Message-ID: <20080820161800.GT4713@pengutronix.de> (raw)
In-Reply-To: <20080820175112.c49ef384.krzysztof.h1@poczta.fm>
On Wed, Aug 20, 2008 at 05:51:12PM +0200, Krzysztof Helt wrote:
> On Tue, 19 Aug 2008 17:06:43 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> > rename imxfb_mach_info to a name more common to kernel hackers
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > arch/arm/mach-imx/include/mach/imxfb.h | 5 +-
> > drivers/video/imxfb.c | 68 ++++++++++++++++----------------
> > 2 files changed, 37 insertions(+), 36 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/include/mach/imxfb.h b/arch/arm/mach-imx/include/mach/imxfb.h
> > index 3ed9ec8..ffcff5a 100644
> > --- a/arch/arm/mach-imx/include/mach/imxfb.h
> > +++ b/arch/arm/mach-imx/include/mach/imxfb.h
> > @@ -1,7 +1,7 @@
> > /*
> > * This structure describes the machine which we are running on.
> > */
> > -struct imxfb_mach_info {
> > +struct imx_fb_platform_data {
> > u_long pixclock;
> >
> > u_short xres;
> > @@ -34,4 +34,5 @@ struct imxfb_mach_info {
> > void (*lcd_power)(int);
> > void (*backlight_power)(int);
> > };
> > -void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info);
> > +
> > +void set_imx_fb_info(struct imx_fb_platform_data *);
> > diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> > index e450e6b..a4a4940 100644
> > --- a/drivers/video/imxfb.c
> > +++ b/drivers/video/imxfb.c
> > @@ -510,7 +510,7 @@ static int imxfb_resume(struct platform_device *dev)
> >
> > static int __init imxfb_init_fbinfo(struct platform_device *pdev)
> > {
> > - struct imxfb_mach_info *inf = pdev->dev.platform_data;
> > + struct imx_fb_platform_data *pdata = pdev->dev.platform_data;
> > struct fb_info *info = dev_get_drvdata(&pdev->dev);
> > struct imxfb_info *fbi = info->par;
> >
> > @@ -546,32 +546,32 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev)
> > fbi->rgb[RGB_16] = &def_rgb_16;
> > fbi->rgb[RGB_8] = &def_rgb_8;
> >
> > - fbi->max_xres = inf->xres;
> > - info->var.xres = inf->xres;
> > - info->var.xres_virtual = inf->xres;
> > - fbi->max_yres = inf->yres;
> > - info->var.yres = inf->yres;
> > - info->var.yres_virtual = inf->yres;
> > - fbi->max_bpp = inf->bpp;
> > - info->var.bits_per_pixel = inf->bpp;
> > - info->var.nonstd = inf->nonstd;
> > - info->var.pixclock = inf->pixclock;
> > - info->var.hsync_len = inf->hsync_len;
> > - info->var.left_margin = inf->left_margin;
> > - info->var.right_margin = inf->right_margin;
> > - info->var.vsync_len = inf->vsync_len;
> > - info->var.upper_margin = inf->upper_margin;
> > - info->var.lower_margin = inf->lower_margin;
> > - info->var.sync = inf->sync;
> > - info->var.grayscale = inf->cmap_greyscale;
> > - fbi->cmap_inverse = inf->cmap_inverse;
> > - fbi->cmap_static = inf->cmap_static;
> > - fbi->pcr = inf->pcr;
> > - fbi->lscr1 = inf->lscr1;
> > - fbi->dmacr = inf->dmacr;
> > - fbi->pwmr = inf->pwmr;
> > - fbi->lcd_power = inf->lcd_power;
> > - fbi->backlight_power = inf->backlight_power;
> > + fbi->max_xres = pdata->xres;
> > + info->var.xres = pdata->xres;
> > + info->var.xres_virtual = pdata->xres;
> > + fbi->max_yres = pdata->yres;
> > + info->var.yres = pdata->yres;
> > + info->var.yres_virtual = pdata->yres;
> > + fbi->max_bpp = pdata->bpp;
> > + info->var.bits_per_pixel = pdata->bpp;
>
> These max_foo fields seem redundant. Especially, the max_bpp.
> Most ARM chips can handle any bpp regardless the connected
> display (I don't know the iMX chips). Also, if resolution switching
> is not allowed (usual for LCD displays) max_xres/yres is also
> redundant.
Ok, I'll prepare another patch for this and let this one as is so that
it still only contains renaming.
Sascha
>
> Otherwise, the patch is fine.
>
> Regards,
> Krzysztof
>
> ----------------------------------------------------------------------
> Podbij Dziki Zachod, wygraj laptopa lub iPoda
> >> http://link.interia.pl/f1ede
>
>
--
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
next prev parent reply other threads:[~2008-08-20 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 15:06 i.MX Framebuffer patches Sascha Hauer
2008-08-19 15:06 ` [PATCH] i.MX Framebuffer: remove gpio setup function Sascha Hauer
2008-08-20 15:52 ` Krzysztof Helt
2008-08-19 15:06 ` [PATCH] i.MX Framebuffer: Use iowrite/ioread instead of direct pointer deref Sascha Hauer
2008-08-20 15:31 ` Krzysztof Helt
2008-08-20 16:31 ` Sascha Hauer
2008-08-20 17:42 ` Krzysztof Helt
2008-08-20 20:23 ` Geert Uytterhoeven
2008-08-19 15:06 ` [PATCH] i.MX Framebuffer: Cleanup Coding style Sascha Hauer
2008-08-20 15:35 ` Krzysztof Helt
2008-08-20 16:15 ` Sascha Hauer
2008-08-20 17:35 ` Krzysztof Helt
2008-08-21 7:13 ` Sascha Hauer
2008-08-19 15:06 ` [PATCH] i.MX Framebuffer: rename imxfb_mach_info to imx_fb_platform_data Sascha Hauer
2008-08-20 15:51 ` Krzysztof Helt
2008-08-20 16:18 ` Sascha Hauer [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-02 11:24 i.MX framebuffer patches Sascha Hauer
2008-09-02 11:24 ` [PATCH] i.MX Framebuffer: rename imxfb_mach_info to imx_fb_platform_data Sascha Hauer
2008-09-02 11:24 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080820161800.GT4713@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=krzysztof.h1@poczta.fm \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).