OMAP: DSS2: introduce generic panel display driver (try #8)
Subsystems (4)
cover OMAP: DSS2: introduce generic panel display driver (try #8)
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-rc2.
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 | 355 ++++++++++++++++++++ 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, 504 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 | 355 ++++++++++++++++++++ 4 files changed, 401 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 +355 -0
355 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/3 OMAP: DSS2: Add generic DPI panel display driver
Quoted 120 lines
-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Bryan Wu
Sent: Wednesday, November 17, 2010 7:05 PM
To: tomi.valkeinen at nokia.com; linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Gadiyar, Anand
Subject: [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driverGeneric 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 inpanel-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 | 355 ++++++++++++++++++++ 4 files changed, 401 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(quoted diff) +0
-0
a/arch/arm/plat-omap/include/plat/panel-generic-dpi.hb/arch/arm/plat-omap/include/plat/panel-generic-dpi.hnew file mode 100644
index 0000000..7906197arch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +7
-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/>.
+ */arch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +19
-0+ +#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 +0
-0
drivers/video/omap2/displays/panel-generic-dpi.c line 9
Quoted 9 lines
drivers/video/omap2/displays/panel-generic-dpi.c new file +9
-0@@ -0,0 +1,355 @@ +/* +* Generic DPI Panels support +* +* Copyright (C) 2010 Canonical Ltd. +* Author: Bryan Wu <[email protected]> +* +* Copyright (C) 2008 Nokia Corporation +* Author: Tomi Valkeinen <[email protected]> +*
[sp] Shouldn't all authors (from the files being coalesced) be
listed here.
I see this missing from PATCH3/3 in your series:
[quote]
- * LCD panel driver for Sharp LQ043T1DG01
- *
- * Copyright (C) 2009 Texas Instruments Inc
- * Author: Vaibhav Hiremath <[email protected]>
- *
[/quote]
[snip]...[snip]
PATCH 1/3 OMAP: DSS2: Add generic DPI panel display driver
Quoted 124 lines · Sanjeev
Quoted 124 lines
-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Bryan Wu
Sent: Wednesday, November 17, 2010 7:05 PM
To: tomi.valkeinen at nokia.com; linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Gadiyar, Anand
Subject: [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driverGeneric 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 inpanel-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 ? | ?355++++++++++++++++++++
?4 files changed, 401 insertions(+), 0 deletions(-) ?create mode 100644arch/arm/plat-omap/include/plat/panel-generic-dpi.h?create mode 100644drivers/video/omap2/displays/panel-generic-dpi.cdiff --git
a/arch/arm/plat-omap/include/plat/panel-generic-dpi.hb/arch/arm/plat-omap/include/plat/panel-generic-dpi.hnew file mode 100644
index 0000000..7906197arch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +7
-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/>.
+ */arch/arm/plat-omap/include/plat/panel-generic-dpi.h new file +19
-0+ +#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 +0
-0@@ -1,6 +1,14 @@?menu "OMAP2/3 Display Device Drivers"
? ? ? ? ?depends onOMAP2_DSSdrivers/video/omap2/displays/Kconfig +8
-0+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.o
drivers/video/omap2/displays/panel-generic-dpi.c new file +4
-0@@ -0,0 +1,355 @@ +/* +* Generic DPI Panels support +* +* Copyright (C) 2010 Canonical Ltd.
Quoted 9 lines
drivers/video/omap2/displays/panel-generic-dpi.c line 9
Quoted 5 lines
drivers/video/omap2/displays/panel-generic-dpi.c new file +5
-0+* Author: Bryan Wu <[email protected]> +* +* Copyright (C) 2008 Nokia Corporation +* Author: Tomi Valkeinen <[email protected]> +* [sp] Shouldn't all authors (from the files being coalesced) be ? ? listed here.
No problem, I will provide an incremental patch for Tomi.
-Bryan
Quoted 14 lines
? ? I see this missing from PATCH3/3 in your series:
[quote]
- * LCD panel driver for Sharp LQ043T1DG01
- *
- * Copyright (C) 2009 Texas Instruments Inc
- * Author: Vaibhav Hiremath <[email protected]>
- *
[/quote][snip]...[snip]
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
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
cover OMAP: DSS2: introduce generic panel display driver (try #8)
In reply to Bryan WuQuoted 10 lines · ext Bryan Wu
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-rc2.
Building with
omap2plus_defconfigis successful.
Quoted 7 lines
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
Thanks, looks good. This is now applied to my tree.
Are you also interested in solving the backlight issue? =)
Tomi
cover OMAP: DSS2: introduce generic panel display driver (try #8)
Quoted 14 lines · Tomi Valkeinen
Quoted 13 lines · ext Bryan Wu
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-rc2.
Building with
omap2plus_defconfigis successful.Keep
sharp_ls_panel, since it contains blacklight control code which will be moved out later.
Quoted 7 lines
Quoted 4 lines
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 driversThanks, looks good. This is now applied to my tree.
Thanks a lot for making this happen, -:))
Quoted 1 line
Are you also interested in solving the backlight issue? =)
Yeah, can I start with drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c. I plan to move the blacklight code to drivers/video/blacklight/ and let sharp_ls to use panel-generic-dpi.c driver.
-Bryan
cover OMAP: DSS2: introduce generic panel display driver (try #8)
Quoted 8 lines · ext Bryan Wu
On Wed, Nov 17, 2010 at 10:18 PM, Tomi Valkeinen
Quoted 1 line
Are you also interested in solving the backlight issue? =)
Yeah, can I start with
drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c. I plan to move the blacklight code todrivers/video/blacklight/and letsharp_lsto usepanel-generic-dpi.cdriver.
Yes, I think that's a good solution for the panels which have a separate backlight (ie. all these "dummy" panels"). However, I'm not sure how that would work for panels with more integrated backlight, for example Taal. But we don't need to worry about that right now.
Tomi
cover OMAP: DSS2: introduce generic panel display driver (try #8)
Quoted 10 lines · Tomi Valkeinen
Quoted 8 lines · ext Bryan Wu
On Wed, Nov 17, 2010 at 10:18 PM, Tomi Valkeinen
Quoted 1 line
Are you also interested in solving the backlight issue? =)
Yeah, can I start with
drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c. I plan to move the blacklight code todrivers/video/blacklight/and letsharp_lsto usepanel-generic-dpi.cdriver.
Quoted 5 lines
Yes, I think that's a good solution for the panels which have a separate backlight (ie. all these "dummy" panels"). However, I'm not sure how that would work for panels with more integrated backlight, for example Taal. But we don't need to worry about that right now.
As I'm working on the sharp-ls panel driver, I just find the backlight code is almost dummy functions which will call dssdev->set_backlight().
How about create platform driver for sharp-ls backlight driver? We pass those dssdev data from platform data struct.
Thanks a lot,
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