Here are some patches for the i.MX framebuffer driver. They mainly prepare
the driver for use with other i.MX processors like the i.MX27.
Sascha
-------------------------------------------------------------------------
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=/
From: Juergen Beisert <redacted>
This patch prepares the current i.MX1 framebuffer driver for usage in the
whole i.MX family. It switches to iowrite/ioread for register accesses.
Also it moves the register definitions to the driver where they belong.
Signed-off-by: Juergen Beisert <redacted>
---
drivers/video/imxfb.c | 208 ++++++++++++++++++++++++++++++++++++++++---------
drivers/video/imxfb.h | 4 +-
2 files changed, 173 insertions(+), 39 deletions(-)
--
1.5.6.3
-------------------------------------------------------------------------
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=/
Remove the gpio mux setup function from i.MX framebuffer driver.
This function is platform specific and thus should be done by
the board setup. As there are currently no in-kernel users
of this driver we do not break anything.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/video/imxfb.c | 53 -------------------------------------------------
1 files changed, 0 insertions(+), 53 deletions(-)
@@ -357,57 +357,6 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *infreturn0;}-staticvoidimxfb_setup_gpio(structimxfb_info*fbi)-{-intwidth;--LCDC_RMCR&=~(RMCR_LCDC_EN|RMCR_SELF_REF);--if(fbi->pcr&PCR_TFT)-width=16;-else-width=1<<((fbi->pcr>>28)&0x3);--switch(width){-case16:-imx_gpio_mode(PD30_PF_LD15);-imx_gpio_mode(PD29_PF_LD14);-imx_gpio_mode(PD28_PF_LD13);-imx_gpio_mode(PD27_PF_LD12);-imx_gpio_mode(PD26_PF_LD11);-imx_gpio_mode(PD25_PF_LD10);-imx_gpio_mode(PD24_PF_LD9);-imx_gpio_mode(PD23_PF_LD8);-case8:-imx_gpio_mode(PD22_PF_LD7);-imx_gpio_mode(PD21_PF_LD6);-imx_gpio_mode(PD20_PF_LD5);-imx_gpio_mode(PD19_PF_LD4);-case4:-imx_gpio_mode(PD18_PF_LD3);-imx_gpio_mode(PD17_PF_LD2);-case2:-imx_gpio_mode(PD16_PF_LD1);-case1:-imx_gpio_mode(PD15_PF_LD0);-}--/* initialize GPIOs */-imx_gpio_mode(PD6_PF_LSCLK);-imx_gpio_mode(PD11_PF_CONTRAST);-imx_gpio_mode(PD14_PF_FLM_VSYNC);-imx_gpio_mode(PD13_PF_LP_HSYNC);-imx_gpio_mode(PD12_PF_ACD_OE);--/* These are only needed for Sharp HR TFT displays */-if(fbi->pcr&PCR_SHARP){-imx_gpio_mode(PD7_PF_REV);-imx_gpio_mode(PD8_PF_CLS);-imx_gpio_mode(PD9_PF_PS);-imx_gpio_mode(PD10_PF_SPL_SPR);-}-}-#ifdef CONFIG_PM/**Powermanagementhooks.Notethatwewon'tbecalledfromIRQcontext,
@@ -594,8 +543,6 @@ static int __init imxfb_probe(struct platform_device *pdev)if(ret<0)gotofailed_cmap;-imxfb_setup_gpio(fbi);-imxfb_set_par(info);ret=register_framebuffer(info);if(ret<0){
--
1.5.6.3
-------------------------------------------------------------------------
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=/
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(-)
@@ -648,7 +648,7 @@ static int __init imxfb_probe(struct platform_device *pdev)gotofailed_ioremap;}-if(!inf->fixed_screen_cpu){+if(!pdata->fixed_screen_cpu){ret=imxfb_map_video_memory(info);if(ret){dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);
@@ -657,8 +657,8 @@ static int __init imxfb_probe(struct platform_device *pdev)}}else{/* Fixed framebuffer mapping enables location of the screen in eSRAM */-fbi->map_cpu=inf->fixed_screen_cpu;-fbi->map_dma=inf->fixed_screen_dma;+fbi->map_cpu=pdata->fixed_screen_cpu;+fbi->map_dma=pdata->fixed_screen_dma;info->screen_base=fbi->map_cpu;fbi->screen_cpu=fbi->map_cpu;fbi->screen_dma=fbi->map_dma;
@@ -689,7 +689,7 @@ static int __init imxfb_probe(struct platform_device *pdev)failed_register:fb_dealloc_cmap(&info->cmap);failed_cmap:-if(!inf->fixed_screen_cpu)+if(!pdata->fixed_screen_cpu)dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu,fbi->map_dma);failed_map:
--
1.5.6.3
-------------------------------------------------------------------------
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=/
@@ -630,7 +632,7 @@ static int __init imxfb_probe(struct platform_device *pdev)platform_set_drvdata(pdev,info);ret=imxfb_init_fbinfo(pdev);-if(ret<0)+if(ret<0)gotofailed_init;res=request_mem_region(res->start,res->end-res->start+1,
@@ -669,7 +671,7 @@ static int __init imxfb_probe(struct platform_device *pdev)*/imxfb_check_var(&info->var,info);-ret=fb_alloc_cmap(&info->cmap,1<<info->var.bits_per_pixel,0);+ret=fb_alloc_cmap(&info->cmap,1<<info->var.bits_per_pixel,0);if(ret<0)gotofailed_cmap;
--
1.5.6.3
-------------------------------------------------------------------------
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=/
I don't like some of the changes like wrapping lines
which are not longer than 80 characters or removing
alignment vs previous line because it contains spaces.
There are also positive CS changes so not everything is bad.
@@ -630,7 +632,7 @@ static int __init imxfb_probe(struct platform_device *pdev)platform_set_drvdata(pdev,info);ret=imxfb_init_fbinfo(pdev);-if(ret<0)+if(ret<0)gotofailed_init;res=request_mem_region(res->start,res->end-res->start+1,
@@ -669,7 +671,7 @@ static int __init imxfb_probe(struct platform_device *pdev)*/imxfb_check_var(&info->var,info);-ret=fb_alloc_cmap(&info->cmap,1<<info->var.bits_per_pixel,0);+ret=fb_alloc_cmap(&info->cmap,1<<info->var.bits_per_pixel,0);if(ret<0)gotofailed_cmap;
--
1.5.6.3
-------------------------------------------------------------------------
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=/
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
----------------------------------------------------------------------
Taniej na zagraniczne komorki!
Sprawdz >>> http://link.interia.pl/f1ee3
-------------------------------------------------------------------------
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=/
From: Krzysztof Helt <hidden> Date: 2008-08-20 15:46:44
On Tue, 19 Aug 2008 17:06:40 +0200
Sascha Hauer [off-list ref] wrote:
Remove the gpio mux setup function from i.MX framebuffer driver.
This function is platform specific and thus should be done by
the board setup. As there are currently no in-kernel users
of this driver we do not break anything.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Acked-by: Krzysztof Helt <redacted>
This is patch type I like the most: only deletions.
Please number your patches with [PATCH 1/4], [PATCH 2/4], etc.
in next repost. Please also add line From: and description
to each patch.
@@ -357,57 +357,6 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *infreturn0;}-staticvoidimxfb_setup_gpio(structimxfb_info*fbi)-{-intwidth;--LCDC_RMCR&=~(RMCR_LCDC_EN|RMCR_SELF_REF);--if(fbi->pcr&PCR_TFT)-width=16;-else-width=1<<((fbi->pcr>>28)&0x3);--switch(width){-case16:-imx_gpio_mode(PD30_PF_LD15);-imx_gpio_mode(PD29_PF_LD14);-imx_gpio_mode(PD28_PF_LD13);-imx_gpio_mode(PD27_PF_LD12);-imx_gpio_mode(PD26_PF_LD11);-imx_gpio_mode(PD25_PF_LD10);-imx_gpio_mode(PD24_PF_LD9);-imx_gpio_mode(PD23_PF_LD8);-case8:-imx_gpio_mode(PD22_PF_LD7);-imx_gpio_mode(PD21_PF_LD6);-imx_gpio_mode(PD20_PF_LD5);-imx_gpio_mode(PD19_PF_LD4);-case4:-imx_gpio_mode(PD18_PF_LD3);-imx_gpio_mode(PD17_PF_LD2);-case2:-imx_gpio_mode(PD16_PF_LD1);-case1:-imx_gpio_mode(PD15_PF_LD0);-}--/* initialize GPIOs */-imx_gpio_mode(PD6_PF_LSCLK);-imx_gpio_mode(PD11_PF_CONTRAST);-imx_gpio_mode(PD14_PF_FLM_VSYNC);-imx_gpio_mode(PD13_PF_LP_HSYNC);-imx_gpio_mode(PD12_PF_ACD_OE);--/* These are only needed for Sharp HR TFT displays */-if(fbi->pcr&PCR_SHARP){-imx_gpio_mode(PD7_PF_REV);-imx_gpio_mode(PD8_PF_CLS);-imx_gpio_mode(PD9_PF_PS);-imx_gpio_mode(PD10_PF_SPL_SPR);-}-}-#ifdef CONFIG_PM/**Powermanagementhooks.Notethatwewon'tbecalledfromIRQcontext,
@@ -594,8 +543,6 @@ static int __init imxfb_probe(struct platform_device *pdev)if(ret<0)gotofailed_cmap;-imxfb_setup_gpio(fbi);-imxfb_set_par(info);ret=register_framebuffer(info);if(ret<0){
--
1.5.6.3
-------------------------------------------------------------------------
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=/
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
----------------------------------------------------------------------
Taniej na zagraniczne komorki!
Sprawdz >>> http://link.interia.pl/f1ee3
-------------------------------------------------------------------------
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=/
From: Krzysztof Helt <hidden> Date: 2008-08-20 15:51:56
On Tue, 19 Aug 2008 17:06:43 +0200
Sascha Hauer [off-list ref] wrote:
quoted hunk
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(-)
@@ -510,7 +510,7 @@ static int imxfb_resume(struct platform_device *dev)staticint__initimxfb_init_fbinfo(structplatform_device*pdev){-structimxfb_mach_info*inf=pdev->dev.platform_data;+structimx_fb_platform_data*pdata=pdev->dev.platform_data;structfb_info*info=dev_get_drvdata(&pdev->dev);structimxfb_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.
Otherwise, the patch is fine.
Regards,
Krzysztof
----------------------------------------------------------------------
Podbij Dziki Zachod, wygraj laptopa lub iPoda
-------------------------------------------------------------------------
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=/
From: Krzysztof Helt <hidden> Date: 2008-08-20 15:56:44
On Tue, 19 Aug 2008 17:06:41 +0200
Sascha Hauer [off-list ref] wrote:
quoted hunk
From: Juergen Beisert <redacted>
This patch prepares the current i.MX1 framebuffer driver for usage in the
whole i.MX family. It switches to iowrite/ioread for register accesses.
Also it moves the register definitions to the driver where they belong.
Signed-off-by: Juergen Beisert <redacted>
---
drivers/video/imxfb.c | 208 ++++++++++++++++++++++++++++++++++++++++---------
drivers/video/imxfb.h | 4 +-
2 files changed, 173 insertions(+), 39 deletions(-)
One may define an inline function imxfb_write(fbi, val, reg) :
imxfb_iowrite(fbi, val, reg)
{
iowrite32(val, fbi->regs + reg);
}
It would make the code more readable. The imxfb_ioread() could be used as well.
+ void __iomem *regs;
+
struct imxfb_rgb *rgb[NR_RGB];
u_int max_bpp;
--
1.5.6.3
-------------------------------------------------------------------------
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=/
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
----------------------------------------------------------------------
Igrzyska na Dzikim Zachodzie!
Sprawdz >> http://link.interia.pl/f1edc
-------------------------------------------------------------------------
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=/
I don't like some of the changes like wrapping lines
which are not longer than 80 characters or removing
alignment vs previous line because it contains spaces.
There are also positive CS changes so not everything is bad.
Hm, this patch only wraps lines longer than 80 characters (in one case
it even merges two lines to one because it's still shorter than 80
chars). It also does not remove alignment vs the previous line, instead
it aligns some lines against the previous line. Maybe reading whitespace
changes in patches is a bit confusing because the +/- at line starts
mess it up.
Sascha
--
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=/
On Wed, Aug 20, 2008 at 05:51:12PM +0200, Krzysztof Helt wrote:
On Tue, 19 Aug 2008 17:06:43 +0200
Sascha Hauer [off-list ref] wrote:
quoted
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(-)
@@ -510,7 +510,7 @@ static int imxfb_resume(struct platform_device *dev)staticint__initimxfb_init_fbinfo(structplatform_device*pdev){-structimxfb_mach_info*inf=pdev->dev.platform_data;+structimx_fb_platform_data*pdata=pdev->dev.platform_data;structfb_info*info=dev_get_drvdata(&pdev->dev);structimxfb_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
--
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=/
On Wed, Aug 20, 2008 at 05:31:59PM +0200, Krzysztof Helt wrote:
On Tue, 19 Aug 2008 17:06:41 +0200
Sascha Hauer [off-list ref] wrote:
quoted
From: Juergen Beisert <redacted>
This patch prepares the current i.MX1 framebuffer driver for usage in the
whole i.MX family. It switches to iowrite/ioread for register accesses.
Also it moves the register definitions to the driver where they belong.
Signed-off-by: Juergen Beisert <redacted>
---
drivers/video/imxfb.c | 208 ++++++++++++++++++++++++++++++++++++++++---------
drivers/video/imxfb.h | 4 +-
2 files changed, 173 insertions(+), 39 deletions(-)
All constants below should really be put into the imxfb.h. There is already such a file.
AFAIK the-new-beautiful-way is not to have these header files next to
the .c files at all and put this stuff into the .c file. So maybe it's
better to move the rest of imxfb.h here aswell.
Is it possible to use this driver without CONFIG_ARCH_IMX defined?
Oops, not yet. These are the differences between IMX and MX2, the
architecture I'm currently preparing this driver for. This shouldn't
show up in this patch of course.
>
One may define an inline function imxfb_write(fbi, val, reg) :
imxfb_iowrite(fbi, val, reg)
{
iowrite32(val, fbi->regs + reg);
}
It would make the code more readable. The imxfb_ioread() could be used as well.
Well, I think this is a matter of taste, I prefer not using wrappers
around the access functions.
ok
--
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=/
I don't like some of the changes like wrapping lines
which are not longer than 80 characters or removing
alignment vs previous line because it contains spaces.
There are also positive CS changes so not everything is bad.
Hm, this patch only wraps lines longer than 80 characters (in one case
it even merges two lines to one because it's still shorter than 80
chars).
The change around line 250 wraps 80 chars line.
@@ -250,7 +249,8 @@ imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, case FB_VISUAL_STATIC_PSEUDOCOLOR: case FB_VISUAL_PSEUDOCOLOR:- ret = imxfb_setpalettereg(regno, red, green, blue, trans, info);+ ret = imxfb_setpalettereg(regno, red, green, blue, trans,+ info); break; }
It also does not remove alignment vs the previous line, instead
it aligns some lines against the previous line.
The removed line was previously aligned to start after the "(" in the previous line.
One could move "static int" into the same line.
You have added spaces between sizeof operator and the opening parenthesis.
It is pointed out by the checkpatch script.
Maybe reading whitespace
changes in patches is a bit confusing because the +/- at line starts
mess it up.
The changes I pointed above are ones I don't like. They are not
bringing any benefit (nor better CS conformance nor readability).
However, I recognize your patch does more positive changes then these
pointed above. Also, my feelings toward some changes are my personal
opinion and I won't block the patch you have posted. I would like
to see the mentioned changes dropped but it is up to you.
Friendly regards,
Krzysztof
----------------------------------------------------------------------
Igrzyska na Dzikim Zachodzie!
Sprawdz >> http://link.interia.pl/f1edc
-------------------------------------------------------------------------
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=/
From: Krzysztof Helt <hidden> Date: 2008-08-20 17:36:38
On Wed, 20 Aug 2008 18:31:09 +0200
Sascha Hauer [off-list ref] wrote:
On Wed, Aug 20, 2008 at 05:31:59PM +0200, Krzysztof Helt wrote:
quoted
On Tue, 19 Aug 2008 17:06:41 +0200
Sascha Hauer [off-list ref] wrote:
quoted
From: Juergen Beisert <redacted>
This patch prepares the current i.MX1 framebuffer driver for usage in the
whole i.MX family. It switches to iowrite/ioread for register accesses.
Also it moves the register definitions to the driver where they belong.
Signed-off-by: Juergen Beisert <redacted>
---
drivers/video/imxfb.c | 208 ++++++++++++++++++++++++++++++++++++++++---------
drivers/video/imxfb.h | 4 +-
2 files changed, 173 insertions(+), 39 deletions(-)
All constants below should really be put into the imxfb.h. There is already such a file.
AFAIK the-new-beautiful-way is not to have these header files next to
the .c files at all and put this stuff into the .c file. So maybe it's
better to move the rest of imxfb.h here aswell.
I was not aware about "the-new-beautiful-way". I am just curious about this.
Normally, the headers for frame buffers are located at include/video.
It can stay this way (no header) if you insist.
One may define an inline function imxfb_write(fbi, val, reg) :
imxfb_iowrite(fbi, val, reg)
{
iowrite32(val, fbi->regs + reg);
}
It would make the code more readable. The imxfb_ioread() could be used as well.
Well, I think this is a matter of taste, I prefer not using wrappers
around the access functions.
Ok.
Regards,
Krzysztof
----------------------------------------------------------------------
Prosty kredyt na wszystkie potrzeby.
Od 1000 zl do 120 000 zl.
Bez poreczycieli i zabezpieczen >>> http://link.interia.pl/f1edf
-------------------------------------------------------------------------
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=/
On Wed, 20 Aug 2008 18:31:09 +0200
Sascha Hauer [off-list ref] wrote:
quoted
On Wed, Aug 20, 2008 at 05:31:59PM +0200, Krzysztof Helt wrote:
quoted
On Tue, 19 Aug 2008 17:06:41 +0200
Sascha Hauer [off-list ref] wrote:
quoted
+#define DRIVER_NAME "imx-fb"
+
All constants below should really be put into the imxfb.h. There is already such a file.
AFAIK the-new-beautiful-way is not to have these header files next to
the .c files at all and put this stuff into the .c file. So maybe it's
better to move the rest of imxfb.h here aswell.
I was not aware about "the-new-beautiful-way". I am just curious about this.
Normally, the headers for frame buffers are located at include/video.
It can stay this way (no header) if you insist.
If the header file is included by a single source file only, it doesn't
make much sense to have the separate header file.
include/video/ is for header files that are included by multiple source
files, some outside drivers/video/.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
-------------------------------------------------------------------------
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=/
I don't like some of the changes like wrapping lines
which are not longer than 80 characters or removing
alignment vs previous line because it contains spaces.
There are also positive CS changes so not everything is bad.
Hm, this patch only wraps lines longer than 80 characters (in one case
it even merges two lines to one because it's still shorter than 80
chars).
The change around line 250 wraps 80 chars line.
@@ -250,7 +249,8 @@ imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, case FB_VISUAL_STATIC_PSEUDOCOLOR: case FB_VISUAL_PSEUDOCOLOR:- ret = imxfb_setpalettereg(regno, red, green, blue, trans, info);+ ret = imxfb_setpalettereg(regno, red, green, blue, trans,+ info);
Ok, you're right. I just saw my cursor blinking on position 81, but of
course that means the line is 80 characters long. My bad
quoted hunk
break;
}
quoted
It also does not remove alignment vs the previous line, instead
it aligns some lines against the previous line.
The removed line was previously aligned to start after the "(" in the previous line.
One could move "static int" into the same line.
You have added spaces between sizeof operator and the opening parenthesis.
It is pointed out by the checkpatch script.
Ah, yes. This one I have copied from a Lindent run.
quoted
Maybe reading whitespace
changes in patches is a bit confusing because the +/- at line starts
mess it up.
The changes I pointed above are ones I don't like. They are not
bringing any benefit (nor better CS conformance nor readability).
However, I recognize your patch does more positive changes then these
pointed above. Also, my feelings toward some changes are my personal
opinion and I won't block the patch you have posted. I would like
to see the mentioned changes dropped but it is up to you.
I will rework it.
Regards,
Sascha
--
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=/