at91: atmel_lcdfb: regression fixes and cpu_is removal
Subsystems (6)
cover at91: atmel_lcdfb: regression fixes and cpu_is removal
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of cpu_is_xxxx() macros in atmel_lcdfb with a platform-device-id table and static configurations.
Patches from Johan Hovold taken from:
"[PATCH 0/3] atmel_lcdfb: fix 16-bpp regression"
and
"[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb: remove cpu_is macros" patch series to form a clean patch series with my signature.
Arnd, Olof,
as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?
Best regards,
Johan Hovold (5):
atmel_lcdfb: fix 16-bpp modes on older SOCs
ARM: at91/neocore926: fix LCD-wiring mode
ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
atmel_lcdfb: move lcdcon2 register access to compute_hozval
ARM: at91/avr32/atmel_lcdfb: add platform device-id table
arch/arm/mach-at91/at91sam9261.c | 2 + arch/arm/mach-at91/at91sam9261_devices.c | 6 +- arch/arm/mach-at91/at91sam9263.c | 1 + arch/arm/mach-at91/at91sam9263_devices.c | 2 +- arch/arm/mach-at91/at91sam9g45.c | 2 + arch/arm/mach-at91/at91sam9g45_devices.c | 6 +- arch/arm/mach-at91/at91sam9rl.c | 1 + arch/arm/mach-at91/at91sam9rl_devices.c | 2 +- arch/arm/mach-at91/board-neocore926.c | 2 +- arch/avr32/mach-at32ap/at32ap700x.c | 6 +- drivers/video/atmel_lcdfb.c | 130 ++++++++++++++++++++++++------- include/video/atmel_lcdc.h | 4 +- 12 files changed, 127 insertions(+), 37 deletions(-)
Signature · 1 line
1.8.0
PATCH 1/5 atmel_lcdfb: fix 16-bpp modes on older SOCs
From: Johan Hovold <[email protected]>
Fix regression introduced by commit 787f9fd23283 ("atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes") which broke 16-bpp modes for older SOCs which use IBGR:555 (msb is intensity) rather than BGR:565.
Use SOC-type to determine the pixel layout.
Tested on at91sam9263 and at91sam9g45.
--- drivers/video/atmel_lcdfb.c | 22 +++++++++++++++------- include/video/atmel_lcdc.h | 1 + 2 files changed, 16 insertions(+), 7 deletions(-)
drivers/video/atmel_lcdfb.c +15 -7
@@ -422,17 +422,22 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, = var->bits_per_pixel;break ;case 16 : +/* Older SOCs use IBGR:555 rather than BGR:565. */ +if (sinfo->have_intensity_bit) + var->green.length =5 ; +else + var->green.length =6 ; +if (sinfo->lcd_wiring_mode ==ATMEL_LCDC_WIRING_RGB ) { -/* RGB:565 mode */ - var->red.offset =11 ; +/* RGB:5X5 mode */ + var->red.offset = var->green.length +5 ; var->blue.offset =0 ; }else { -/* BGR:565 mode */ +/* BGR:5X5 mode */ var->red.offset =0 ; - var->blue.offset =11 ; + var->blue.offset = var->green.length +5 ; } var->green.offset =5 ; - var->green.length =6 ; var->red.length = var->blue.length =5 ;break ;case 32 :
@@ -679,8 +684,7 @@ static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red,case FB_VISUAL_PSEUDOCOLOR :if (regno <256 ) { -if (cpu_is_at91sam9261 () ||cpu_is_at91sam9263 () - ||cpu_is_at91sam9rl ()) { +if (sinfo->have_intensity_bit) {/* old style I+BGR:555 */ val = ((red >>11 ) &0x001f ); val |= ((green >>6 ) &0x03e0 );
@@ -870,6 +874,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) } sinfo->info = info; sinfo->pdev = pdev; +if (cpu_is_at91sam9261 () ||cpu_is_at91sam9263 () || +cpu_is_at91sam9rl ()) { + sinfo->have_intensity_bit = true; + }strcpy (info->fix.id, sinfo->pdev->name); info->flags =ATMEL_LCDFB_FBINFO_DEFAULT ;
include/video/atmel_lcdc.h +1 -0
@@ -62,6 +62,7 @@ struct atmel_lcdfb_info {void (*atmel_lcdfb_power_control)(int on);struct fb_monspecs *default_monspecs;u32 pseudo_palette[16 ]; +bool have_intensity_bit; };#define ATMEL_LCDC_DMABADDR1 0x00
Signature · 1 line
1.8.0
PATCH 2/5 ARM: at91/neocore926: fix LCD-wiring mode
In reply to Nicolas FerreFrom: Johan Hovold <[email protected]>
Fix regression introduced by commit 787f9fd23283 ("atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes") which broke 16-bpp modes for older SOCs which use IBGR:555 (msb is intensity) rather than BGR:565.
The above commit also removed the RGB:555-wiring hack without fixing the neocore926 board which used it. Fix by specifying RGB-wiring and let the driver handle the final SOC-dependant layout.
Remove the no longer used ATMEL_LCDC_WIRING_RGB555 define.
Compile-only tested.
--- arch/arm/mach-at91/board-neocore926.c | 2 +- include/video/atmel_lcdc.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-at91/board-neocore926.c +1 -1
@@ -266,7 +266,7 @@ static struct atmel_lcdfb_info __initdata neocore926_lcdc_data = { .default_monspecs = &at91fb_default_monspecs, .atmel_lcdfb_power_control = at91_lcdc_power_control, .guard_time = 1, - .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB555, + .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB, };#else
include/video/atmel_lcdc.h +0 -1
@@ -30,7 +30,6 @@*/ #define ATMEL_LCDC_WIRING_BGR 0#define ATMEL_LCDC_WIRING_RGB 1 -#define ATMEL_LCDC_WIRING_RGB555 2/* LCD Controller info data structure, stored in device platform_data */
Signature · 1 line
1.8.0
PATCH 3/5 ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
In reply to Nicolas FerreFrom: Johan Hovold <[email protected]>
Add hclk entry for the atmel_lcdfb bus clock.
On at91sam9261, at91sam9g10 and at32ap the bus clock has to be enabled as well as the peripheral clock. Add the appropriate lookup entries to these SOCs and fake clocks to the SOCs that do not use it.
This allows us to get rid of the conditional enabling of the clocks in the driver which relied on the cpu_is macros.
Tested on at91sam9263 and at91sam9g45, compile-tested for other AT91-SOCs, and untested for AVR32.
--- arch/arm/mach-at91/at91sam9261.c | 1 + arch/arm/mach-at91/at91sam9263.c | 1 + arch/arm/mach-at91/at91sam9g45.c | 1 + arch/arm/mach-at91/at91sam9rl.c | 1 + arch/avr32/mach-at32ap/at32ap700x.c | 4 ++-- drivers/video/atmel_lcdfb.c | 23 ++++++++--------------- 6 files changed, 14 insertions(+), 17 deletions(-)
arch/arm/mach-at91/at91sam9261.c +1 -0
@@ -169,6 +169,7 @@ static struct clk *periph_clocks[] __initdata = { };static struct clk_lookup periph_clocks_lookups[] = { +CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &hck1),CLKDEV_CON_DEV_ID ("spi_clk" ,"atmel_spi.0" , &spi0_clk),CLKDEV_CON_DEV_ID ("spi_clk" ,"atmel_spi.1" , &spi1_clk),CLKDEV_CON_DEV_ID ("t0_clk" ,"atmel_tcb.0" , &tc0_clk),
arch/arm/mach-at91/at91sam9263.c +1 -0
@@ -190,6 +190,7 @@ static struct clk_lookup periph_clocks_lookups[] = {CLKDEV_CON_DEV_ID ("pclk" ,"at91rm9200_ssc.1" , &ssc1_clk),CLKDEV_CON_DEV_ID ("pclk" ,"fff98000.ssc" , &ssc0_clk),CLKDEV_CON_DEV_ID ("pclk" ,"fff9c000.ssc" , &ssc1_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("mci_clk" ,"atmel_mci.0" , &mmc0_clk),CLKDEV_CON_DEV_ID ("mci_clk" ,"atmel_mci.1" , &mmc1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
arch/arm/mach-at91/at91sam9g45.c +1 -0
@@ -228,6 +228,7 @@ static struct clk_lookup periph_clocks_lookups[] = {CLKDEV_CON_ID ("hclk" , &macb_clk),/* One additional fake clock for ohci */ CLKDEV_CON_ID ("ohci_clk" , &uhphs_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("ehci_clk" ,"atmel-ehci" , &uhphs_clk),CLKDEV_CON_DEV_ID ("hclk" ,"atmel_usba_udc" , &utmi_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
arch/arm/mach-at91/at91sam9rl.c +1 -0
@@ -179,6 +179,7 @@ static struct clk *periph_clocks[] __initdata = { };static struct clk_lookup periph_clocks_lookups[] = { +CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("hclk" ,"atmel_usba_udc" , &utmi_clk),CLKDEV_CON_DEV_ID ("pclk" ,"atmel_usba_udc" , &udphs_clk),CLKDEV_CON_DEV_ID ("t0_clk" ,"atmel_tcb.0" , &tc0_clk),
arch/avr32/mach-at32ap/at32ap700x.c +2 -2
@@ -1453,7 +1453,7 @@ static struct resource atmel_lcdfb0_resource[] = { }, };DEFINE_DEV_DATA (atmel_lcdfb,0 ); -DEV_CLK (hck1, atmel_lcdfb0, hsb,7 ); +DEV_CLK (hclk, atmel_lcdfb0, hsb,7 );static struct clk atmel_lcdfb0_pixclk = { .name ="lcdc_clk" , .dev = &atmel_lcdfb0_device.dev,
@@ -2246,7 +2246,7 @@ static __initdata struct clk *init_clocks[] = { &atmel_twi0_pclk, &atmel_mci0_pclk,#if defined(CONFIG_CPU_AT32AP7000 ) || defined(CONFIG_CPU_AT32AP7002 ) - &atmel_lcdfb0_hck1, + &atmel_lcdfb0_hclk, &atmel_lcdfb0_pixclk, #endif &ssc0_pclk,
drivers/video/atmel_lcdfb.c +8 -15
@@ -821,15 +821,13 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)static void atmel_lcdfb_start_clock (struct atmel_lcdfb_info *sinfo) { -if (sinfo->bus_clk) -clk_enable (sinfo->bus_clk); +clk_enable (sinfo->bus_clk);clk_enable (sinfo->lcdc_clk); }static void atmel_lcdfb_stop_clock (struct atmel_lcdfb_info *sinfo) { -if (sinfo->bus_clk) -clk_disable (sinfo->bus_clk); +clk_disable (sinfo->bus_clk);clk_disable (sinfo->lcdc_clk); }
@@ -888,13 +886,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) info->fix = atmel_lcdfb_fix;/* Enable LCDC Clocks */ -if (cpu_is_at91sam9261 () ||cpu_is_at91sam9g10 () - ||cpu_is_at32ap7000 ()) { - sinfo->bus_clk =clk_get (dev,"hck1" ); -if (IS_ERR (sinfo->bus_clk)) { - ret =PTR_ERR (sinfo->bus_clk); - goto free_info; - } + sinfo->bus_clk =clk_get (dev,"hclk" ); +if (IS_ERR (sinfo->bus_clk)) { + ret =PTR_ERR (sinfo->bus_clk); + goto free_info; } sinfo->lcdc_clk =clk_get (dev,"lcdc_clk" );if (IS_ERR (sinfo->lcdc_clk)) {
@@ -1055,8 +1050,7 @@ stop_clk:atmel_lcdfb_stop_clock (sinfo);clk_put (sinfo->lcdc_clk); put_bus_clk: -if (sinfo->bus_clk) -clk_put (sinfo->bus_clk); +clk_put (sinfo->bus_clk); free_info:framebuffer_release (info); out:
@@ -1081,8 +1075,7 @@ static int __exit atmel_lcdfb_remove(struct platform_device *pdev)unregister_framebuffer (info);atmel_lcdfb_stop_clock (sinfo);clk_put (sinfo->lcdc_clk); -if (sinfo->bus_clk) -clk_put (sinfo->bus_clk); +clk_put (sinfo->bus_clk);fb_dealloc_cmap (&info->cmap);free_irq (sinfo->irq_base, info);iounmap (sinfo->mmio);
Signature · 1 line
1.8.0
PATCH 4/5 atmel_lcdfb: move lcdcon2 register access to compute_hozval
In reply to Nicolas FerreFrom: Johan Hovold <[email protected]>
Pass atmel_lcd_info structure to compute_hozval and only do the register access on SOCs that actually use it.
This will also simplify the removal of the cpu_is macros.
--- drivers/video/atmel_lcdfb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/video/atmel_lcdfb.c +5 -3
@@ -193,14 +193,17 @@ static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { .accel = FB_ACCEL_NONE, }; -static unsigned long compute_hozval (unsigned long xres,unsigned long lcdcon2) +static unsigned long compute_hozval (struct atmel_lcdfb_info *sinfo, +unsigned long xres) { +unsigned long lcdcon2;unsigned long value;if (!(cpu_is_at91sam9261 () ||cpu_is_at91sam9g10 () ||cpu_is_at32ap7000 ()))return xres; + lcdcon2 =lcdc_readl (sinfo,ATMEL_LCDC_LCDCON2 ); value = xres;if ((lcdcon2 &ATMEL_LCDC_DISTYPE ) !=ATMEL_LCDC_DISTYPE_TFT ) {/* STN display */
@@ -591,8 +594,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info)lcdc_writel (sinfo,ATMEL_LCDC_TIM2 , value);/* Horizontal value (aka line size) */ - hozval_linesz =compute_hozval (info->var.xres, -lcdc_readl (sinfo,ATMEL_LCDC_LCDCON2 )); + hozval_linesz =compute_hozval (sinfo, info->var.xres);/* Display size */ value = (hozval_linesz -1 ) <<ATMEL_LCDC_HOZVAL_OFFSET ;
Signature · 1 line
1.8.0
PATCH 5/5 ARM: at91/avr32/atmel_lcdfb: add platform device-id table
In reply to Nicolas FerreFrom: Johan Hovold <[email protected]>
Add platform device-id table in order to identify the controller and determine its configuration.
The currently used configuration parameters are:
have_alt_pixclock
- SOC uses an alternate pixel-clock calculation formula (at91sam9g45 non-ES)
have_hozval
- SOC has a HOZVAL field in LCDFRMCFG which is used to determine the linesize for STN displays (at91sam9261, at921sam9g10 and at32ap)
have_intensity_bit
- SOC uses IBGR:555 rather than BGR:565 16-bit pixel layout (at91sam9261, at91sam9263 and at91sam9rl)
This allows us to remove all the remaining uses of cpu_is macros from the driver.
Tested on at91sam9263 and at91sam9g45, compile-tested for other AT91-SOCs, and untested for AVR32.
--- arch/arm/mach-at91/at91sam9261.c | 3 +- arch/arm/mach-at91/at91sam9261_devices.c | 6 ++- arch/arm/mach-at91/at91sam9263.c | 2 +- arch/arm/mach-at91/at91sam9263_devices.c | 2 +- arch/arm/mach-at91/at91sam9g45.c | 3 +- arch/arm/mach-at91/at91sam9g45_devices.c | 6 ++- arch/arm/mach-at91/at91sam9rl.c | 2 +- arch/arm/mach-at91/at91sam9rl_devices.c | 2 +- arch/avr32/mach-at32ap/at32ap700x.c | 2 + drivers/video/atmel_lcdfb.c | 89 ++++++++++++++++++++++++++++---- include/video/atmel_lcdc.h | 4 +- 11 files changed, 102 insertions(+), 19 deletions(-)
arch/arm/mach-at91/at91sam9261.c +2 -1
@@ -169,7 +169,8 @@ static struct clk *periph_clocks[] __initdata = { };static struct clk_lookup periph_clocks_lookups[] = { -CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &hck1), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9261-lcdfb.0" , &hck1), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9g10-lcdfb.0" , &hck1),CLKDEV_CON_DEV_ID ("spi_clk" ,"atmel_spi.0" , &spi0_clk),CLKDEV_CON_DEV_ID ("spi_clk" ,"atmel_spi.1" , &spi1_clk),CLKDEV_CON_DEV_ID ("t0_clk" ,"atmel_tcb.0" , &tc0_clk),
arch/arm/mach-at91/at91sam9261_devices.c +5 -1
@@ -488,7 +488,6 @@ static struct resource lcdc_resources[] = { };static struct platform_device at91_lcdc_device = { - .name ="atmel_lcdfb" , .id =0 , .dev = { .dma_mask = &lcdc_dmamask,
@@ -505,6 +504,11 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)return ; } +if (cpu_is_at91sam9g10 ()) + at91_lcdc_device.name ="at91sam9g10-lcdfb" ; +else + at91_lcdc_device.name ="at91sam9261-lcdfb" ; +#if defined(CONFIG_FB_ATMEL_STN )at91_set_A_periph (AT91_PIN_PB0 ,0 );/* LCDVSYNC */ at91_set_A_periph (AT91_PIN_PB1 ,0 );/* LCDHSYNC */
arch/arm/mach-at91/at91sam9263.c +1 -1
@@ -190,7 +190,7 @@ static struct clk_lookup periph_clocks_lookups[] = {CLKDEV_CON_DEV_ID ("pclk" ,"at91rm9200_ssc.1" , &ssc1_clk),CLKDEV_CON_DEV_ID ("pclk" ,"fff98000.ssc" , &ssc0_clk),CLKDEV_CON_DEV_ID ("pclk" ,"fff9c000.ssc" , &ssc1_clk), -CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9263-lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("mci_clk" ,"atmel_mci.0" , &mmc0_clk),CLKDEV_CON_DEV_ID ("mci_clk" ,"atmel_mci.1" , &mmc1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
@@ -848,7 +848,7 @@ static struct resource lcdc_resources[] = { };static struct platform_device at91_lcdc_device = { - .name ="atmel_lcdfb" , + .name ="at91sam9263-lcdfb" , .id =0 , .dev = { .dma_mask = &lcdc_dmamask,
arch/arm/mach-at91/at91sam9g45.c +2 -1
@@ -228,7 +228,8 @@ static struct clk_lookup periph_clocks_lookups[] = {CLKDEV_CON_ID ("hclk" , &macb_clk),/* One additional fake clock for ohci */ CLKDEV_CON_ID ("ohci_clk" , &uhphs_clk), -CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9g45-lcdfb.0" , &lcdc_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9g45es-lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("ehci_clk" ,"atmel-ehci" , &uhphs_clk),CLKDEV_CON_DEV_ID ("hclk" ,"atmel_usba_udc" , &utmi_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
arch/arm/mach-at91/at91sam9g45_devices.c +5 -1
@@ -981,7 +981,6 @@ static struct resource lcdc_resources[] = { };static struct platform_device at91_lcdc_device = { - .name ="atmel_lcdfb" , .id =0 , .dev = { .dma_mask = &lcdc_dmamask,
@@ -997,6 +996,11 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)if (!data)return ; +if (cpu_is_at91sam9g45es ()) + at91_lcdc_device.name ="at91sam9g45es-lcdfb" ; +else + at91_lcdc_device.name ="at91sam9g45-lcdfb" ; +at91_set_A_periph (AT91_PIN_PE0 ,0 );/* LCDDPWR */ at91_set_A_periph (AT91_PIN_PE2 ,0 );/* LCDCC */
arch/arm/mach-at91/at91sam9rl.c +1 -1
@@ -179,7 +179,7 @@ static struct clk *periph_clocks[] __initdata = { };static struct clk_lookup periph_clocks_lookups[] = { -CLKDEV_CON_DEV_ID ("hclk" ,"atmel_lcdfb.0" , &lcdc_clk), +CLKDEV_CON_DEV_ID ("hclk" ,"at91sam9rl-lcdfb.0" , &lcdc_clk),CLKDEV_CON_DEV_ID ("hclk" ,"atmel_usba_udc" , &utmi_clk),CLKDEV_CON_DEV_ID ("pclk" ,"atmel_usba_udc" , &udphs_clk),CLKDEV_CON_DEV_ID ("t0_clk" ,"atmel_tcb.0" , &tc0_clk),
arch/arm/mach-at91/at91sam9rl_devices.c +1 -1
@@ -514,7 +514,7 @@ static struct resource lcdc_resources[] = { };static struct platform_device at91_lcdc_device = { - .name ="atmel_lcdfb" , + .name ="at91sam9rl-lcdfb" , .id =0 , .dev = { .dma_mask = &lcdc_dmamask,
arch/avr32/mach-at32ap/at32ap700x.c +2 -0
@@ -1530,6 +1530,8 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,memcpy (info, data,sizeof (struct atmel_lcdfb_info )); info->default_monspecs = monspecs; + pdev->name ="at32ap-lcdfb" ; +platform_device_register (pdev);return pdev;
drivers/video/atmel_lcdfb.c +79 -10
131 lines not on this page · raw message
include/video/atmel_lcdc.h +3 -1
@@ -31,6 +31,7 @@#define ATMEL_LCDC_WIRING_BGR 0#define ATMEL_LCDC_WIRING_RGB 1 +struct atmel_lcdfb_config ;/* LCD Controller info data structure, stored in device platform_data */ struct atmel_lcdfb_info {
@@ -61,7 +62,8 @@ struct atmel_lcdfb_info {void (*atmel_lcdfb_power_control)(int on);struct fb_monspecs *default_monspecs;u32 pseudo_palette[16 ]; -bool have_intensity_bit; + +struct atmel_lcdfb_config *config; };#define ATMEL_LCDC_DMABADDR1 0x00
Signature · 1 line
1.8.0
HI,
on all
Best Regards,
J.
Quoted 45 lines · Nicolas Ferre
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from:
"[PATCH 0/3]atmel_lcdfb: fix 16-bpp regression"
and
"[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb: removecpu_ismacros" patch series to form a clean patch series with my signature.Arnd, Olof,
as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?Best regards,
Johan Hovold (5):
atmel_lcdfb: fix 16-bpp modes on older SOCs
ARM: at91/neocore926: fix LCD-wiring mode
ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
atmel_lcdfb: move lcdcon2 register access tocompute_hozval
ARM: at91/avr32/atmel_lcdfb: add platform device-id tablearch/arm/mach-at91/at91sam9261.c | 2 + arch/arm/mach-at91/at91sam9261_devices.c | 6 +- arch/arm/mach-at91/at91sam9263.c | 1 + arch/arm/mach-at91/at91sam9263_devices.c | 2 +- arch/arm/mach-at91/at91sam9g45.c | 2 + arch/arm/mach-at91/at91sam9g45_devices.c | 6 +- arch/arm/mach-at91/at91sam9rl.c | 1 + arch/arm/mach-at91/at91sam9rl_devices.c | 2 +- arch/arm/mach-at91/board-neocore926.c | 2 +- arch/avr32/mach-at32ap/at32ap700x.c | 6 +- drivers/video/atmel_lcdfb.c | 130 ++++++++++++++++++++++++------- include/video/atmel_lcdc.h | 4 +- 12 files changed, 127 insertions(+), 37 deletions(-)Signature · 1 line
1.8.0
Quoted 14 lines · Nicolas Ferre
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from:
"[PATCH 0/3]atmel_lcdfb: fix 16-bpp regression"
and
"[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb: removecpu_ismacros" patch series to form a clean patch series with my signature.
Quoted 4 lines
Arnd, Olof,
as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?
It would be beneficial to get an ack from Florian. Was he involved in the review of the code that regressed 16-bpp support in the first place? When was the regression introduced?
-Olof
Quoted 16 lines · Olof Johansson
Quoted 15 lines · Nicolas Ferre
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from: "[PATCH 0/3]
atmel_lcdfb: fix 16-bpp regression" and "[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb:
removecpu_ismacros" patch series to form a clean patch series with my signature.
Quoted 7 lines
Quoted 3 lines
Arnd, Olof, as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?
It would be beneficial to get an ack from Florian. Was he involved in the review of the code that regressed 16-bpp support in the first place? When was the regression introduced?
In v3.4 by commit 787f9fd2328 ("atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes").
Johan
On 02/10/2013 07:45 PM, Johan Hovold :
Quoted 21 lines · Olof Johansson
Quoted 20 lines · Nicolas Ferre
Quoted 18 lines
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from: "[PATCH 0/3]
atmel_lcdfb: fix 16-bpp regression" and "[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb:
removecpu_ismacros" patch series to form a clean patch series with my signature.Arnd, Olof, as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?
Quoted 6 lines
Quoted 3 lines
It would be beneficial to get an ack from Florian. Was he involved in the review of the code that regressed 16-bpp support in the first place? When was the regression introduced?
In v3.4 by commit
787f9fd2328("atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes").
Arnd, Olof,
Please tell me if I can do something to ease the adoption of these patches during 3.9-rc timeframe (I can rebase it on top of 3.9-rc1 to avoid any conflict: the file board-neocore926.c was removed during the merge window).
Johan has written the series a long time ago and we still do not have it in mainline.
If the option to ask Andrew is better in your opinion, please tell me.
Best regards,
Signature · 1 line
Nicolas Ferre
On 03/08/2013 10:37 AM, Nicolas Ferre :
Quoted 31 lines
On 02/10/2013 07:45 PM, Johan Hovold :
Quoted 21 lines · Olof Johansson
Quoted 20 lines · Nicolas Ferre
Quoted 18 lines
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from: "[PATCH 0/3]
atmel_lcdfb: fix 16-bpp regression" and "[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb:
removecpu_ismacros" patch series to form a clean patch series with my signature.Arnd, Olof, as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?
Quoted 6 lines
Quoted 3 lines
It would be beneficial to get an ack from Florian. Was he involved in the review of the code that regressed 16-bpp support in the first place? When was the regression introduced?
In v3.4 by commit
787f9fd2328("atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes").Arnd, Olof,
Quoted 8 lines
Please tell me if I can do something to ease the adoption of these patches during 3.9-rc timeframe (I can rebase it on top of 3.9-rc1 to avoid any conflict: the file
board-neocore926.cwas removed during the merge window).
Johan has written the series a long time ago and we still do not have it in mainline.If the option to ask Andrew is better in your opinion, please tell me.
In case we end-up with an agreement on the path those fixes should follow, here is the location of my updated material rebased on top of 3.9-rc2:
The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9:
Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)
are available in the git repository at:
git://github.com/at91linux/linux-at91.git at91-3.9-fixesLCD
for you to fetch changes up to bbd44f6bd9d1aa735b180b29b5719d63a8e87b55:
ARM: at91/avr32/atmel_lcdfb: add platform device-id table (2013-03-13 11:05:12 +0100)
----------------------------------------------------------------
Johan Hovold (5):
atmel_lcdfb: fix 16-bpp modes on older SOCs
ARM: at91: fix LCD-wiring mode
ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
atmel_lcdfb: move lcdcon2 register access to compute_hozval
ARM: at91/avr32/atmel_lcdfb: add platform device-id table
arch/arm/mach-at91/at91sam9261.c | 2 + arch/arm/mach-at91/at91sam9261_devices.c | 6 +- arch/arm/mach-at91/at91sam9263.c | 1 + arch/arm/mach-at91/at91sam9263_devices.c | 2 +- arch/arm/mach-at91/at91sam9g45.c | 2 + arch/arm/mach-at91/at91sam9g45_devices.c | 6 +- arch/arm/mach-at91/at91sam9rl.c | 1 + arch/arm/mach-at91/at91sam9rl_devices.c | 2 +- arch/avr32/mach-at32ap/at32ap700x.c | 6 +- drivers/video/atmel_lcdfb.c | 130 +++++++++++++++++++++++++++-------- include/video/atmel_lcdc.h | 4 +- 11 files changed, 126 insertions(+), 36 deletions(-)
Thanks, best regards,
Signature · 1 line
Nicolas Ferre
Quoted 15 lines · Nicolas Ferre
In case we end-up with an agreement on the path those fixes should follow, here is the location of my updated material rebased on top of 3.9-rc2:
The following changes since commit
f6161aa153581da4a3867a2d1a7caf4be19b6ec9:Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)
are available in the git repository at:
git://github.com/at91linux/linux-at91.gitat91-3.9-fixesLCDfor you to fetch changes up to
bbd44f6bd9d1aa735b180b29b5719d63a8e87b55:ARM: at91/avr32/atmel_lcdfb: add platform device-id table (2013-03-13 11:05:12 +0100)
Quoted 8 lines
----------------------------------------------------------------
Johan Hovold (5):
atmel_lcdfb: fix 16-bpp modes on older SOCs
ARM: at91: fix LCD-wiring mode
ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
atmel_lcdfb: move lcdcon2 register access tocompute_hozval
ARM: at91/avr32/atmel_lcdfb: add platform device-id table
I have merged the first two patches into the fixes branch now, from up to commit 67cf9c0a. Please resubmit the remaining ones on top of this commit for 3.10, either through arm-soc or through the framebuffer tree.
Arnd
On 03/15/2013 12:03 AM, Arnd Bergmann :
Quoted 25 lines · Nicolas Ferre
Quoted 15 lines
In case we end-up with an agreement on the path those fixes should follow, here is the location of my updated material rebased on top of 3.9-rc2:
The following changes since commit
f6161aa153581da4a3867a2d1a7caf4be19b6ec9:Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)
are available in the git repository at:
git://github.com/at91linux/linux-at91.gitat91-3.9-fixesLCDfor you to fetch changes up to
bbd44f6bd9d1aa735b180b29b5719d63a8e87b55:ARM: at91/avr32/atmel_lcdfb: add platform device-id table (2013-03-13 11:05:12 +0100)
Quoted 8 lines
----------------------------------------------------------------
Johan Hovold (5):
atmel_lcdfb: fix 16-bpp modes on older SOCs
ARM: at91: fix LCD-wiring mode
ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
atmel_lcdfb: move lcdcon2 register access tocompute_hozval
ARM: at91/avr32/atmel_lcdfb: add platform device-id table
Quoted 3 lines
I have merged the first two patches into the fixes branch now, from up to commit
67cf9c0a. Please resubmit the remaining ones on top of this commit for 3.10, either through arm-soc or through the framebuffer tree.
Thanks a lot.
I have just sent the pull-request for remaining material. Tell me if it is what you've expected.
Best regards,
Signature · 1 line
Nicolas Ferre
Quoted 15 lines · Olof Johansson
Quoted 14 lines · Nicolas Ferre
These patches fix a regression in 16-bpp support for older SOCs which use IBGR:555 rather than BGR:565 pixel layout. Use SOC-type to determine if the controller uses the intensity-bit and restore the old layout in that case.
The last patch is a removal of uses of
cpu_is_xxxx()macros inatmel_lcdfbwith a platform-device-id table and static configurations.Patches from Johan Hovold taken from:
"[PATCH 0/3]atmel_lcdfb: fix 16-bpp regression"
and
"[PATCH v2 0/3] ARM: at91/avr32/atmel_lcdfb: removecpu_ismacros" patch series to form a clean patch series with my signature.
Quoted 8 lines
Quoted 4 lines
Arnd, Olof,
as it seems that old fbdev drivers are not so much reviewed those days, can we take the decision to queue this material through arm-soc with other AT91 drivers updates?It would be beneficial to get an ack from Florian. Was he involved in the review of the code that regressed 16-bpp support in the first place? When was the regression introduced?
Thought I'd send a reminder about these fixes. Has anyone picked them up for 3.9-rc?
Thanks,
Johan