Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [GIT PULL] fbdev changes for 3.8
From: Felipe Balbi @ 2012-12-17 10:05 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Dave Jones, Linus Torvalds, Tomi Valkeinen, linux-omap,
	linux-fbdev, linux-kernel, Florian Tobias Schandinat,
	Dmitry Torokhov, Felipe Balbi, Evgeniy Polyakov, Arnd Bergmann
In-Reply-To: <20121216203536.GR4989@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 4094 bytes --]

Hi,

On Sun, Dec 16, 2012 at 12:35:37PM -0800, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [121216 09:49]:
> > * Dave Jones <davej@redhat.com> [121215 14:27]:
> > > On Sat, Dec 15, 2012 at 01:11:04PM -0800, Linus Torvalds wrote:
> > >  > On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > >  > > Hi Linus,
> > >  > >
> > >  > > Florian, the fbdev maintainer, has been very busy lately, so I offered to send
> > >  > > the pull request for fbdev for this merge window.
> > >  > 
> > >  > Pulled. However, with this I get the Kconfig question
> > >  > 
> > >  >    OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)
> > >  > 
> > >  > which doesn't make a whole lot of sense on x86-64, unless there's
> > >  > something about OMAP2 that I don't know.
> > >  > 
> > >  > So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
> > >  > least ARM. Because showing it to anybody else seems insane.
> > >  > 
> > >  > Same goes for FB_OMAP2 for that matter. I realize that it's likely
> > >  > nice to get compile testing for this on x86-64 too, but if that's the
> > >  > intent, we need to think about it some more. I don't think it's good
> > >  > to ask actual normal users questions like this just for compile
> > >  > coverage.
> > > 
> > > This OMAP stuff has been creeping into x86 builds for a while.
> > > Grep from my current build config ..
> > > 
> > > # CONFIG_OMAP_OCP2SCP is not set
> > > # CONFIG_KEYBOARD_OMAP4 is not set
> > > # CONFIG_OMAP2_DSS is not set
> > > # CONFIG_OMAP_USB2 is not set
> > > 
> > > There was some other arm-ism that does the same that I' currently forgetting,
> > > or maybe that got fixed..
> > 
> > Those are all omap internal devices and should be all marked with
> > depends on ARCH_OMAP2PLUS.
> > 
> > It's a different story for external devices that may be used on other
> > architectures.
> > 
> > I only came up with one reason to compile internal devices for other
> > architectures: In some cases the driver subsystem maintainer may want to
> > be able to compile test subsystem wide changes without having to compile
> > for each target separately. But for those cases it's trivial to carry a
> > compile test patch that just drops the depends Kconfig entries.
> 
> And here's a patch to limit the omap drivers above to omap only.
> 
> Regards,
> 
> Tony
> 
> 
> From: Tony Lindgren <tony@atomide.com>
> Date: Sun, 16 Dec 2012 12:28:46 -0800
> Subject: [PATCH] ARM: OMAP: Fix drivers to depend on omap for internal devices
> 
> These devices are not available on other architectures, so
> let's limit them to omap.
> 
> If the driver subsystem maintainers want to build test
> system wide changes without building for each target,
> it's easy to carry a test patch that just strips out the
> depends entries from Kconfig files.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -6,6 +6,7 @@ menu "Bus devices"
>  
>  config OMAP_OCP2SCP
>  	tristate "OMAP OCP2SCP DRIVER"
> +	depends on ARCH_OMAP2PLUS
>  	help
>  	  Driver to enable ocp2scp module which transforms ocp interface
>  	  protocol to scp protocol. In OMAP4, USB PHY is connected via
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -544,6 +544,7 @@ config KEYBOARD_OMAP
>  
>  config KEYBOARD_OMAP4
>  	tristate "TI OMAP4+ keypad support"
> +	depends on ARCH_OMAP2PLUS
>  	select INPUT_MATRIXKMAP
>  	help
>  	  Say Y here if you want to use the OMAP4+ keypad.
> --- a/drivers/usb/phy/Kconfig
> +++ b/drivers/usb/phy/Kconfig
> @@ -6,6 +6,7 @@ comment "USB Physical Layer drivers"
>  
>  config OMAP_USB2
>  	tristate "OMAP USB2 PHY Driver"
> +	depends on ARCH_OMAP2PLUS
>  	select USB_OTG_UTILS
>  	help
>  	  Enable this to support the transceiver that is part of SOC. This

for Keypad, PHY and OCP2SCP I would rather not as I want to use
linux-next for compile testing our stuff in all arches.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [GIT PULL] fbdev changes for 3.8
From: Tomi Valkeinen @ 2012-12-17  9:03 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Dave Jones, Linus Torvalds, linux-omap, linux-fbdev, linux-kernel,
	Florian Tobias Schandinat, Dmitry Torokhov, Felipe Balbi,
	Evgeniy Polyakov, Arnd Bergmann
In-Reply-To: <20121216203536.GR4989@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

On 2012-12-16 22:35, Tony Lindgren wrote:

>> Those are all omap internal devices and should be all marked with
>> depends on ARCH_OMAP2PLUS.
>>
>> It's a different story for external devices that may be used on other
>> architectures.
>>
>> I only came up with one reason to compile internal devices for other
>> architectures: In some cases the driver subsystem maintainer may want to
>> be able to compile test subsystem wide changes without having to compile
>> for each target separately. But for those cases it's trivial to carry a
>> compile test patch that just drops the depends Kconfig entries.
> 
> And here's a patch to limit the omap drivers above to omap only.

The patch looks good to me.

The reason I removed the OMAP dependency from OMAP DSS was not (only)
because of the compile testing, but also because I thought it was right:
a driver for an IP block shouldn't presume that the IP is used only on
particular SoC.

But perhaps that's a bit too academic approach for an IP that's in real
world only used for OMAP.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

^ permalink raw reply

* [PATCH v2 RESEND] video console: add a driver for lcd2s character display
From: Lars Poeschel @ 2012-12-17  8:34 UTC (permalink / raw)
  To: Arnd Bergmann, FlorianSchandinat
  Cc: mathieu.poirier, linux-fbdev, linux-kernel

From: Lars Poeschel <poeschel@lemonage.de>

This driver allows to use a lcd2s 20x4 character display as
a linux console output device.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
---
 drivers/video/console/Kconfig    |   10 ++
 drivers/video/console/Makefile   |    1 +
 drivers/video/console/lcd2scon.c |  360 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 371 insertions(+)
 create mode 100644 drivers/video/console/lcd2scon.c

diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index e2c96d0..44fc3bf 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -129,6 +129,16 @@ config STI_CONSOLE
           machines.  Say Y here to build support for it into your kernel.
           The alternative is to use your primary serial port as a console.
 
+config LCD2S_CONSOLE
+        tristate "lcd2s 20x4 character display over I2C console"
+        depends on I2C
+        default n
+        help
+          This is a driver that lets you use the lcd2s 20x4 character display
+          from modtronix engineering as a console output device. The display
+          is a simple single color character display. You have to connect it
+          to an I2C bus.
+
 config FONTS
 	bool "Select compiled-in fonts"
 	depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile
index a862e91..74d5993 100644
--- a/drivers/video/console/Makefile
+++ b/drivers/video/console/Makefile
@@ -23,6 +23,7 @@ font-objs += $(font-objs-y)
 obj-$(CONFIG_DUMMY_CONSOLE)       += dummycon.o
 obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o font.o
 obj-$(CONFIG_STI_CONSOLE)         += sticon.o sticore.o font.o
+obj-$(CONFIG_LCD2S_CONSOLE)       += lcd2scon.o
 obj-$(CONFIG_VGA_CONSOLE)         += vgacon.o
 obj-$(CONFIG_MDA_CONSOLE)         += mdacon.o
 obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o softcursor.o
diff --git a/drivers/video/console/lcd2scon.c b/drivers/video/console/lcd2scon.c
new file mode 100644
index 0000000..c139811
--- /dev/null
+++ b/drivers/video/console/lcd2scon.c
@@ -0,0 +1,360 @@
+/*
+ *  console driver for LCD2S 4x20 character displays connected through i2c.
+ *
+ *  This is a driver allowing you to use a LCD2S 4x20 from modtronix
+ *  engineering as console output device.
+ *
+ *  (C) 2012 by Lemonage Software GmbH
+ *  Author: Lars Poeschel <poeschel@lemonage.de>
+ *  All rights reserved.
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/kd.h>
+#include <linux/tty.h>
+#include <linux/console_struct.h>
+#include <linux/console.h>
+#include <linux/vt_kern.h>
+#include <linux/i2c.h>
+
+#define LCD2S_CMD_CUR_BLINK_OFF		0x10
+#define LCD2S_CMD_CUR_UL_OFF		0x11
+#define LCD2S_CMD_DISPLAY_OFF		0x12
+#define LCD2S_CMD_CUR_BLINK_ON		0x18
+#define LCD2S_CMD_CUR_UL_ON		0x19
+#define LCD2S_CMD_DISPLAY_ON		0x1a
+#define LCD2S_CMD_BACKLIGHT_OFF		0x20
+#define LCD2S_CMD_BACKLIGHT_ON		0x28
+#define LCD2S_CMD_WRITE			0x80
+#define LCD2S_CMD_SHIFT_UP		0x87
+#define LCD2S_CMD_SHIFT_DOWN		0x88
+#define LCD2S_CMD_CUR_ADDR		0x89
+#define LCD2S_CMD_CUR_POS		0x8a
+#define LCD2S_CMD_CUR_RESET		0x8b
+#define LCD2S_CMD_CLEAR			0x8c
+
+#define LCD2S_FIRST			8
+#define LCD2S_LAST			9
+
+#define LCD2S_ROWS			4
+#define LCD2S_COLS			20
+
+struct lcd2s_data {
+	struct i2c_client *i2c;
+	int row;
+	int col;
+	unsigned int cur_blink:1;
+	unsigned int cur_ul:1;
+};
+
+static struct lcd2s_data lcd2s;
+
+static void lcd2s_set_cursor(int row, int col)
+{
+	u8 buf[] = { LCD2S_CMD_CUR_POS, row + 1, col + 1};
+
+	if (row = lcd2s.row && col = lcd2s.col)
+		return;
+
+	i2c_master_send(lcd2s.i2c, buf, sizeof(buf));
+	lcd2s.row = row;
+	lcd2s.col = col;
+}
+
+static void lcd2s_reset_cursor(void)
+{
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CUR_RESET);
+	lcd2s.row = 0;
+	lcd2s.col = 0;
+}
+
+static void lcd2s_increase_cursor(struct vc_data *con, int inc)
+{
+	lcd2s.col += inc;
+	if ((lcd2s.col / con->vc_cols) >= 1) {
+		lcd2s.row += (lcd2s.col / con->vc_cols);
+		lcd2s.col %= con->vc_cols;
+	}
+}
+
+static void lcd2s_cursor_ul_on(void)
+{
+	if (!lcd2s.cur_ul) {
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CUR_UL_ON);
+		lcd2s.cur_ul = 1;
+	}
+}
+
+static void lcd2s_cursor_ul_off(void)
+{
+	if (lcd2s.cur_ul) {
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CUR_UL_OFF);
+		lcd2s.cur_ul = 0;
+	}
+}
+
+static void lcd2s_cursor_blink_on(void)
+{
+	if (!lcd2s.cur_blink) {
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CUR_BLINK_ON);
+		lcd2s.cur_blink = 1;
+	}
+}
+
+static void lcd2s_cursor_blink_off(void)
+{
+	if (lcd2s.cur_blink) {
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CUR_BLINK_OFF);
+		lcd2s.cur_blink = 0;
+	}
+}
+
+static const char *lcd2s_startup(void)
+{
+	return "lcd2s console";
+}
+
+
+/*
+ * init is set if console is currently allocated during init
+ */
+static void lcd2s_init(struct vc_data *con, int init)
+{
+	lcd2s.cur_blink = 0;
+	lcd2s.cur_ul = 0;
+
+	/* turn display on */
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_DISPLAY_ON);
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_BACKLIGHT_ON);
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CLEAR);
+	lcd2s_cursor_ul_on();
+	lcd2s_reset_cursor();
+
+	con->vc_can_do_color = 0;
+	con->vc_hi_font_mask = 0;
+
+	if (init) {
+		con->vc_rows = LCD2S_ROWS;
+		con->vc_cols = LCD2S_COLS;
+	} else
+		vc_resize(con, LCD2S_COLS, LCD2S_ROWS);
+}
+
+static void lcd2s_deinit(struct vc_data *con)
+{
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_DISPLAY_OFF);
+	i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_BACKLIGHT_OFF);
+	lcd2s_cursor_blink_off();
+	lcd2s_cursor_ul_off();
+}
+
+static void lcd2s_clear(struct vc_data *con, int s_row, int s_col,
+			int height, int width)
+{
+	u8 buf[width];
+	int i;
+
+	if (width <= 0 || height <= 0)
+		return;
+
+	/* if the whole display is to clear, we have a single command */
+	if (s_col = 0 && s_row = 0 &&
+		height >= con->vc_rows - 1 && width >= con->vc_cols - 1) {
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_CLEAR);
+		return;
+	}
+
+	for (i = 0; i <= width; i++)
+		buf[i] = ' ';
+
+	for (i = s_col; i <= height; i++) {
+		lcd2s_set_cursor(s_row, i);
+		i2c_master_send(lcd2s.i2c, buf, width);
+	}
+}
+
+static void lcd2s_putc(struct vc_data *con, int data, int row, int col)
+{
+	u8 buf[] = {LCD2S_CMD_WRITE, data};
+
+	lcd2s_set_cursor(row, col);
+
+	i2c_master_send(lcd2s.i2c, buf, sizeof(buf));
+	lcd2s_increase_cursor(con, 1);
+}
+
+static void lcd2s_putcs(struct vc_data *con, const unsigned short *buf,
+			int len, int row, int col)
+{
+	u8 *i2c_buf;
+	int i;
+
+	i2c_buf = kzalloc(len + 1, GFP_KERNEL);
+	if (!i2c_buf)
+		return;
+
+	lcd2s_set_cursor(row, col);
+
+	i2c_buf[0] = LCD2S_CMD_WRITE;
+	for (i = 0; i < len ; i++)
+		i2c_buf[i + 1] = buf[i];
+
+	i2c_master_send(lcd2s.i2c, i2c_buf, len + 1);
+	kfree(i2c_buf);
+	lcd2s_increase_cursor(con, len);
+}
+
+static void lcd2s_cursor(struct vc_data *con, int mode)
+{
+	switch (mode) {
+	case CM_ERASE:
+		lcd2s_cursor_blink_off();
+		lcd2s_cursor_ul_off();
+		break;
+	case CM_MOVE:
+	case CM_DRAW:
+		lcd2s_set_cursor(con->vc_y, con->vc_x);
+
+		switch (con->vc_cursor_type & CUR_HWMASK) {
+		case CUR_UNDERLINE:
+			lcd2s_cursor_ul_on();
+			lcd2s_cursor_blink_off();
+			break;
+		case CUR_NONE:
+			lcd2s_cursor_blink_off();
+			lcd2s_cursor_ul_off();
+			break;
+		default:
+			lcd2s_cursor_blink_on();
+			lcd2s_cursor_ul_off();
+			break;
+		}
+		break;
+	}
+}
+
+static int lcd2s_scroll(struct vc_data *con, int top, int bot,
+			int dir, int lines)
+{
+	/* we can only scroll the whole display */
+	if (top = 0 && bot = con->vc_rows) {
+		while (lines--) {
+			switch (dir) {
+			case SM_UP:
+				i2c_smbus_write_byte(lcd2s.i2c,
+					LCD2S_CMD_SHIFT_UP);
+				break;
+			case SM_DOWN:
+				i2c_smbus_write_byte(lcd2s.i2c,
+					LCD2S_CMD_SHIFT_DOWN);
+				break;
+			}
+		}
+		return 0;
+	}
+	return 1;
+}
+
+static void lcd2s_bmove(struct vc_data *conp, int s_row, int s_col,
+			int d_row, int d_col, int height, int width)
+{
+}
+
+static int lcd2s_switch(struct vc_data *con)
+{
+	return 1;
+}
+
+static int lcd2s_blank(struct vc_data *con, int blank, int mode_switch)
+{
+	switch (blank) {
+	case 0:		/* unblank */
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_DISPLAY_ON);
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_BACKLIGHT_ON);
+		break;
+	case 1:		/* normal blanking */
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_DISPLAY_OFF);
+		i2c_smbus_write_byte(lcd2s.i2c, LCD2S_CMD_BACKLIGHT_OFF);
+		break;
+	}
+	return 0;
+}
+
+static int lcd2s_set_palette(struct vc_data *con, unsigned char *table)
+{
+	return -EINVAL;
+}
+
+static int lcd2s_scrolldelta(struct vc_data *con, int lines)
+{
+	return 0;
+}
+
+static struct consw lcd2s_con = {
+	.owner			= THIS_MODULE,
+	.con_startup		= lcd2s_startup,
+	.con_init		= lcd2s_init,
+	.con_deinit		= lcd2s_deinit,
+	.con_clear		= lcd2s_clear,
+	.con_putc		= lcd2s_putc,
+	.con_putcs		= lcd2s_putcs,
+	.con_cursor		= lcd2s_cursor,
+	.con_scroll		= lcd2s_scroll,
+	.con_bmove		= lcd2s_bmove,
+	.con_switch		= lcd2s_switch,
+	.con_blank		= lcd2s_blank,
+	.con_set_palette	= lcd2s_set_palette,
+	.con_scrolldelta	= lcd2s_scrolldelta,
+};
+
+static int __devinit lcd2s_i2c_probe(struct i2c_client *i2c,
+				const struct i2c_device_id *id)
+{
+	if (!i2c_check_functionality(i2c->adapter,
+			I2C_FUNC_SMBUS_WRITE_BYTE_DATA |
+			I2C_FUNC_SMBUS_WRITE_BLOCK_DATA))
+		return -EIO;
+
+	lcd2s.i2c = i2c;
+
+	take_over_console(&lcd2s_con, LCD2S_FIRST, LCD2S_LAST, 1);
+
+	return 0;
+}
+
+static __devexit int lcd2s_i2c_remove(struct i2c_client *i2c)
+{
+	/* unregister from console subsystem */
+	unregister_con_driver(&lcd2s_con);
+	return 0;
+}
+
+static const struct i2c_device_id lcd2s_i2c_id[] = {
+	{ "lcd2s", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, lcd2s_i2c_id);
+
+static struct i2c_driver lcd2s_i2c_driver = {
+	.driver = {
+		.name = "lcd2s",
+		.owner = THIS_MODULE,
+	},
+	.probe = lcd2s_i2c_probe,
+	.remove = __devexit_p(lcd2s_i2c_remove),
+	.id_table = lcd2s_i2c_id,
+};
+
+module_i2c_driver(lcd2s_i2c_driver)
+
+MODULE_DESCRIPTION("LCD2S character display console driver");
+MODULE_AUTHOR("Lars Poeschel");
+MODULE_LICENSE("GPL");
-- 
1.7.10.4


^ permalink raw reply related

* Re: [GIT PULL] fbdev changes for 3.8
From: Dmitry Torokhov @ 2012-12-17  6:00 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Dave Jones, Linus Torvalds, Tomi Valkeinen, linux-omap,
	linux-fbdev, linux-kernel, Florian Tobias Schandinat,
	Felipe Balbi, Evgeniy Polyakov, Arnd Bergmann
In-Reply-To: <20121216203536.GR4989@atomide.com>

On Sun, Dec 16, 2012 at 12:35:37PM -0800, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [121216 09:49]:
> > * Dave Jones <davej@redhat.com> [121215 14:27]:
> > > On Sat, Dec 15, 2012 at 01:11:04PM -0800, Linus Torvalds wrote:
> > >  > On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > >  > > Hi Linus,
> > >  > >
> > >  > > Florian, the fbdev maintainer, has been very busy lately, so I offered to send
> > >  > > the pull request for fbdev for this merge window.
> > >  > 
> > >  > Pulled. However, with this I get the Kconfig question
> > >  > 
> > >  >    OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)
> > >  > 
> > >  > which doesn't make a whole lot of sense on x86-64, unless there's
> > >  > something about OMAP2 that I don't know.
> > >  > 
> > >  > So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
> > >  > least ARM. Because showing it to anybody else seems insane.
> > >  > 
> > >  > Same goes for FB_OMAP2 for that matter. I realize that it's likely
> > >  > nice to get compile testing for this on x86-64 too, but if that's the
> > >  > intent, we need to think about it some more. I don't think it's good
> > >  > to ask actual normal users questions like this just for compile
> > >  > coverage.
> > > 
> > > This OMAP stuff has been creeping into x86 builds for a while.
> > > Grep from my current build config ..
> > > 
> > > # CONFIG_OMAP_OCP2SCP is not set
> > > # CONFIG_KEYBOARD_OMAP4 is not set
> > > # CONFIG_OMAP2_DSS is not set
> > > # CONFIG_OMAP_USB2 is not set
> > > 
> > > There was some other arm-ism that does the same that I' currently forgetting,
> > > or maybe that got fixed..
> > 
> > Those are all omap internal devices and should be all marked with
> > depends on ARCH_OMAP2PLUS.
> > 
> > It's a different story for external devices that may be used on other
> > architectures.
> > 
> > I only came up with one reason to compile internal devices for other
> > architectures: In some cases the driver subsystem maintainer may want to
> > be able to compile test subsystem wide changes without having to compile
> > for each target separately. But for those cases it's trivial to carry a
> > compile test patch that just drops the depends Kconfig entries.
> 
> And here's a patch to limit the omap drivers above to omap only.

Do you think we could add a new symbol to debug options, something like
COMPILE_COVERAGE, and have drivers that can be compiled on platforms
other than ones having the hardware to do

	depend on ARCH_XXX || COMPILE_CONVERAGE

This way people who want to do compile coverage do not have to carry
patches and allyesconfig will pick this right up.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] video: exynos_mipi_dsi: Add missing mutex_unlock
From: Donghwa Lee @ 2012-12-17  1:31 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <000801cdd9d5$a9536a10$fbfa3e30$%choi@samsung.com>

  On Fri, Dec 14, 2012 at 17:33, Jonghwan Choi wrote:
> Add a mutex_unlock on the error path.
>
> Signed-off-by: Jonghwan Choi<jhbird.choi@samsung.com>
> ---
>   drivers/video/exynos/exynos_mipi_dsi_common.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c
> b/drivers/video/exynos/exynos_mipi_dsi_common.c
> index 3cd29a4..bd7f4f2 100644
> --- a/drivers/video/exynos/exynos_mipi_dsi_common.c
> +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
> @@ -377,6 +377,7 @@ int exynos_mipi_dsi_rd_data(struct mipi_dsim_device
> *dsim, unsigned int data_id,
>   			"data id %x is not supported current DSI spec.\n",
>   			data_id);
>   
> +		mutex_unlock(&dsim->lock);
>   		return -EINVAL;
>   	}
>   
It looks good to me.

Acked-by: Donghwa Lee <dh09.lee@samsung.com>

Thank you,
Donghwa Lee

^ permalink raw reply

* Re: [PATCH 1/1] video: exynos: Use devm_* APIs in s6e8ax0.c
From: Donghwa Lee @ 2012-12-17  0:36 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1355289083-28269-1-git-send-email-sachin.kamat@linaro.org>

On Wed, Dec 12, 2012 at 14:11, Sachin Kamat wrote:
> devm_* APIs are device managed and make error handling
> and code cleanup simpler.
>
> Cc: Donghwa Lee <dh09.lee@samsung.com>
> Cc: Inki Dae <inki.dae@samsung.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> Compile tested against linux-next.
> ---
>   drivers/video/exynos/s6e8ax0.c |   14 ++++----------
>   1 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/video/exynos/s6e8ax0.c b/drivers/video/exynos/s6e8ax0.c
> index 05d080b..ca26024 100644
> --- a/drivers/video/exynos/s6e8ax0.c
> +++ b/drivers/video/exynos/s6e8ax0.c
> @@ -776,7 +776,7 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev)
>   	int ret;
>   	u8 mtp_id[3] = {0, };
>   
> -	lcd = kzalloc(sizeof(struct s6e8ax0), GFP_KERNEL);
> +	lcd = devm_kzalloc(&dsim_dev->dev, sizeof(struct s6e8ax0), GFP_KERNEL);
>   	if (!lcd) {
>   		dev_err(&dsim_dev->dev, "failed to allocate s6e8ax0 structure.\n");
>   		return -ENOMEM;
> @@ -788,18 +788,17 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev)
>   
>   	mutex_init(&lcd->lock);
>   
> -	ret = regulator_bulk_get(lcd->dev, ARRAY_SIZE(supplies), supplies);
> +	ret = devm_regulator_bulk_get(lcd->dev, ARRAY_SIZE(supplies), supplies);
>   	if (ret) {
>   		dev_err(lcd->dev, "Failed to get regulators: %d\n", ret);
> -		goto err_lcd_register;
> +		return ret;
>   	}
>   
>   	lcd->ld = lcd_device_register("s6e8ax0", lcd->dev, lcd,
>   			&s6e8ax0_lcd_ops);
>   	if (IS_ERR(lcd->ld)) {
>   		dev_err(lcd->dev, "failed to register lcd ops.\n");
> -		ret = PTR_ERR(lcd->ld);
> -		goto err_lcd_register;
> +		return PTR_ERR(lcd->ld);
>   	}
>   
>   	lcd->bd = backlight_device_register("s6e8ax0-bl", lcd->dev, lcd,
> @@ -838,11 +837,6 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev)
>   
>   err_backlight_register:
>   	lcd_device_unregister(lcd->ld);
> -
> -err_lcd_register:
> -	regulator_bulk_free(ARRAY_SIZE(supplies), supplies);
> -	kfree(lcd);
> -
>   	return ret;
>   }
>   
It looks good to me.
Acked-by: Donghwa Lee <dh09.lee@samsung.com>

Thank you,
Donghwa Lee

^ permalink raw reply

* Re: [PATCHv4 1/9] video: mmp display subsystem
From: Haojian Zhuang @ 2012-12-16 23:47 UTC (permalink / raw)
  To: linux-fbdev

On Wed, Oct 24, 2012 at 2:56 PM, Zhou Zhu <zzhu3@marvell.com> wrote:
> Added mmp display subsystem to support Marvell MMP display controllers.
>
> This subsystem contains 4 parts:
> --fb folder
> --core.c
> --hw folder
> --panel folder
>
> 1. fb folder contains implementation of fb.
> fb get path and ovly from common interface and operates on these structures.
>
> 2. core.c provides common interface for a hardware abstraction.
> Major parts of this interface are:
> a) Path: path is a output device connected to a panel or HDMI TV.
> Main operations of the path is set/get timing/output color.
> fb operates output device through path structure.
> b) Ovly: Ovly is a buffer shown on the path.
> Ovly describes frame buffer and its source/destination size, offset, input
> color, buffer address, z-order, and so on.
> Each fb device maps to one ovly.
>
> 3. hw folder contains implementation of hardware operations defined by core.c.
> It registers paths for fb use.
>
> 4. panel folder contains implementation of panels.
> It's connected to path. Panel drivers would also regiester panels and linked
> to path when probe.
>
> Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
> Signed-off-by: Lisa Du <cldu@marvell.com>
> ---
>  drivers/video/Kconfig      |    1 +
>  drivers/video/Makefile     |    1 +
>  drivers/video/mmp/Kconfig  |    5 +
>  drivers/video/mmp/Makefile |    1 +
>  drivers/video/mmp/core.c   |  217 +++++++++++++++++++++++++++
>  include/video/mmp_disp.h   |  351 ++++++++++++++++++++++++++++++++++++++++++++
>  6 files changed, 576 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/video/mmp/Kconfig
>  create mode 100644 drivers/video/mmp/Makefile
>  create mode 100644 drivers/video/mmp/core.c
>  create mode 100644 include/video/mmp_disp.h
>

Hi Florian,

This patch series have been sent for a long time. And there's no
comments on this.

I need this patch series on enabling LCD on pxa910 platform. Do you
think it's OK to merge?

Best Regards
Haojian

^ permalink raw reply

* Re: [GIT PULL] fbdev changes for 3.8
From: Tony Lindgren @ 2012-12-16 20:35 UTC (permalink / raw)
  To: Dave Jones, Linus Torvalds, Tomi Valkeinen, linux-omap,
	linux-fbdev, linux-kernel, Florian Tobias Schandinat
  Cc: Dmitry Torokhov, Felipe Balbi, Evgeniy Polyakov, Arnd Bergmann
In-Reply-To: <20121216174613.GA18490@atomide.com>

* Tony Lindgren <tony@atomide.com> [121216 09:49]:
> * Dave Jones <davej@redhat.com> [121215 14:27]:
> > On Sat, Dec 15, 2012 at 01:11:04PM -0800, Linus Torvalds wrote:
> >  > On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> >  > > Hi Linus,
> >  > >
> >  > > Florian, the fbdev maintainer, has been very busy lately, so I offered to send
> >  > > the pull request for fbdev for this merge window.
> >  > 
> >  > Pulled. However, with this I get the Kconfig question
> >  > 
> >  >    OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)
> >  > 
> >  > which doesn't make a whole lot of sense on x86-64, unless there's
> >  > something about OMAP2 that I don't know.
> >  > 
> >  > So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
> >  > least ARM. Because showing it to anybody else seems insane.
> >  > 
> >  > Same goes for FB_OMAP2 for that matter. I realize that it's likely
> >  > nice to get compile testing for this on x86-64 too, but if that's the
> >  > intent, we need to think about it some more. I don't think it's good
> >  > to ask actual normal users questions like this just for compile
> >  > coverage.
> > 
> > This OMAP stuff has been creeping into x86 builds for a while.
> > Grep from my current build config ..
> > 
> > # CONFIG_OMAP_OCP2SCP is not set
> > # CONFIG_KEYBOARD_OMAP4 is not set
> > # CONFIG_OMAP2_DSS is not set
> > # CONFIG_OMAP_USB2 is not set
> > 
> > There was some other arm-ism that does the same that I' currently forgetting,
> > or maybe that got fixed..
> 
> Those are all omap internal devices and should be all marked with
> depends on ARCH_OMAP2PLUS.
> 
> It's a different story for external devices that may be used on other
> architectures.
> 
> I only came up with one reason to compile internal devices for other
> architectures: In some cases the driver subsystem maintainer may want to
> be able to compile test subsystem wide changes without having to compile
> for each target separately. But for those cases it's trivial to carry a
> compile test patch that just drops the depends Kconfig entries.

And here's a patch to limit the omap drivers above to omap only.

Regards,

Tony


From: Tony Lindgren <tony@atomide.com>
Date: Sun, 16 Dec 2012 12:28:46 -0800
Subject: [PATCH] ARM: OMAP: Fix drivers to depend on omap for internal devices

These devices are not available on other architectures, so
let's limit them to omap.

If the driver subsystem maintainers want to build test
system wide changes without building for each target,
it's easy to carry a test patch that just strips out the
depends entries from Kconfig files.

Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -6,6 +6,7 @@ menu "Bus devices"
 
 config OMAP_OCP2SCP
 	tristate "OMAP OCP2SCP DRIVER"
+	depends on ARCH_OMAP2PLUS
 	help
 	  Driver to enable ocp2scp module which transforms ocp interface
 	  protocol to scp protocol. In OMAP4, USB PHY is connected via
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -544,6 +544,7 @@ config KEYBOARD_OMAP
 
 config KEYBOARD_OMAP4
 	tristate "TI OMAP4+ keypad support"
+	depends on ARCH_OMAP2PLUS
 	select INPUT_MATRIXKMAP
 	help
 	  Say Y here if you want to use the OMAP4+ keypad.
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -6,6 +6,7 @@ comment "USB Physical Layer drivers"
 
 config OMAP_USB2
 	tristate "OMAP USB2 PHY Driver"
+	depends on ARCH_OMAP2PLUS
 	select USB_OTG_UTILS
 	help
 	  Enable this to support the transceiver that is part of SOC. This
--- a/drivers/video/omap2/Kconfig
+++ b/drivers/video/omap2/Kconfig
@@ -1,6 +1,10 @@
 config OMAP2_VRFB
 	bool
 
+if ARCH_OMAP2PLUS
+
 source "drivers/video/omap2/dss/Kconfig"
 source "drivers/video/omap2/omapfb/Kconfig"
 source "drivers/video/omap2/displays/Kconfig"
+
+endif
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -60,6 +60,7 @@ config W1_MASTER_GPIO
 
 config HDQ_MASTER_OMAP
 	tristate "OMAP HDQ driver"
+	depends on ARCH_OMAP
 	help
 	  Say Y here if you want support for the 1-wire or HDQ Interface
 	  on an OMAP processor.

^ permalink raw reply

* Re: [GIT PULL] fbdev changes for 3.8
From: Tony Lindgren @ 2012-12-16 17:46 UTC (permalink / raw)
  To: Dave Jones, Linus Torvalds, Tomi Valkeinen, linux-omap,
	linux-fbdev, linux-kernel, Florian Tobias Schandinat
In-Reply-To: <20121215222431.GA7153@redhat.com>

* Dave Jones <davej@redhat.com> [121215 14:27]:
> On Sat, Dec 15, 2012 at 01:11:04PM -0800, Linus Torvalds wrote:
>  > On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>  > > Hi Linus,
>  > >
>  > > Florian, the fbdev maintainer, has been very busy lately, so I offered to send
>  > > the pull request for fbdev for this merge window.
>  > 
>  > Pulled. However, with this I get the Kconfig question
>  > 
>  >    OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)
>  > 
>  > which doesn't make a whole lot of sense on x86-64, unless there's
>  > something about OMAP2 that I don't know.
>  > 
>  > So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
>  > least ARM. Because showing it to anybody else seems insane.
>  > 
>  > Same goes for FB_OMAP2 for that matter. I realize that it's likely
>  > nice to get compile testing for this on x86-64 too, but if that's the
>  > intent, we need to think about it some more. I don't think it's good
>  > to ask actual normal users questions like this just for compile
>  > coverage.
> 
> This OMAP stuff has been creeping into x86 builds for a while.
> Grep from my current build config ..
> 
> # CONFIG_OMAP_OCP2SCP is not set
> # CONFIG_KEYBOARD_OMAP4 is not set
> # CONFIG_OMAP2_DSS is not set
> # CONFIG_OMAP_USB2 is not set
> 
> There was some other arm-ism that does the same that I' currently forgetting,
> or maybe that got fixed..

Those are all omap internal devices and should be all marked with
depends on ARCH_OMAP2PLUS.

It's a different story for external devices that may be used on other
architectures.

I only came up with one reason to compile internal devices for other
architectures: In some cases the driver subsystem maintainer may want to
be able to compile test subsystem wide changes without having to compile
for each target separately. But for those cases it's trivial to carry a
compile test patch that just drops the depends Kconfig entries.

Regards,

Tony

^ permalink raw reply

* Re: [GIT PULL] fbdev changes for 3.8
From: Dave Jones @ 2012-12-15 22:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Tomi Valkeinen, linux-omap, linux-fbdev, linux-kernel,
	Florian Tobias Schandinat
In-Reply-To: <CA+55aFz9+3mOZcjJ9C-izKkidT9mxeO7xUubJER0OTjcZjE=2A@mail.gmail.com>

On Sat, Dec 15, 2012 at 01:11:04PM -0800, Linus Torvalds wrote:
 > On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
 > > Hi Linus,
 > >
 > > Florian, the fbdev maintainer, has been very busy lately, so I offered to send
 > > the pull request for fbdev for this merge window.
 > 
 > Pulled. However, with this I get the Kconfig question
 > 
 >    OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)
 > 
 > which doesn't make a whole lot of sense on x86-64, unless there's
 > something about OMAP2 that I don't know.
 > 
 > So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
 > least ARM. Because showing it to anybody else seems insane.
 > 
 > Same goes for FB_OMAP2 for that matter. I realize that it's likely
 > nice to get compile testing for this on x86-64 too, but if that's the
 > intent, we need to think about it some more. I don't think it's good
 > to ask actual normal users questions like this just for compile
 > coverage.

This OMAP stuff has been creeping into x86 builds for a while.
Grep from my current build config ..

# CONFIG_OMAP_OCP2SCP is not set
# CONFIG_KEYBOARD_OMAP4 is not set
# CONFIG_OMAP2_DSS is not set
# CONFIG_OMAP_USB2 is not set

There was some other arm-ism that does the same that I' currently forgetting,
or maybe that got fixed..

	Dave


^ permalink raw reply

* Re: [GIT PULL] fbdev changes for 3.8
From: Linus Torvalds @ 2012-12-15 21:11 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, linux-kernel, Florian Tobias Schandinat
In-Reply-To: <50CAFDFF.3070802@ti.com>

On Fri, Dec 14, 2012 at 2:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi Linus,
>
> Florian, the fbdev maintainer, has been very busy lately, so I offered to send
> the pull request for fbdev for this merge window.

Pulled. However, with this I get the Kconfig question

   OMAP2+ Display Subsystem support (OMAP2_DSS) [N/m/y/?] (NEW)

which doesn't make a whole lot of sense on x86-64, unless there's
something about OMAP2 that I don't know.

So I'd suggest making that OMAP2_DSS be dependent on OMAP2. Or at
least ARM. Because showing it to anybody else seems insane.

Same goes for FB_OMAP2 for that matter. I realize that it's likely
nice to get compile testing for this on x86-64 too, but if that's the
intent, we need to think about it some more. I don't think it's good
to ask actual normal users questions like this just for compile
coverage.

Hmm?

                    Linus

^ permalink raw reply

* [PATCH] fbcon: clear the logo bitmap from the margin area
From: Kamal Mostafa @ 2012-12-14 20:30 UTC (permalink / raw)
  To: Florian Tobias Schandinat, linux-fbdev, linux-kernel

Explicitly clear_margins when clearing the logo, in case the font dimensions
are non-integral to the framebuffer dimensions.

Signed-off-by: Kamal Mostafa <kamal@whence.com>
---
 drivers/video/console/fbcon.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 8745637..b51a4bd 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1236,8 +1236,16 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
 	if (!height || !width)
 		return;
 
-	if (sy < vc->vc_top && vc->vc_top = logo_lines)
+	if (sy < vc->vc_top && vc->vc_top = logo_lines) {
 		vc->vc_top = 0;
+		/*
+		 * If the font dimensions are not an integral of the display
+		 * dimensions then the ops->clear below won't end up clearing
+		 * the margins.  Call clear_margins here in case the logo
+		 * bitmap stretched into the margin area.
+		 */
+		fbcon_clear_margins(vc, 0);
+	}
 
 	/* Split blits that cross physical y_wrap boundary */
 
-- 
1.7.10.4


^ permalink raw reply related

* [patch] OMAPDSS: reading past end of array in dispc_dump_regs()
From: Dan Carpenter @ 2012-12-14 15:01 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Florian Tobias Schandinat, Archit Taneja, Chandrabhanu Mahapatra,
	linux-omap, linux-fbdev, kernel-janitors

We added another kind of plane in 66a0f9e4ac "OMAPDSS: Use WB fifo for
GFX overlay" so this array needs a new entry as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker work.  I don't have a way to test this.

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index fedbd2c..bfe62cc 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3163,6 +3163,7 @@ static void dispc_dump_regs(struct seq_file *s)
 		[OMAP_DSS_VIDEO1]	= "VID1",
 		[OMAP_DSS_VIDEO2]	= "VID2",
 		[OMAP_DSS_VIDEO3]	= "VID3",
+		[OMAP_DSS_WB]		= "WB",
 	};
 	const char **p_names;
 

^ permalink raw reply related

* [RFC 6/6] video: add makefile & kconfig
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/Kconfig          |    1 +
 drivers/video/Makefile         |    1 +
 drivers/video/display/Kconfig  |   26 ++++++++++++++++++++++++++
 drivers/video/display/Makefile |    5 +++++
 4 files changed, 33 insertions(+)
 create mode 100644 drivers/video/display/Kconfig
 create mode 100644 drivers/video/display/Makefile

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c5b7bcf..e91f03e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2442,6 +2442,7 @@ source "drivers/video/omap/Kconfig"
 source "drivers/video/omap2/Kconfig"
 source "drivers/video/exynos/Kconfig"
 source "drivers/video/backlight/Kconfig"
+source "drivers/video/display/Kconfig"
 
 if VT
 	source "drivers/video/console/Kconfig"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index b936b00..0a4cfea 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -14,6 +14,7 @@ fb-objs                           := $(fb-y)
 obj-$(CONFIG_VT)		  += console/
 obj-$(CONFIG_LOGO)		  += logo/
 obj-y				  += backlight/
+obj-y				  += display/
 
 obj-$(CONFIG_EXYNOS_VIDEO)     += exynos/
 
diff --git a/drivers/video/display/Kconfig b/drivers/video/display/Kconfig
new file mode 100644
index 0000000..1d1a590
--- /dev/null
+++ b/drivers/video/display/Kconfig
@@ -0,0 +1,26 @@
+menuconfig DISPLAY_CORE
+	tristate "Display Core"
+	---help---
+	  Support common display framework for graphics devices.
+
+if DISPLAY_CORE
+
+config DISPLAY_PANEL_DPI
+	tristate "DPI (Parallel) Display Panels"
+	---help---
+	  Support for simple digital (parallel) pixel interface panels. Those
+	  panels receive pixel data through a parallel bus and have no control
+	  bus.
+
+	  If you are in doubt, say N.
+
+config DISPLAY_PANEL_DVI
+	tristate "DVI Monitor"
+
+config DISPLAY_PANEL_TAAL
+	tristate "Taal DSI command mode panel"
+
+config DISPLAY_CHIP_TFP410
+	tristate "DPI to DVI chip"
+
+endif # DISPLAY_CORE
diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile
new file mode 100644
index 0000000..ac97dfd
--- /dev/null
+++ b/drivers/video/display/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_DISPLAY_CORE) += display-core.o
+obj-$(CONFIG_DISPLAY_PANEL_DPI) += panel-dpi.o
+obj-$(CONFIG_DISPLAY_PANEL_DVI) += panel-dvi.o
+obj-$(CONFIG_DISPLAY_PANEL_TAAL) += panel-taal.o
+obj-$(CONFIG_DISPLAY_CHIP_TFP410) += chip-tfp410.o
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 5/6] video: add taal panel
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/display/panel-taal.c   |  383 ++++++++++++++++++++++++++++++++++
 include/video/omap-panel-nokia-dsi.h |    4 +-
 2 files changed, 385 insertions(+), 2 deletions(-)
 create mode 100644 drivers/video/display/panel-taal.c

diff --git a/drivers/video/display/panel-taal.c b/drivers/video/display/panel-taal.c
new file mode 100644
index 0000000..f1c2196
--- /dev/null
+++ b/drivers/video/display/panel-taal.c
@@ -0,0 +1,383 @@
+/*
+ * Taal DSI command mode panel
+ *
+ * Copyright (C) 2012 Texas Instruments
+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * 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/>.
+ */
+
+#define DEBUG
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/gpio.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/videomode.h>
+
+#include <video/omapdss.h>
+#include <video/display.h>
+#include <video/omap-panel-nokia-dsi.h>
+#include <video/mipi_display.h>
+
+/* DSI Virtual channel. Hardcoded for now. */
+#define TCH 0
+
+#define DCS_READ_NUM_ERRORS	0x05
+#define DCS_BRIGHTNESS		0x51
+#define DCS_CTRL_DISPLAY	0x53
+#define DCS_WRITE_CABC		0x55
+#define DCS_READ_CABC		0x56
+#define DCS_GET_ID1		0xda
+#define DCS_GET_ID2		0xdb
+#define DCS_GET_ID3		0xdc
+
+struct taal_data {
+	struct platform_device *pdev;
+	struct video_source *src;
+	struct display_entity entity;
+
+	struct mutex lock;
+
+	unsigned long	hw_guard_end;	/* next value of jiffies when we can
+					 * issue the next sleep in/out command
+					 */
+	unsigned long	hw_guard_wait;	/* max guard time in jiffies */
+
+	/* panel HW configuration from DT or platform data */
+	int reset_gpio;
+
+	/* runtime variables */
+	bool enabled;
+
+	bool te_enabled;
+
+	int channel;
+
+	bool cabc_broken;
+	unsigned cabc_mode;
+
+	bool intro_printed;
+};
+
+static void hw_guard_start(struct taal_data *td, int guard_msec)
+{
+	td->hw_guard_wait = msecs_to_jiffies(guard_msec);
+	td->hw_guard_end = jiffies + td->hw_guard_wait;
+}
+
+static void hw_guard_wait(struct taal_data *td)
+{
+	unsigned long wait = td->hw_guard_end - jiffies;
+
+	if ((long)wait > 0 && wait <= td->hw_guard_wait) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(wait);
+	}
+}
+
+static int taal_dcs_read_1(struct taal_data *td, u8 dcs_cmd, u8 *data)
+{
+	int r;
+	u8 buf[1];
+	struct video_source *src = td->src;
+
+	r = src->ops.dsi->dcs_read(src, td->channel, dcs_cmd, buf, 1);
+	if (r < 0)
+		return r;
+
+	*data = buf[0];
+
+	return 0;
+}
+
+static int taal_dcs_write_0(struct taal_data *td, u8 dcs_cmd)
+{
+	struct video_source *src = td->src;
+
+	return src->ops.dsi->dcs_write(src, td->channel, &dcs_cmd, 1);
+}
+
+static int taal_sleep_out(struct taal_data *td)
+{
+	int r;
+
+	hw_guard_wait(td);
+
+	r = taal_dcs_write_0(td, MIPI_DCS_EXIT_SLEEP_MODE);
+	if (r)
+		return r;
+
+	hw_guard_start(td, 120);
+
+	msleep(5);
+
+	return 0;
+}
+
+static int taal_get_id(struct taal_data *td, u8 *id1, u8 *id2, u8 *id3)
+{
+	int r;
+
+	r = taal_dcs_read_1(td, DCS_GET_ID1, id1);
+	if (r)
+		return r;
+	r = taal_dcs_read_1(td, DCS_GET_ID2, id2);
+	if (r)
+		return r;
+	r = taal_dcs_read_1(td, DCS_GET_ID3, id3);
+	if (r)
+		return r;
+
+	return 0;
+}
+
+static void taal_hw_reset(struct taal_data *td)
+{
+	if (!gpio_is_valid(td->reset_gpio))
+		return;
+
+	gpio_set_value(td->reset_gpio, 1);
+	udelay(10);
+	/* reset the panel */
+	gpio_set_value(td->reset_gpio, 0);
+	/* assert reset */
+	udelay(10);
+	gpio_set_value(td->reset_gpio, 1);
+	/* wait after releasing reset */
+	msleep(5);
+}
+
+#define to_panel(p) container_of(p, struct taal_data, entity)
+
+static int taal_set_state(struct display_entity *entity,
+			       enum display_entity_state state)
+{
+	struct taal_data *td = to_panel(entity);
+	struct video_source *src = td->src;
+	int r;
+
+	switch (state) {
+	case DISPLAY_ENTITY_STATE_OFF:
+	case DISPLAY_ENTITY_STATE_STANDBY:
+		r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF);
+		if (r)
+			printk("display off failed\n");
+
+		src->ops.dsi->disable(src);
+
+		break;
+
+	case DISPLAY_ENTITY_STATE_ON:
+		r = src->ops.dsi->enable(src);
+		if (r)
+			printk("failed to enable bus\n");
+
+		taal_hw_reset(td);
+
+		r = taal_sleep_out(td);
+		if (r)
+			printk("sleep out failed\n");
+
+		src->ops.dsi->enable_hs(src, true);
+
+
+		r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_ON);
+		if (r)
+			printk("display on failed\n");
+		break;
+	}
+
+	return 0;
+}
+
+static const struct videomode taal_mode = {
+	.hactive = 864,
+	.vactive = 480,
+};
+
+static int taal_get_modes(struct display_entity *entity,
+			       const struct videomode **modes)
+{
+	//struct panel_data *data = to_panel(entity);
+
+	*modes = &taal_mode;
+	return 1;
+}
+
+static int taal_get_size(struct display_entity *entity,
+			      unsigned int *width, unsigned int *height)
+{
+	//struct panel_data *data = to_panel(entity);
+
+	*width = 10;
+	*height = 10;
+	return 0;
+}
+
+static int taal_update(struct display_entity *entity,
+		void (*callback)(int, void *), void *data)
+{
+	struct taal_data *td = to_panel(entity);
+	struct video_source *src = td->src;
+
+	return src->ops.dsi->update(src, td->channel, callback, data);
+}
+
+static const struct display_entity_control_ops taal_control_ops = {
+	.set_state = taal_set_state,
+	.get_modes = taal_get_modes,
+	.get_size = taal_get_size,
+	.update = taal_update,
+};
+
+static void panel_taal_release(struct display_entity *entity)
+{
+	printk("panel taal release\n");
+}
+
+static int taal_probe(struct platform_device *pdev)
+{
+	const struct nokia_dsi_panel_data *pdata = pdev->dev.platform_data;
+	struct taal_data *td;
+	int r;
+	u8 id1, id2, id3;
+	struct video_source *src;
+
+	dev_dbg(&pdev->dev, "probe\n");
+
+	td = devm_kzalloc(&pdev->dev, sizeof(*td), GFP_KERNEL);
+	if (!td)
+		return -ENOMEM;
+
+	td->pdev = pdev;
+
+
+	td->reset_gpio = pdata->reset_gpio;
+
+	platform_set_drvdata(pdev, td);
+
+	mutex_init(&td->lock);
+
+	if (gpio_is_valid(td->reset_gpio)) {
+		r = devm_gpio_request_one(&pdev->dev, td->reset_gpio,
+				GPIOF_OUT_INIT_LOW, "taal rst");
+		if (r) {
+			dev_err(&pdev->dev, "failed to request reset gpio\n");
+			return r;
+		}
+	}
+
+
+	/* setup input */
+	src = video_source_find(pdata->video_source);
+	if (src = NULL) {
+		printk("failed to get video source\n");
+		return -EINVAL;
+	}
+
+	td->src = src;
+
+	r = src->ops.dsi->configure_pins(src, &pdata->pin_config);
+	if (r)
+		dev_err(&pdev->dev, "failed to configure DSI pins\n");
+
+	r = src->ops.dsi->set_clocks(src, 216000000, 10000000);
+	if (r)
+		dev_err(&pdev->dev, "failed to set HS and LP clocks\n");
+
+	src->ops.dsi->set_size(src, 864, 480);
+	src->ops.dsi->set_pixel_format(src, OMAP_DSS_DSI_FMT_RGB888);
+	src->ops.dsi->set_operation_mode(src, OMAP_DSS_DSI_CMD_MODE);
+
+	/* setup panel entity */
+
+	td->entity.dev = &pdev->dev;
+	td->entity.release = panel_taal_release;
+	td->entity.ops = &taal_control_ops;
+
+	r = display_entity_register(&td->entity);
+	if (r < 0) {
+		printk("failed to register display entity\n");
+		return r;
+	}
+
+	/* show version */
+
+	r = src->ops.dsi->enable(src);
+	if (r)
+		dev_err(&pdev->dev, "failed to enable bus\n");
+
+	taal_hw_reset(td);
+
+	r = taal_get_id(td, &id1, &id2, &id3);
+	if (r)
+		return r;
+
+	dev_info(&pdev->dev, "panel revision %02x.%02x.%02x\n", id1, id2, id3);
+
+	src->ops.dsi->disable(src);
+
+
+	return 0;
+#if 0
+	r = omap_dsi_request_vc(dssdev, &td->channel);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get virtual channel\n");
+		goto err_req_vc;
+	}
+
+	r = omap_dsi_set_vc_id(dssdev, td->channel, TCH);
+	if (r) {
+		dev_err(&pdev->dev, "failed to set VC_ID\n");
+		goto err_vc_id;
+	}
+#endif
+}
+
+static int taal_remove(struct platform_device *pdev)
+{
+	struct taal_data *td = platform_get_drvdata(pdev);
+
+	dev_dbg(&pdev->dev, "remove\n");
+
+	display_entity_unregister(&td->entity);
+
+	video_source_put(td->src);
+
+	/* reset, to be sure that the panel is in a valid state */
+	taal_hw_reset(td);
+
+#if 0
+	omap_dsi_release_vc(dssdev, td->channel);
+#endif
+	return 0;
+}
+
+static struct platform_driver taal_driver = {
+	.probe	= taal_probe,
+	.remove	= taal_remove,
+	.driver	= {
+		.name	= "taal",
+		.owner	= THIS_MODULE,
+	},
+};
+
+module_platform_driver(taal_driver);
+
+MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
+MODULE_DESCRIPTION("Taal Driver");
+MODULE_LICENSE("GPL");
diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h
index 225a841..fe274a5 100644
--- a/include/video/omap-panel-nokia-dsi.h
+++ b/include/video/omap-panel-nokia-dsi.h
@@ -14,6 +14,8 @@ struct omap_dss_device;
  * @pin_config: DSI pin configuration
  */
 struct nokia_dsi_panel_data {
+	const char *video_source;
+
 	const char *name;
 
 	int reset_gpio;
@@ -27,8 +29,6 @@ struct nokia_dsi_panel_data {
 	bool use_dsi_backlight;
 
 	struct omap_dsi_pin_config pin_config;
-
-	void *video_source;
 };
 
 #endif /* __OMAP_NOKIA_DSI_PANEL_H */
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 4/6] video: add generic dvi monitor
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/display/panel-dvi.c |  164 +++++++++++++++++++++++++++++++++++++
 include/video/panel-dvi.h         |   18 ++++
 2 files changed, 182 insertions(+)
 create mode 100644 drivers/video/display/panel-dvi.c
 create mode 100644 include/video/panel-dvi.h

diff --git a/drivers/video/display/panel-dvi.c b/drivers/video/display/panel-dvi.c
new file mode 100644
index 0000000..01cea09
--- /dev/null
+++ b/drivers/video/display/panel-dvi.c
@@ -0,0 +1,164 @@
+/*
+ * Generic DVI monitor
+ *
+ * Copyright (C) 2012 Texas Instruments
+ *
+ * Contacts: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+#include <video/display.h>
+#include <video/panel-dvi.h>
+
+struct panel_data {
+	struct display_entity entity;
+	struct video_source *in;
+};
+
+#define to_panel(p) container_of(p, struct panel_data, entity)
+
+static int panel_dvi_set_state(struct display_entity *entity,
+			       enum display_entity_state state)
+{
+	struct panel_data *data = to_panel(entity);
+	struct video_source *in = data->in;
+
+	switch (state) {
+	case DISPLAY_ENTITY_STATE_OFF:
+	case DISPLAY_ENTITY_STATE_STANDBY:
+		in->common_ops->set_stream(in, DISPLAY_ENTITY_STREAM_STOPPED);
+		break;
+
+	case DISPLAY_ENTITY_STATE_ON:
+		in->common_ops->set_stream(in, DISPLAY_ENTITY_STREAM_CONTINUOUS);
+		break;
+	}
+
+	return 0;
+}
+
+static const struct videomode vga_mode = {
+	.pixelclock = 23500,
+
+	.hactive = 640,
+	.hfront_porch = 48,
+	.hback_porch = 80,
+	.hsync_len = 32,
+
+	.vactive = 480,
+	.vfront_porch = 3,
+	.vback_porch = 7,
+	.vsync_len = 4,
+
+	.hah = true,
+	.vah = true,
+	.de = true,
+};
+
+static int panel_dvi_get_modes(struct display_entity *entity,
+			       const struct videomode **modes)
+{
+	//struct panel_data *data = to_panel(entity);
+
+	*modes = &vga_mode;
+	return 1;
+}
+
+static int panel_dvi_get_size(struct display_entity *entity,
+			      unsigned int *width, unsigned int *height)
+{
+	//struct panel_data *data = to_panel(entity);
+
+	*width = 10;
+	*height = 10;
+	return 0;
+}
+
+static const struct display_entity_control_ops panel_dvi_control_ops = {
+	.set_state = panel_dvi_set_state,
+	.get_modes = panel_dvi_get_modes,
+	.get_size = panel_dvi_get_size,
+};
+
+static void panel_dvi_release(struct display_entity *entity)
+{
+	printk("panel dvi release\n");
+}
+
+static int __devinit panel_dvi_probe(struct platform_device *pdev)
+{
+	const struct panel_dvi_platform_data *pdata = pdev->dev.platform_data;
+	struct panel_data *data;
+	int ret;
+
+	if (pdata = NULL)
+		return -ENODEV;
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+	if (data = NULL)
+		return -ENOMEM;
+
+	/* setup input */
+	data->in = video_source_find(pdata->video_source);
+	if (data->in = NULL) {
+		printk("failed to get video source\n");
+		return -EINVAL;
+	}
+
+	/* setup default mode */
+	data->in->ops.dvi->set_videomode(data->in, &vga_mode);
+
+	/* setup panel entity */
+
+	data->entity.dev = &pdev->dev;
+	data->entity.release = panel_dvi_release;
+	data->entity.ops = &panel_dvi_control_ops;
+
+	ret = display_entity_register(&data->entity);
+	if (ret < 0) {
+		video_source_put(data->in);
+		return ret;
+	}
+
+	platform_set_drvdata(pdev, data);
+
+	return 0;
+}
+
+static int panel_dvi_remove(struct platform_device *pdev)
+{
+	struct panel_data *data = platform_get_drvdata(pdev);
+
+	display_entity_unregister(&data->entity);
+
+	video_source_put(data->in);
+
+	return 0;
+}
+
+
+static const struct dev_pm_ops panel_dvi_dev_pm_ops = {
+};
+
+static struct platform_driver panel_dvi_driver = {
+	.probe = panel_dvi_probe,
+	.remove = panel_dvi_remove,
+	.driver = {
+		.name = "panel_dvi",
+		.owner = THIS_MODULE,
+		.pm = &panel_dvi_dev_pm_ops,
+	},
+};
+
+module_platform_driver(panel_dvi_driver);
+
+MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
+MODULE_DESCRIPTION("DVI Monitor");
+MODULE_LICENSE("GPL");
diff --git a/include/video/panel-dvi.h b/include/video/panel-dvi.h
new file mode 100644
index 0000000..ab88380
--- /dev/null
+++ b/include/video/panel-dvi.h
@@ -0,0 +1,18 @@
+/*
+ * DVI Display Panel
+ *
+ * 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.
+ */
+
+#ifndef __PANEL_DVI_H__
+#define __PANEL_DVI_H__
+
+#include <linux/videomode.h>
+
+struct panel_dvi_platform_data {
+	const char *video_source;
+};
+
+#endif /* __PANEL_DVI_H__ */
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 3/6] video: add tfp410
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/display/chip-tfp410.c |  164 +++++++++++++++++++++++++++++++++++
 include/video/omap-panel-tfp410.h   |    4 +
 2 files changed, 168 insertions(+)
 create mode 100644 drivers/video/display/chip-tfp410.c

diff --git a/drivers/video/display/chip-tfp410.c b/drivers/video/display/chip-tfp410.c
new file mode 100644
index 0000000..2f8bdb6
--- /dev/null
+++ b/drivers/video/display/chip-tfp410.c
@@ -0,0 +1,164 @@
+/*
+ * TFP410 DPI-to-DVI bridge
+ *
+ * Copyright (C) 2012 Texas Instruments
+ *
+ * Contacts: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+
+#include <video/display.h>
+#include <video/omap-panel-tfp410.h>
+
+struct tfp410_data {
+	struct video_source *in;
+
+	struct video_source out;
+
+	int power_down_gpio;
+};
+
+#define to_tfp410(p) container_of(p, struct tfp410_data, out)
+
+static int tfp410_set_stream(struct video_source *src,
+				     enum video_source_stream_state state)
+{
+	struct tfp410_data *data = to_tfp410(src);
+	struct video_source *in = data->in;
+	int r;
+
+	r = in->common_ops->set_stream(in, state);
+	if (r)
+		return r;
+
+	switch (state) {
+	case DISPLAY_ENTITY_STREAM_STOPPED:
+		printk("tfp410 set_stream: STOPPED\n");
+
+		gpio_set_value_cansleep(data->power_down_gpio, 0);
+
+		break;
+
+	case DISPLAY_ENTITY_STREAM_CONTINUOUS:
+		printk("tfp410 set_stream: CONTINUOUS\n");
+
+		gpio_set_value_cansleep(data->power_down_gpio, 1);
+
+		break;
+
+	default:
+		printk("tfp410 set_stream error\n");
+		break;
+	}
+
+	return 0;
+}
+
+static int tfp410_set_vm(struct video_source *src, const struct videomode *vm)
+{
+	struct tfp410_data *data = to_tfp410(src);
+	struct video_source *in = data->in;
+
+	printk("tfp410 set vm\n");
+
+	return in->ops.dpi->set_videomode(in, vm);
+}
+
+static const struct common_video_source_ops tfp410_common_ops = {
+	.set_stream = tfp410_set_stream,
+};
+
+static const struct dvi_video_source_ops tfp410_dvi_ops = {
+	.set_videomode = tfp410_set_vm,
+};
+
+static void tfp410_release(struct video_source *src)
+{
+	printk("tfp410 entity release\n");
+}
+
+static int __devinit tfp410_probe(struct platform_device *pdev)
+{
+	const struct tfp410_platform_data *pdata = pdev->dev.platform_data;
+	struct tfp410_data *data;
+	int r;
+
+	if (pdata = NULL)
+		return -ENODEV;
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+	if (data = NULL)
+		return -ENOMEM;
+
+	data->power_down_gpio = pdata->power_down_gpio;
+
+	r = devm_gpio_request_one(&pdev->dev, pdata->power_down_gpio,
+			GPIOF_OUT_INIT_LOW, "tfp410 pd");
+	if (r) {
+		printk("failed to request pd gpio\n");
+		return r;
+	}
+
+	/* setup input */
+
+	data->in = video_source_find(pdata->video_source);
+	if (data->in = NULL) {
+		printk("failed to get video source\n");
+		return -EINVAL;
+	}
+
+	data->in->ops.dpi->set_data_lines(data->in, 24);
+
+	/* setup output */
+
+	data->out.dev = &pdev->dev;
+	data->out.release = tfp410_release;
+	data->out.common_ops = &tfp410_common_ops;
+	data->out.ops.dvi = &tfp410_dvi_ops;
+	data->out.name = pdata->video_output;
+
+	r = video_source_register(&data->out);
+	if (r < 0) {
+		printk("tfp410 entity register failed\n");
+		video_source_put(data->in);
+		return r;
+	}
+
+	platform_set_drvdata(pdev, data);
+
+	return 0;
+}
+
+static int tfp410_remove(struct platform_device *pdev)
+{
+	struct tfp410_data *data = platform_get_drvdata(pdev);
+
+	video_source_unregister(&data->out);
+
+	video_source_put(data->in);
+
+	return 0;
+}
+
+static struct platform_driver tfp410_driver = {
+	.probe = tfp410_probe,
+	.remove = tfp410_remove,
+	.driver = {
+		.name = "tfp410",
+		.owner = THIS_MODULE,
+	},
+};
+
+module_platform_driver(tfp410_driver);
+
+MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
+MODULE_DESCRIPTION("TFP410 DPI-to-DVI Bridge");
+MODULE_LICENSE("GPL");
diff --git a/include/video/omap-panel-tfp410.h b/include/video/omap-panel-tfp410.h
index b5b05f4..18f2b46 100644
--- a/include/video/omap-panel-tfp410.h
+++ b/include/video/omap-panel-tfp410.h
@@ -30,6 +30,10 @@ struct omap_dss_device;
  */
 struct tfp410_platform_data {
 	const char *name;
+
+	const char *video_source;
+	const char *video_output;
+
 	u16 i2c_bus_num;
 	int power_down_gpio;
 };
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 2/6] video: add generic dpi panel
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/display/panel-dpi.c |  155 +++++++++++++++++++++++++++++++++++++
 include/video/panel-dpi.h         |   25 ++++++
 2 files changed, 180 insertions(+)
 create mode 100644 drivers/video/display/panel-dpi.c
 create mode 100644 include/video/panel-dpi.h

diff --git a/drivers/video/display/panel-dpi.c b/drivers/video/display/panel-dpi.c
new file mode 100644
index 0000000..824cd88
--- /dev/null
+++ b/drivers/video/display/panel-dpi.c
@@ -0,0 +1,155 @@
+/*
+ * DPI Display Panel
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+#include <video/display.h>
+#include <video/panel-dpi.h>
+
+struct panel_dpi {
+	struct display_entity entity;
+	struct video_source *src;
+	const struct panel_dpi_platform_data *pdata;
+};
+
+#define to_panel_dpi(p)		container_of(p, struct panel_dpi, entity)
+
+static int panel_dpi_set_state(struct display_entity *entity,
+			       enum display_entity_state state)
+{
+	struct panel_dpi *panel = to_panel_dpi(entity);
+	struct video_source *src = panel->src;
+
+	switch (state) {
+	case DISPLAY_ENTITY_STATE_OFF:
+	case DISPLAY_ENTITY_STATE_STANDBY:
+		src->common_ops->set_stream(src,
+				DISPLAY_ENTITY_STREAM_STOPPED);
+		break;
+
+	case DISPLAY_ENTITY_STATE_ON:
+		src->common_ops->set_stream(src,
+				DISPLAY_ENTITY_STREAM_CONTINUOUS);
+		break;
+	}
+
+	return 0;
+}
+
+static int panel_dpi_get_modes(struct display_entity *entity,
+			       const struct videomode **modes)
+{
+	struct panel_dpi *panel = to_panel_dpi(entity);
+
+	*modes = panel->pdata->mode;
+	return 1;
+}
+
+static int panel_dpi_get_size(struct display_entity *entity,
+			      unsigned int *width, unsigned int *height)
+{
+	struct panel_dpi *panel = to_panel_dpi(entity);
+
+	*width = panel->pdata->width;
+	*height = panel->pdata->height;
+	return 0;
+}
+
+static const struct display_entity_control_ops panel_dpi_control_ops = {
+	.set_state = panel_dpi_set_state,
+	.get_modes = panel_dpi_get_modes,
+	.get_size = panel_dpi_get_size,
+};
+
+static void panel_dpi_release(struct display_entity *entity)
+{
+	struct panel_dpi *panel = to_panel_dpi(entity);
+
+	kfree(panel);
+}
+
+static int panel_dpi_remove(struct platform_device *pdev)
+{
+	struct panel_dpi *panel = platform_get_drvdata(pdev);
+
+	display_entity_unregister(&panel->entity);
+
+	if (panel->src) {
+		video_source_put(panel->src);
+		panel->src = NULL;
+	}
+
+	platform_set_drvdata(pdev, NULL);
+
+	return 0;
+}
+
+static int __devinit panel_dpi_probe(struct platform_device *pdev)
+{
+	const struct panel_dpi_platform_data *pdata = pdev->dev.platform_data;
+	struct panel_dpi *panel;
+	int ret;
+
+	if (pdata = NULL)
+		return -ENODEV;
+
+	panel = kzalloc(sizeof(*panel), GFP_KERNEL);
+	if (panel = NULL)
+		return -ENOMEM;
+
+	panel->pdata = pdata;
+
+	panel->src = video_source_find(pdata->video_source);
+	if (panel->src = NULL) {
+		printk("failed to get video source\n");
+		return -EINVAL;
+	}
+
+	panel->src->ops.dpi->set_data_lines(panel->src, 24);
+	panel->src->ops.dpi->set_videomode(panel->src, pdata->mode);
+
+	panel->entity.dev = &pdev->dev;
+	panel->entity.release = panel_dpi_release;
+	panel->entity.ops = &panel_dpi_control_ops;
+
+	ret = display_entity_register(&panel->entity);
+	if (ret < 0) {
+		kfree(panel);
+		return ret;
+	}
+
+	platform_set_drvdata(pdev, panel);
+
+	return 0;
+}
+
+static const struct dev_pm_ops panel_dpi_dev_pm_ops = {
+};
+
+static struct platform_driver panel_dpi_driver = {
+	.probe = panel_dpi_probe,
+	.remove = panel_dpi_remove,
+	.driver = {
+		.name = "panel_dpi",
+		.owner = THIS_MODULE,
+		.pm = &panel_dpi_dev_pm_ops,
+	},
+};
+
+module_platform_driver(panel_dpi_driver);
+
+MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
+MODULE_DESCRIPTION("DPI Display Panel");
+MODULE_LICENSE("GPL");
diff --git a/include/video/panel-dpi.h b/include/video/panel-dpi.h
new file mode 100644
index 0000000..0c5856e
--- /dev/null
+++ b/include/video/panel-dpi.h
@@ -0,0 +1,25 @@
+/*
+ * DPI Display Panel
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ *
+ * 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.
+ */
+
+#ifndef __PANEL_DPI_H__
+#define __PANEL_DPI_H__
+
+#include <linux/videomode.h>
+
+struct panel_dpi_platform_data {
+	const char *video_source;
+	unsigned long width;		/* Panel width in mm */
+	unsigned long height;		/* Panel height in mm */
+	const struct videomode *mode;
+};
+
+#endif /* __PANEL_DPI_H__ */
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 1/6] video: add display-core
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen
In-Reply-To: <1355495252-26364-1-git-send-email-tomi.valkeinen@ti.com>

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/display/display-core.c |  207 ++++++++++++++++++++++++++++++++++
 include/video/display.h              |  166 +++++++++++++++++++++++++++
 2 files changed, 373 insertions(+)
 create mode 100644 drivers/video/display/display-core.c
 create mode 100644 include/video/display.h

diff --git a/drivers/video/display/display-core.c b/drivers/video/display/display-core.c
new file mode 100644
index 0000000..5f8be30
--- /dev/null
+++ b/drivers/video/display/display-core.c
@@ -0,0 +1,207 @@
+/*
+ * Display Core
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ *
+ * 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.
+ */
+
+#include <linux/export.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/videomode.h>
+
+#include <video/display.h>
+
+/* -----------------------------------------------------------------------------
+ * Display Entity
+ */
+
+static LIST_HEAD(display_entity_list);
+static DEFINE_MUTEX(display_entity_mutex);
+
+struct display_entity *display_entity_get_first(void)
+{
+	if (list_empty(&display_entity_list))
+		return NULL;
+
+	return list_first_entry(&display_entity_list, struct display_entity,
+			list);
+}
+EXPORT_SYMBOL(display_entity_get_first);
+
+int display_entity_set_state(struct display_entity *entity,
+			     enum display_entity_state state)
+{
+	int ret;
+
+	if (entity->state = state)
+		return 0;
+
+	if (!entity->ops || !entity->ops->set_state)
+		return 0;
+
+	ret = entity->ops->set_state(entity, state);
+	if (ret < 0)
+		return ret;
+
+	entity->state = state;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(display_entity_set_state);
+
+int display_entity_get_modes(struct display_entity *entity,
+			     const struct videomode **modes)
+{
+	if (!entity->ops || !entity->ops->get_modes)
+		return 0;
+
+	return entity->ops->get_modes(entity, modes);
+}
+EXPORT_SYMBOL_GPL(display_entity_get_modes);
+
+int display_entity_get_size(struct display_entity *entity,
+			    unsigned int *width, unsigned int *height)
+{
+	if (!entity->ops || !entity->ops->get_size)
+		return -EOPNOTSUPP;
+
+	return entity->ops->get_size(entity, width, height);
+}
+EXPORT_SYMBOL_GPL(display_entity_get_size);
+
+static void display_entity_release(struct kref *ref)
+{
+	struct display_entity *entity +		container_of(ref, struct display_entity, ref);
+
+	if (entity->release)
+		entity->release(entity);
+}
+
+struct display_entity *display_entity_get(struct display_entity *entity)
+{
+	if (entity = NULL)
+		return NULL;
+
+	kref_get(&entity->ref);
+	return entity;
+}
+EXPORT_SYMBOL_GPL(display_entity_get);
+
+void display_entity_put(struct display_entity *entity)
+{
+	kref_put(&entity->ref, display_entity_release);
+}
+EXPORT_SYMBOL_GPL(display_entity_put);
+
+int __must_check __display_entity_register(struct display_entity *entity,
+					   struct module *owner)
+{
+	kref_init(&entity->ref);
+	entity->owner = owner;
+	entity->state = DISPLAY_ENTITY_STATE_OFF;
+
+	mutex_lock(&display_entity_mutex);
+	list_add(&entity->list, &display_entity_list);
+
+	mutex_unlock(&display_entity_mutex);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(__display_entity_register);
+
+void display_entity_unregister(struct display_entity *entity)
+{
+	mutex_lock(&display_entity_mutex);
+
+	list_del(&entity->list);
+	mutex_unlock(&display_entity_mutex);
+
+	display_entity_put(entity);
+}
+EXPORT_SYMBOL_GPL(display_entity_unregister);
+
+/* -----------------------------------------------------------------------------
+ * Video Source
+ */
+
+static LIST_HEAD(video_source_list);
+static DEFINE_MUTEX(video_source_mutex);
+
+int __must_check __video_source_register(struct video_source *src,
+					   struct module *owner)
+{
+	kref_init(&src->ref);
+	src->owner = owner;
+
+	mutex_lock(&video_source_mutex);
+	list_add(&src->list, &video_source_list);
+
+	mutex_unlock(&video_source_mutex);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(__video_source_register);
+
+void video_source_unregister(struct video_source *src)
+{
+	mutex_lock(&video_source_mutex);
+
+	list_del(&src->list);
+	mutex_unlock(&video_source_mutex);
+
+	video_source_put(src);
+}
+EXPORT_SYMBOL_GPL(video_source_unregister);
+
+
+static void video_source_release(struct kref *ref)
+{
+	struct video_source *src +		container_of(ref, struct video_source, ref);
+
+	if (src->release)
+		src->release(src);
+}
+
+struct video_source *video_source_get(struct video_source *src)
+{
+	if (src = NULL)
+		return NULL;
+
+	kref_get(&src->ref);
+	return src;
+}
+EXPORT_SYMBOL_GPL(video_source_get);
+
+void video_source_put(struct video_source *src)
+{
+	kref_put(&src->ref, video_source_release);
+}
+EXPORT_SYMBOL_GPL(video_source_put);
+
+struct video_source *video_source_find(const char *name)
+{
+	struct video_source *src;
+
+	list_for_each_entry(src, &video_source_list, list) {
+		if (strcmp(src->name, name) = 0) {
+			kref_get(&src->ref);
+			return src;
+		}
+	}
+
+	return NULL;
+}
+EXPORT_SYMBOL_GPL(video_source_find);
+
+MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
+MODULE_DESCRIPTION("Display Core");
+MODULE_LICENSE("GPL");
diff --git a/include/video/display.h b/include/video/display.h
new file mode 100644
index 0000000..b639fd0
--- /dev/null
+++ b/include/video/display.h
@@ -0,0 +1,166 @@
+/*
+ * Display Core
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ *
+ * 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.
+ */
+
+#ifndef __DISPLAY_H__
+#define __DISPLAY_H__
+
+#include <linux/kref.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <video/omapdss.h>
+
+struct display_entity;
+struct video_source;
+struct videomode;
+
+/* -----------------------------------------------------------------------------
+ * Display Entity
+ */
+
+/* Hack to get the first registered display entity */
+struct display_entity *display_entity_get_first(void);
+
+enum display_entity_state {
+	DISPLAY_ENTITY_STATE_OFF,
+	DISPLAY_ENTITY_STATE_STANDBY,
+	DISPLAY_ENTITY_STATE_ON,
+};
+
+struct display_entity_control_ops {
+	int (*set_state)(struct display_entity *ent,
+			 enum display_entity_state state);
+	int (*update)(struct display_entity *ent,
+			void (*callback)(int, void *), void *data);
+	int (*get_modes)(struct display_entity *ent,
+			 const struct videomode **modes);
+	int (*get_size)(struct display_entity *ent,
+			unsigned int *width, unsigned int *height);
+};
+
+struct display_entity {
+	struct list_head list;
+	struct device *dev;
+	struct module *owner;
+	struct kref ref;
+
+	const struct display_entity_control_ops *ops;
+
+	void(*release)(struct display_entity *ent);
+
+	enum display_entity_state state;
+};
+
+int display_entity_set_state(struct display_entity *entity,
+			     enum display_entity_state state);
+int display_entity_get_modes(struct display_entity *entity,
+			     const struct videomode **modes);
+int display_entity_get_size(struct display_entity *entity,
+			    unsigned int *width, unsigned int *height);
+
+struct display_entity *display_entity_get(struct display_entity *entity);
+void display_entity_put(struct display_entity *entity);
+
+int __must_check __display_entity_register(struct display_entity *entity,
+					   struct module *owner);
+void display_entity_unregister(struct display_entity *entity);
+
+#define display_entity_register(display_entity) \
+	__display_entity_register(display_entity, THIS_MODULE)
+
+
+/* -----------------------------------------------------------------------------
+ * Video Source
+ */
+
+enum video_source_stream_state {
+	DISPLAY_ENTITY_STREAM_STOPPED,
+	DISPLAY_ENTITY_STREAM_CONTINUOUS,
+};
+
+struct common_video_source_ops {
+	int (*set_stream)(struct video_source *src,
+			 enum video_source_stream_state state);
+};
+
+struct dpi_video_source_ops {
+	int (*set_videomode)(struct video_source *src,
+			const struct videomode *vm);
+	int (*set_data_lines)(struct video_source *src, int lines);
+};
+
+struct dsi_video_source_ops {
+	/* enable/disable dsi bus */
+	int (*enable)(struct video_source *src);
+	void (*disable)(struct video_source *src);
+
+	/* bus configuration */
+	int (*configure_pins)(struct video_source *src,
+			const struct omap_dsi_pin_config *pins);
+	int (*set_clocks)(struct video_source *src,
+			unsigned long ddr_clk,
+			unsigned long lp_clk);
+
+	void (*set_operation_mode)(struct video_source *src,
+			enum omap_dss_dsi_mode mode);
+	void (*set_pixel_format)(struct video_source *src,
+			enum omap_dss_dsi_pixel_format fmt);
+	void (*set_size)(struct video_source *src, u16 w, u16 h);
+
+	void (*enable_hs)(struct video_source *src, bool enable);
+
+	/* data transfer */
+	int (*dcs_write)(struct video_source *src, int channel,
+			u8 *data, size_t len);
+	int (*dcs_read)(struct video_source *src, int channel, u8 dcs_cmd,
+			u8 *data, size_t len);
+	int (*update)(struct video_source *src, int channel,
+			void (*callback)(int, void *), void *data);
+};
+
+struct dvi_video_source_ops {
+	int (*set_videomode)(struct video_source *src,
+			const struct videomode *vm);
+};
+
+struct video_source {
+	struct list_head list;
+	struct device *dev;
+	struct module *owner;
+	struct kref ref;
+
+	const char *name;
+
+	const struct common_video_source_ops *common_ops;
+
+	union {
+		const struct dpi_video_source_ops *dpi;
+		const struct dsi_video_source_ops *dsi;
+		const struct dvi_video_source_ops *dvi;
+	} ops;
+
+	void(*release)(struct video_source *src);
+};
+
+
+#define video_source_register(video_source) \
+	__video_source_register(video_source, THIS_MODULE)
+
+int __must_check __video_source_register(struct video_source *entity,
+					   struct module *owner);
+void video_source_unregister(struct video_source *entity);
+
+struct video_source *video_source_get(struct video_source *src);
+void video_source_put(struct video_source *src);
+
+struct video_source *video_source_find(const char *name);
+
+#endif /* __DISPLAY_H__ */
-- 
1.7.10.4


^ permalink raw reply related

* [RFC 0/6] Common Display Framework-T
From: Tomi Valkeinen @ 2012-12-14 14:27 UTC (permalink / raw)
  To: Laurent Pinchart, linux-fbdev, dri-devel; +Cc: Tomi Valkeinen

Hi,

I have been testing Common Display Framework on OMAP, and making changes that
I've discussed in the posts I've sent in reply to the CDF series from Laurent.
While my CDF code is rather hacky and not at all ready, I wanted to post the
code for comments and also as a reference code to my posts.

So here is CDF-T (Tomi-edition =). 

Changes compared to Laurent's CDF
---------------------------------

- DBI bus is removed. I don't have any DBI devices, and as I said in my posts,
  I didn't see need for a real bus for DBI (or DSI). I thus also removed the
  DBI panels.

- Split the display_entity into two parts: video_source, which is used to
  connect the display chips and panels, and display_entity, which represent
  either the panel or the whole pipeline (I'm not sure which is better).

- Added ops for DVI and DSI

- Added driver for TFP410, a DPI to DVI converter chip
- Added driver for generic DVI monitor
- Added driver for Taal, a DSI command mode panel

- Removed DISPLAY_ENTITY_STREAM_SINGLE_SHOT, and instead there's update() op.
  It's perhaps possible to use the single-shot method, but I went for a
  separate op to get a "update done"-callback implemented easily.

Notes about the code
--------------------

As I said, the code is rather untidy, but I think it's more or less
understandable. I've skipped adding any helper funcs, for example to call the
ops, so it's easier for me to change the API.

I also (ab)used some of the omapdss panel headers to ease my hacking for
omapdss+cdf. These should be quite clear.

The code, including hacks to omapdss to make it use CDF, can be found from:
git://gitorious.org/linux-omap-dss2/linux.git work/dss-dev-model-cdf

The DSI part is very unfinished. I am able to use it to start up the Taal
panel, and send frames to the panel, but it's really missing lots of stuff.

About display_entity & video_source
-----------------------------------

I've discussed this split in previous posts, but I'll describe it here again.

As I see it, the connections between the display blocks, and the use of the
panel (and thus the whole pipeline) are very different things, and I think they
should be separated. So in my version I have struct video_source, used to
connect the blocks, and display_entity, representing the panel or the whole
pipeline. display_entity is probably not a good name for it anymore, but I
didn't come up with a good one yet.

As an example, let's look at chip-tfp410.c and panel-dvi.c.

tfp410 uses two video_sources, one for input and one for output. The input
comes from some other display block, in my case from OMAP display subsystem.
OMAP DSS has registered a DPI video_source, and the tfp410 driver will get this
source using video_source_find().

tfp410 registers its output as a video source, using video_source_register.
panel-dvi will in turn use video_source_find() to get it.

Both drivers use video_source to configure the input bus, i.e. tfp410
configures the DPI bus between OMAP DSS and TFP410 using, for example,
set_data_lines op to configure the number of datalines on the DPI bus.

With the video_sources in place, the whole video pipeline can be used. However,
we still need to expose an API so that somebody can actually use the pipeline.
This is done with display_entity. display_entity contains higher level ops,
which are not bus specific. The display_entity is registered by the panel at
the end of the chain.

In my model the display_entity ops go to the panel driver, which then calls ops
in the input video source to do the work. Laurent has objected to this model,
and would rather have the display_entity ops go to the DSS side (if I
understood right), which would then propagate forward towards the panel. I have
still kept my model, as I don't see the downsides with my model, nor do I see
any use for propagating the ops from DSS to the panel. But I'm happy to hear
examples how it is beneficial and could be used.


About the bus model
-------------------

Lauren't version uses a linux bus for DBI. The idea here is that DBI is the
control bus fro the panel/chip, and should thus be represented by a real bus.
While I agreed to this approach when we discussed about it, I now am slightly
against it.

My reason is that DBI (or DSI or any other similar bus) is not really control
bus, it is a video bus. It _can_ be used for control, but video is the main
purpose. This has the partical issues:

- There's never use for DBI only for control. DBI is always used for either
  video only, or control+video.

- If DBI is used only for video, there's no DBI bus. How to configure DBI in
  this case?

- If DBI is used for control and video, we have two separate APIs for the bus.
  In theory it's possible to handle this, but in practice it may be impossible,
  especially for more complex busses like DSI.

So in my version I added DSI as a plain video_source, without a real linux bus.
I think this model is a lot simpler, and works better.

 Tomi

Tomi Valkeinen (6):
  video: add display-core
  video: add generic dpi panel
  video: add tfp410
  video: add generic dvi monitor
  video: add taal panel
  video: add makefile & kconfig

 drivers/video/Kconfig                |    1 +
 drivers/video/Makefile               |    1 +
 drivers/video/display/Kconfig        |   26 +++
 drivers/video/display/Makefile       |    5 +
 drivers/video/display/chip-tfp410.c  |  164 +++++++++++++++
 drivers/video/display/display-core.c |  207 ++++++++++++++++++
 drivers/video/display/panel-dpi.c    |  155 ++++++++++++++
 drivers/video/display/panel-dvi.c    |  164 +++++++++++++++
 drivers/video/display/panel-taal.c   |  383 ++++++++++++++++++++++++++++++++++
 include/video/display.h              |  166 +++++++++++++++
 include/video/omap-panel-nokia-dsi.h |    4 +-
 include/video/omap-panel-tfp410.h    |    4 +
 include/video/panel-dpi.h            |   25 +++
 include/video/panel-dvi.h            |   18 ++
 14 files changed, 1321 insertions(+), 2 deletions(-)
 create mode 100644 drivers/video/display/Kconfig
 create mode 100644 drivers/video/display/Makefile
 create mode 100644 drivers/video/display/chip-tfp410.c
 create mode 100644 drivers/video/display/display-core.c
 create mode 100644 drivers/video/display/panel-dpi.c
 create mode 100644 drivers/video/display/panel-dvi.c
 create mode 100644 drivers/video/display/panel-taal.c
 create mode 100644 include/video/display.h
 create mode 100644 include/video/panel-dpi.h
 create mode 100644 include/video/panel-dvi.h

-- 
1.7.10.4


^ permalink raw reply

* [GIT PULL] fbdev changes for 3.8
From: Tomi Valkeinen @ 2012-12-14 10:22 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-omap, linux-fbdev, linux-kernel, Florian Tobias Schandinat

[-- Attachment #1: Type: text/plain, Size: 20843 bytes --]

Hi Linus,

Florian, the fbdev maintainer, has been very busy lately, so I offered to send
the pull request for fbdev for this merge window.

There are a few conflicts, but they look clear to me.
arch/arm/plat-omap/common.c is to be removed.

 Tomi

The following changes since commit 9489e9dcae718d5fde988e4a684a0f55b5f94d17:

  Linux 3.7-rc7 (2012-11-25 17:59:19 -0800)

are available in the git repository at:

  git://gitorious.org/linux-omap-dss2/linux.git tags/fbdev-for-3.8

for you to fetch changes up to e7f5c9a16ea2648a3e85af8e34191026bf3dcb62:

  Merge tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux into for-linus (2012-12-13 14:30:56 +0200)

----------------------------------------------------------------

fbdev changes for 3.8:

OMAPDSS changes, including:
- use dynanic debug prints
- OMAP platform dependency removals
- Creation of compat-layer, helping us to improve omapdrm
- Misc cleanups, aiming to make omadss more in line with the upcoming common
  display framework

Exynos DP changes for the 3.8 merge window:
- Device Tree support for Samsung Exynos DP
- SW Link training is cleaned up.
- HPD interrupt is supported.

Samsung Framebuffer changes for the 3.8 merge window:
- The bit definitions of header file are updated.
- Some minor typos are fixed.
- Some minor bugs of s3c_fb_check_var() are fixed.

FB related changes for SH Mobile, Freescale DIU

Add support for the Solomon SSD1307 OLED Controller

----------------------------------------------------------------
Aaro Koskinen (1):
      OMAPDSS: panel-n8x0: register the DSS driver after SPI probe

Ajay Kumar (5):
      video: exynos_dp: Add device tree support to DP driver
      video: exynos_dp: device tree documentation
      video: exynos_dp: Reset and initialize DP before requesting irq
      video: exynos_dp: Fix incorrect setting for INT_CTL
      video: exynos_dp: remove redundant parameters

Archit Taneja (10):
      OMAPDSS: Remove acb and acbi fields from omap_dss_device
      OMAPDSS: DISPC: Fix calc_scaling_44xx() bugs for writeback pipeline
      OMAPDSS: DISPC: Don't allow predecimation for writeback
      OMAPDSS: DISPC: Use output width and height to calculate row/pix inc for writeback
      OMAPDSS: APPLY: Don't treat an overlay's channel out as shadow bits
      OMAPDSS: APPLY: Remove unnecessary variable in dss_apply_irq_handler
      OMAPDSS: APPLY: Remove unnecessary call to mg_clear_shadow_dirty
      OMAPDSS: Add overlay manager width and height limits as a dispc feature
      OMAPDSS: Add a dispc_features struct for OMAP5
      OMAPDSS: Use only "omapdss_dss" platform device to get context lost count

Axel Lin (1):
      OMAPDSS: Add terminating entry for picodlp_i2c_id table

Chandrabhanu Mahapatra (5):
      OMAPDSS: Move definition of DEBUG flag to Makefile
      OMAPDSS: Create new debug config options
      OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
      OMAPDSS: Replace multi part debug prints with pr_debug
      OMAPDSS: Remove dss_debug variable

Chuansheng Liu (2):
      OMAPDSS: DISPC: Fix the usage of wait_for_completion_timeout
      OMAPDSS: APPLY: Fix the usage of wait_for_completion_timeout

Hideki EIRAKU (1):
      fbdev: sh_mobile_lcdc: use dma_mmap_coherent

Jingoo Han (14):
      video: s3c-fb: clean the bit definition for WINCON register
      video: s3c-fb: move the address definitions for VIDTCON registers
      video: s3c-fb: move the address definition for VIDOSD register
      video: s3c-fb: move the bit definitions for VIDINTCON0 register
      video: s3c-fb: move the bit definitions for WINxMAP and WPALCON register
      video: s3c-fb: move the bit definitions for DITHMODE register
      video: s3c-fb: add the bit definitions for VIDCON0_VIDOUT_WB
      video: s3c-fb: fix typo in comment
      video: s3c-fb: fix help message for FB_S3C_DEBUG_REGWRITE
      video: s3c-fb: use FIMD_V8_VIDTCON0 for EXYNOS5 FIMD
      video: s3c-fb: use dev_get_drvdata() instead of platform_get_drvdata()
      video: s3c-fb: add "drop through" comment
      video: s3c-fb: return an error when bpp is invalid
      video: s3c-fb: fix red offset and length for ARGB232 format

Laurent Pinchart (19):
      fbdev: sh_mobile_lcdc: Get display dimensions from the channel structure
      fbdev: sh_mobile_lcdc: Rename mode argument to modes
      fbdev: sh_mobile_lcdc: Remove priv argument from channel and overlay init
      ARM: mach-shmobile: ag5evm: Add LCDC tx_dev field to platform data
      fbdev: sh_mipi_dsi: Add channel field to platform data
      ARM: mach-shmobile: Initiliaze the new sh_mipi_dsi_info channel field
      fbdev: sh_mipi_dsi: Use the sh_mipi_dsi_info channel field
      fbdev: sh_mipi_dsi: Use the LCDC entity default mode
      fbdev: sh_mipi_dsi: Remove last reference to LCDC platform data
      ARM: mach-shmobile: Remove the unused sh_mipi_dsi_info lcd_chan field
      fbdev: sh_mipi_dsi: Remove the unused sh_mipi_dsi_info lcd_chan field
      fbdev: sh_mobile_lcdc: Store the backlight brightness internally
      ARM: mach-shmobile: mackerel: Removed unused get_brightness callback
      sh: ap325rxa: Remove unused get_brightness LCDC callback
      sh: ecovec24: Remove unused get_brightness LCDC callback
      fbdev: sh_mobile_lcdc: Remove unused get_brightness pdata callback
      ARM: mach-shmobile: ag5evm: Use the backlight API for brightness control
      sh: kfr2r09: Use the backlight API for brightness control
      fbdev: sh_mobile_lcdc: Make sh_mobile_lcdc_sys_bus_ops static

Manjunathappa (1):
      video: da8xx-fb: clk_get on connection id fck

Manjunathappa, Prakash (2):
      da8xx-fb: adopt fb_videomode data for panel information
      da8xx-fb: cleanup LCDC configurations

Matthias Brugger (1):
      OMAPFB: Delete if statement evaluating a constant.

Maxime Ripard (1):
      drivers/video: add support for the Solomon SSD1307 OLED Controller

Pantelis Antoniou (1):
      da8xx: Fix revision check on the da8xx driver

Peter Ujfalusi (1):
      OMAPDSS: Correct check for the callback pointer in dss_dsi_disable_pads()

Ricardo Neri (8):
      OMAPDSS: HDMI: Rename resource variable at probe.
      OMAPDSS: HDMI: Convert to devm_request_and_ioremap
      OMAPDSS: HDMI: Make panel return dssdev register errors
      OMAPDSS: HDMI: Handle panel init error at probe
      OMAPDSS: HDMI: Uninit display on device add error
      OMAPDSS: HDMI: Add op to get audio DMA port address offset
      OMAPDSS: HDMI: Create platform device for audio support
      OMAPDSS: HDMI: Remove __exit macro from hdmi_uninit_display

Sachin Kamat (1):
      drivers/video/console/softcursor.c: remove redundant NULL check before kfree()

Sean Paul (8):
      video: exynos_dp: Check DPCD return codes
      video: exynos_dp: Clean up SW link training
      video: exynos_dp: Get pll lock before pattern set
      video: exynos_dp: Improve EDID error handling
      video: exynos_dp: Fix bug when checking dp->irq
      video: exynos_dp: Remove sink control to D0
      video: exynos_dp: Move hotplug into a workqueue
      video: exynos_dp: Enable hotplug interrupts

Timur Tabi (9):
      MAINTAINERS: Make Timur Tabi the maintainer for the Freescale DIU driver
      drivers/video: fsl-diu-fb: simplify platforms that have only one port
      drivers/video: fsl-diu-fb: add support for set_gamma ioctls
      drivers/video: fsl-diu-fb: streamline enabling of interrupts
      drivers/video: fsl-diu-fb: improve message displays
      drivers/video: fsl-diu-fb: remove unused 'cursor_reset' variable
      drivers/video: fsl-diu-fb: clean up reset of primary display
      drivers/video: fsl-diu-fb: don't touch registers for unused features
      drivers/video: fsl-diu-fb: store EDID data in the global object

Tomi Valkeinen (113):
      Merge tag 'v3.7-rc1'
      OMAPDSS: add missing sizes.h includes
      OMAPDSS: fix compilation warnings
      OMAPDSS: remove Kconfig dependencies
      Merge branch '3.8/dss-version'
      Merge branch '3.8/vrfb-conversion'
      OMAPDSS: DSI: fix dsi_get_dsidev_from_id()
      OMAPDSS: fix registering the vsync isr in apply
      OMAPDSS: DISPC: constify function parameters
      OMAPDSS: combine LCD related config into one func
      OMAPDSS: remove declarations for non-existing funcs
      OMAPDSS: DISPC: remove struct omap_overlay use
      OMAPDSS: DISPC: cleanup lcd and digit enable
      OMAPDSS: DISPC: add dispc_mgr_get_sync_lost_irq()
      OMAPDSS: DISPC: cleanup lcd/digit enable/disable
      OMAPDSS: remove omap_dss_device's suspend/resume
      OMAPDSS: get the dss version from core pdev
      OMAPDSS: remove dispc_irq_handler declaration
      OMAPDSS: DISPC: fix dispc_mgr_lclk_rate for DIGIT output
      OMAPDSS: export dss_get_def_display_name()
      OMAPDSS: remove initial display code from omapdss
      OMAPDSS: DISPC: use dss_feat_get_num_ovls()
      OMAPDSS: DISPC: rename dispc_mgr_enable/disable to _sync
      OMAPDSS: DISPC: make _enable_mgr_out public as "dispc_mgr_enable"
      OMAPDSS: add dispc_ovl_enabled()
      OMAPDSS: DISPC: Add IRQ enable/status helpers
      OMAPDSS: HDMI: split power_on/off to two parts
      OMAPDSS: HDMI: use core power on/off with edid & detect
      OMAPDSS: HDMI: add 1920x1200 video mode
      OMAPDSS: HDMI: make hdmi pclk check more permissive
      OMAPFB: remove use of extended edid block
      OMAPFB: improve mode selection from EDID
      OMAPDSS: fix DSI2 PLL clk names
      OMAPDSS: DISPC: fix loop in error handler
      OMAPDSS: DISPC: remove dssdev depependency from error handler
      OMAPDSS: split hdmi muxing function
      Merge branch '3.8/misc-2'
      OMAPDSS: fix DPI & DSI init order
      OMAPDSS: DSI: skip odd dividers when pck >= 100MHz
      OMAPDSS: DSI: workaround for HSDiv problem
      OMAPDSS: add dss_calc_clock_rates() back
      OMAPDSS: setup default dss fck
      OMAPDSS: hide dss_select_dispc_clk_source()
      OMAPDSS: DPI: use dpi.dsidev to see whether to use dsi pll
      OMAPDSS: DPI: verify if DSI PLL is operational
      OMAPDSS: DPI: always use DSI PLL if available
      Merge branch '3.8/dsi-pll-work'
      OMAPDSS: DISPC: fix DS variable name
      OMAPDSS: DISPC: fix sparse warning
      OMAPDSS: HACK: look for regulators with omap4 names
      OMAP: FB: use DMA_BIT_MASK() for fb's coherent_dma_mask
      OMAPFB: use dma_alloc_attrs to allocate memory
      OMAP: RX51: remove use of vram
      OMAP: common.c: remove init call to vram
      OMAP: remove vram allocator
      Revert "OMAPDSS: HDMI: Create platform device for audio support"
      Merge tag 'v3.7-rc4'
      Merge branch '3.8/vram-conversion' of git://gitorious.org/linux-omap-dss2/linux
      OMAPFB: fix compilation error
      Merge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux
      Merge branch 'lcdc-next' of git://linuxtv.org/pinchartl/fbdev into for-linus
      Merge branch 'fbdev-next' of github.com:timur-tabi/linux-2.6 into for-linus
      OMAPDSS: remove declarations for non-existing functions
      OMAPDSS: DPI: fix crash with dpi_verify_dsi_pll()
      OMAPDSS: don't WARN if there's no DSI device
      OMAPDSS: DISPC: add no_framedone_tv feat
      OMAPDSS: DISPC: use get_framedone_irq in disable_digit_out
      OMAPDSS: DISPC: Remove blocking code from dispc_wb_enable()
      OMAPDSS: cleanup WB enable/is_enabled functions
      OMAPDSS: DISPC: use WARN_ON() in dispc_mgr_go
      OMAPDSS: DISPC: pclk & lclk rates for writeback
      OMAPDSS: DISPC: pass pclk to calc_core_clk()
      OMAPDSS: DISPC: pass pclk & lclk to check_horiz_timing_omap3
      OMAPDSS: DISPC: pass pclk & lclk to calc_scaling
      OMAPDSS: DISPC: pass pclk & lclk to dispc_ovl_calc_scaling
      OMAPDSS: create display-sysfs.c
      OMAPDSS: add dss_get_core_pdev()
      Merge branch 'samsung-fb-next' of git://github.com/jingoo/linux into for-linus
      Merge branch 'exynos-dp-next' of git://github.com/jingoo/linux into for-linus
      [media] omap_vout: use omapdss's version instead of cpu_is_*
      [media] omap_vout: remove extra include
      OMAPFB: remove exported udpate window
      OMAPFB: move dssdev->sync call out from omapfb_realloc_fbmem
      OMAPFB: simplify locking
      OMAPFB: remove warning when trying to alloc at certain paddress
      OMAPDSS: manage output-dssdev connection in output drivers
      OMAPFB: connect ovl managers to all dssdevs
      OMAPDSS: add omapdss_compat_init()
      OMAPDSS: move ovl & ovl-mgr init to apply.c
      OMAPDSS: move ovl-mgr function setup to apply.c
      OMAPDSS: move ovl function setup to apply.c
      OMAPDSS: add manager ops
      OMAPDSS: manage framedone irq with mgr ops
      OMAPDSS: move blocking mgr enable/disable to compat layer
      OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c
      OMAPDSS: move irq handling to dispc-compat
      OMAPDSS: DISPC: add dispc_ovl_check()
      OMAPDSS: DPI: use dispc's check_timings
      OMAPDSS: move display sysfs init to compat layer
      OMAPDSS: separate compat files in the Makefile
      OMAPDSS: export dss_mgr_ops functions
      OMAPDSS: export dss_feat functions
      OMAPDSS: export dispc functions
      OMAPDSS: use omapdss_compat_init() in other drivers
      Merge omapdss compat layer work
      OMAPDSS: DISPC: get dss clock rate from dss driver
      OMAPDSS: DISPC: remove dispc fck uses
      OMAPFB: use devm_kzalloc to allocate omapfb2_device
      OMAPFB: fix error handling in omapfb_find_best_mode()
      OMAPFB: remove silly loop in fb2display()
      Revert "OMAPFB: simplify locking"
      OMAPDSS: fix TV-out issue with DSI PLL
      Merge tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux into for-linus

Wei Yongjun (1):
      OMAPDSS: HDMI: fix missing unlock on error in hdmi_dump_regs()

 Documentation/arm/OMAP/DSS                         |   10 +-
 .../devicetree/bindings/video/exynos_dp.txt        |   80 ++
 .../devicetree/bindings/video/ssd1307fb.txt        |   24 +
 MAINTAINERS                                        |    6 +
 arch/arm/mach-davinci/da830.c                      |    2 +-
 arch/arm/mach-davinci/da850.c                      |    2 +-
 arch/arm/mach-davinci/devices-da8xx.c              |   22 +-
 arch/arm/mach-davinci/pm_domain.c                  |    1 +
 arch/arm/mach-omap2/board-rx51-video.c             |   14 -
 arch/arm/mach-omap2/board-rx51.c                   |    3 -
 arch/arm/mach-omap2/display.c                      |   53 +-
 arch/arm/mach-omap2/sdrc.c                         |   16 -
 arch/arm/mach-shmobile/board-ag5evm.c              |  198 ++--
 arch/arm/mach-shmobile/board-ap4evb.c              |    4 +-
 arch/arm/mach-shmobile/board-mackerel.c            |    6 -
 arch/arm/plat-omap/common.c                        |    2 -
 arch/arm/plat-omap/fb.c                            |   66 +-
 arch/arm/plat-omap/include/plat/sdrc.h             |    7 -
 arch/arm/plat-omap/include/plat/vram.h             |   43 -
 arch/sh/boards/mach-ap325rxa/setup.c               |    6 -
 arch/sh/boards/mach-ecovec24/setup.c               |    6 -
 arch/sh/boards/mach-kfr2r09/lcd_wqvga.c            |   16 +-
 arch/sh/boards/mach-kfr2r09/setup.c                |    7 +-
 arch/sh/include/mach-kfr2r09/mach/kfr2r09.h        |    6 +-
 drivers/media/platform/omap/omap_vout.c            |   23 +-
 drivers/media/platform/omap/omap_vout_vrfb.c       |    2 +-
 drivers/media/platform/omap/omap_voutdef.h         |    2 +-
 drivers/media/platform/omap/omap_voutlib.c         |   38 +-
 drivers/media/platform/omap/omap_voutlib.h         |    3 +
 drivers/staging/omapdrm/omap_drv.c                 |   11 +
 drivers/video/Kconfig                              |   17 +-
 drivers/video/Makefile                             |    1 +
 drivers/video/console/softcursor.c                 |    3 +-
 drivers/video/da8xx-fb.c                           |  170 ++-
 drivers/video/exynos/exynos_dp_core.c              |  697 ++++++++-----
 drivers/video/exynos/exynos_dp_core.h              |   21 +-
 drivers/video/exynos/exynos_dp_reg.c               |   77 +-
 drivers/video/exynos/exynos_dp_reg.h               |    3 +-
 drivers/video/fsl-diu-fb.c                         |  201 ++--
 drivers/video/omap2/Kconfig                        |    3 -
 drivers/video/omap2/Makefile                       |    1 -
 drivers/video/omap2/displays/panel-acx565akm.c     |   23 -
 drivers/video/omap2/displays/panel-generic-dpi.c   |   36 -
 .../omap2/displays/panel-lgphilips-lb035q02.c      |   34 -
 drivers/video/omap2/displays/panel-n8x0.c          |   89 +-
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   24 -
 drivers/video/omap2/displays/panel-picodlp.c       |   45 +-
 .../video/omap2/displays/panel-sharp-ls037v7dw01.c |   17 -
 drivers/video/omap2/displays/panel-taal.c          |   72 --
 drivers/video/omap2/displays/panel-tfp410.c        |   33 -
 .../video/omap2/displays/panel-tpo-td043mtea1.c    |   20 -
 drivers/video/omap2/dss/Kconfig                    |   35 +-
 drivers/video/omap2/dss/Makefile                   |    7 +-
 drivers/video/omap2/dss/apply.c                    |  331 ++++--
 drivers/video/omap2/dss/core.c                     |   72 +-
 drivers/video/omap2/dss/dispc-compat.c             |  667 ++++++++++++
 drivers/video/omap2/dss/dispc-compat.h             |   30 +
 drivers/video/omap2/dss/dispc.c                    | 1102 ++++++--------------
 drivers/video/omap2/dss/display-sysfs.c            |  321 ++++++
 drivers/video/omap2/dss/display.c                  |  386 +------
 drivers/video/omap2/dss/dpi.c                      |  126 ++-
 drivers/video/omap2/dss/dsi.c                      |  247 +++--
 drivers/video/omap2/dss/dss.c                      |  138 ++-
 drivers/video/omap2/dss/dss.h                      |  124 +--
 drivers/video/omap2/dss/dss_features.c             |   79 +-
 drivers/video/omap2/dss/dss_features.h             |   12 +-
 drivers/video/omap2/dss/hdmi.c                     |  158 ++-
 drivers/video/omap2/dss/hdmi_panel.c               |   82 +-
 drivers/video/omap2/dss/manager.c                  |   39 -
 drivers/video/omap2/dss/output.c                   |   90 +-
 drivers/video/omap2/dss/overlay.c                  |   17 -
 drivers/video/omap2/dss/rfbi.c                     |   23 +-
 drivers/video/omap2/dss/sdi.c                      |   11 +-
 drivers/video/omap2/dss/ti_hdmi.h                  |    3 +
 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c          |   11 +-
 drivers/video/omap2/dss/venc.c                     |   11 +-
 drivers/video/omap2/dss/venc_panel.c               |   19 -
 drivers/video/omap2/omapfb/Kconfig                 |    1 -
 drivers/video/omap2/omapfb/omapfb-ioctl.c          |   48 +-
 drivers/video/omap2/omapfb/omapfb-main.c           |  212 ++--
 drivers/video/omap2/omapfb/omapfb-sysfs.c          |    6 +-
 drivers/video/omap2/omapfb/omapfb.h                |   20 +-
 drivers/video/omap2/vram.c                         |  514 ---------
 drivers/video/omap2/vrfb.c                         |  142 ++-
 drivers/video/s3c-fb.c                             |   24 +-
 drivers/video/sh_mipi_dsi.c                        |   69 +-
 drivers/video/sh_mobile_lcdcfb.c                   |   74 +-
 drivers/video/sh_mobile_lcdcfb.h                   |    1 +
 drivers/video/ssd1307fb.c                          |  396 +++++++
 include/linux/fsl-diu-fb.h                         |    9 +
 include/video/da8xx-fb.h                           |   25 +-
 include/video/omapdss.h                            |  105 +-
 .../plat/vrfb.h => include/video/omapvrfb.h        |    2 +
 include/video/samsung_fimd.h                       |  168 +--
 include/video/sh_mipi_dsi.h                        |    4 +-
 include/video/sh_mobile_lcdc.h                     |    1 -
 96 files changed, 4355 insertions(+), 3873 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt
 create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt
 delete mode 100644 arch/arm/plat-omap/include/plat/vram.h
 create mode 100644 drivers/video/omap2/dss/dispc-compat.c
 create mode 100644 drivers/video/omap2/dss/dispc-compat.h
 create mode 100644 drivers/video/omap2/dss/display-sysfs.c
 delete mode 100644 drivers/video/omap2/vram.c
 create mode 100644 drivers/video/ssd1307fb.c
 rename arch/arm/plat-omap/include/plat/vrfb.h => include/video/omapvrfb.h (95%)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

^ permalink raw reply

* [PATCH] video: exynos_mipi_dsi: Add missing mutex_unlock
From: Jonghwan Choi @ 2012-12-14  8:33 UTC (permalink / raw)
  To: linux-fbdev

Add a mutex_unlock on the error path.

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
---
 drivers/video/exynos/exynos_mipi_dsi_common.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c
b/drivers/video/exynos/exynos_mipi_dsi_common.c
index 3cd29a4..bd7f4f2 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -377,6 +377,7 @@ int exynos_mipi_dsi_rd_data(struct mipi_dsim_device
*dsim, unsigned int data_id,
 			"data id %x is not supported current DSI spec.\n",
 			data_id);
 
+		mutex_unlock(&dsim->lock);
 		return -EINVAL;
 	}
 
-- 
1.7.4.1


^ permalink raw reply related

* Re: [PATCH 2/5] OMAPFB: simplify locking
From: Tomi Valkeinen @ 2012-12-13 11:17 UTC (permalink / raw)
  To: Archit Taneja; +Cc: linux-omap, linux-fbdev, Ville Syrjälä
In-Reply-To: <1354881309-17625-2-git-send-email-tomi.valkeinen@ti.com>

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On 2012-12-07 13:55, Tomi Valkeinen wrote:
> Kernel lock verification code has lately detected possible circular
> locking in omapfb. The exact problem is unclear, but omapfb's current
> locking seems to be overly complex.
> 
> This patch simplifies the locking in the following ways:
> 
> - Remove explicit omapfb mem region locking. I couldn't figure out the
>   need for this, as long as we take care to take omapfb lock.
> 
> - Get omapfb lock always, even if the operation is possibly only related
>   to one fb_info. Better safe than sorry, and normally there's only one
>   user for the fb so this shouldn't matter.
> 
> - Make sure fb_info lock is taken first, then omapfb lock.
> 
> With this patch the warnings about possible circular locking does not
> happen anymore.

I'm dropping this patch, for some reason it causes huge latencies with
two processes using separate fbs. I guess there's need for the more
precise locking, after all.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

^ permalink raw reply

* Re: [PATCH v4] video: Versatile Express DVI output driver
From: Pawel Moll @ 2012-12-12 18:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1353343147-15654-1-git-send-email-pawel.moll@arm.com>

Hi Arnd,

On Mon, 2012-11-19 at 16:39 +0000, Pawel Moll wrote:
> Versatile Express' DVI video output can be connected to one the three
> sources - motherboard's CLCD controller or a video signal generated
> by one of the daughterboards.
> 
> This driver configures the muxer FPGA so the output displays content
> of one of the framebuffers in the system (0 by default, can be changed
> by user writing to the "fb" sysfs attribute of the muxfpga device).
> 
> It will also set up the display formatter mode and keep it up
> to date with mode changes requested by the user (eg. with fbset
> tool).
> 
> Signed-off-by: Pawel Moll <pawel.moll@arm.com>

Could I just politely remind about this one?

Paweł



^ permalink raw reply

* [PATCH 2/2] OMAPDSS: DISPC: remove dispc fck uses
From: Tomi Valkeinen @ 2012-12-12 12:27 UTC (permalink / raw)
  To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
In-Reply-To: <1355315229-25238-1-git-send-email-tomi.valkeinen@ti.com>

The previous patch changes dispc to get the dispc fck rate from dss core
driver. This was the only use of the dispc fck in dispc, and thus we can
now remove the clock handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 08137a8..05ff2b9 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -96,7 +96,6 @@ static struct {
 	int		ctx_loss_cnt;
 
 	int irq;
-	struct clk *dss_clk;
 
 	u32 fifo_size[DISPC_MAX_NR_FIFOS];
 	/* maps which plane is using a fifo. fifo-id -> plane-id */
@@ -3619,7 +3618,6 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
 	u32 rev;
 	int r = 0;
 	struct resource *dispc_mem;
-	struct clk *clk;
 
 	dispc.pdev = pdev;
 
@@ -3646,15 +3644,6 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	clk = clk_get(&pdev->dev, "fck");
-	if (IS_ERR(clk)) {
-		DSSERR("can't get fck\n");
-		r = PTR_ERR(clk);
-		return r;
-	}
-
-	dispc.dss_clk = clk;
-
 	pm_runtime_enable(&pdev->dev);
 
 	r = dispc_runtime_get();
@@ -3675,7 +3664,6 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
 
 err_runtime_get:
 	pm_runtime_disable(&pdev->dev);
-	clk_put(dispc.dss_clk);
 	return r;
 }
 
@@ -3683,8 +3671,6 @@ static int __exit omap_dispchw_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
 
-	clk_put(dispc.dss_clk);
-
 	return 0;
 }
 
-- 
1.7.10.4


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox