OMAP: DSS2: introduce generic panel display driver (try #6)
Subsystems (4)
cover OMAP: DSS2: introduce generic panel display driver (try #6)
There are 4 duplicated DPI panel drivers in DSS2 display driver. They are similar and a generic DPI panel driver can support all them with specific panel configuration. And new DPI panel driver can be easily supported by adding panel configurations into generic panel DPI driver.
This patchset introduces a generic panel DPI driver, remove 3 panel drivers and enable generic panel DPI driver in board files. And it is based on 2.6.37-rc1.
Building with omap2plus_defconfig is successful.
Keep sharp_ls_panel, since it contains blacklight control code which will be moved out later.
Bryan Wu (3):
OMAP: DSS2: Add generic DPI panel display driver
OMAP: use generic DPI panel driver in board files
OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers
arch/arm/mach-omap2/board-3430sdp.c | 12 +- arch/arm/mach-omap2/board-am3517evm.c | 23 +- arch/arm/mach-omap2/board-cm-t35.c | 23 +- arch/arm/mach-omap2/board-devkit8000.c | 26 +- arch/arm/mach-omap2/board-igep0020.c | 12 +- arch/arm/mach-omap2/board-omap3beagle.c | 12 +- arch/arm/mach-omap2/board-omap3evm.c | 12 +- arch/arm/mach-omap2/board-omap3stalker.c | 23 +- .../arm/plat-omap/include/plat/panel-generic-dpi.h | 37 +++ drivers/video/omap2/displays/Kconfig | 22 +- drivers/video/omap2/displays/Makefile | 4 +- drivers/video/omap2/displays/panel-generic-dpi.c | 333 ++++++++++++++++++++ drivers/video/omap2/displays/panel-generic.c | 174 ---------- .../video/omap2/displays/panel-sharp-lq043t1dg01.c | 165 ---------- .../video/omap2/displays/panel-toppoly-tdo35s.c | 164 ---------- 15 files changed, 482 insertions(+), 560 deletions(-) create mode 100644 arch/arm/plat-omap/include/plat/panel-generic-dpi.h create mode 100644 drivers/video/omap2/displays/panel-generic-dpi.c delete mode 100644 drivers/video/omap2/displays/panel-generic.c delete mode 100644 drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c delete mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
PATCH 1/3 OMAP: DSS2: Add generic DPI panel display driver
Generic DPI panel driver includes the driver and 4 similar panel configurations. It will match the panel name which is passed from platform data and setup the right configurations.
With generic DPI panel driver, we can remove those 4 duplicated panel display drivers. In the future, it is simple for us just add new panel configuration date in panel-generic-dpi.c to support new display panel.
--- .../arm/plat-omap/include/plat/panel-generic-dpi.h | 37 +++ drivers/video/omap2/displays/Kconfig | 8 + drivers/video/omap2/displays/Makefile | 1 + drivers/video/omap2/displays/panel-generic-dpi.c | 333 ++++++++++++++++++++ 4 files changed, 379 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-omap/include/plat/panel-generic-dpi.h create mode 100644 drivers/video/omap2/displays/panel-generic-dpi.c
arch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Header for generic DPI panel driver +* +* Copyright (C) 2010 Canonical Ltd. +* Author: Bryan Wu <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published by +* the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H +#define __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H + +#include "display.h" + +/** +* struct panel_generic_dpi_data - panel driver configuration data +* @name: panel name +* @platform_enable: platform specific panel enable function +* @platform_disable: platform specific panel disable function +*/ +struct panel_generic_dpi_data { +const char *name; +int (*platform_enable)(struct omap_dss_device *dssdev); +void (*platform_disable)(struct omap_dss_device *dssdev); +}; + +#endif /* __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H */
drivers/video/omap2/displays/Kconfig +8 -0
@@ -1,6 +1,14 @@ menu "OMAP2/3 Display Device Drivers" depends on OMAP2_DSS +config PANEL_GENERIC_DPI + tristate "Generic DPI Panel" + help + Generic DPI panel driver. + Supports DVI output for Beagle and OMAP3 SDP. + Supports LCD Panel used in TI SDP3430 and EVM boards, + OMAP3517 EVM boards and CM-T35. + config PANEL_GENERIC tristate "Generic Panel" help
drivers/video/omap2/displays/Makefile +1 -0
@@ -1,3 +1,4 @@ +obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
drivers/video/omap2/displays/panel-generic-dpi.c new file +333 -0
333 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/3 OMAP: DSS2: Add generic DPI panel display driver
Hi,
Quoted 237 lines · ext Bryan Wu
Generic DPI panel driver includes the driver and 4 similar panel configurations. It will match the panel name which is passed from platform data and setup the right configurations.
With generic DPI panel driver, we can remove those 4 duplicated panel display drivers. In the future, it is simple for us just add new panel configuration date in
panel-generic-dpi.cto support new display panel.Signed-off-by Bryan Wu <[email protected]>--- .../arm/plat-omap/include/plat/panel-generic-dpi.h | 37 +++ drivers/video/omap2/displays/Kconfig | 8 + drivers/video/omap2/displays/Makefile | 1 + drivers/video/omap2/displays/panel-generic-dpi.c | 333 ++++++++++++++++++++ 4 files changed, 379 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-omap/include/plat/panel-generic-dpi.h create mode 100644 drivers/video/omap2/displays/panel-generic-dpi.carch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +37
-0@@ -0,0 +1,37 @@ +/* +* Header for generic DPI panel driver +* +* Copyright (C) 2010 Canonical Ltd. +* Author: Bryan Wu <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published by +* the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H +#define __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H + +#include "display.h" + +/** +* struct panel_generic_dpi_data - panel driver configuration data +* @name: panel name +* @platform_enable: platform specific panel enable function +* @platform_disable: platform specific panel disable function +*/ +struct panel_generic_dpi_data { +const char *name; +int (*platform_enable)(struct omap_dss_device *dssdev); +void (*platform_disable)(struct omap_dss_device *dssdev); +}; + +#endif /* __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H */ drivers/video/omap2/displays/Kconfig +8
-0@@ -1,6 +1,14 @@ menu "OMAP2/3 Display Device Drivers" depends on OMAP2_DSS +config PANEL_GENERIC_DPI + tristate "Generic DPI Panel" + help + Generic DPI panel driver. + Supports DVI output for Beagle and OMAP3 SDP. + Supports LCD Panel used in TI SDP3430 and EVM boards, + OMAP3517 EVM boards and CM-T35. + config PANEL_GENERIC tristate "Generic Panel" helpdrivers/video/omap2/displays/Makefile +1
-0@@ -1,3 +1,4 @@ +obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.odrivers/video/omap2/displays/panel-generic-dpi.c new file +142
-0@@ -0,0 +1,333 @@ +/* +* Generic DPI Panels support +* +* Copyright (C) 2010 Canonical Ltd. +* Author: Bryan Wu <[email protected]> +* +* Copyright (C) 2008 Nokia Corporation +* Author: Tomi Valkeinen <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published by +* the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <linux/module.h> +#include <linux/delay.h> + +#include <plat/panel-generic-dpi.h> + +struct panel_config { +struct omap_video_timings timings; + +int acbi;/* ac-bias pin transitions per interrupt */ +/* Unit: line clocks */ +int acb;/* ac-bias pin frequency */ + +enum omap_panel_config config; + +int power_on_delay; +int power_off_delay; + +/* +* Used to match device to panel configuration +* when use generic panel driver +*/ +const char *name; +}; + +/* Panel configurations */ +static struct panel_config generic_dpi_panels[] = { +/* Generic Panel */ + { + { + .x_res =640 , + .y_res =480 , + + .pixel_clock =23500 , + + .hfp =48 , + .hsw =32 , + .hbp =80 , + + .vfp =3 , + .vsw =4 , + .vbp =7 , + }, + .acbi =0x0 , + .acb =0x0 , + .config =OMAP_DSS_LCD_TFT , + .power_on_delay =0 , + .power_off_delay =0 , + .name ="generic" , + }, + +/* Sharp LQ043T1DG01 */ + { + { + .x_res =480 , + .y_res =272 , + + .pixel_clock =9000 , + + .hsw =42 , + .hfp =3 , + .hbp =2 , + + .vsw =11 , + .vfp =3 , + .vbp =2 , + }, + .acbi =0x0 , + .acb =0x0 , + .config =OMAP_DSS_LCD_TFT |OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS |OMAP_DSS_LCD_IEO , + .power_on_delay =50 , + .power_off_delay =100 , + .name ="sharp_lq" , + }, + +/* Sharp LS037V7DW01 */ + { + { + .x_res =480 , + .y_res =640 , + + .pixel_clock =19200 , + + .hsw =2 , + .hfp =1 , + .hbp =28 , + + .vsw =1 , + .vfp =1 , + .vbp =1 , + }, + .acbi =0x0 , + .acb =0x28 , + .config =OMAP_DSS_LCD_TFT |OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS , + .power_on_delay =50 , + .power_off_delay =100 , + .name ="sharp_ls" , + }, + +/* Toppoly TDO35S */ + { + { + .x_res =480 , + .y_res =640 , + + .pixel_clock =26000 , + + .hfp =104 , + .hsw =8 , + .hbp =8 , + + .vfp =4 , + .vsw =2 , + .vbp =2 , + }, + .acbi =0x0 , + .acb =0x0 , + .config =OMAP_DSS_LCD_TFT |OMAP_DSS_LCD_IVS | + OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC |
drivers/video/omap2/displays/panel-generic-dpi.c line 152
Quoted 10 lines
drivers/video/omap2/displays/panel-generic-dpi.c new file +10
-0+ OMAP_DSS_LCD_ONOFF, + .power_on_delay = 0, + .power_off_delay = 0, + .name = "toppoly_tdo35s", + }, +}; + +static power_on_delay = 0; + +static power_off_delay = 0;
This is not right. There may be multiple panels in a single board, and these would be shared by both of the panels.
What you need to do is have a struct, which contains pointer to the panel configuration used with that particular dssdev, and set the struct with dev_set_drvdata().
Check panel-taal.c for an example. There's struct taal_data, which contains also quite a bit other data, but also a pointer to the panel config.
Tomi
PATCH 1/3 OMAP: DSS2: Add generic DPI panel display driver
Quoted 14 lines · Tomi Valkeinen
Hi,
Quoted 11 lines · ext Bryan Wu
Generic DPI panel driver includes the driver and 4 similar panel configurations. It will match the panel name which is passed from platform data and setup the right configurations.
With generic DPI panel driver, we can remove those 4 duplicated panel display drivers. In the future, it is simple for us just add new panel configuration date in
panel-generic-dpi.cto support new display panel.Signed-off-by Bryan Wu <[email protected]>---
?.../arm/plat-omap/include/plat/panel-generic-dpi.h | ? 37 +++
[snip]
Quoted 8 lines
drivers/video/omap2/displays/panel-generic-dpi.c line 152
Quoted 4 lines
drivers/video/omap2/displays/panel-generic-dpi.c new file +4
-0+ +static power_on_delay = 0; + +static power_off_delay = 0;This is not right. There may be multiple panels in a single board, and these would be shared by both of the panels.
Quoted 8 lines
What you need to do is have a struct, which contains pointer to the panel configuration used with that particular dssdev, and set the struct with
dev_set_drvdata().Check
panel-taal.cfor an example. There's structtaal_data, which contains also quite a bit other data, but also a pointer to the panel config.
Exactly, I just fixed it and sent the updated patchset.
Thanks,
Signature · 5 lines
Bryan Wu <[email protected]> Kernel Developer ? ?+86.138-1617-6545 Mobile Ubuntu Kernel Team Canonical Ltd. ? ? ?www.canonical.com Ubuntu - Linux for human beings | www.ubuntu.com
PATCH 2/3 OMAP: use generic DPI panel driver in board files
In reply to Bryan WuStill keep sharp_ls_panel, since the sharp_ls_panel driver contains blacklight control driver code which will be moved out later. Then we can use generic DPI driver for sharp_ls_panel.
--- arch/arm/mach-omap2/board-3430sdp.c | 12 +++++++++--- arch/arm/mach-omap2/board-am3517evm.c | 23 +++++++++++++++++------ arch/arm/mach-omap2/board-cm-t35.c | 23 +++++++++++++++++------ arch/arm/mach-omap2/board-devkit8000.c | 26 ++++++++++++++++++-------- arch/arm/mach-omap2/board-igep0020.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3beagle.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3evm.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3stalker.c | 23 +++++++++++++++++------ 8 files changed, 105 insertions(+), 38 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +9 -3
@@ -38,6 +38,7 @@#include <plat/dma.h> #include <plat/gpmc.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/gpmc-smc91x.h>
@@ -270,13 +271,18 @@ static struct omap_dss_device sdp3430_lcd_device = { .platform_disable = sdp3430_panel_disable_lcd, }; +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = sdp3430_panel_enable_dvi, + .platform_disable = sdp3430_panel_disable_dvi, +}; +static struct omap_dss_device sdp3430_dvi_device = { .name ="dvi" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = sdp3430_panel_enable_dvi, - .platform_disable = sdp3430_panel_disable_dvi, };static struct omap_dss_device sdp3430_tv_device = {
arch/arm/mach-omap2/board-am3517evm.c +17 -6
@@ -35,6 +35,7 @@#include <plat/common.h> #include <plat/usb.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include "mux.h" #include "control.h"
@@ -303,13 +304,18 @@ static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev) lcd_enabled =0 ; } +static struct panel_generic_dpi_data lcd_panel = { + .name ="sharp_lq" , + .platform_enable = am3517_evm_panel_enable_lcd, + .platform_disable = am3517_evm_panel_disable_lcd, +}; +static struct omap_dss_device am3517_evm_lcd_device = { .type =OMAP_DISPLAY_TYPE_DPI , .name ="lcd" , - .driver_name ="sharp_lq_panel" , + .driver_name ="generic_dpi_panel" , + .data = &lcd_panel, .phy.dpi.data_lines =16 , - .platform_enable = am3517_evm_panel_enable_lcd, - .platform_disable = am3517_evm_panel_disable_lcd, };static int am3517_evm_panel_enable_tv (struct omap_dss_device *dssdev)
@@ -346,13 +352,18 @@ static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev) dvi_enabled =0 ; } +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = am3517_evm_panel_enable_dvi, + .platform_disable = am3517_evm_panel_disable_dvi, +}; +static struct omap_dss_device am3517_evm_dvi_device = { .type =OMAP_DISPLAY_TYPE_DPI , .name ="dvi" , - .driver_name ="generic_panel" , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = am3517_evm_panel_enable_dvi, - .platform_disable = am3517_evm_panel_disable_dvi, };static struct omap_dss_device *am3517_evm_dss_devices[] = {
arch/arm/mach-omap2/board-cm-t35.c +17 -6
@@ -46,6 +46,7 @@#include <plat/gpmc.h> #include <plat/usb.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/mcspi.h> #include <mach/hardware.h>
@@ -351,22 +352,32 @@ static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev) { } +static struct panel_generic_dpi_data lcd_panel = { + .name ="toppoly_tdo35s" , + .platform_enable = cm_t35_panel_enable_lcd, + .platform_disable = cm_t35_panel_disable_lcd, +}; +static struct omap_dss_device cm_t35_lcd_device = { .name ="lcd" , - .driver_name ="toppoly_tdo35s_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &lcd_panel, .phy.dpi.data_lines =18 , - .platform_enable = cm_t35_panel_enable_lcd, - .platform_disable = cm_t35_panel_disable_lcd, +}; + +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = cm_t35_panel_enable_dvi, + .platform_disable = cm_t35_panel_disable_dvi, };static struct omap_dss_device cm_t35_dvi_device = { .name ="dvi" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = cm_t35_panel_enable_dvi, - .platform_disable = cm_t35_panel_disable_dvi, };static struct omap_dss_device cm_t35_tv_device = {
arch/arm/mach-omap2/board-devkit8000.c +18 -8
@@ -46,6 +46,7 @@#include <plat/nand.h> #include <plat/usb.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/mcspi.h> #include <linux/input/matrix_keypad.h>
@@ -149,23 +150,32 @@ static struct regulator_consumer_supply devkit8000_vmmc1_supply =static struct regulator_consumer_supply devkit8000_vio_supply =REGULATOR_SUPPLY ("vcc" ,"spi2.0" ); +static struct panel_generic_dpi_data lcd_panel = { + .name ="generic" , + .platform_enable = devkit8000_panel_enable_lcd, + .platform_disable = devkit8000_panel_disable_lcd, +}; +static struct omap_dss_device devkit8000_lcd_device = { .name ="lcd" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &lcd_panel, .phy.dpi.data_lines =24 , - .reset_gpio = -EINVAL ,/* will be replaced */ - .platform_enable = devkit8000_panel_enable_lcd, - .platform_disable = devkit8000_panel_disable_lcd, }; + +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = devkit8000_panel_enable_dvi, + .platform_disable = devkit8000_panel_disable_dvi, +}; +static struct omap_dss_device devkit8000_dvi_device = { .name ="dvi" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .reset_gpio = -EINVAL ,/* will be replaced */ - .platform_enable = devkit8000_panel_enable_dvi, - .platform_disable = devkit8000_panel_disable_dvi, };static struct omap_dss_device devkit8000_tv_device = {
arch/arm/mach-omap2/board-igep0020.c +9 -3
@@ -30,6 +30,7 @@#include <plat/gpmc.h> #include <plat/usb.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/onenand.h> #include "mux.h"
@@ -433,13 +434,18 @@ static void igep2_disable_dvi(struct omap_dss_device *dssdev)gpio_direction_output (IGEP2_GPIO_DVI_PUP ,0 ); } +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = igep2_enable_dvi, + .platform_disable = igep2_disable_dvi, +}; +static struct omap_dss_device igep2_dvi_device = { .type =OMAP_DISPLAY_TYPE_DPI , .name ="dvi" , - .driver_name ="generic_panel" , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = igep2_enable_dvi, - .platform_disable = igep2_disable_dvi, };static struct omap_dss_device *igep2_dss_devices[] = {
arch/arm/mach-omap2/board-omap3beagle.c +9 -3
@@ -41,6 +41,7 @@#include <plat/board.h> #include <plat/common.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/gpmc.h> #include <plat/nand.h> #include <plat/usb.h>
@@ -194,14 +195,19 @@ static void beagle_disable_dvi(struct omap_dss_device *dssdev)gpio_set_value (dssdev->reset_gpio,0 ); } +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = beagle_enable_dvi, + .platform_disable = beagle_disable_dvi, +}; +static struct omap_dss_device beagle_dvi_device = { .type =OMAP_DISPLAY_TYPE_DPI , .name ="dvi" , - .driver_name ="generic_panel" , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , .reset_gpio =170 , - .platform_enable = beagle_enable_dvi, - .platform_disable = beagle_disable_dvi, };static struct omap_dss_device beagle_tv_device = {
arch/arm/mach-omap2/board-omap3evm.c +9 -3
@@ -43,6 +43,7 @@#include <plat/common.h> #include <plat/mcspi.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include "mux.h" #include "sdram-micron-mt46h32m32lf-6.h"
@@ -301,13 +302,18 @@ static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) dvi_enabled =0 ; } +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = omap3_evm_enable_dvi, + .platform_disable = omap3_evm_disable_dvi, +}; +static struct omap_dss_device omap3_evm_dvi_device = { .name ="dvi" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = omap3_evm_enable_dvi, - .platform_disable = omap3_evm_disable_dvi, };static struct omap_dss_device *omap3_evm_dss_devices[] = {
arch/arm/mach-omap2/board-omap3stalker.c +17 -6
@@ -40,6 +40,7 @@#include <plat/nand.h> #include <plat/usb.h> #include <plat/display.h> +#include <plat/panel-generic-dpi.h> #include <plat/mcspi.h> #include <linux/input/matrix_keypad.h>
@@ -160,13 +161,18 @@ static void omap3_stalker_disable_lcd(struct omap_dss_device *dssdev) lcd_enabled =0 ; } +static struct panel_generic_dpi_data lcd_panel = { + .name ="generic" , + .platform_enable = omap3_stalker_enable_lcd, + .platform_disable = omap3_stalker_disable_lcd, +}; +static struct omap_dss_device omap3_stalker_lcd_device = { .name ="lcd" , - .driver_name ="generic_panel" , + .driver_name ="generic_dpi_panel" , + .data = &lcd_panel, .phy.dpi.data_lines =24 , .type =OMAP_DISPLAY_TYPE_DPI , - .platform_enable = omap3_stalker_enable_lcd, - .platform_disable = omap3_stalker_disable_lcd, };static int omap3_stalker_enable_tv (struct omap_dss_device *dssdev)
@@ -208,13 +214,18 @@ static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev) dvi_enabled =0 ; } +static struct panel_generic_dpi_data dvi_panel = { + .name ="generic" , + .platform_enable = omap3_stalker_enable_dvi, + .platform_disable = omap3_stalker_disable_dvi, +}; +static struct omap_dss_device omap3_stalker_dvi_device = { .name ="dvi" , - .driver_name ="generic_panel" , .type =OMAP_DISPLAY_TYPE_DPI , + .driver_name ="generic_dpi_panel" , + .data = &dvi_panel, .phy.dpi.data_lines =24 , - .platform_enable = omap3_stalker_enable_dvi, - .platform_disable = omap3_stalker_disable_dvi, };static struct omap_dss_device *omap3_stalker_dss_devices[] = {
Signature · 1 line
1.7.1
Tony Lindgren
maintainerPATCH 2/3 OMAP: use generic DPI panel driver in board files
Quoted 5 lines · Bryan Wu
Still keep
sharp_ls_panel, since thesharp_ls_paneldriver contains blacklight control driver code which will be moved out later. Then we can use generic DPI driver forsharp_ls_panel.Signed-off-by Bryan Wu <[email protected]>
Quoted 10 lines
--- arch/arm/mach-omap2/board-3430sdp.c | 12 +++++++++--- arch/arm/mach-omap2/board-am3517evm.c | 23 +++++++++++++++++------ arch/arm/mach-omap2/board-cm-t35.c | 23 +++++++++++++++++------ arch/arm/mach-omap2/board-devkit8000.c | 26 ++++++++++++++++++-------- arch/arm/mach-omap2/board-igep0020.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3beagle.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3evm.c | 12 +++++++++--- arch/arm/mach-omap2/board-omap3stalker.c | 23 +++++++++++++++++------ 8 files changed, 105 insertions(+), 38 deletions(-)
Here's my ack for these changes once Tomi is happy with the series:
PATCH 3/3 OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers
In reply to Bryan WuStill keep sharp_ls_panel driver, because it contains blacklight control driver.
--- drivers/video/omap2/displays/Kconfig | 18 -- drivers/video/omap2/displays/Makefile | 3 - drivers/video/omap2/displays/panel-generic.c | 174 -------------------- .../video/omap2/displays/panel-sharp-lq043t1dg01.c | 165 ------------------- .../video/omap2/displays/panel-toppoly-tdo35s.c | 164 ------------------ 5 files changed, 0 insertions(+), 524 deletions(-) delete mode 100644 drivers/video/omap2/displays/panel-generic.c delete mode 100644 drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c delete mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
drivers/video/omap2/displays/Kconfig +0 -18
@@ -9,12 +9,6 @@ config PANEL_GENERIC_DPI Supports LCD Panel used in TI SDP3430 and EVM boards, OMAP3517 EVM boards and CM-T35. -config PANEL_GENERIC - tristate "Generic Panel" - help - Generic panel driver. - Used for DVI output for Beagle and OMAP3 SDP. - config PANEL_SHARP_LS037V7DW01 tristate "Sharp LS037V7DW01 LCD Panel" depends on OMAP2_DSS
@@ -22,24 +16,12 @@ config PANEL_SHARP_LS037V7DW01 help LCD Panel used in TI's SDP3430 and EVM boards -config PANEL_SHARP_LQ043T1DG01 - tristate "Sharp LQ043T1DG01 LCD Panel" - depends on OMAP2_DSS - help - LCD Panel used in TI's OMAP3517 EVM boards - config PANEL_TAAL tristate "Taal DSI Panel" depends on OMAP2_DSS_DSI help Taal DSI command mode panel from TPO. -config PANEL_TOPPOLY_TDO35S - tristate "Toppoly TDO35S LCD Panel support" - depends on OMAP2_DSS - help - LCD Panel used in CM-T35 - config PANEL_TPO_TD043MTEA1 tristate "TPO TD043MTEA1 LCD Panel" depends on OMAP2_DSS && SPI
drivers/video/omap2/displays/Makefile +0 -3
@@ -1,9 +1,6 @@ obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o -obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o -obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o obj-$(CONFIG_PANEL_TAAL) += panel-taal.o -obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
drivers/video/omap2/displays/panel-generic.c deleted +0 -174
174 lines not on this page · raw message
drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c deleted +0 -165
165 lines not on this page · raw message
drivers/video/omap2/displays/panel-toppoly-tdo35s.c deleted +0 -164
164 lines not on this page · raw message
Signature · 1 line
1.7.1