* [PATCH 02/21] OMAP: board-files: remove custom PD GPIO handling for DVI output
From: Tomi Valkeinen @ 2012-03-07 12:44 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen, Tony Lindgren
In-Reply-To: <1331124290-6285-1-git-send-email-tomi.valkeinen@ti.com>
Now that the panel-dvi driver handles the PD (power-down) GPIO, we can
remove the custom PD handling from the board files.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-3430sdp.c | 32 +----------------------------
arch/arm/mach-omap2/board-am3517evm.c | 19 +----------------
arch/arm/mach-omap2/board-cm-t35.c | 24 +--------------------
arch/arm/mach-omap2/board-devkit8000.c | 24 +--------------------
arch/arm/mach-omap2/board-igep0020.c | 26 +---------------------
arch/arm/mach-omap2/board-omap3beagle.c | 31 +--------------------------
arch/arm/mach-omap2/board-omap3evm.c | 23 +--------------------
arch/arm/mach-omap2/board-omap3stalker.c | 23 +--------------------
arch/arm/mach-omap2/board-omap4panda.c | 33 +----------------------------
arch/arm/mach-omap2/board-overo.c | 19 +----------------
drivers/video/omap2/displays/panel-dvi.c | 13 -----------
include/video/omap-panel-dvi.h | 4 ---
12 files changed, 14 insertions(+), 257 deletions(-)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 383717b..7105005 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = {
{SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
};
-static int lcd_enabled;
-static int dvi_enabled;
-
static void __init sdp3430_display_init(void)
{
int r;
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void)
static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
{
- if (dvi_enabled) {
- printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
- return -EINVAL;
- }
-
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
- lcd_enabled = 1;
-
return 0;
}
static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
{
- lcd_enabled = 0;
-
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
}
-static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
-
- dvi_enabled = 1;
-
- return 0;
-}
-
-static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
-{
- dvi_enabled = 0;
-}
-
static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
{
return 0;
@@ -187,8 +158,7 @@ static struct omap_dss_device sdp3430_lcd_device = {
};
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = sdp3430_panel_enable_dvi,
- .platform_disable = sdp3430_panel_disable_dvi,
+ .power_down_gpio = -1,
};
static struct omap_dss_device sdp3430_dvi_device = {
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 4b1cfe3..958dd97 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -320,25 +320,8 @@ static struct omap_dss_device am3517_evm_tv_device = {
.platform_disable = am3517_evm_panel_disable_tv,
};
-static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
- dvi_enabled = 1;
-
- return 0;
-}
-
-static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
-{
- dvi_enabled = 0;
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = am3517_evm_panel_enable_dvi,
- .platform_disable = am3517_evm_panel_disable_dvi,
+ .power_down_gpio = -1,
};
static struct omap_dss_device am3517_evm_dvi_device = {
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index d73316e..5a361c9 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -202,25 +202,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
}
-static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
-
- gpio_set_value(CM_T35_DVI_EN_GPIO, 0);
- dvi_enabled = 1;
-
- return 0;
-}
-
-static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_set_value(CM_T35_DVI_EN_GPIO, 1);
- dvi_enabled = 0;
-}
-
static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
{
return 0;
@@ -245,8 +226,7 @@ static struct omap_dss_device cm_t35_lcd_device = {
};
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = cm_t35_panel_enable_dvi,
- .platform_disable = cm_t35_panel_disable_dvi,
+ .power_down_gpio = CM_T35_DVI_EN_GPIO,
};
static struct omap_dss_device cm_t35_dvi_device = {
@@ -301,7 +281,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = {
static struct gpio cm_t35_dss_gpios[] __initdata = {
{ CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
{ CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
- { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" },
};
static void __init cm_t35_init_display(void)
@@ -320,7 +299,6 @@ static void __init cm_t35_init_display(void)
gpio_export(CM_T35_LCD_EN_GPIO, 0);
gpio_export(CM_T35_LCD_BL_GPIO, 0);
- gpio_export(CM_T35_DVI_EN_GPIO, 0);
msleep(50);
gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index e873063..07edb6d 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -117,19 +117,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
gpio_set_value_cansleep(dssdev->reset_gpio, 0);
}
-static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (gpio_is_valid(dssdev->reset_gpio))
- gpio_set_value_cansleep(dssdev->reset_gpio, 1);
- return 0;
-}
-
-static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
-{
- if (gpio_is_valid(dssdev->reset_gpio))
- gpio_set_value_cansleep(dssdev->reset_gpio, 0);
-}
-
static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
@@ -154,8 +141,7 @@ static struct omap_dss_device devkit8000_lcd_device = {
};
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = devkit8000_panel_enable_dvi,
- .platform_disable = devkit8000_panel_disable_dvi,
+ .power_down_gpio = -1,
};
static struct omap_dss_device devkit8000_dvi_device = {
@@ -243,13 +229,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
}
/* gpio + 7 is "DVI_PD" (out, active low) */
- devkit8000_dvi_device.reset_gpio = gpio + 7;
- ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
- GPIOF_OUT_INIT_LOW, "DVI PowerDown");
- if (ret < 0) {
- devkit8000_dvi_device.reset_gpio = -EINVAL;
- printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
- }
+ dvi_panel.power_down_gpio = gpio + 7;
return 0;
}
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index a59ace0..21188f8 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -443,22 +443,9 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
.setup = igep_twl_gpio_setup,
};
-static int igep2_enable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
-
- return 0;
-}
-
-static void igep2_disable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = igep2_enable_dvi,
- .platform_disable = igep2_disable_dvi,
- .i2c_bus_num = 3,
+ .i2c_bus_num = 3,
+ .power_down_gpio = IGEP2_GPIO_DVI_PUP,
};
static struct omap_dss_device igep2_dvi_device = {
@@ -479,14 +466,6 @@ static struct omap_dss_board_info igep2_dss_data = {
.default_device = &igep2_dvi_device,
};
-static void __init igep2_display_init(void)
-{
- int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
- "GPIO_DVI_PUP");
- if (err)
- pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
-}
-
static struct platform_device *igep_devices[] __initdata = {
&igep_vwlan_device,
};
@@ -658,7 +637,6 @@ static void __init igep_init(void)
if (machine_is_igep0020()) {
omap_display_init(&igep2_dss_data);
- igep2_display_init();
igep2_init_smsc911x();
usbhs_init(&igep2_usbhs_bdata);
} else {
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7ffcd28..26c9df4 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -189,24 +189,9 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
/* DSS */
-static int beagle_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (gpio_is_valid(dssdev->reset_gpio))
- gpio_set_value(dssdev->reset_gpio, 1);
-
- return 0;
-}
-
-static void beagle_disable_dvi(struct omap_dss_device *dssdev)
-{
- if (gpio_is_valid(dssdev->reset_gpio))
- gpio_set_value(dssdev->reset_gpio, 0);
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = beagle_enable_dvi,
- .platform_disable = beagle_disable_dvi,
.i2c_bus_num = 3,
+ .power_down_gpio = -1,
};
static struct omap_dss_device beagle_dvi_device = {
@@ -215,7 +200,6 @@ static struct omap_dss_device beagle_dvi_device = {
.driver_name = "dvi",
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
- .reset_gpio = -EINVAL,
};
static struct omap_dss_device beagle_tv_device = {
@@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = {
.default_device = &beagle_dvi_device,
};
-static void __init beagle_display_init(void)
-{
- int r;
-
- r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
- "DVI reset");
- if (r < 0)
- printk(KERN_ERR "Unable to get DVI reset GPIO\n");
-}
-
#include "sdram-micron-mt46h32m32lf-6.h"
static struct omap2_hsmmc_info mmc[] = {
@@ -310,7 +284,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
}
- beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
+ dvi_panel.power_down_gpio = beagle_config.reset_gpio;
gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
"nEN_USB_PWR");
@@ -548,7 +522,6 @@ static void __init omap3_beagle_init(void)
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
- beagle_display_init();
beagle_opp_init();
}
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c877236..1467fbf 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -228,29 +228,8 @@ static struct omap_dss_device omap3_evm_tv_device = {
.platform_disable = omap3_evm_disable_tv,
};
-static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
-
- gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
-
- dvi_enabled = 1;
- return 0;
-}
-
-static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
-
- dvi_enabled = 0;
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = omap3_evm_enable_dvi,
- .platform_disable = omap3_evm_disable_dvi,
+ .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
};
static struct omap_dss_device omap3_evm_dvi_device = {
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index cb089a4..22444c2 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -100,9 +100,6 @@ static inline void __init omap3stalker_init_eth(void)
#define LCD_PANEL_BKLIGHT_GPIO 210
#define ENABLE_VPLL2_DEV_GRP 0xE0
-static int lcd_enabled;
-static int dvi_enabled;
-
static void __init omap3_stalker_display_init(void)
{
return;
@@ -130,26 +127,8 @@ static struct omap_dss_device omap3_stalker_tv_device = {
.platform_disable = omap3_stalker_disable_tv,
};
-static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
- gpio_set_value(DSS_ENABLE_GPIO, 1);
- dvi_enabled = 1;
- return 0;
-}
-
-static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_set_value(DSS_ENABLE_GPIO, 0);
- dvi_enabled = 0;
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = omap3_stalker_enable_dvi,
- .platform_disable = omap3_stalker_disable_dvi,
+ .power_down_gpio = DSS_ENABLE_GPIO,
};
static struct omap_dss_device omap3_stalker_dvi_device = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 28fc271..e773f28 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -372,22 +372,10 @@ static struct omap_board_mux board_mux[] __initdata = {
/* Display DVI */
#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
-static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_set_value(dssdev->reset_gpio, 1);
- return 0;
-}
-
-static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
-{
- gpio_set_value(dssdev->reset_gpio, 0);
-}
-
/* Using generic display panel */
static struct panel_dvi_platform_data omap4_dvi_panel = {
- .platform_enable = omap4_panda_enable_dvi,
- .platform_disable = omap4_panda_disable_dvi,
- .i2c_bus_num = 3,
+ .i2c_bus_num = 3,
+ .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
};
struct omap_dss_device omap4_panda_dvi_device = {
@@ -400,18 +388,6 @@ struct omap_dss_device omap4_panda_dvi_device = {
.channel = OMAP_DSS_CHANNEL_LCD2,
};
-int __init omap4_panda_dvi_init(void)
-{
- int r;
-
- /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
- r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
- GPIOF_OUT_INIT_LOW, "DVI PD");
- if (r)
- pr_err("Failed to get DVI powerdown GPIO\n");
-
- return r;
-}
static struct gpio panda_hdmi_gpios[] = {
{ HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
@@ -463,11 +439,6 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
void omap4_panda_display_init(void)
{
- int r;
-
- r = omap4_panda_dvi_init();
- if (r)
- pr_err("error initializing panda DVI\n");
omap_display_init(&omap4_panda_dss_data);
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 52c0cef..21e900e 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -167,26 +167,9 @@ static void __init overo_display_init(void)
gpio_export(OVERO_GPIO_LCD_BL, 0);
}
-static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
-{
- if (lcd_enabled) {
- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
- return -EINVAL;
- }
- dvi_enabled = 1;
-
- return 0;
-}
-
-static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
-{
- dvi_enabled = 0;
-}
-
static struct panel_dvi_platform_data dvi_panel = {
- .platform_enable = overo_panel_enable_dvi,
- .platform_disable = overo_panel_disable_dvi,
.i2c_bus_num = 3,
+ .power_down_gpio = -1,
};
static struct omap_dss_device overo_dvi_device = {
diff --git a/drivers/video/omap2/displays/panel-dvi.c b/drivers/video/omap2/displays/panel-dvi.c
index 876b798..7e8cadd 100644
--- a/drivers/video/omap2/displays/panel-dvi.c
+++ b/drivers/video/omap2/displays/panel-dvi.c
@@ -58,7 +58,6 @@ static inline struct panel_dvi_platform_data
static int panel_dvi_power_on(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
- struct panel_dvi_platform_data *pdata = get_pdata(dssdev);
int r;
if (dssdev->state = OMAP_DSS_DISPLAY_ACTIVE)
@@ -68,18 +67,10 @@ static int panel_dvi_power_on(struct omap_dss_device *dssdev)
if (r)
goto err0;
- if (pdata->platform_enable) {
- r = pdata->platform_enable(dssdev);
- if (r)
- goto err1;
- }
-
if (gpio_is_valid(ddata->pd_gpio))
gpio_set_value(ddata->pd_gpio, 1);
return 0;
-err1:
- omapdss_dpi_display_disable(dssdev);
err0:
return r;
}
@@ -87,7 +78,6 @@ err0:
static void panel_dvi_power_off(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
- struct panel_dvi_platform_data *pdata = get_pdata(dssdev);
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
@@ -95,9 +85,6 @@ static void panel_dvi_power_off(struct omap_dss_device *dssdev)
if (gpio_is_valid(ddata->pd_gpio))
gpio_set_value(ddata->pd_gpio, 0);
- if (pdata->platform_disable)
- pdata->platform_disable(dssdev);
-
omapdss_dpi_display_disable(dssdev);
}
diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h
index 4ad41fc..a782124 100644
--- a/include/video/omap-panel-dvi.h
+++ b/include/video/omap-panel-dvi.h
@@ -24,14 +24,10 @@ struct omap_dss_device;
/**
* struct panel_dvi_platform_data - panel driver configuration data
- * @platform_enable: platform specific panel enable function
- * @platform_disable: platform specific panel disable function
* @i2c_bus_num: i2c bus id for the panel
* @power_down_gpio: gpio number for PD pin (or -1 if not available)
*/
struct panel_dvi_platform_data {
- int (*platform_enable)(struct omap_dss_device *dssdev);
- void (*platform_disable)(struct omap_dss_device *dssdev);
u16 i2c_bus_num;
int power_down_gpio;
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH 01/21] OMAPDSS: panel-dvi: add PD gpio handling
From: Tomi Valkeinen @ 2012-03-07 12:44 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen
In-Reply-To: <1331124290-6285-1-git-send-email-tomi.valkeinen@ti.com>
The driver for the DVI framer should handle the power-down signal of the
framer, instead of the current way of handling it in the board files.
This patch adds power_down_gpio into the device's platform data, and
adds the necessary code in the driver to request and handle the GPIO.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/displays/panel-dvi.c | 31 ++++++++++++++++++++++++++++++
include/video/omap-panel-dvi.h | 2 +
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/displays/panel-dvi.c b/drivers/video/omap2/displays/panel-dvi.c
index 03eb14a..876b798 100644
--- a/drivers/video/omap2/displays/panel-dvi.c
+++ b/drivers/video/omap2/displays/panel-dvi.c
@@ -21,6 +21,7 @@
#include <linux/slab.h>
#include <video/omapdss.h>
#include <linux/i2c.h>
+#include <linux/gpio.h>
#include <drm/drm_edid.h>
#include <video/omap-panel-dvi.h>
@@ -44,6 +45,8 @@ struct panel_drv_data {
struct omap_dss_device *dssdev;
struct mutex lock;
+
+ int pd_gpio;
};
static inline struct panel_dvi_platform_data
@@ -54,6 +57,7 @@ static inline struct panel_dvi_platform_data
static int panel_dvi_power_on(struct omap_dss_device *dssdev)
{
+ struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
struct panel_dvi_platform_data *pdata = get_pdata(dssdev);
int r;
@@ -70,6 +74,9 @@ static int panel_dvi_power_on(struct omap_dss_device *dssdev)
goto err1;
}
+ if (gpio_is_valid(ddata->pd_gpio))
+ gpio_set_value(ddata->pd_gpio, 1);
+
return 0;
err1:
omapdss_dpi_display_disable(dssdev);
@@ -79,11 +86,15 @@ err0:
static void panel_dvi_power_off(struct omap_dss_device *dssdev)
{
+ struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
struct panel_dvi_platform_data *pdata = get_pdata(dssdev);
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
+ if (gpio_is_valid(ddata->pd_gpio))
+ gpio_set_value(ddata->pd_gpio, 0);
+
if (pdata->platform_disable)
pdata->platform_disable(dssdev);
@@ -92,7 +103,9 @@ static void panel_dvi_power_off(struct omap_dss_device *dssdev)
static int panel_dvi_probe(struct omap_dss_device *dssdev)
{
+ struct panel_dvi_platform_data *pdata = get_pdata(dssdev);
struct panel_drv_data *ddata;
+ int r;
ddata = kzalloc(sizeof(*ddata), GFP_KERNEL);
if (!ddata)
@@ -104,6 +117,21 @@ static int panel_dvi_probe(struct omap_dss_device *dssdev)
ddata->dssdev = dssdev;
mutex_init(&ddata->lock);
+ if (pdata)
+ ddata->pd_gpio = pdata->power_down_gpio;
+ else
+ ddata->pd_gpio = -1;
+
+ if (gpio_is_valid(ddata->pd_gpio)) {
+ r = gpio_request_one(ddata->pd_gpio, GPIOF_OUT_INIT_LOW,
+ "tfp410 pd");
+ if (r) {
+ dev_err(&dssdev->dev, "Failed to request PD GPIO %d\n",
+ ddata->pd_gpio);
+ ddata->pd_gpio = -1;
+ }
+ }
+
dev_set_drvdata(&dssdev->dev, ddata);
return 0;
@@ -115,6 +143,9 @@ static void __exit panel_dvi_remove(struct omap_dss_device *dssdev)
mutex_lock(&ddata->lock);
+ if (gpio_is_valid(ddata->pd_gpio))
+ gpio_free(ddata->pd_gpio);
+
dev_set_drvdata(&dssdev->dev, NULL);
mutex_unlock(&ddata->lock);
diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h
index 87ad567b..4ad41fc 100644
--- a/include/video/omap-panel-dvi.h
+++ b/include/video/omap-panel-dvi.h
@@ -27,11 +27,13 @@ struct omap_dss_device;
* @platform_enable: platform specific panel enable function
* @platform_disable: platform specific panel disable function
* @i2c_bus_num: i2c bus id for the panel
+ * @power_down_gpio: gpio number for PD pin (or -1 if not available)
*/
struct panel_dvi_platform_data {
int (*platform_enable)(struct omap_dss_device *dssdev);
void (*platform_disable)(struct omap_dss_device *dssdev);
u16 i2c_bus_num;
+ int power_down_gpio;
};
#endif /* __OMAP_PANEL_DVI_H */
--
1.7.4.1
^ permalink raw reply related
* [PATCH 00/21] OMAPDSS: DT preparation patches
From: Tomi Valkeinen @ 2012-03-07 12:44 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: archit, Tomi Valkeinen
Hi,
I started cleaning up and restructuring omapdss for device tree, and here's the
first set of patches from that ordeal. There's nothing DT specific in these
patches, but they are mostly generic cleanups that make sense even without DT.
The custom pdev creation depends on the following patches posted on l-o:
ARM: OMAP: remove omap_device_parent
ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register}
This series can also be found from:
git://gitorious.org/linux-omap-dss2/linux.git work/devtree-base
Tomi
Tomi Valkeinen (21):
OMAPDSS: panel-dvi: add PD gpio handling
OMAP: board-files: remove custom PD GPIO handling for DVI output
OMAPDSS: TFP410: rename dvi -> tfp410
OMAPDSS: TFP410: rename dvi files to tfp410
OMAPDSS: TFP410: pdata rewrite
OMAPDSS: DSI: use dsi_get_dsidev_id(dsidev) instead of dsidev->id
OMAPDSS: Taal: move reset gpio handling to taal driver
OMAPDSS: clean up the omapdss platform data mess
OMAPDSS: remove return from platform_driver_unreg
OMAPDSS: use platform_driver_probe for core/dispc/dss
OMAPDSS: register dss drivers in module init
OMAPDSS: create custom pdevs for DSS omap_devices
OMAPDSS: create DPI & SDI devices
OMAPDSS: create DPI & SDI drivers
OMAPDSS: remove uses of dss_runtime_get/put
OMAPDSS: handle output-driver reg/unreg more dynamically
OMAPDSS: move the creation of debugfs files
OMAPDSS: use platform_driver_probe for dsi/hdmi/rfbi/venc/dpi/sdi
OMAPDSS: add __init & __exit
OMAPFB: add __init & __exit
OMAPDSS: change default_device handling
arch/arm/mach-omap2/board-3430sdp.c | 38 +---
arch/arm/mach-omap2/board-4430sdp.c | 16 --
arch/arm/mach-omap2/board-am3517evm.c | 25 +--
arch/arm/mach-omap2/board-cm-t35.c | 30 +--
arch/arm/mach-omap2/board-devkit8000.c | 30 +--
arch/arm/mach-omap2/board-igep0020.c | 32 +--
arch/arm/mach-omap2/board-omap3beagle.c | 37 +---
arch/arm/mach-omap2/board-omap3evm.c | 29 +--
arch/arm/mach-omap2/board-omap3stalker.c | 29 +--
arch/arm/mach-omap2/board-omap4panda.c | 39 +---
arch/arm/mach-omap2/board-overo.c | 25 +--
arch/arm/mach-omap2/display.c | 172 +++++++++++--
drivers/video/omap2/displays/Kconfig | 8 +-
drivers/video/omap2/displays/Makefile | 2 +-
drivers/video/omap2/displays/panel-taal.c | 15 ++
.../omap2/displays/{panel-dvi.c => panel-tfp410.c} | 186 ++++++++------
drivers/video/omap2/dss/core.c | 260 +++++++++++++-------
drivers/video/omap2/dss/dispc.c | 50 ++---
drivers/video/omap2/dss/dpi.c | 38 ++--
drivers/video/omap2/dss/dsi.c | 86 ++-----
drivers/video/omap2/dss/dss.c | 46 ++---
drivers/video/omap2/dss/dss.h | 76 +-----
drivers/video/omap2/dss/hdmi.c | 55 +----
drivers/video/omap2/dss/rfbi.c | 31 +--
drivers/video/omap2/dss/sdi.c | 31 ++-
drivers/video/omap2/dss/venc.c | 31 +--
drivers/video/omap2/omapfb/omapfb-main.c | 9 +-
.../{omap-panel-dvi.h => omap-panel-tfp410.h} | 18 +-
include/video/omapdss.h | 5 -
29 files changed, 628 insertions(+), 821 deletions(-)
rename drivers/video/omap2/displays/{panel-dvi.c => panel-tfp410.c} (56%)
rename include/video/{omap-panel-dvi.h => omap-panel-tfp410.h} (63%)
--
1.7.4.1
^ permalink raw reply
* Re: [PATCH V2 RESEND] video: s3c-fb: Add support EXYNOS5 FIMD
From: Florian Tobias Schandinat @ 2012-03-07 10:19 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-fbdev, linux-samsung-soc, 'Kukjin Kim'
In-Reply-To: <002201ccfb65$ddcb0400$99610c00$%han@samsung.com>
On 03/06/2012 06:53 AM, Jingoo Han wrote:
> This patch adds s3c_fb_driverdata s3c_fb_data_exynos5 for EXYNOS5
> and adds extended timing control setting.
>
> EXYNOS5 FIMD needs extended setting for video timing control.
> Additional bits are added to VIDTCON2, VIDWxxADD2, VIDOSDxA and
> VIDOSDxB registers in order to set timing value for lager resolution.
>
> Also, address offset of VIDTCONx registers is changed from 0x0
> to 0x20000, thus variable type should be changed to int type
> to handle the address offset of VIDTCONx registers for EXYNOS5 FIMD.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Applied.
No need to resend when just over a week has passed. I usually try to
wait a week for non-trivial patches to give others a chance to comment
on it before applying.
Thanks,
Florian Tobias Schandinat
> ---
> v2: fix commit message from VIDCONx to VIDTCONx.
>
> arch/arm/plat-samsung/include/plat/regs-fb.h | 24 ++++++++----
> drivers/video/s3c-fb.c | 52 +++++++++++++++++++++++--
> 2 files changed, 63 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/regs-fb.h b/arch/arm/plat-samsung/include/plat/regs-fb.h
> index bbb16e0..9a78012 100644
> --- a/arch/arm/plat-samsung/include/plat/regs-fb.h
> +++ b/arch/arm/plat-samsung/include/plat/regs-fb.h
> @@ -167,15 +167,17 @@
> #define VIDTCON1_HSPW(_x) ((_x) << 0)
>
> #define VIDTCON2 (0x18)
> +#define VIDTCON2_LINEVAL_E(_x) ((((_x) & 0x800) >> 11) << 23)
> #define VIDTCON2_LINEVAL_MASK (0x7ff << 11)
> #define VIDTCON2_LINEVAL_SHIFT (11)
> #define VIDTCON2_LINEVAL_LIMIT (0x7ff)
> -#define VIDTCON2_LINEVAL(_x) ((_x) << 11)
> +#define VIDTCON2_LINEVAL(_x) (((_x) & 0x7ff) << 11)
>
> +#define VIDTCON2_HOZVAL_E(_x) ((((_x) & 0x800) >> 11) << 22)
> #define VIDTCON2_HOZVAL_MASK (0x7ff << 0)
> #define VIDTCON2_HOZVAL_SHIFT (0)
> #define VIDTCON2_HOZVAL_LIMIT (0x7ff)
> -#define VIDTCON2_HOZVAL(_x) ((_x) << 0)
> +#define VIDTCON2_HOZVAL(_x) (((_x) & 0x7ff) << 0)
>
> /* WINCONx */
>
> @@ -231,25 +233,29 @@
> /* Local input channels (windows 0-2) */
> #define SHADOWCON_CHx_LOCAL_ENABLE(_win) (1 << (5 + (_win)))
>
> +#define VIDOSDxA_TOPLEFT_X_E(_x) ((((_x) & 0x800) >> 11) << 23)
> #define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11)
> #define VIDOSDxA_TOPLEFT_X_SHIFT (11)
> #define VIDOSDxA_TOPLEFT_X_LIMIT (0x7ff)
> -#define VIDOSDxA_TOPLEFT_X(_x) ((_x) << 11)
> +#define VIDOSDxA_TOPLEFT_X(_x) (((_x) & 0x7ff) << 11)
>
> +#define VIDOSDxA_TOPLEFT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22)
> #define VIDOSDxA_TOPLEFT_Y_MASK (0x7ff << 0)
> #define VIDOSDxA_TOPLEFT_Y_SHIFT (0)
> #define VIDOSDxA_TOPLEFT_Y_LIMIT (0x7ff)
> -#define VIDOSDxA_TOPLEFT_Y(_x) ((_x) << 0)
> +#define VIDOSDxA_TOPLEFT_Y(_x) (((_x) & 0x7ff) << 0)
>
> +#define VIDOSDxB_BOTRIGHT_X_E(_x) ((((_x) & 0x800) >> 11) << 23)
> #define VIDOSDxB_BOTRIGHT_X_MASK (0x7ff << 11)
> #define VIDOSDxB_BOTRIGHT_X_SHIFT (11)
> #define VIDOSDxB_BOTRIGHT_X_LIMIT (0x7ff)
> -#define VIDOSDxB_BOTRIGHT_X(_x) ((_x) << 11)
> +#define VIDOSDxB_BOTRIGHT_X(_x) (((_x) & 0x7ff) << 11)
>
> +#define VIDOSDxB_BOTRIGHT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22)
> #define VIDOSDxB_BOTRIGHT_Y_MASK (0x7ff << 0)
> #define VIDOSDxB_BOTRIGHT_Y_SHIFT (0)
> #define VIDOSDxB_BOTRIGHT_Y_LIMIT (0x7ff)
> -#define VIDOSDxB_BOTRIGHT_Y(_x) ((_x) << 0)
> +#define VIDOSDxB_BOTRIGHT_Y(_x) (((_x) & 0x7ff) << 0)
>
> /* For VIDOSD[1..4]C */
> #define VIDISD14C_ALPHA0_R(_x) ((_x) << 20)
> @@ -281,15 +287,17 @@
> #define VIDW_BUF_END1(_buff) (0xD4 + ((_buff) * 8))
> #define VIDW_BUF_SIZE(_buff) (0x100 + ((_buff) * 4))
>
> +#define VIDW_BUF_SIZE_OFFSET_E(_x) ((((_x) & 0x2000) >> 13) << 27)
> #define VIDW_BUF_SIZE_OFFSET_MASK (0x1fff << 13)
> #define VIDW_BUF_SIZE_OFFSET_SHIFT (13)
> #define VIDW_BUF_SIZE_OFFSET_LIMIT (0x1fff)
> -#define VIDW_BUF_SIZE_OFFSET(_x) ((_x) << 13)
> +#define VIDW_BUF_SIZE_OFFSET(_x) (((_x) & 0x1fff) << 13)
>
> +#define VIDW_BUF_SIZE_PAGEWIDTH_E(_x) ((((_x) & 0x2000) >> 13) << 26)
> #define VIDW_BUF_SIZE_PAGEWIDTH_MASK (0x1fff << 0)
> #define VIDW_BUF_SIZE_PAGEWIDTH_SHIFT (0)
> #define VIDW_BUF_SIZE_PAGEWIDTH_LIMIT (0x1fff)
> -#define VIDW_BUF_SIZE_PAGEWIDTH(_x) ((_x) << 0)
> +#define VIDW_BUF_SIZE_PAGEWIDTH(_x) (((_x) & 0x1fff) << 0)
>
> /* Interrupt controls and status */
>
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 1fb7ddf..f310516 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -89,7 +89,7 @@ struct s3c_fb;
> struct s3c_fb_variant {
> unsigned int is_2443:1;
> unsigned short nr_windows;
> - unsigned short vidtcon;
> + unsigned int vidtcon;
> unsigned short wincon;
> unsigned short winmap;
> unsigned short keycon;
> @@ -568,7 +568,9 @@ static int s3c_fb_set_par(struct fb_info *info)
> writel(data, regs + sfb->variant.vidtcon + 4);
>
> data = VIDTCON2_LINEVAL(var->yres - 1) |
> - VIDTCON2_HOZVAL(var->xres - 1);
> + VIDTCON2_HOZVAL(var->xres - 1) |
> + VIDTCON2_LINEVAL_E(var->yres - 1) |
> + VIDTCON2_HOZVAL_E(var->xres - 1);
> writel(data, regs + sfb->variant.vidtcon + 8);
> }
>
> @@ -584,17 +586,23 @@ static int s3c_fb_set_par(struct fb_info *info)
>
> pagewidth = (var->xres * var->bits_per_pixel) >> 3;
> data = VIDW_BUF_SIZE_OFFSET(info->fix.line_length - pagewidth) |
> - VIDW_BUF_SIZE_PAGEWIDTH(pagewidth);
> + VIDW_BUF_SIZE_PAGEWIDTH(pagewidth) |
> + VIDW_BUF_SIZE_OFFSET_E(info->fix.line_length - pagewidth) |
> + VIDW_BUF_SIZE_PAGEWIDTH_E(pagewidth);
> writel(data, regs + sfb->variant.buf_size + (win_no * 4));
>
> /* write 'OSD' registers to control position of framebuffer */
>
> - data = VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0);
> + data = VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0) |
> + VIDOSDxA_TOPLEFT_X_E(0) | VIDOSDxA_TOPLEFT_Y_E(0);
> writel(data, regs + VIDOSD_A(win_no, sfb->variant));
>
> data = VIDOSDxB_BOTRIGHT_X(s3c_fb_align_word(var->bits_per_pixel,
> var->xres - 1)) |
> - VIDOSDxB_BOTRIGHT_Y(var->yres - 1);
> + VIDOSDxB_BOTRIGHT_Y(var->yres - 1) |
> + VIDOSDxB_BOTRIGHT_X_E(s3c_fb_align_word(var->bits_per_pixel,
> + var->xres - 1)) |
> + VIDOSDxB_BOTRIGHT_Y_E(var->yres - 1);
>
> writel(data, regs + VIDOSD_B(win_no, sfb->variant));
>
> @@ -1903,6 +1911,37 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = {
> .win[4] = &s3c_fb_data_s5p_wins[4],
> };
>
> +static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
> + .variant = {
> + .nr_windows = 5,
> + .vidtcon = VIDTCON0,
> + .wincon = WINCON(0),
> + .winmap = WINxMAP(0),
> + .keycon = WKEYCON,
> + .osd = VIDOSD_BASE,
> + .osd_stride = 16,
> + .buf_start = VIDW_BUF_START(0),
> + .buf_size = VIDW_BUF_SIZE(0),
> + .buf_end = VIDW_BUF_END(0),
> +
> + .palette = {
> + [0] = 0x2400,
> + [1] = 0x2800,
> + [2] = 0x2c00,
> + [3] = 0x3000,
> + [4] = 0x3400,
> + },
> + .has_shadowcon = 1,
> + .has_blendcon = 1,
> + .has_fixvclk = 1,
> + },
> + .win[0] = &s3c_fb_data_s5p_wins[0],
> + .win[1] = &s3c_fb_data_s5p_wins[1],
> + .win[2] = &s3c_fb_data_s5p_wins[2],
> + .win[3] = &s3c_fb_data_s5p_wins[3],
> + .win[4] = &s3c_fb_data_s5p_wins[4],
> +};
> +
> /* S3C2443/S3C2416 style hardware */
> static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
> .variant = {
> @@ -1981,6 +2020,9 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
> .name = "exynos4-fb",
> .driver_data = (unsigned long)&s3c_fb_data_exynos4,
> }, {
> + .name = "exynos5-fb",
> + .driver_data = (unsigned long)&s3c_fb_data_exynos5,
> + }, {
> .name = "s3c2443-fb",
> .driver_data = (unsigned long)&s3c_fb_data_s3c2443,
> }, {
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: add entry for exynos mipi display drivers
From: Florian Tobias Schandinat @ 2012-03-07 10:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4F557A2A.2080108@samsung.com>
On 03/06/2012 02:44 AM, Donghwa Lee wrote:
> Hi, I'd like to add Inki Dae, Donghwa Lee and Kyungmin Park as
> maintainers who developers for exynos mipi display drivers for
> video/driver/exynos/exynos_mipi* and include/video/exynos_mipi*.
>
> Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Applied after moving it to keep alphabetical order in MAINTAINERS and
amending the commit message like Andrew did with v1 of this patch
(deleting "Hi, I'd like to").
Thanks,
Florian Tobias Schandinat
> ---
> MAINTAINERS | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b087b3bc..eb5fbcb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2351,6 +2351,15 @@ S: Supported
> F: drivers/gpu/drm/exynos
> F: include/drm/exynos*
>
> +EXYNOS MIPI DISPLAY DRIVERS
> +M: Inki Dae <inki.dae@samsung.com>
> +M: Donghwa Lee <dh09.lee@samsung.com>
> +M: Kyungmin Park <kyungmin.park@samsung.com>
> +L: linux-fbdev@vger.kernel.org
> +S: Maintained
> +F: drivers/video/exynos/exynos_mipi*
> +F: include/video/exynos_mipi*
> +
> DSCC4 DRIVER
> M: Francois Romieu <romieu@fr.zoreil.com>
> L: netdev@vger.kernel.org
^ permalink raw reply
* Re: [PATCH] pxafb: do console locking before calling fb_blank()
From: Florian Tobias Schandinat @ 2012-03-07 10:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1330264322-5938-1-git-send-email-anarsoul@gmail.com>
On 02/26/2012 01:52 PM, Vasily Khoruzhick wrote:
> Otherwise we hit WARN_CONSOLE_UNLOCKED in do_unblank_screen
>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Applied.
Thanks,
Florian Tobias Schandinat
> ---
> drivers/video/pxafb.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
> index 1d1e4f1..c176561 100644
> --- a/drivers/video/pxafb.c
> +++ b/drivers/video/pxafb.c
> @@ -54,6 +54,7 @@
> #include <linux/mutex.h>
> #include <linux/kthread.h>
> #include <linux/freezer.h>
> +#include <linux/console.h>
>
> #include <mach/hardware.h>
> #include <asm/io.h>
> @@ -730,9 +731,12 @@ static int overlayfb_open(struct fb_info *info, int user)
> if (user = 0)
> return -ENODEV;
>
> - if (ofb->usage++ = 0)
> + if (ofb->usage++ = 0) {
> /* unblank the base framebuffer */
> + console_lock();
> fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK);
> + console_unlock();
> + }
>
> return 0;
> }
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: add maintainer entry for Exynos DP driver
From: Florian Tobias Schandinat @ 2012-03-07 10:08 UTC (permalink / raw)
To: linux-fbdev
On 02/06/2012 02:30 AM, Jingoo Han wrote:
> Add maintainer entry for Exynos DP driver which can be used for
> Samsung Exynos SoC series.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Applied.
Thanks,
Florian Tobias Schandinat
> ---
> MAINTAINERS | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ebb1936..f685bfd 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2639,6 +2639,12 @@ M: Mimi Zohar <zohar@us.ibm.com>
> S: Supported
> F: security/integrity/evm/
>
> +EXYNOS DP DRIVER
> +M: Jingoo Han <jg1.han@samsung.com>
> +L: linux-fbdev@vger.kernel.org
> +S: Maintained
> +F: drivers/video/exynos/exynos_dp*
> +
> F71805F HARDWARE MONITORING DRIVER
> M: Jean Delvare <khali@linux-fr.org>
> L: lm-sensors@lm-sensors.org
> --
>
>
^ permalink raw reply
* Re: [GIT PULL] udlfb patches for fbdev-next
From: Florian Tobias Schandinat @ 2012-03-07 10:06 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <CAO1w=s86ykpLJC8KkTbUn1qhvO52CJnzCKz5+rhS7mQtnwR4_w@mail.gmail.com>
Hi Bernie,
On 03/05/2012 02:33 AM, Bernie Thompson wrote:
> Hi Florian,
>
> These are udlfb patches for fbdev-next (assume 3.4; compatible with 3.3)
>
> Testing use of github to try to make patch submission easier. 1st
> time. Be kind.
> Not yet on git 1.7.9 for signed requests. Happy to send github pull requests.
Merged.
For those few patches I don't consider signing crucial. It's still easy
enough to review, so it doesn't matter too much if github is compromised.
> All 5 patches are independent of each other. Feedback welcome.
Looks good. Just "udlfb: fix hcd_buffer_free panic on unplug/replug"
wasn't trivial to review, hope it is well tested. I was wondering about
the patch of Olivier Sobrie as it was neither part of this pull-request
nor did you comment on it, but probably you read my comment I wrote when
I cc'ed you as you added yourself to MAINTAINERS.
Thanks,
Florian Tobias Schandinat
>
> The following changes since commit 327e27681c27d3ed5ea470ec483904d1a318cb7f:
>
> video: s3c-fb: use devm_request_irq() (2012-02-24 00:50:07 +0000)
>
> are available in the git repository at:
> git@github.com:bernieplug/linux-2.6.git fbdev-next
>
> Ben Collins (2):
> udlfb: Make sure to get correct endian keys from vendor descriptor
> udlfb: Add module_param to allow forcing pixel_limit
>
> Bernie Thompson (2):
> udlfb: add maintainer
> udlfb: fix hcd_buffer_free panic on unplug/replug
>
> Martin Decky (1):
> udlfb: Improve debugging printouts with refresh rate
>
> MAINTAINERS | 9 +++
> drivers/video/udlfb.c | 163 ++++++++++++++++++++++++++++--------------------
> include/video/udlfb.h | 1 +
> 3 files changed, 105 insertions(+), 68 deletions(-)
>
^ permalink raw reply
* [PATCH] fbdev: sh_mipi_dsi: add extra phyctrl for sh_mipi_dsi_info
From: Kuninori Morimoto @ 2012-03-07 2:57 UTC (permalink / raw)
To: linux-fbdev
sh_mipi uses some clocks, but the method of setup depends on CPU.
Current SuperH (like sh73a0) can control all of these clocks
by CPG (Clock Pulse Generator).
It means we can control it by clock framework only.
But on sh7372, it needs CPG settings AND sh_mipi PHYCTRL::PLLDS,
and only sh7372 has PHYCTRL::PLLDS.
But on current sh_mipi driver, PHYCTRL::PLLDS of sh7372 was
overwrote since the callback timing of clock setting was changed
by c2658b70f06108361aa5024798f9c1bf47c73374
(fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()).
The difference of PHYCTRL between current SuperH (=sh73a0) and
old SuperH (=sh7372) is not only PLLDS.
So this patch adds extra .phyctrl.
It also adds detail explanation for unclear mipi settings for ap4evb.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ap4evb.c | 12 +++++++++---
drivers/video/sh_mipi_dsi.c | 2 +-
include/video/sh_mipi_dsi.h | 1 +
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index b4718b0..ca075aa 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -556,20 +556,25 @@ static struct platform_device keysc_device = {
};
/* MIPI-DSI */
-#define PHYCTRL 0x0070
static int sh_mipi_set_dot_clock(struct platform_device *pdev,
void __iomem *base,
int enable)
{
struct clk *pck = clk_get(&pdev->dev, "dsip_clk");
- void __iomem *phy = base + PHYCTRL;
if (IS_ERR(pck))
return PTR_ERR(pck);
if (enable) {
+ /*
+ * DSIPCLK = 24MHz
+ * D-PHY = DSIPCLK * ((0x6*2)+1) = 321MHz (see .phyctrl)
+ * HsByteCLK = D-PHY/8 = 39MHz
+ *
+ * X * Y * FPS + * (544+72+600+16) * (961+8+8+2) * 30 = 36.1MHz
+ */
clk_set_rate(pck, clk_round_rate(pck, 24000000));
- iowrite32(ioread32(phy) | (0xb << 8), phy);
clk_enable(pck);
} else {
clk_disable(pck);
@@ -598,6 +603,7 @@ static struct sh_mipi_dsi_info mipidsi0_info = {
.lcd_chan = &lcdc_info.ch[0],
.lane = 2,
.vsynw_offset = 17,
+ .phyctrl = 0x6 << 8,
.flags = SH_MIPI_DSI_SYNC_PULSES_MODE |
SH_MIPI_DSI_HSbyteCLK,
.set_dot_clock = sh_mipi_set_dot_clock,
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
index 05151b8..214482c 100644
--- a/drivers/video/sh_mipi_dsi.c
+++ b/drivers/video/sh_mipi_dsi.c
@@ -271,7 +271,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
iowrite32(0x00000001, base + PHYCTRL);
udelay(200);
/* Deassert resets, power on */
- iowrite32(0x03070001, base + PHYCTRL);
+ iowrite32(0x03070001 | pdata->phyctrl, base + PHYCTRL);
/*
* Default = ULPS enable |
diff --git a/include/video/sh_mipi_dsi.h b/include/video/sh_mipi_dsi.h
index 434d56b..06c67fb 100644
--- a/include/video/sh_mipi_dsi.h
+++ b/include/video/sh_mipi_dsi.h
@@ -51,6 +51,7 @@ struct sh_mipi_dsi_info {
int lane;
unsigned long flags;
u32 clksrc;
+ u32 phyctrl; /* for extra setting */
unsigned int vsynw_offset;
int (*set_dot_clock)(struct platform_device *pdev,
void __iomem *base,
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH 2/3] video: s3c-fb: remove 'default_win' element from platform data
From: Thomas Abraham @ 2012-03-06 10:22 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-fbdev, FlorianSchandinat, linux-samsung-soc, kgene.kim,
ben-linux, patches
In-Reply-To: <002801ccfb80$aac11cf0$004356d0$%han@samsung.com>
On 6 March 2012 15:35, Jingoo Han <jg1.han@samsung.com> wrote:
>> -----Original Message-----
>> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
>> Sent: Sunday, March 04, 2012 12:50 AM
>> To: linux-fbdev@vger.kernel.org
>> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
>> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
>> Subject: [PATCH 2/3] video: s3c-fb: remove 'default_win' element from platform data
>>
>> The decision to enable or disable the data output to the lcd panel from
>> the controller need not be based on the value of 'default_win' element
>> in the platform data. Instead, the data output to the panel is enabled
>> if any of the windows are active, else data output is disabled.
>>
>> Cc: Ben Dooks <ben-linux@fluff.org>
>> Cc: Jingoo Han <jg1.han@samsung.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> ---
>> arch/arm/plat-samsung/include/plat/fb.h | 2 --
>> drivers/video/s3c-fb.c | 24 ++++--------------------
>> 2 files changed, 4 insertions(+), 22 deletions(-)
>>
>> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
>> index 39d6bd7..536002f 100644
>> --- a/arch/arm/plat-samsung/include/plat/fb.h
>> +++ b/arch/arm/plat-samsung/include/plat/fb.h
>> @@ -62,8 +62,6 @@ struct s3c_fb_platdata {
>> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
>> struct fb_videomode *vtiming;
>>
>> - u32 default_win;
>> -
>> u32 vidcon0;
>> u32 vidcon1;
>> };
>> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
>> index 8e05d4d..8baba31 100644
>> --- a/drivers/video/s3c-fb.c
>> +++ b/drivers/video/s3c-fb.c
>> @@ -531,7 +531,7 @@ static int s3c_fb_set_par(struct fb_info *info)
>> /* disable the window whilst we update it */
>> writel(0, regs + WINCON(win_no));
>>
>> - if (win_no = sfb->pdata->default_win)
>> + if (!sfb->output_on)
>> s3c_fb_enable(sfb, 1);
>>
>> /* write the buffer address */
>> @@ -792,7 +792,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
>> struct s3c_fb_win *win = info->par;
>> struct s3c_fb *sfb = win->parent;
>> unsigned int index = win->index;
>> - u32 wincon;
>> + u32 wincon, output_on = sfb->output_on;
>
> Can you add new line as below? It's more readable.
> + u32 output_on = sfb->output_on;
> Sorry for nitpicking.
Ok. I will add a new line as you have suggested.
>
>>
>> dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
>>
>> @@ -838,27 +838,11 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
>> * it is highly likely that we also do not need to output
>> * anything.
>> */
>> -
>> - /* We could do something like the following code, but the current
>> - * system of using framebuffer events means that we cannot make
>> - * the distinction between just window 0 being inactive and all
>> - * the windows being down.
>> - *
>> - * s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
>> - */
>> -
>> - /* we're stuck with this until we can do something about overriding
>> - * the power control using the blanking event for a single fb.
>> - */
>> - if (index = sfb->pdata->default_win) {
>> - shadow_protect_win(win, 1);
>> - s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0);
>> - shadow_protect_win(win, 0);
>> - }
>> + s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
>
> However, shadow_protect_win() is necessary as belows.
> Because shadow registers such as VIDCON0 should be protectd
> whenever the registers are updated. The s3c_fb_enable() updates
> VIDCON0.
> + shadow_protect_win(win, 1);
> + s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
> + shadow_protect_win(win, 0);
Right. Thanks for the correction. I will submit updated patch series soon.
Regards,
Thomas.
^ permalink raw reply
* RE: [PATCH 2/3] video: s3c-fb: remove 'default_win' element from platform data
From: Jingoo Han @ 2012-03-06 10:05 UTC (permalink / raw)
To: 'Thomas Abraham', linux-fbdev
Cc: FlorianSchandinat, linux-samsung-soc, kgene.kim, ben-linux,
patches, 'Jingoo Han'
In-Reply-To: <1330789808-8253-3-git-send-email-thomas.abraham@linaro.org>
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Sunday, March 04, 2012 12:50 AM
> To: linux-fbdev@vger.kernel.org
> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
> Subject: [PATCH 2/3] video: s3c-fb: remove 'default_win' element from platform data
>
> The decision to enable or disable the data output to the lcd panel from
> the controller need not be based on the value of 'default_win' element
> in the platform data. Instead, the data output to the panel is enabled
> if any of the windows are active, else data output is disabled.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/plat-samsung/include/plat/fb.h | 2 --
> drivers/video/s3c-fb.c | 24 ++++--------------------
> 2 files changed, 4 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
> index 39d6bd7..536002f 100644
> --- a/arch/arm/plat-samsung/include/plat/fb.h
> +++ b/arch/arm/plat-samsung/include/plat/fb.h
> @@ -62,8 +62,6 @@ struct s3c_fb_platdata {
> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
> struct fb_videomode *vtiming;
>
> - u32 default_win;
> -
> u32 vidcon0;
> u32 vidcon1;
> };
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 8e05d4d..8baba31 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -531,7 +531,7 @@ static int s3c_fb_set_par(struct fb_info *info)
> /* disable the window whilst we update it */
> writel(0, regs + WINCON(win_no));
>
> - if (win_no = sfb->pdata->default_win)
> + if (!sfb->output_on)
> s3c_fb_enable(sfb, 1);
>
> /* write the buffer address */
> @@ -792,7 +792,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
> struct s3c_fb_win *win = info->par;
> struct s3c_fb *sfb = win->parent;
> unsigned int index = win->index;
> - u32 wincon;
> + u32 wincon, output_on = sfb->output_on;
Can you add new line as below? It's more readable.
+ u32 output_on = sfb->output_on;
Sorry for nitpicking.
>
> dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
>
> @@ -838,27 +838,11 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
> * it is highly likely that we also do not need to output
> * anything.
> */
> -
> - /* We could do something like the following code, but the current
> - * system of using framebuffer events means that we cannot make
> - * the distinction between just window 0 being inactive and all
> - * the windows being down.
> - *
> - * s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
> - */
> -
> - /* we're stuck with this until we can do something about overriding
> - * the power control using the blanking event for a single fb.
> - */
> - if (index = sfb->pdata->default_win) {
> - shadow_protect_win(win, 1);
> - s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0);
> - shadow_protect_win(win, 0);
> - }
> + s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
However, shadow_protect_win() is necessary as belows.
Because shadow registers such as VIDCON0 should be protectd
whenever the registers are updated. The s3c_fb_enable() updates
VIDCON0.
+ shadow_protect_win(win, 1);
+ s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
+ shadow_protect_win(win, 0);
>
> pm_runtime_put_sync(sfb->dev);
>
> - return 0;
> + return output_on = sfb->output_on;
> }
>
> /**
> --
> 1.6.6.rc2
^ permalink raw reply
* RE: [PATCH 3/3] ARM: Exynos: Rework platform data for lcd controller for Origen board
From: Jingoo Han @ 2012-03-06 7:32 UTC (permalink / raw)
To: 'Thomas Abraham', linux-fbdev
Cc: FlorianSchandinat, linux-samsung-soc, kgene.kim, ben-linux,
patches, 'Jingoo Han'
In-Reply-To: <1330789808-8253-4-git-send-email-thomas.abraham@linaro.org>
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Sunday, March 04, 2012 12:50 AM
> To: linux-fbdev@vger.kernel.org
> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
> Subject: [PATCH 3/3] ARM: Exynos: Rework platform data for lcd controller for Origen board
>
> The 'default_win' element in the platform data is removed and the lcd panel
> video timing values are moved out of individual window configuration data.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
It looks good.
Acked-by: Jingoo Han <jg1.han@samsung.com>
> ---
> arch/arm/mach-exynos/mach-origen.c | 24 ++++++++++++++----------
> 1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
> index f57aed4..dc4ecc3 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -583,22 +583,26 @@ static struct platform_device origen_lcd_hv070wsa = {
> };
>
> static struct s3c_fb_pd_win origen_fb_win0 = {
> - .win_mode = {
> - .left_margin = 64,
> - .right_margin = 16,
> - .upper_margin = 64,
> - .lower_margin = 16,
> - .hsync_len = 48,
> - .vsync_len = 3,
> - .xres = 1024,
> - .yres = 600,
> - },
> + .xres = 512,
> + .yres = 300,
> .max_bpp = 32,
> .default_bpp = 24,
> };
>
> +static struct fb_videomode lcd_hv070wsa_timing = {
> + .left_margin = 64,
> + .right_margin = 16,
> + .upper_margin = 64,
> + .lower_margin = 16,
> + .hsync_len = 48,
> + .vsync_len = 3,
> + .xres = 1024,
> + .yres = 600,
> +};
> +
> static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
> .win[0] = &origen_fb_win0,
> + .vtiming = &lcd_hv070wsa_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> VIDCON1_INV_VCLK,
> --
> 1.6.6.rc2
^ permalink raw reply
* RE: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
From: Jingoo Han @ 2012-03-06 7:26 UTC (permalink / raw)
To: 'Thomas Abraham'
Cc: linux-fbdev, FlorianSchandinat, linux-samsung-soc, kgene.kim,
ben-linux, patches, 'Jingoo Han'
In-Reply-To: <CAJuYYwRAGQw=b0P1XePqPPXi=v5KXPQqoEJsvOpGbu7FtMnLNw@mail.gmail.com>
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Tuesday, March 06, 2012 3:35 PM
> To: Jingoo Han
> Cc: linux-fbdev@vger.kernel.org; FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org;
> kgene.kim@samsung.com; ben-linux@fluff.org; patches@linaro.org
> Subject: Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>
> On 6 March 2012 11:52, Jingoo Han <jg1.han@samsung.com> wrote:
>
> >> -----Original Message-----
> >> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> >> Sent: Tuesday, March 06, 2012 2:26 PM
> >> To: Jingoo Han
> >> Cc: linux-fbdev@vger.kernel.org; FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org;
> >> kgene.kim@samsung.com; ben-linux@fluff.org; patches@linaro.org
> >> Subject: Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
> >>
> >> On 6 March 2012 10:15, Jingoo Han <jg1.han@samsung.com> wrote:
> >>
> >> >> -----Original Message-----
> >> >> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> >> >> Sent: Sunday, March 04, 2012 12:50 AM
> >> >> To: linux-fbdev@vger.kernel.org
> >> >> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> >> >> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
> >> >> Subject: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
> >> >>
> >> >> The video interface timing is independent of the window setup data.
> >> >> The resolution of the window can be smaller than that of the lcd
> >> >> panel to which the video data is output.
> >> >>
> >> >> So move the video timing data from the per-window setup data to the
> >> >> platform specific section in the platform data. This also removes
> >> >> the restriction that atleast one window should have the same
> >> >> resolution as that of the panel attached.
> >> >>
> >> >> Cc: Ben Dooks <ben-linux@fluff.org>
> >> >> Cc: Jingoo Han <jg1.han@samsung.com>
> >> >> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> >> >> ---
> >> >> arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
> >> >> drivers/video/s3c-fb.c | 106 +++++++++++++++++--------------
> >> >> 2 files changed, 63 insertions(+), 52 deletions(-)
> >> >>
> >> >> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
> >> >> index 0fedf47..39d6bd7 100644
> >> >> --- a/arch/arm/plat-samsung/include/plat/fb.h
> >> >> +++ b/arch/arm/plat-samsung/include/plat/fb.h
> >> >> @@ -24,15 +24,16 @@
> >> >>
> >> >> /**
> >> >> * struct s3c_fb_pd_win - per window setup data
> >> >> - * @win_mode: The display parameters to initialise (not for window 0)
> >> >> + * @xres : The window X size.
> >> >> + * @yres : The window Y size.
> >> >> * @virtual_x: The virtual X size.
> >> >> * @virtual_y: The virtual Y size.
> >> >> */
> >> >> struct s3c_fb_pd_win {
> >> >> - struct fb_videomode win_mode;
> >> >> -
> >> >> unsigned short default_bpp;
> >> >> unsigned short max_bpp;
> >> >> + unsigned short xres;
> >> >> + unsigned short yres;
> >> >> unsigned short virtual_x;
> >> >> unsigned short virtual_y;
> >> >> };
> >> >> @@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
> >> >> * @default_win: default window layer number to be used for UI layer.
> >> >> * @vidcon0: The base vidcon0 values to control the panel data format.
> >> >> * @vidcon1: The base vidcon1 values to control the panel data output.
> >> >> + * @vtiming: Video timing when connected to a RGB type panel.
> >> >
> >> > fb_videomode can be set, even if it is not RGB type panel.
> >> > In my opinion, it would be better.
> >> > + * @vtiming: The video timing values to set the interface timing of the panel.
> >>
> >> The other interface that is supported is the i80 interface. Can these
> >> timing values be used for i80 interface as well ?
> >
> > No, you're right. The i80 is not supported.
> > Please ignore my comment.
> >
> >>
> >> >
> >> >> * @win: The setup data for each hardware window, or NULL for unused.
> >> >> * @display_mode: The LCD output display mode.
> >> >> *
> >> >> @@ -58,6 +60,7 @@ struct s3c_fb_platdata {
> >> >> void (*setup_gpio)(void);
> >> >>
> >> >> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
> >> >> + struct fb_videomode *vtiming;
> >> >>
> >> >> u32 default_win;
> >> >>
> >> >> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> >> >> index 1fb7ddf..8e05d4d 100644
> >> >> --- a/drivers/video/s3c-fb.c
> >> >> +++ b/drivers/video/s3c-fb.c
> >> >> @@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
> >> >> u32 alpha = 0;
> >> >> u32 data;
> >> >> u32 pagewidth;
> >> >> - int clkdiv;
> >> >>
> >> >> dev_dbg(sfb->dev, "setting framebuffer parameters\n");
> >> >>
> >> >> @@ -532,46 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
> >> >> /* disable the window whilst we update it */
> >> >> writel(0, regs + WINCON(win_no));
> >> >>
> >> >> - /* use platform specified window as the basis for the lcd timings */
> >> >> -
> >> >> - if (win_no = sfb->pdata->default_win) {
> >> >> - clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
> >> >> -
> >> >> - data = sfb->pdata->vidcon0;
> >> >> - data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
> >> >> -
> >> >> - if (clkdiv > 1)
> >> >> - data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
> >> >> - else
> >> >> - data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
> >> >> -
> >> >> - /* write the timing data to the panel */
> >> >> -
> >> >> - if (sfb->variant.is_2443)
> >> >> - data |= (1 << 5);
> >> >> -
> >> >> - writel(data, regs + VIDCON0);
> >> >> -
> >> >> + if (win_no = sfb->pdata->default_win)
> >> >> s3c_fb_enable(sfb, 1);
> >> >>
> >> >> - data = VIDTCON0_VBPD(var->upper_margin - 1) |
> >> >> - VIDTCON0_VFPD(var->lower_margin - 1) |
> >> >> - VIDTCON0_VSPW(var->vsync_len - 1);
> >> >> -
> >> >> - writel(data, regs + sfb->variant.vidtcon);
> >> >> -
> >> >> - data = VIDTCON1_HBPD(var->left_margin - 1) |
> >> >> - VIDTCON1_HFPD(var->right_margin - 1) |
> >> >> - VIDTCON1_HSPW(var->hsync_len - 1);
> >> >> -
> >> >> - /* VIDTCON1 */
> >> >> - writel(data, regs + sfb->variant.vidtcon + 4);
> >> >> -
> >> >> - data = VIDTCON2_LINEVAL(var->yres - 1) |
> >> >> - VIDTCON2_HOZVAL(var->xres - 1);
> >> >> - writel(data, regs + sfb->variant.vidtcon + 8);
> >> >> - }
> >> >> -
> >> >
> >> > It looks good.
> >> > VIDTCON registers don't need to be written whenever s3c_fb_set_par is called.
> >> >
> >> >> /* write the buffer address */
> >> >>
> >> >> /* start and end registers stride is 8 */
> >> >> @@ -1136,11 +1098,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
> >> >>
> >> >> dev_dbg(sfb->dev, "allocating memory for display\n");
> >> >>
> >> >> - real_size = windata->win_mode.xres * windata->win_mode.yres;
> >> >> + real_size = windata->xres * windata->yres;
> >> >> virt_size = windata->virtual_x * windata->virtual_y;
> >> >>
> >> >> dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
> >> >> - real_size, windata->win_mode.xres, windata->win_mode.yres,
> >> >> + real_size, windata->xres, windata->yres,
> >> >> virt_size, windata->virtual_x, windata->virtual_y);
> >> >>
> >> >> size = (real_size > virt_size) ? real_size : virt_size;
> >> >> @@ -1222,7 +1184,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int
> win_no,
> >> >> struct s3c_fb_win **res)
> >> >> {
> >> >> struct fb_var_screeninfo *var;
> >> >> - struct fb_videomode *initmode;
> >> >> + struct fb_videomode initmode;
> >> >
> >> > *initmode cannot be used???
> >> > Can you tell me why pointer type should be changed?
> >> >
> >>
> >> The initmode is used to pass video timing to the fb_videomode_to_var()
> >> function. Each window setup data in platform data included video
> >> timing information. Since, the video timing data is now moved out of
> >> per-window data, the xres and yres values have to be setup based on
> >> the window for which the fb_videomode_to_var() is called. Hence, the
> >> common timing values is first copied into initmode and then the window
> >> specific xres and yres are set. If initmode is a maintained as a
> >> pointer (to the video timing data in platform data), then any xres and
> >> yres update to initmode would overwrite the 'constant' video timing.
> >
> > My point is that variable type 'initmode' can be not changed by using pointer type as follows:
> >
> > @@ -1243,11 +1243,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> > }
> >
> > windata = sfb->pdata->win[win_no];
> > - initmode = &windata->win_mode;
> > + initmode = sfb->pdata->vtiming;
>
> In this case, initmode is not pointing to the 'constant' lcd panel
> timing values.
>
> >
> > WARN_ON(windata->max_bpp = 0);
> > - WARN_ON(windata->win_mode.xres = 0);
> > - WARN_ON(windata->win_mode.yres = 0);
> > + WARN_ON(windata->xres = 0);
> > + WARN_ON(windata->yres = 0);
> >
> > win = fbinfo->par;
> > *res = win;
> > @@ -1286,6 +1286,8 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> > }
> >
> > /* setup the initial video mode from the window */
> > + initmode->xres = windata->xres;
> > + initmode->yres = windata->yres;
>
> And then here, the xres and yres of the 'constant' lcd panel timing
> value will be changed.
>
> But, we don't want to change the actual lcd panel timing value. That
> is the reason to first copy the lcd panel timing value into a local
> copy and then update the xres and yres and then pass this local copy
> of the timing value to fb_videomode_to_var() function.
OK. I see. You're right.
If you add add it in the resume path in the resume path,
you can use my acked-by to this 1st patch.
Thank you for sending the patch.
Best regards,
Jingoo Han
>
> Thanks,
> Thomas.
>
> [...]
^ permalink raw reply
* [PATCH V2 RESEND] video: s3c-fb: Add support EXYNOS5 FIMD
From: Jingoo Han @ 2012-03-06 6:53 UTC (permalink / raw)
To: linux-fbdev, 'Florian Tobias Schandinat'
Cc: linux-samsung-soc, 'Kukjin Kim', 'Jingoo Han'
This patch adds s3c_fb_driverdata s3c_fb_data_exynos5 for EXYNOS5
and adds extended timing control setting.
EXYNOS5 FIMD needs extended setting for video timing control.
Additional bits are added to VIDTCON2, VIDWxxADD2, VIDOSDxA and
VIDOSDxB registers in order to set timing value for lager resolution.
Also, address offset of VIDTCONx registers is changed from 0x0
to 0x20000, thus variable type should be changed to int type
to handle the address offset of VIDTCONx registers for EXYNOS5 FIMD.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
v2: fix commit message from VIDCONx to VIDTCONx.
arch/arm/plat-samsung/include/plat/regs-fb.h | 24 ++++++++----
drivers/video/s3c-fb.c | 52 +++++++++++++++++++++++--
2 files changed, 63 insertions(+), 13 deletions(-)
diff --git a/arch/arm/plat-samsung/include/plat/regs-fb.h b/arch/arm/plat-samsung/include/plat/regs-fb.h
index bbb16e0..9a78012 100644
--- a/arch/arm/plat-samsung/include/plat/regs-fb.h
+++ b/arch/arm/plat-samsung/include/plat/regs-fb.h
@@ -167,15 +167,17 @@
#define VIDTCON1_HSPW(_x) ((_x) << 0)
#define VIDTCON2 (0x18)
+#define VIDTCON2_LINEVAL_E(_x) ((((_x) & 0x800) >> 11) << 23)
#define VIDTCON2_LINEVAL_MASK (0x7ff << 11)
#define VIDTCON2_LINEVAL_SHIFT (11)
#define VIDTCON2_LINEVAL_LIMIT (0x7ff)
-#define VIDTCON2_LINEVAL(_x) ((_x) << 11)
+#define VIDTCON2_LINEVAL(_x) (((_x) & 0x7ff) << 11)
+#define VIDTCON2_HOZVAL_E(_x) ((((_x) & 0x800) >> 11) << 22)
#define VIDTCON2_HOZVAL_MASK (0x7ff << 0)
#define VIDTCON2_HOZVAL_SHIFT (0)
#define VIDTCON2_HOZVAL_LIMIT (0x7ff)
-#define VIDTCON2_HOZVAL(_x) ((_x) << 0)
+#define VIDTCON2_HOZVAL(_x) (((_x) & 0x7ff) << 0)
/* WINCONx */
@@ -231,25 +233,29 @@
/* Local input channels (windows 0-2) */
#define SHADOWCON_CHx_LOCAL_ENABLE(_win) (1 << (5 + (_win)))
+#define VIDOSDxA_TOPLEFT_X_E(_x) ((((_x) & 0x800) >> 11) << 23)
#define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11)
#define VIDOSDxA_TOPLEFT_X_SHIFT (11)
#define VIDOSDxA_TOPLEFT_X_LIMIT (0x7ff)
-#define VIDOSDxA_TOPLEFT_X(_x) ((_x) << 11)
+#define VIDOSDxA_TOPLEFT_X(_x) (((_x) & 0x7ff) << 11)
+#define VIDOSDxA_TOPLEFT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22)
#define VIDOSDxA_TOPLEFT_Y_MASK (0x7ff << 0)
#define VIDOSDxA_TOPLEFT_Y_SHIFT (0)
#define VIDOSDxA_TOPLEFT_Y_LIMIT (0x7ff)
-#define VIDOSDxA_TOPLEFT_Y(_x) ((_x) << 0)
+#define VIDOSDxA_TOPLEFT_Y(_x) (((_x) & 0x7ff) << 0)
+#define VIDOSDxB_BOTRIGHT_X_E(_x) ((((_x) & 0x800) >> 11) << 23)
#define VIDOSDxB_BOTRIGHT_X_MASK (0x7ff << 11)
#define VIDOSDxB_BOTRIGHT_X_SHIFT (11)
#define VIDOSDxB_BOTRIGHT_X_LIMIT (0x7ff)
-#define VIDOSDxB_BOTRIGHT_X(_x) ((_x) << 11)
+#define VIDOSDxB_BOTRIGHT_X(_x) (((_x) & 0x7ff) << 11)
+#define VIDOSDxB_BOTRIGHT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22)
#define VIDOSDxB_BOTRIGHT_Y_MASK (0x7ff << 0)
#define VIDOSDxB_BOTRIGHT_Y_SHIFT (0)
#define VIDOSDxB_BOTRIGHT_Y_LIMIT (0x7ff)
-#define VIDOSDxB_BOTRIGHT_Y(_x) ((_x) << 0)
+#define VIDOSDxB_BOTRIGHT_Y(_x) (((_x) & 0x7ff) << 0)
/* For VIDOSD[1..4]C */
#define VIDISD14C_ALPHA0_R(_x) ((_x) << 20)
@@ -281,15 +287,17 @@
#define VIDW_BUF_END1(_buff) (0xD4 + ((_buff) * 8))
#define VIDW_BUF_SIZE(_buff) (0x100 + ((_buff) * 4))
+#define VIDW_BUF_SIZE_OFFSET_E(_x) ((((_x) & 0x2000) >> 13) << 27)
#define VIDW_BUF_SIZE_OFFSET_MASK (0x1fff << 13)
#define VIDW_BUF_SIZE_OFFSET_SHIFT (13)
#define VIDW_BUF_SIZE_OFFSET_LIMIT (0x1fff)
-#define VIDW_BUF_SIZE_OFFSET(_x) ((_x) << 13)
+#define VIDW_BUF_SIZE_OFFSET(_x) (((_x) & 0x1fff) << 13)
+#define VIDW_BUF_SIZE_PAGEWIDTH_E(_x) ((((_x) & 0x2000) >> 13) << 26)
#define VIDW_BUF_SIZE_PAGEWIDTH_MASK (0x1fff << 0)
#define VIDW_BUF_SIZE_PAGEWIDTH_SHIFT (0)
#define VIDW_BUF_SIZE_PAGEWIDTH_LIMIT (0x1fff)
-#define VIDW_BUF_SIZE_PAGEWIDTH(_x) ((_x) << 0)
+#define VIDW_BUF_SIZE_PAGEWIDTH(_x) (((_x) & 0x1fff) << 0)
/* Interrupt controls and status */
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 1fb7ddf..f310516 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -89,7 +89,7 @@ struct s3c_fb;
struct s3c_fb_variant {
unsigned int is_2443:1;
unsigned short nr_windows;
- unsigned short vidtcon;
+ unsigned int vidtcon;
unsigned short wincon;
unsigned short winmap;
unsigned short keycon;
@@ -568,7 +568,9 @@ static int s3c_fb_set_par(struct fb_info *info)
writel(data, regs + sfb->variant.vidtcon + 4);
data = VIDTCON2_LINEVAL(var->yres - 1) |
- VIDTCON2_HOZVAL(var->xres - 1);
+ VIDTCON2_HOZVAL(var->xres - 1) |
+ VIDTCON2_LINEVAL_E(var->yres - 1) |
+ VIDTCON2_HOZVAL_E(var->xres - 1);
writel(data, regs + sfb->variant.vidtcon + 8);
}
@@ -584,17 +586,23 @@ static int s3c_fb_set_par(struct fb_info *info)
pagewidth = (var->xres * var->bits_per_pixel) >> 3;
data = VIDW_BUF_SIZE_OFFSET(info->fix.line_length - pagewidth) |
- VIDW_BUF_SIZE_PAGEWIDTH(pagewidth);
+ VIDW_BUF_SIZE_PAGEWIDTH(pagewidth) |
+ VIDW_BUF_SIZE_OFFSET_E(info->fix.line_length - pagewidth) |
+ VIDW_BUF_SIZE_PAGEWIDTH_E(pagewidth);
writel(data, regs + sfb->variant.buf_size + (win_no * 4));
/* write 'OSD' registers to control position of framebuffer */
- data = VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0);
+ data = VIDOSDxA_TOPLEFT_X(0) | VIDOSDxA_TOPLEFT_Y(0) |
+ VIDOSDxA_TOPLEFT_X_E(0) | VIDOSDxA_TOPLEFT_Y_E(0);
writel(data, regs + VIDOSD_A(win_no, sfb->variant));
data = VIDOSDxB_BOTRIGHT_X(s3c_fb_align_word(var->bits_per_pixel,
var->xres - 1)) |
- VIDOSDxB_BOTRIGHT_Y(var->yres - 1);
+ VIDOSDxB_BOTRIGHT_Y(var->yres - 1) |
+ VIDOSDxB_BOTRIGHT_X_E(s3c_fb_align_word(var->bits_per_pixel,
+ var->xres - 1)) |
+ VIDOSDxB_BOTRIGHT_Y_E(var->yres - 1);
writel(data, regs + VIDOSD_B(win_no, sfb->variant));
@@ -1903,6 +1911,37 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = {
.win[4] = &s3c_fb_data_s5p_wins[4],
};
+static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
+ .variant = {
+ .nr_windows = 5,
+ .vidtcon = VIDTCON0,
+ .wincon = WINCON(0),
+ .winmap = WINxMAP(0),
+ .keycon = WKEYCON,
+ .osd = VIDOSD_BASE,
+ .osd_stride = 16,
+ .buf_start = VIDW_BUF_START(0),
+ .buf_size = VIDW_BUF_SIZE(0),
+ .buf_end = VIDW_BUF_END(0),
+
+ .palette = {
+ [0] = 0x2400,
+ [1] = 0x2800,
+ [2] = 0x2c00,
+ [3] = 0x3000,
+ [4] = 0x3400,
+ },
+ .has_shadowcon = 1,
+ .has_blendcon = 1,
+ .has_fixvclk = 1,
+ },
+ .win[0] = &s3c_fb_data_s5p_wins[0],
+ .win[1] = &s3c_fb_data_s5p_wins[1],
+ .win[2] = &s3c_fb_data_s5p_wins[2],
+ .win[3] = &s3c_fb_data_s5p_wins[3],
+ .win[4] = &s3c_fb_data_s5p_wins[4],
+};
+
/* S3C2443/S3C2416 style hardware */
static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
.variant = {
@@ -1981,6 +2020,9 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
.name = "exynos4-fb",
.driver_data = (unsigned long)&s3c_fb_data_exynos4,
}, {
+ .name = "exynos5-fb",
+ .driver_data = (unsigned long)&s3c_fb_data_exynos5,
+ }, {
.name = "s3c2443-fb",
.driver_data = (unsigned long)&s3c_fb_data_s3c2443,
}, {
--
1.7.1
^ permalink raw reply related
* Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
From: Thomas Abraham @ 2012-03-06 6:47 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-fbdev, FlorianSchandinat, linux-samsung-soc, kgene.kim,
ben-linux, patches
In-Reply-To: <002101ccfb61$710d2c70$53278550$%han@samsung.com>
On 6 March 2012 11:52, Jingoo Han <jg1.han@samsung.com> wrote:
>> -----Original Message-----
>> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
>> Sent: Tuesday, March 06, 2012 2:26 PM
>> To: Jingoo Han
>> Cc: linux-fbdev@vger.kernel.org; FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org;
>> kgene.kim@samsung.com; ben-linux@fluff.org; patches@linaro.org
>> Subject: Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>>
>> On 6 March 2012 10:15, Jingoo Han <jg1.han@samsung.com> wrote:
>>
>> >> -----Original Message-----
>> >> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
>> >> Sent: Sunday, March 04, 2012 12:50 AM
>> >> To: linux-fbdev@vger.kernel.org
>> >> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
>> >> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
>> >> Subject: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>> >>
>> >> The video interface timing is independent of the window setup data.
>> >> The resolution of the window can be smaller than that of the lcd
>> >> panel to which the video data is output.
>> >>
>> >> So move the video timing data from the per-window setup data to the
>> >> platform specific section in the platform data. This also removes
>> >> the restriction that atleast one window should have the same
>> >> resolution as that of the panel attached.
>> >>
>> >> Cc: Ben Dooks <ben-linux@fluff.org>
>> >> Cc: Jingoo Han <jg1.han@samsung.com>
>> >> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> >> ---
>> >> arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
>> >> drivers/video/s3c-fb.c | 106 +++++++++++++++++--------------
>> >> 2 files changed, 63 insertions(+), 52 deletions(-)
>> >>
>> >> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
>> >> index 0fedf47..39d6bd7 100644
>> >> --- a/arch/arm/plat-samsung/include/plat/fb.h
>> >> +++ b/arch/arm/plat-samsung/include/plat/fb.h
>> >> @@ -24,15 +24,16 @@
>> >>
>> >> /**
>> >> * struct s3c_fb_pd_win - per window setup data
>> >> - * @win_mode: The display parameters to initialise (not for window 0)
>> >> + * @xres : The window X size.
>> >> + * @yres : The window Y size.
>> >> * @virtual_x: The virtual X size.
>> >> * @virtual_y: The virtual Y size.
>> >> */
>> >> struct s3c_fb_pd_win {
>> >> - struct fb_videomode win_mode;
>> >> -
>> >> unsigned short default_bpp;
>> >> unsigned short max_bpp;
>> >> + unsigned short xres;
>> >> + unsigned short yres;
>> >> unsigned short virtual_x;
>> >> unsigned short virtual_y;
>> >> };
>> >> @@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
>> >> * @default_win: default window layer number to be used for UI layer.
>> >> * @vidcon0: The base vidcon0 values to control the panel data format.
>> >> * @vidcon1: The base vidcon1 values to control the panel data output.
>> >> + * @vtiming: Video timing when connected to a RGB type panel.
>> >
>> > fb_videomode can be set, even if it is not RGB type panel.
>> > In my opinion, it would be better.
>> > + * @vtiming: The video timing values to set the interface timing of the panel.
>>
>> The other interface that is supported is the i80 interface. Can these
>> timing values be used for i80 interface as well ?
>
> No, you're right. The i80 is not supported.
> Please ignore my comment.
>
>>
>> >
>> >> * @win: The setup data for each hardware window, or NULL for unused.
>> >> * @display_mode: The LCD output display mode.
>> >> *
>> >> @@ -58,6 +60,7 @@ struct s3c_fb_platdata {
>> >> void (*setup_gpio)(void);
>> >>
>> >> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
>> >> + struct fb_videomode *vtiming;
>> >>
>> >> u32 default_win;
>> >>
>> >> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
>> >> index 1fb7ddf..8e05d4d 100644
>> >> --- a/drivers/video/s3c-fb.c
>> >> +++ b/drivers/video/s3c-fb.c
>> >> @@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
>> >> u32 alpha = 0;
>> >> u32 data;
>> >> u32 pagewidth;
>> >> - int clkdiv;
>> >>
>> >> dev_dbg(sfb->dev, "setting framebuffer parameters\n");
>> >>
>> >> @@ -532,46 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
>> >> /* disable the window whilst we update it */
>> >> writel(0, regs + WINCON(win_no));
>> >>
>> >> - /* use platform specified window as the basis for the lcd timings */
>> >> -
>> >> - if (win_no = sfb->pdata->default_win) {
>> >> - clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
>> >> -
>> >> - data = sfb->pdata->vidcon0;
>> >> - data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
>> >> -
>> >> - if (clkdiv > 1)
>> >> - data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
>> >> - else
>> >> - data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
>> >> -
>> >> - /* write the timing data to the panel */
>> >> -
>> >> - if (sfb->variant.is_2443)
>> >> - data |= (1 << 5);
>> >> -
>> >> - writel(data, regs + VIDCON0);
>> >> -
>> >> + if (win_no = sfb->pdata->default_win)
>> >> s3c_fb_enable(sfb, 1);
>> >>
>> >> - data = VIDTCON0_VBPD(var->upper_margin - 1) |
>> >> - VIDTCON0_VFPD(var->lower_margin - 1) |
>> >> - VIDTCON0_VSPW(var->vsync_len - 1);
>> >> -
>> >> - writel(data, regs + sfb->variant.vidtcon);
>> >> -
>> >> - data = VIDTCON1_HBPD(var->left_margin - 1) |
>> >> - VIDTCON1_HFPD(var->right_margin - 1) |
>> >> - VIDTCON1_HSPW(var->hsync_len - 1);
>> >> -
>> >> - /* VIDTCON1 */
>> >> - writel(data, regs + sfb->variant.vidtcon + 4);
>> >> -
>> >> - data = VIDTCON2_LINEVAL(var->yres - 1) |
>> >> - VIDTCON2_HOZVAL(var->xres - 1);
>> >> - writel(data, regs + sfb->variant.vidtcon + 8);
>> >> - }
>> >> -
>> >
>> > It looks good.
>> > VIDTCON registers don't need to be written whenever s3c_fb_set_par is called.
>> >
>> >> /* write the buffer address */
>> >>
>> >> /* start and end registers stride is 8 */
>> >> @@ -1136,11 +1098,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
>> >>
>> >> dev_dbg(sfb->dev, "allocating memory for display\n");
>> >>
>> >> - real_size = windata->win_mode.xres * windata->win_mode.yres;
>> >> + real_size = windata->xres * windata->yres;
>> >> virt_size = windata->virtual_x * windata->virtual_y;
>> >>
>> >> dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
>> >> - real_size, windata->win_mode.xres, windata->win_mode.yres,
>> >> + real_size, windata->xres, windata->yres,
>> >> virt_size, windata->virtual_x, windata->virtual_y);
>> >>
>> >> size = (real_size > virt_size) ? real_size : virt_size;
>> >> @@ -1222,7 +1184,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
>> >> struct s3c_fb_win **res)
>> >> {
>> >> struct fb_var_screeninfo *var;
>> >> - struct fb_videomode *initmode;
>> >> + struct fb_videomode initmode;
>> >
>> > *initmode cannot be used???
>> > Can you tell me why pointer type should be changed?
>> >
>>
>> The initmode is used to pass video timing to the fb_videomode_to_var()
>> function. Each window setup data in platform data included video
>> timing information. Since, the video timing data is now moved out of
>> per-window data, the xres and yres values have to be setup based on
>> the window for which the fb_videomode_to_var() is called. Hence, the
>> common timing values is first copied into initmode and then the window
>> specific xres and yres are set. If initmode is a maintained as a
>> pointer (to the video timing data in platform data), then any xres and
>> yres update to initmode would overwrite the 'constant' video timing.
>
> My point is that variable type 'initmode' can be not changed by using pointer type as follows:
>
> @@ -1243,11 +1243,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> }
>
> windata = sfb->pdata->win[win_no];
> - initmode = &windata->win_mode;
> + initmode = sfb->pdata->vtiming;
In this case, initmode is not pointing to the 'constant' lcd panel
timing values.
>
> WARN_ON(windata->max_bpp = 0);
> - WARN_ON(windata->win_mode.xres = 0);
> - WARN_ON(windata->win_mode.yres = 0);
> + WARN_ON(windata->xres = 0);
> + WARN_ON(windata->yres = 0);
>
> win = fbinfo->par;
> *res = win;
> @@ -1286,6 +1286,8 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> }
>
> /* setup the initial video mode from the window */
> + initmode->xres = windata->xres;
> + initmode->yres = windata->yres;
And then here, the xres and yres of the 'constant' lcd panel timing
value will be changed.
But, we don't want to change the actual lcd panel timing value. That
is the reason to first copy the lcd panel timing value into a local
copy and then update the xres and yres and then pass this local copy
of the timing value to fb_videomode_to_var() function.
Thanks,
Thomas.
[...]
^ permalink raw reply
* RE: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
From: Jingoo Han @ 2012-03-06 6:22 UTC (permalink / raw)
To: 'Thomas Abraham'
Cc: linux-fbdev, FlorianSchandinat, linux-samsung-soc, kgene.kim,
ben-linux, patches, 'Jingoo Han'
In-Reply-To: <CAJuYYwToJDXujqjLcY_2cN0M-K0yGzzOcDaFeh+OT_Qx9pPCEQ@mail.gmail.com>
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Tuesday, March 06, 2012 2:26 PM
> To: Jingoo Han
> Cc: linux-fbdev@vger.kernel.org; FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org;
> kgene.kim@samsung.com; ben-linux@fluff.org; patches@linaro.org
> Subject: Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>
> On 6 March 2012 10:15, Jingoo Han <jg1.han@samsung.com> wrote:
>
> >> -----Original Message-----
> >> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> >> Sent: Sunday, March 04, 2012 12:50 AM
> >> To: linux-fbdev@vger.kernel.org
> >> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> >> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
> >> Subject: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
> >>
> >> The video interface timing is independent of the window setup data.
> >> The resolution of the window can be smaller than that of the lcd
> >> panel to which the video data is output.
> >>
> >> So move the video timing data from the per-window setup data to the
> >> platform specific section in the platform data. This also removes
> >> the restriction that atleast one window should have the same
> >> resolution as that of the panel attached.
> >>
> >> Cc: Ben Dooks <ben-linux@fluff.org>
> >> Cc: Jingoo Han <jg1.han@samsung.com>
> >> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> >> ---
> >> arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
> >> drivers/video/s3c-fb.c | 106 +++++++++++++++++--------------
> >> 2 files changed, 63 insertions(+), 52 deletions(-)
> >>
> >> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
> >> index 0fedf47..39d6bd7 100644
> >> --- a/arch/arm/plat-samsung/include/plat/fb.h
> >> +++ b/arch/arm/plat-samsung/include/plat/fb.h
> >> @@ -24,15 +24,16 @@
> >>
> >> /**
> >> * struct s3c_fb_pd_win - per window setup data
> >> - * @win_mode: The display parameters to initialise (not for window 0)
> >> + * @xres : The window X size.
> >> + * @yres : The window Y size.
> >> * @virtual_x: The virtual X size.
> >> * @virtual_y: The virtual Y size.
> >> */
> >> struct s3c_fb_pd_win {
> >> - struct fb_videomode win_mode;
> >> -
> >> unsigned short default_bpp;
> >> unsigned short max_bpp;
> >> + unsigned short xres;
> >> + unsigned short yres;
> >> unsigned short virtual_x;
> >> unsigned short virtual_y;
> >> };
> >> @@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
> >> * @default_win: default window layer number to be used for UI layer.
> >> * @vidcon0: The base vidcon0 values to control the panel data format.
> >> * @vidcon1: The base vidcon1 values to control the panel data output.
> >> + * @vtiming: Video timing when connected to a RGB type panel.
> >
> > fb_videomode can be set, even if it is not RGB type panel.
> > In my opinion, it would be better.
> > + * @vtiming: The video timing values to set the interface timing of the panel.
>
> The other interface that is supported is the i80 interface. Can these
> timing values be used for i80 interface as well ?
No, you're right. The i80 is not supported.
Please ignore my comment.
>
> >
> >> * @win: The setup data for each hardware window, or NULL for unused.
> >> * @display_mode: The LCD output display mode.
> >> *
> >> @@ -58,6 +60,7 @@ struct s3c_fb_platdata {
> >> void (*setup_gpio)(void);
> >>
> >> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
> >> + struct fb_videomode *vtiming;
> >>
> >> u32 default_win;
> >>
> >> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> >> index 1fb7ddf..8e05d4d 100644
> >> --- a/drivers/video/s3c-fb.c
> >> +++ b/drivers/video/s3c-fb.c
> >> @@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
> >> u32 alpha = 0;
> >> u32 data;
> >> u32 pagewidth;
> >> - int clkdiv;
> >>
> >> dev_dbg(sfb->dev, "setting framebuffer parameters\n");
> >>
> >> @@ -532,46 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
> >> /* disable the window whilst we update it */
> >> writel(0, regs + WINCON(win_no));
> >>
> >> - /* use platform specified window as the basis for the lcd timings */
> >> -
> >> - if (win_no = sfb->pdata->default_win) {
> >> - clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
> >> -
> >> - data = sfb->pdata->vidcon0;
> >> - data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
> >> -
> >> - if (clkdiv > 1)
> >> - data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
> >> - else
> >> - data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
> >> -
> >> - /* write the timing data to the panel */
> >> -
> >> - if (sfb->variant.is_2443)
> >> - data |= (1 << 5);
> >> -
> >> - writel(data, regs + VIDCON0);
> >> -
> >> + if (win_no = sfb->pdata->default_win)
> >> s3c_fb_enable(sfb, 1);
> >>
> >> - data = VIDTCON0_VBPD(var->upper_margin - 1) |
> >> - VIDTCON0_VFPD(var->lower_margin - 1) |
> >> - VIDTCON0_VSPW(var->vsync_len - 1);
> >> -
> >> - writel(data, regs + sfb->variant.vidtcon);
> >> -
> >> - data = VIDTCON1_HBPD(var->left_margin - 1) |
> >> - VIDTCON1_HFPD(var->right_margin - 1) |
> >> - VIDTCON1_HSPW(var->hsync_len - 1);
> >> -
> >> - /* VIDTCON1 */
> >> - writel(data, regs + sfb->variant.vidtcon + 4);
> >> -
> >> - data = VIDTCON2_LINEVAL(var->yres - 1) |
> >> - VIDTCON2_HOZVAL(var->xres - 1);
> >> - writel(data, regs + sfb->variant.vidtcon + 8);
> >> - }
> >> -
> >
> > It looks good.
> > VIDTCON registers don't need to be written whenever s3c_fb_set_par is called.
> >
> >> /* write the buffer address */
> >>
> >> /* start and end registers stride is 8 */
> >> @@ -1136,11 +1098,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
> >>
> >> dev_dbg(sfb->dev, "allocating memory for display\n");
> >>
> >> - real_size = windata->win_mode.xres * windata->win_mode.yres;
> >> + real_size = windata->xres * windata->yres;
> >> virt_size = windata->virtual_x * windata->virtual_y;
> >>
> >> dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
> >> - real_size, windata->win_mode.xres, windata->win_mode.yres,
> >> + real_size, windata->xres, windata->yres,
> >> virt_size, windata->virtual_x, windata->virtual_y);
> >>
> >> size = (real_size > virt_size) ? real_size : virt_size;
> >> @@ -1222,7 +1184,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> >> struct s3c_fb_win **res)
> >> {
> >> struct fb_var_screeninfo *var;
> >> - struct fb_videomode *initmode;
> >> + struct fb_videomode initmode;
> >
> > *initmode cannot be used???
> > Can you tell me why pointer type should be changed?
> >
>
> The initmode is used to pass video timing to the fb_videomode_to_var()
> function. Each window setup data in platform data included video
> timing information. Since, the video timing data is now moved out of
> per-window data, the xres and yres values have to be setup based on
> the window for which the fb_videomode_to_var() is called. Hence, the
> common timing values is first copied into initmode and then the window
> specific xres and yres are set. If initmode is a maintained as a
> pointer (to the video timing data in platform data), then any xres and
> yres update to initmode would overwrite the 'constant' video timing.
My point is that variable type 'initmode' can be not changed by using pointer type as follows:
@@ -1243,11 +1243,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
}
windata = sfb->pdata->win[win_no];
- initmode = &windata->win_mode;
+ initmode = sfb->pdata->vtiming;
WARN_ON(windata->max_bpp = 0);
- WARN_ON(windata->win_mode.xres = 0);
- WARN_ON(windata->win_mode.yres = 0);
+ WARN_ON(windata->xres = 0);
+ WARN_ON(windata->yres = 0);
win = fbinfo->par;
*res = win;
@@ -1286,6 +1286,8 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
}
/* setup the initial video mode from the window */
+ initmode->xres = windata->xres;
+ initmode->yres = windata->yres;
fb_videomode_to_var(&fbinfo->var, initmode);
fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
In this case, you don't need additional change such as following.
- struct fb_videomode *initmode;
+ struct fb_videomode initmode;
...
- fb_videomode_to_var(&fbinfo->var, initmode);
+ fb_videomode_to_var(&fbinfo->var, &initmode);
>
>
> >> struct s3c_fb_pd_win *windata;
> >> struct s3c_fb_win *win;
> >> struct fb_info *fbinfo;
> >> @@ -1243,11 +1205,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> >> }
> >>
> >> windata = sfb->pdata->win[win_no];
> >> - initmode = &windata->win_mode;
> >> + initmode = *sfb->pdata->vtiming;
> >>
> >> WARN_ON(windata->max_bpp = 0);
> >> - WARN_ON(windata->win_mode.xres = 0);
> >> - WARN_ON(windata->win_mode.yres = 0);
> >> + WARN_ON(windata->xres = 0);
> >> + WARN_ON(windata->yres = 0);
> >>
> >> win = fbinfo->par;
> >> *res = win;
> >> @@ -1286,7 +1248,9 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> >> }
> >>
> >> /* setup the initial video mode from the window */
> >> - fb_videomode_to_var(&fbinfo->var, initmode);
> >> + initmode.xres = windata->xres;
> >> + initmode.yres = windata->yres;
>
> Here, the xres and yres values are copied to initmode and described above.
>
> >> + fb_videomode_to_var(&fbinfo->var, &initmode);
> >>
> >> fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
> >> fbinfo->fix.accel = FB_ACCEL_NONE;
> >> @@ -1331,6 +1295,51 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> >> }
> >>
> >> /**
> >> + * s3c_fb_set_rgb_timing() - set video timing for rgb interface.
> >> + * @sfb: The base resources for the hardware.
> >> + *
> >> + * Set horizontal and vertical lcd rgb interface timing.
> >> + */
> >> +static void s3c_fb_set_rgb_timing(struct s3c_fb *sfb)
> >> +{
> >> + struct fb_videomode *vmode = sfb->pdata->vtiming;
> >> + void __iomem *regs = sfb->regs;
> >> + int clkdiv;
> >> + u32 data;
> >> +
> >> + if (!vmode->pixclock)
> >> + s3c_fb_missing_pixclock(vmode);
> >> +
> >> + clkdiv = s3c_fb_calc_pixclk(sfb, vmode->pixclock);
> >> +
> >> + data = sfb->pdata->vidcon0;
> >> + data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
> >> +
> >> + if (clkdiv > 1)
> >> + data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
> >> + else
> >> + data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
> >> +
> >> + if (sfb->variant.is_2443)
> >> + data |= (1 << 5);
> >> + writel(data, regs + VIDCON0);
> >> +
> >> + data = VIDTCON0_VBPD(vmode->upper_margin - 1) |
> >> + VIDTCON0_VFPD(vmode->lower_margin - 1) |
> >> + VIDTCON0_VSPW(vmode->vsync_len - 1);
> >> + writel(data, regs + sfb->variant.vidtcon);
> >> +
> >> + data = VIDTCON1_HBPD(vmode->left_margin - 1) |
> >> + VIDTCON1_HFPD(vmode->right_margin - 1) |
> >> + VIDTCON1_HSPW(vmode->hsync_len - 1);
> >> + writel(data, regs + sfb->variant.vidtcon + 4);
> >> +
> >> + data = VIDTCON2_LINEVAL(vmode->yres - 1) |
> >> + VIDTCON2_HOZVAL(vmode->xres - 1);
> >> + writel(data, regs + sfb->variant.vidtcon + 8);
> >> +}
> >> +
> >> +/**
> >> * s3c_fb_clear_win() - clear hardware window registers.
> >> * @sfb: The base resources for the hardware.
> >> * @win: The window to process.
> >> @@ -1473,15 +1482,14 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
> >> writel(0xffffff, regs + WKEYCON1);
> >> }
> >>
> >> + s3c_fb_set_rgb_timing(sfb);
> >> +
> >
> > This s3c_fb_set_rgb_timing(sfb) should be added to s3c_fb_resume().
> > The timing registers should be set when s3c_fb_resume() is called.
> > If not, after resuming, timing registers such as VIDTCONx will not bet set.
>
> Yes, I missed that. I will add it in the resume path.
>
> Thanks for you comments. If you could let me know if i80 video timing
> values can be passed with 'struct fb_videomode', I will do the changes
> as you have suggested and quickly repost this patchset.
>
> Thanks,
> Thomas.
^ permalink raw reply
* Re: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
From: Thomas Abraham @ 2012-03-06 5:38 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-fbdev, FlorianSchandinat, linux-samsung-soc, kgene.kim,
ben-linux, patches
In-Reply-To: <001f01ccfb53$f034ef00$d09ecd00$%han@samsung.com>
On 6 March 2012 10:15, Jingoo Han <jg1.han@samsung.com> wrote:
>> -----Original Message-----
>> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
>> Sent: Sunday, March 04, 2012 12:50 AM
>> To: linux-fbdev@vger.kernel.org
>> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
>> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
>> Subject: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>>
>> The video interface timing is independent of the window setup data.
>> The resolution of the window can be smaller than that of the lcd
>> panel to which the video data is output.
>>
>> So move the video timing data from the per-window setup data to the
>> platform specific section in the platform data. This also removes
>> the restriction that atleast one window should have the same
>> resolution as that of the panel attached.
>>
>> Cc: Ben Dooks <ben-linux@fluff.org>
>> Cc: Jingoo Han <jg1.han@samsung.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> ---
>> arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
>> drivers/video/s3c-fb.c | 106 +++++++++++++++++--------------
>> 2 files changed, 63 insertions(+), 52 deletions(-)
>>
>> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
>> index 0fedf47..39d6bd7 100644
>> --- a/arch/arm/plat-samsung/include/plat/fb.h
>> +++ b/arch/arm/plat-samsung/include/plat/fb.h
>> @@ -24,15 +24,16 @@
>>
>> /**
>> * struct s3c_fb_pd_win - per window setup data
>> - * @win_mode: The display parameters to initialise (not for window 0)
>> + * @xres : The window X size.
>> + * @yres : The window Y size.
>> * @virtual_x: The virtual X size.
>> * @virtual_y: The virtual Y size.
>> */
>> struct s3c_fb_pd_win {
>> - struct fb_videomode win_mode;
>> -
>> unsigned short default_bpp;
>> unsigned short max_bpp;
>> + unsigned short xres;
>> + unsigned short yres;
>> unsigned short virtual_x;
>> unsigned short virtual_y;
>> };
>> @@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
>> * @default_win: default window layer number to be used for UI layer.
>> * @vidcon0: The base vidcon0 values to control the panel data format.
>> * @vidcon1: The base vidcon1 values to control the panel data output.
>> + * @vtiming: Video timing when connected to a RGB type panel.
>
> fb_videomode can be set, even if it is not RGB type panel.
> In my opinion, it would be better.
> + * @vtiming: The video timing values to set the interface timing of the panel.
The other interface that is supported is the i80 interface. Can these
timing values be used for i80 interface as well ?
>
>> * @win: The setup data for each hardware window, or NULL for unused.
>> * @display_mode: The LCD output display mode.
>> *
>> @@ -58,6 +60,7 @@ struct s3c_fb_platdata {
>> void (*setup_gpio)(void);
>>
>> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
>> + struct fb_videomode *vtiming;
>>
>> u32 default_win;
>>
>> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
>> index 1fb7ddf..8e05d4d 100644
>> --- a/drivers/video/s3c-fb.c
>> +++ b/drivers/video/s3c-fb.c
>> @@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
>> u32 alpha = 0;
>> u32 data;
>> u32 pagewidth;
>> - int clkdiv;
>>
>> dev_dbg(sfb->dev, "setting framebuffer parameters\n");
>>
>> @@ -532,46 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
>> /* disable the window whilst we update it */
>> writel(0, regs + WINCON(win_no));
>>
>> - /* use platform specified window as the basis for the lcd timings */
>> -
>> - if (win_no = sfb->pdata->default_win) {
>> - clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
>> -
>> - data = sfb->pdata->vidcon0;
>> - data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
>> -
>> - if (clkdiv > 1)
>> - data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
>> - else
>> - data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
>> -
>> - /* write the timing data to the panel */
>> -
>> - if (sfb->variant.is_2443)
>> - data |= (1 << 5);
>> -
>> - writel(data, regs + VIDCON0);
>> -
>> + if (win_no = sfb->pdata->default_win)
>> s3c_fb_enable(sfb, 1);
>>
>> - data = VIDTCON0_VBPD(var->upper_margin - 1) |
>> - VIDTCON0_VFPD(var->lower_margin - 1) |
>> - VIDTCON0_VSPW(var->vsync_len - 1);
>> -
>> - writel(data, regs + sfb->variant.vidtcon);
>> -
>> - data = VIDTCON1_HBPD(var->left_margin - 1) |
>> - VIDTCON1_HFPD(var->right_margin - 1) |
>> - VIDTCON1_HSPW(var->hsync_len - 1);
>> -
>> - /* VIDTCON1 */
>> - writel(data, regs + sfb->variant.vidtcon + 4);
>> -
>> - data = VIDTCON2_LINEVAL(var->yres - 1) |
>> - VIDTCON2_HOZVAL(var->xres - 1);
>> - writel(data, regs + sfb->variant.vidtcon + 8);
>> - }
>> -
>
> It looks good.
> VIDTCON registers don't need to be written whenever s3c_fb_set_par is called.
>
>> /* write the buffer address */
>>
>> /* start and end registers stride is 8 */
>> @@ -1136,11 +1098,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
>>
>> dev_dbg(sfb->dev, "allocating memory for display\n");
>>
>> - real_size = windata->win_mode.xres * windata->win_mode.yres;
>> + real_size = windata->xres * windata->yres;
>> virt_size = windata->virtual_x * windata->virtual_y;
>>
>> dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
>> - real_size, windata->win_mode.xres, windata->win_mode.yres,
>> + real_size, windata->xres, windata->yres,
>> virt_size, windata->virtual_x, windata->virtual_y);
>>
>> size = (real_size > virt_size) ? real_size : virt_size;
>> @@ -1222,7 +1184,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
>> struct s3c_fb_win **res)
>> {
>> struct fb_var_screeninfo *var;
>> - struct fb_videomode *initmode;
>> + struct fb_videomode initmode;
>
> *initmode cannot be used???
> Can you tell me why pointer type should be changed?
>
The initmode is used to pass video timing to the fb_videomode_to_var()
function. Each window setup data in platform data included video
timing information. Since, the video timing data is now moved out of
per-window data, the xres and yres values have to be setup based on
the window for which the fb_videomode_to_var() is called. Hence, the
common timing values is first copied into initmode and then the window
specific xres and yres are set. If initmode is a maintained as a
pointer (to the video timing data in platform data), then any xres and
yres update to initmode would overwrite the 'constant' video timing.
>> struct s3c_fb_pd_win *windata;
>> struct s3c_fb_win *win;
>> struct fb_info *fbinfo;
>> @@ -1243,11 +1205,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
>> }
>>
>> windata = sfb->pdata->win[win_no];
>> - initmode = &windata->win_mode;
>> + initmode = *sfb->pdata->vtiming;
>>
>> WARN_ON(windata->max_bpp = 0);
>> - WARN_ON(windata->win_mode.xres = 0);
>> - WARN_ON(windata->win_mode.yres = 0);
>> + WARN_ON(windata->xres = 0);
>> + WARN_ON(windata->yres = 0);
>>
>> win = fbinfo->par;
>> *res = win;
>> @@ -1286,7 +1248,9 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
>> }
>>
>> /* setup the initial video mode from the window */
>> - fb_videomode_to_var(&fbinfo->var, initmode);
>> + initmode.xres = windata->xres;
>> + initmode.yres = windata->yres;
Here, the xres and yres values are copied to initmode and described above.
>> + fb_videomode_to_var(&fbinfo->var, &initmode);
>>
>> fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
>> fbinfo->fix.accel = FB_ACCEL_NONE;
>> @@ -1331,6 +1295,51 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
>> }
>>
>> /**
>> + * s3c_fb_set_rgb_timing() - set video timing for rgb interface.
>> + * @sfb: The base resources for the hardware.
>> + *
>> + * Set horizontal and vertical lcd rgb interface timing.
>> + */
>> +static void s3c_fb_set_rgb_timing(struct s3c_fb *sfb)
>> +{
>> + struct fb_videomode *vmode = sfb->pdata->vtiming;
>> + void __iomem *regs = sfb->regs;
>> + int clkdiv;
>> + u32 data;
>> +
>> + if (!vmode->pixclock)
>> + s3c_fb_missing_pixclock(vmode);
>> +
>> + clkdiv = s3c_fb_calc_pixclk(sfb, vmode->pixclock);
>> +
>> + data = sfb->pdata->vidcon0;
>> + data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
>> +
>> + if (clkdiv > 1)
>> + data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
>> + else
>> + data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
>> +
>> + if (sfb->variant.is_2443)
>> + data |= (1 << 5);
>> + writel(data, regs + VIDCON0);
>> +
>> + data = VIDTCON0_VBPD(vmode->upper_margin - 1) |
>> + VIDTCON0_VFPD(vmode->lower_margin - 1) |
>> + VIDTCON0_VSPW(vmode->vsync_len - 1);
>> + writel(data, regs + sfb->variant.vidtcon);
>> +
>> + data = VIDTCON1_HBPD(vmode->left_margin - 1) |
>> + VIDTCON1_HFPD(vmode->right_margin - 1) |
>> + VIDTCON1_HSPW(vmode->hsync_len - 1);
>> + writel(data, regs + sfb->variant.vidtcon + 4);
>> +
>> + data = VIDTCON2_LINEVAL(vmode->yres - 1) |
>> + VIDTCON2_HOZVAL(vmode->xres - 1);
>> + writel(data, regs + sfb->variant.vidtcon + 8);
>> +}
>> +
>> +/**
>> * s3c_fb_clear_win() - clear hardware window registers.
>> * @sfb: The base resources for the hardware.
>> * @win: The window to process.
>> @@ -1473,15 +1482,14 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>> writel(0xffffff, regs + WKEYCON1);
>> }
>>
>> + s3c_fb_set_rgb_timing(sfb);
>> +
>
> This s3c_fb_set_rgb_timing(sfb) should be added to s3c_fb_resume().
> The timing registers should be set when s3c_fb_resume() is called.
> If not, after resuming, timing registers such as VIDTCONx will not bet set.
Yes, I missed that. I will add it in the resume path.
Thanks for you comments. If you could let me know if i80 video timing
values can be passed with 'struct fb_videomode', I will do the changes
as you have suggested and quickly repost this patchset.
Thanks,
Thomas.
^ permalink raw reply
* RE: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
From: Jingoo Han @ 2012-03-06 4:45 UTC (permalink / raw)
To: 'Thomas Abraham', linux-fbdev
Cc: FlorianSchandinat, linux-samsung-soc, kgene.kim, ben-linux,
patches, 'Jingoo Han'
In-Reply-To: <1330789808-8253-2-git-send-email-thomas.abraham@linaro.org>
> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Sunday, March 04, 2012 12:50 AM
> To: linux-fbdev@vger.kernel.org
> Cc: FlorianSchandinat@gmx.de; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> jg1.han@samsung.com; ben-linux@fluff.org; patches@linaro.org
> Subject: [PATCH 1/3] video: s3c-fb: move video interface timing out of window setup data
>
> The video interface timing is independent of the window setup data.
> The resolution of the window can be smaller than that of the lcd
> panel to which the video data is output.
>
> So move the video timing data from the per-window setup data to the
> platform specific section in the platform data. This also removes
> the restriction that atleast one window should have the same
> resolution as that of the panel attached.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
> drivers/video/s3c-fb.c | 106 +++++++++++++++++--------------
> 2 files changed, 63 insertions(+), 52 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
> index 0fedf47..39d6bd7 100644
> --- a/arch/arm/plat-samsung/include/plat/fb.h
> +++ b/arch/arm/plat-samsung/include/plat/fb.h
> @@ -24,15 +24,16 @@
>
> /**
> * struct s3c_fb_pd_win - per window setup data
> - * @win_mode: The display parameters to initialise (not for window 0)
> + * @xres : The window X size.
> + * @yres : The window Y size.
> * @virtual_x: The virtual X size.
> * @virtual_y: The virtual Y size.
> */
> struct s3c_fb_pd_win {
> - struct fb_videomode win_mode;
> -
> unsigned short default_bpp;
> unsigned short max_bpp;
> + unsigned short xres;
> + unsigned short yres;
> unsigned short virtual_x;
> unsigned short virtual_y;
> };
> @@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
> * @default_win: default window layer number to be used for UI layer.
> * @vidcon0: The base vidcon0 values to control the panel data format.
> * @vidcon1: The base vidcon1 values to control the panel data output.
> + * @vtiming: Video timing when connected to a RGB type panel.
fb_videomode can be set, even if it is not RGB type panel.
In my opinion, it would be better.
+ * @vtiming: The video timing values to set the interface timing of the panel.
> * @win: The setup data for each hardware window, or NULL for unused.
> * @display_mode: The LCD output display mode.
> *
> @@ -58,6 +60,7 @@ struct s3c_fb_platdata {
> void (*setup_gpio)(void);
>
> struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
> + struct fb_videomode *vtiming;
>
> u32 default_win;
>
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 1fb7ddf..8e05d4d 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
> u32 alpha = 0;
> u32 data;
> u32 pagewidth;
> - int clkdiv;
>
> dev_dbg(sfb->dev, "setting framebuffer parameters\n");
>
> @@ -532,46 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
> /* disable the window whilst we update it */
> writel(0, regs + WINCON(win_no));
>
> - /* use platform specified window as the basis for the lcd timings */
> -
> - if (win_no = sfb->pdata->default_win) {
> - clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
> -
> - data = sfb->pdata->vidcon0;
> - data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
> -
> - if (clkdiv > 1)
> - data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
> - else
> - data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
> -
> - /* write the timing data to the panel */
> -
> - if (sfb->variant.is_2443)
> - data |= (1 << 5);
> -
> - writel(data, regs + VIDCON0);
> -
> + if (win_no = sfb->pdata->default_win)
> s3c_fb_enable(sfb, 1);
>
> - data = VIDTCON0_VBPD(var->upper_margin - 1) |
> - VIDTCON0_VFPD(var->lower_margin - 1) |
> - VIDTCON0_VSPW(var->vsync_len - 1);
> -
> - writel(data, regs + sfb->variant.vidtcon);
> -
> - data = VIDTCON1_HBPD(var->left_margin - 1) |
> - VIDTCON1_HFPD(var->right_margin - 1) |
> - VIDTCON1_HSPW(var->hsync_len - 1);
> -
> - /* VIDTCON1 */
> - writel(data, regs + sfb->variant.vidtcon + 4);
> -
> - data = VIDTCON2_LINEVAL(var->yres - 1) |
> - VIDTCON2_HOZVAL(var->xres - 1);
> - writel(data, regs + sfb->variant.vidtcon + 8);
> - }
> -
It looks good.
VIDTCON registers don't need to be written whenever s3c_fb_set_par is called.
> /* write the buffer address */
>
> /* start and end registers stride is 8 */
> @@ -1136,11 +1098,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
>
> dev_dbg(sfb->dev, "allocating memory for display\n");
>
> - real_size = windata->win_mode.xres * windata->win_mode.yres;
> + real_size = windata->xres * windata->yres;
> virt_size = windata->virtual_x * windata->virtual_y;
>
> dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
> - real_size, windata->win_mode.xres, windata->win_mode.yres,
> + real_size, windata->xres, windata->yres,
> virt_size, windata->virtual_x, windata->virtual_y);
>
> size = (real_size > virt_size) ? real_size : virt_size;
> @@ -1222,7 +1184,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> struct s3c_fb_win **res)
> {
> struct fb_var_screeninfo *var;
> - struct fb_videomode *initmode;
> + struct fb_videomode initmode;
*initmode cannot be used???
Can you tell me why pointer type should be changed?
> struct s3c_fb_pd_win *windata;
> struct s3c_fb_win *win;
> struct fb_info *fbinfo;
> @@ -1243,11 +1205,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> }
>
> windata = sfb->pdata->win[win_no];
> - initmode = &windata->win_mode;
> + initmode = *sfb->pdata->vtiming;
>
> WARN_ON(windata->max_bpp = 0);
> - WARN_ON(windata->win_mode.xres = 0);
> - WARN_ON(windata->win_mode.yres = 0);
> + WARN_ON(windata->xres = 0);
> + WARN_ON(windata->yres = 0);
>
> win = fbinfo->par;
> *res = win;
> @@ -1286,7 +1248,9 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> }
>
> /* setup the initial video mode from the window */
> - fb_videomode_to_var(&fbinfo->var, initmode);
> + initmode.xres = windata->xres;
> + initmode.yres = windata->yres;
> + fb_videomode_to_var(&fbinfo->var, &initmode);
>
> fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
> fbinfo->fix.accel = FB_ACCEL_NONE;
> @@ -1331,6 +1295,51 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
> }
>
> /**
> + * s3c_fb_set_rgb_timing() - set video timing for rgb interface.
> + * @sfb: The base resources for the hardware.
> + *
> + * Set horizontal and vertical lcd rgb interface timing.
> + */
> +static void s3c_fb_set_rgb_timing(struct s3c_fb *sfb)
> +{
> + struct fb_videomode *vmode = sfb->pdata->vtiming;
> + void __iomem *regs = sfb->regs;
> + int clkdiv;
> + u32 data;
> +
> + if (!vmode->pixclock)
> + s3c_fb_missing_pixclock(vmode);
> +
> + clkdiv = s3c_fb_calc_pixclk(sfb, vmode->pixclock);
> +
> + data = sfb->pdata->vidcon0;
> + data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
> +
> + if (clkdiv > 1)
> + data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
> + else
> + data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
> +
> + if (sfb->variant.is_2443)
> + data |= (1 << 5);
> + writel(data, regs + VIDCON0);
> +
> + data = VIDTCON0_VBPD(vmode->upper_margin - 1) |
> + VIDTCON0_VFPD(vmode->lower_margin - 1) |
> + VIDTCON0_VSPW(vmode->vsync_len - 1);
> + writel(data, regs + sfb->variant.vidtcon);
> +
> + data = VIDTCON1_HBPD(vmode->left_margin - 1) |
> + VIDTCON1_HFPD(vmode->right_margin - 1) |
> + VIDTCON1_HSPW(vmode->hsync_len - 1);
> + writel(data, regs + sfb->variant.vidtcon + 4);
> +
> + data = VIDTCON2_LINEVAL(vmode->yres - 1) |
> + VIDTCON2_HOZVAL(vmode->xres - 1);
> + writel(data, regs + sfb->variant.vidtcon + 8);
> +}
> +
> +/**
> * s3c_fb_clear_win() - clear hardware window registers.
> * @sfb: The base resources for the hardware.
> * @win: The window to process.
> @@ -1473,15 +1482,14 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
> writel(0xffffff, regs + WKEYCON1);
> }
>
> + s3c_fb_set_rgb_timing(sfb);
> +
This s3c_fb_set_rgb_timing(sfb) should be added to s3c_fb_resume().
The timing registers should be set when s3c_fb_resume() is called.
If not, after resuming, timing registers such as VIDTCONx will not bet set.
> /* we have the register setup, start allocating framebuffers */
>
> for (win = 0; win < fbdrv->variant.nr_windows; win++) {
> if (!pd->win[win])
> continue;
>
> - if (!pd->win[win]->win_mode.pixclock)
> - s3c_fb_missing_pixclock(&pd->win[win]->win_mode);
> -
> ret = s3c_fb_probe_win(sfb, win, fbdrv->win[win],
> &sfb->windows[win]);
> if (ret < 0) {
> --
> 1.6.6.rc2
^ permalink raw reply
* [PATCH] MAINTAINERS: add entry for exynos mipi display drivers
From: Donghwa Lee @ 2012-03-06 2:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4F2667EE.2090902@samsung.com>
Hi, I'd like to add Inki Dae, Donghwa Lee and Kyungmin Park as
maintainers who developers for exynos mipi display drivers for
video/driver/exynos/exynos_mipi* and include/video/exynos_mipi*.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
MAINTAINERS | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index b087b3bc..eb5fbcb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2351,6 +2351,15 @@ S: Supported
F: drivers/gpu/drm/exynos
F: include/drm/exynos*
+EXYNOS MIPI DISPLAY DRIVERS
+M: Inki Dae <inki.dae@samsung.com>
+M: Donghwa Lee <dh09.lee@samsung.com>
+M: Kyungmin Park <kyungmin.park@samsung.com>
+L: linux-fbdev@vger.kernel.org
+S: Maintained
+F: drivers/video/exynos/exynos_mipi*
+F: include/video/exynos_mipi*
+
DSCC4 DRIVER
M: Francois Romieu <romieu@fr.zoreil.com>
L: netdev@vger.kernel.org
--
1.7.4.1
^ permalink raw reply related
* [PATCH v3] fbdev: remove dependency of FB_SH_MOBILE_MERAM from FB_SH_MOBILE_LCDC
From: Kuninori Morimoto @ 2012-03-06 1:23 UTC (permalink / raw)
To: linux-fbdev
MERAM can be used for other IP blocks as well in the future.
It doesn't necessarily mean that the MERAM driver depends on the LCDC.
This patch corrects dependency.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v2 -> v3
- move config FB_SH_MOBILE_MERAM out of "choice"
drivers/video/Kconfig | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8951cbd..36e8b06 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2013,18 +2013,6 @@ config FB_SH_MOBILE_HDMI
---help---
Driver for the on-chip SH-Mobile HDMI controller.
-config FB_SH_MOBILE_MERAM
- tristate "SuperH Mobile MERAM read ahead support for LCDC"
- depends on FB_SH_MOBILE_LCDC
- default y
- ---help---
- Enable MERAM support for the SH-Mobile LCD controller.
-
- This will allow for caching of the framebuffer to provide more
- reliable access under heavy main memory bus traffic situations.
- Up to 4 memory channels can be configured, allowing 4 RGB or
- 2 YCbCr framebuffers to be configured.
-
config FB_TMIO
tristate "Toshiba Mobile IO FrameBuffer support"
depends on FB && MFD_CORE
@@ -2332,6 +2320,17 @@ config FB_MB862XX_LIME
endchoice
+config FB_SH_MOBILE_MERAM
+ tristate "SuperH Mobile MERAM read ahead support"
+ depends on (SUPERH || ARCH_SHMOBILE)
+ ---help---
+ Enable MERAM support for the SuperH controller.
+
+ This will allow for caching of the framebuffer to provide more
+ reliable access under heavy main memory bus traffic situations.
+ Up to 4 memory channels can be configured, allowing 4 RGB or
+ 2 YCbCr framebuffers to be configured.
+
config FB_MB862XX_I2C
bool "Support I2C bus on MB862XX GDC"
depends on FB_MB862XX && I2C
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH v2] fbdev: remove dependency of FB_SH_MOBILE_MERAM from FB_SH_MOBILE_LCDC
From: Kuninori Morimoto @ 2012-03-06 1:14 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <87fwdmwozi.wl%kuninori.morimoto.gx@renesas.com>
Hi
I'm so sorry.
This patch breaks menuconfig.
Please give me v3 chance
> MERAM can be used for other IP blocks as well in the future.
> It doesn't necessarily mean that the MERAM driver depends on the LCDC.
> This patch corrects dependency.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> This patch is v2 of [PATCH] fbdev: remove "default y" from FB_SH_MOBILE_MERAM
>
> v1 -> v2
> - corrects dependency
> - modify transfate and help too
>
> drivers/video/Kconfig | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 6ca0c40..11594ea 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -2002,11 +2002,10 @@ config FB_SH_MOBILE_HDMI
> Driver for the on-chip SH-Mobile HDMI controller.
>
> config FB_SH_MOBILE_MERAM
> - tristate "SuperH Mobile MERAM read ahead support for LCDC"
> - depends on FB_SH_MOBILE_LCDC
> - default y
> + tristate "SuperH Mobile MERAM read ahead support"
> + depends on (SUPERH || ARCH_SHMOBILE)
> ---help---
> - Enable MERAM support for the SH-Mobile LCD controller.
> + Enable MERAM support for the SuperH controller.
>
> This will allow for caching of the framebuffer to provide more
> reliable access under heavy main memory bus traffic situations.
> --
> 1.7.5.4
>
Best regards
---
Kuninori Morimoto
^ permalink raw reply
* [PATCH v2] fbdev: remove dependency of FB_SH_MOBILE_MERAM from FB_SH_MOBILE_LCDC
From: Kuninori Morimoto @ 2012-03-06 0:29 UTC (permalink / raw)
To: linux-fbdev
MERAM can be used for other IP blocks as well in the future.
It doesn't necessarily mean that the MERAM driver depends on the LCDC.
This patch corrects dependency.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
This patch is v2 of [PATCH] fbdev: remove "default y" from FB_SH_MOBILE_MERAM
v1 -> v2
- corrects dependency
- modify transfate and help too
drivers/video/Kconfig | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 6ca0c40..11594ea 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2002,11 +2002,10 @@ config FB_SH_MOBILE_HDMI
Driver for the on-chip SH-Mobile HDMI controller.
config FB_SH_MOBILE_MERAM
- tristate "SuperH Mobile MERAM read ahead support for LCDC"
- depends on FB_SH_MOBILE_LCDC
- default y
+ tristate "SuperH Mobile MERAM read ahead support"
+ depends on (SUPERH || ARCH_SHMOBILE)
---help---
- Enable MERAM support for the SH-Mobile LCD controller.
+ Enable MERAM support for the SuperH controller.
This will allow for caching of the framebuffer to provide more
reliable access under heavy main memory bus traffic situations.
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH] fbdev: remove "default y" from FB_SH_MOBILE_MERAM
From: Kuninori Morimoto @ 2012-03-06 0:12 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <874nu7bcd3.wl%kuninori.morimoto.gx@renesas.com>
Hi Laurent, Hayama-san
Thank you for your advice
> > On Friday 02 March 2012 01:06:53 Kuninori Morimoto wrote:
> >> "default y" of FB_SH_MOBILE_MERAM was overkill option.
> >> "depends on FB_SH_MOBILE_LCDC" is very enough here.
> >
> > Actually the sh_mobile_meram driver doesn't depend on the LCDC driver. What
> > would you think about removing both the dependency and the default=y ?
>
> I agree with Laurent here. MERAM can be used for other IP blocks as well
> in the future, e.g. the CEU driver. The LCDC was the only driver using
> it, but doesn't necessarily mean that the MERAM driver depends on the
> LCDC. In some case, you might even want to disable MERAM for the LCDC if
> there's not enough memory on MERAM.
Thanks.
I send v2 patch.
Best regards
---
Kuninori Morimoto
^ permalink raw reply
* Re: [PATCH] fbdev: remove "default y" from FB_SH_MOBILE_MERAM
From: Takanari Hayama @ 2012-03-05 22:59 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <874nu7bcd3.wl%kuninori.morimoto.gx@renesas.com>
Hi Laurent and Morimoto-san,
On 3/6/12 12:11 AM, Laurent Pinchart wrote:
> On Friday 02 March 2012 01:06:53 Kuninori Morimoto wrote:
>> "default y" of FB_SH_MOBILE_MERAM was overkill option.
>> "depends on FB_SH_MOBILE_LCDC" is very enough here.
>
> Actually the sh_mobile_meram driver doesn't depend on the LCDC driver. What
> would you think about removing both the dependency and the default=y ?
I agree with Laurent here. MERAM can be used for other IP blocks as well
in the future, e.g. the CEU driver. The LCDC was the only driver using
it, but doesn't necessarily mean that the MERAM driver depends on the
LCDC. In some case, you might even want to disable MERAM for the LCDC if
there's not enough memory on MERAM.
>
>> This patch remove it.
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
>> drivers/video/Kconfig | 1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>> index 549b960..dfec9b7 100644
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -1994,7 +1994,6 @@ config FB_SH_MOBILE_HDMI
>> config FB_SH_MOBILE_MERAM
>> tristate "SuperH Mobile MERAM read ahead support for LCDC"
>> depends on FB_SH_MOBILE_LCDC
>> - default y
>> ---help---
>> Enable MERAM support for the SH-Mobile LCD controller.
>
Takanari Hayama, Ph.D. (taki@igel.co.jp)
IGEL Co.,Ltd.
http://www.igel.co.jp/
^ permalink raw reply
* Re: [PATCH] fbdev: remove "default y" from FB_SH_MOBILE_MERAM
From: Laurent Pinchart @ 2012-03-05 15:11 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <874nu7bcd3.wl%kuninori.morimoto.gx@renesas.com>
Hi Morimoto-san,
Thanks for the patch.
On Friday 02 March 2012 01:06:53 Kuninori Morimoto wrote:
> "default y" of FB_SH_MOBILE_MERAM was overkill option.
> "depends on FB_SH_MOBILE_LCDC" is very enough here.
Actually the sh_mobile_meram driver doesn't depend on the LCDC driver. What
would you think about removing both the dependency and the default=y ?
> This patch remove it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> drivers/video/Kconfig | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 549b960..dfec9b7 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -1994,7 +1994,6 @@ config FB_SH_MOBILE_HDMI
> config FB_SH_MOBILE_MERAM
> tristate "SuperH Mobile MERAM read ahead support for LCDC"
> depends on FB_SH_MOBILE_LCDC
> - default y
> ---help---
> Enable MERAM support for the SH-Mobile LCD controller.
--
Regards,
Laurent Pinchart
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox