* [PATCH 00/20] OMAPDSS: misc improvements
@ 2013-03-08 11:51 Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 01/20] OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev Tomi Valkeinen
` (19 more replies)
0 siblings, 20 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Hi,
Here are a bunch of misc patches, created when working on improving DSS device
model. Most notable is the recommended_channel stuff, which removes the need to
pass LCD channel from the board file, which has been rather problematic.
Two of the patches are marked LATER, as they affect the board files. They're
pure cleanups, and can be sent after the rest are merged.
Tomi
Tomi Valkeinen (20):
OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev
OMAPDSS: HDMI: remove HDMI clk divisors from dssdev
OMAPDSS: DPI: remove omap_dss_device uses
OMAPDSS: DSI: remove omap_dss_device uses
OMAPDSS: Taal: remove multi-panel support
OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync
OMAPDSS: add missing export for omap_dss_get_output()
OMAPDSS: HDMI: init output earlier
OMAPDSS: add output->name
OMAPDSS: Resolve channels for outputs
OMAPDSS: add output->recommended_channel
OMAPDSS: DPI: use output->recommended_channel
OMAPFB: use output->recommended_channel
OMAPDSS: remove dssdev->channel assignments
OMAP: dss-common.c: remove uses of dss channel (LATER)
OMAPDSS: omapdss.h: remove channel field from omap_dss_device (LATER)
OMAPDSS: add pdata->default_display_name
OMAPDSS: DSI: delay dispc initialization
OMAPDSS: DSI: fix DSI channel source initialization
OMAPDSS: Taal: remove rotate & mirror support
arch/arm/mach-omap2/dss-common.c | 6 -
drivers/video/omap2/displays/panel-taal.c | 279 ++---------------------------
drivers/video/omap2/dss/apply.c | 15 +-
drivers/video/omap2/dss/core.c | 2 +
drivers/video/omap2/dss/dpi.c | 74 +++++---
drivers/video/omap2/dss/dsi.c | 219 +++++++++++++---------
drivers/video/omap2/dss/hdmi.c | 19 +-
drivers/video/omap2/dss/output.c | 1 +
drivers/video/omap2/dss/rfbi.c | 2 +
drivers/video/omap2/dss/sdi.c | 2 +
drivers/video/omap2/dss/venc.c | 4 +-
drivers/video/omap2/omapfb/omapfb-main.c | 2 +-
include/video/omapdss.h | 38 +---
13 files changed, 235 insertions(+), 428 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 01/20] OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 02/20] OMAPDSS: HDMI: remove HDMI " Tomi Valkeinen
` (18 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
struct omap_dss_device contains DSS clock divisors. The idea is that the
board file can pass precalculated divisors to the display driver.
However, these divsors are no longer needed, as the omapdss driver can
calculate the divisors during runtime.
This patch removes the divisors from omap_dss_device, and their uses
from the dsi driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dsi.c | 47 +++++++++++++++++++++++------------------
include/video/omapdss.h | 21 ------------------
2 files changed, 26 insertions(+), 42 deletions(-)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 28d41d1..9eb7845 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -261,6 +261,13 @@ struct dsi_data {
struct clk *dss_clk;
struct clk *sys_clk;
+ struct dispc_clock_info user_dispc_cinfo;
+ struct dsi_clock_info user_dsi_cinfo;
+
+ enum omap_dss_clk_source user_dispc_fclk_src;
+ enum omap_dss_clk_source user_lcd_clk_src;
+ enum omap_dss_clk_source user_dsi_fclk_src;
+
struct dsi_clock_info current_cinfo;
bool vdds_dsi_enabled;
@@ -1200,7 +1207,7 @@ static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev)
unsigned lp_clk_div;
unsigned long lp_clk;
- lp_clk_div = dssdev->clocks.dsi.lp_clk_div;
+ lp_clk_div = dsi->user_dsi_cinfo.lp_clk_div;
if (lp_clk_div = 0 || lp_clk_div > dsi->lpdiv_max)
return -EINVAL;
@@ -3910,7 +3917,7 @@ static void dsi_config_cmd_mode_interleaving(struct omap_dss_device *dssdev)
struct omap_video_timings *timings = &dsi->timings;
int bpp = dsi_get_pixel_size(dsi->pix_fmt);
int ndl = dsi->num_lanes_used - 1;
- int dsi_fclk_hsdiv = dssdev->clocks.dsi.regm_dsi + 1;
+ int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.regm_dsi + 1;
int hsa_interleave_hs = 0, hsa_interleave_lp = 0;
int hfp_interleave_hs = 0, hfp_interleave_lp = 0;
int hbp_interleave_hs = 0, hbp_interleave_lp = 0;
@@ -4302,24 +4309,24 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
dsi_fclk = cinfo.dsi_pll_hsdiv_dsi_clk;
lp_clk_div = DIV_ROUND_UP(dsi_fclk, lp_clk * 2);
- dssdev->clocks.dsi.regn = cinfo.regn;
- dssdev->clocks.dsi.regm = cinfo.regm;
- dssdev->clocks.dsi.regm_dispc = cinfo.regm_dispc;
- dssdev->clocks.dsi.regm_dsi = cinfo.regm_dsi;
+ dsi->user_dsi_cinfo.regn = cinfo.regn;
+ dsi->user_dsi_cinfo.regm = cinfo.regm;
+ dsi->user_dsi_cinfo.regm_dispc = cinfo.regm_dispc;
+ dsi->user_dsi_cinfo.regm_dsi = cinfo.regm_dsi;
- dssdev->clocks.dsi.lp_clk_div = lp_clk_div;
+ dsi->user_dsi_cinfo.lp_clk_div = lp_clk_div;
- dssdev->clocks.dispc.channel.lck_div = dispc_cinfo.lck_div;
- dssdev->clocks.dispc.channel.pck_div = dispc_cinfo.pck_div;
+ dsi->user_dispc_cinfo.lck_div = dispc_cinfo.lck_div;
+ dsi->user_dispc_cinfo.pck_div = dispc_cinfo.pck_div;
- dssdev->clocks.dispc.dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK;
+ dsi->user_dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK;
- dssdev->clocks.dispc.channel.lcd_clk_src + dsi->user_lcd_clk_src dsi->module_id = 0 ?
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC :
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC;
- dssdev->clocks.dsi.dsi_fclk_src + dsi->user_dsi_fclk_src dsi->module_id = 0 ?
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI :
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI;
@@ -4589,8 +4596,8 @@ static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)
fck = dsi_get_pll_hsdiv_dispc_rate(dsidev);
- dispc_cinfo.lck_div = dssdev->clocks.dispc.channel.lck_div;
- dispc_cinfo.pck_div = dssdev->clocks.dispc.channel.pck_div;
+ dispc_cinfo.lck_div = dsi->user_dispc_cinfo.lck_div;
+ dispc_cinfo.pck_div = dsi->user_dispc_cinfo.pck_div;
r = dispc_calc_clock_rates(fck, &dispc_cinfo);
if (r) {
@@ -4679,13 +4686,12 @@ static void dsi_display_uninit_dispc(struct omap_dss_device *dssdev)
static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
+ struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct dsi_clock_info cinfo;
int r;
- cinfo.regn = dssdev->clocks.dsi.regn;
- cinfo.regm = dssdev->clocks.dsi.regm;
- cinfo.regm_dispc = dssdev->clocks.dsi.regm_dispc;
- cinfo.regm_dsi = dssdev->clocks.dsi.regm_dsi;
+ cinfo = dsi->user_dsi_cinfo;
+
r = dsi_calc_clock_rates(dsidev, &cinfo);
if (r) {
DSSERR("Failed to calc dsi clocks\n");
@@ -4716,9 +4722,8 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev)
if (r)
goto err1;
- dss_select_dsi_clk_source(dsi->module_id, dssdev->clocks.dsi.dsi_fclk_src);
- dss_select_lcd_clk_source(mgr->id,
- dssdev->clocks.dispc.channel.lcd_clk_src);
+ dss_select_dsi_clk_source(dsi->module_id, dsi->user_dsi_fclk_src);
+ dss_select_lcd_clk_source(mgr->id, dsi->user_lcd_clk_src);
DSSDBG("PLL OK\n");
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index caefa09..255bcf5 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -592,27 +592,6 @@ struct omap_dss_device {
struct {
struct {
- struct {
- u16 lck_div;
- u16 pck_div;
- enum omap_dss_clk_source lcd_clk_src;
- } channel;
-
- enum omap_dss_clk_source dispc_fclk_src;
- } dispc;
-
- struct {
- /* regn is one greater than TRM's REGN value */
- u16 regn;
- u16 regm;
- u16 regm_dispc;
- u16 regm_dsi;
-
- u16 lp_clk_div;
- enum omap_dss_clk_source dsi_fclk_src;
- } dsi;
-
- struct {
/* regn is one greater than TRM's REGN value */
u16 regn;
u16 regm2;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 02/20] OMAPDSS: HDMI: remove HDMI clk divisors from dssdev
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 01/20] OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 03/20] OMAPDSS: DPI: remove omap_dss_device uses Tomi Valkeinen
` (17 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
struct omap_dss_device contains HDMI clock divisors. The idea is that the
board file can pass precalculated divisors to the display driver.
However, these divsors are no longer needed, as the omapdss driver can
calculate the divisors during runtime.
This patch removes the divisors from omap_dss_device, and their uses
from the hdmi driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/hdmi.c | 11 +++--------
include/video/omapdss.h | 8 --------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 769d082..e5682ae 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -472,17 +472,12 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
* Input clock is predivided by N + 1
* out put of which is reference clk
*/
- if (dssdev->clocks.hdmi.regn = 0)
- pi->regn = HDMI_DEFAULT_REGN;
- else
- pi->regn = dssdev->clocks.hdmi.regn;
+
+ pi->regn = HDMI_DEFAULT_REGN;
refclk = clkin / pi->regn;
- if (dssdev->clocks.hdmi.regm2 = 0)
- pi->regm2 = HDMI_DEFAULT_REGM2;
- else
- pi->regm2 = dssdev->clocks.hdmi.regm2;
+ pi->regm2 = HDMI_DEFAULT_REGM2;
/*
* multiplier is pixel_clk/ref_clk
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 255bcf5..2cb2b0e 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -591,14 +591,6 @@ struct omap_dss_device {
} phy;
struct {
- struct {
- /* regn is one greater than TRM's REGN value */
- u16 regn;
- u16 regm2;
- } hdmi;
- } clocks;
-
- struct {
struct omap_video_timings timings;
enum omap_dss_dsi_pixel_format dsi_pix_fmt;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 03/20] OMAPDSS: DPI: remove omap_dss_device uses
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 01/20] OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 02/20] OMAPDSS: HDMI: remove HDMI " Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 04/20] OMAPDSS: DSI: " Tomi Valkeinen
` (16 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
The role of struct omap_dss_device will change in the future. The exact
details of that are still a bit unclear. However, the less uses of
omap_dss_device we have, the easier the change is in the future.
This patch removes uses of omap_dss_device from dpi.c, where it can be
done neatly, by, for example, passing some lower level parameter in
function parameters.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 4af136a..cb6b280 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -91,11 +91,10 @@ static enum omap_dss_clk_source dpi_get_alt_clk_src(enum omap_channel channel)
}
}
-static int dpi_set_dsi_clk(struct omap_dss_device *dssdev,
+static int dpi_set_dsi_clk(enum omap_channel channel,
unsigned long pck_req, unsigned long *fck, int *lck_div,
int *pck_div)
{
- struct omap_overlay_manager *mgr = dssdev->output->manager;
struct dsi_clock_info dsi_cinfo;
struct dispc_clock_info dispc_cinfo;
int r;
@@ -109,8 +108,8 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev,
if (r)
return r;
- dss_select_lcd_clk_source(mgr->id,
- dpi_get_alt_clk_src(mgr->id));
+ dss_select_lcd_clk_source(channel,
+ dpi_get_alt_clk_src(channel));
dpi.mgr_config.clock_info = dispc_cinfo;
@@ -121,9 +120,8 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev,
return 0;
}
-static int dpi_set_dispc_clk(struct omap_dss_device *dssdev,
- unsigned long pck_req, unsigned long *fck, int *lck_div,
- int *pck_div)
+static int dpi_set_dispc_clk(unsigned long pck_req, unsigned long *fck,
+ int *lck_div, int *pck_div)
{
struct dss_clock_info dss_cinfo;
struct dispc_clock_info dispc_cinfo;
@@ -146,20 +144,19 @@ static int dpi_set_dispc_clk(struct omap_dss_device *dssdev,
return 0;
}
-static int dpi_set_mode(struct omap_dss_device *dssdev)
+static int dpi_set_mode(struct omap_overlay_manager *mgr)
{
struct omap_video_timings *t = &dpi.timings;
- struct omap_overlay_manager *mgr = dssdev->output->manager;
int lck_div = 0, pck_div = 0;
unsigned long fck = 0;
unsigned long pck;
int r = 0;
if (dpi.dsidev)
- r = dpi_set_dsi_clk(dssdev, t->pixel_clock * 1000, &fck,
+ r = dpi_set_dsi_clk(mgr->id, t->pixel_clock * 1000, &fck,
&lck_div, &pck_div);
else
- r = dpi_set_dispc_clk(dssdev, t->pixel_clock * 1000, &fck,
+ r = dpi_set_dispc_clk(t->pixel_clock * 1000, &fck,
&lck_div, &pck_div);
if (r)
return r;
@@ -179,10 +176,8 @@ static int dpi_set_mode(struct omap_dss_device *dssdev)
return 0;
}
-static void dpi_config_lcd_manager(struct omap_dss_device *dssdev)
+static void dpi_config_lcd_manager(struct omap_overlay_manager *mgr)
{
- struct omap_overlay_manager *mgr = dssdev->output->manager;
-
dpi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS;
dpi.mgr_config.stallmode = false;
@@ -197,7 +192,7 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev)
int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
{
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out = &dpi.output;
int r;
mutex_lock(&dpi.lock);
@@ -230,7 +225,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
if (r)
goto err_get_dispc;
- r = dss_dpi_select_source(dssdev->channel);
+ r = dss_dpi_select_source(out->manager->id);
if (r)
goto err_src_sel;
@@ -244,11 +239,11 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
goto err_dsi_pll_init;
}
- r = dpi_set_mode(dssdev);
+ r = dpi_set_mode(out->manager);
if (r)
goto err_set_mode;
- dpi_config_lcd_manager(dssdev);
+ dpi_config_lcd_manager(out->manager);
mdelay(2);
@@ -285,7 +280,7 @@ EXPORT_SYMBOL(omapdss_dpi_display_enable);
void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
{
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dpi.output.manager;
mutex_lock(&dpi.lock);
@@ -325,7 +320,7 @@ int dpi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
int r;
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dpi.output.manager;
int lck_div, pck_div;
unsigned long fck;
unsigned long pck;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 04/20] OMAPDSS: DSI: remove omap_dss_device uses
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (2 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 03/20] OMAPDSS: DPI: remove omap_dss_device uses Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 05/20] OMAPDSS: Taal: remove multi-panel support Tomi Valkeinen
` (15 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
The role of struct omap_dss_device will change in the future. The exact
details of that are still a bit unclear. However, the less uses of
omap_dss_device we have, the easier the change is in the future.
This patch removes uses of omap_dss_device from dsi.c, where it can be
done easily. Mostly this means passing dsi platform device to functions,
instead of the omap_dss_device.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dsi.c | 68 ++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 39 deletions(-)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 9eb7845..815c930 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1199,9 +1199,8 @@ static unsigned long dsi_fclk_rate(struct platform_device *dsidev)
return r;
}
-static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev)
+static int dsi_set_lp_clk_divisor(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
unsigned long dsi_fclk;
unsigned lp_clk_div;
@@ -3904,9 +3903,8 @@ static int dsi_compute_interleave_lp(int blank, int enter_hs, int exit_hs,
return max(lp_inter, 0);
}
-static void dsi_config_cmd_mode_interleaving(struct omap_dss_device *dssdev)
+static void dsi_config_cmd_mode_interleaving(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
int blanking_mode;
int hfp_blanking_mode, hbp_blanking_mode, hsa_blanking_mode;
@@ -4022,9 +4020,8 @@ static void dsi_config_cmd_mode_interleaving(struct omap_dss_device *dssdev)
dsi_write_reg(dsidev, DSI_VM_TIMING6, r);
}
-static int dsi_proto_config(struct omap_dss_device *dssdev)
+static int dsi_proto_config(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
u32 r;
int buswidth = 0;
@@ -4082,7 +4079,7 @@ static int dsi_proto_config(struct omap_dss_device *dssdev)
if (dsi->mode = OMAP_DSS_DSI_VIDEO_MODE) {
dsi_config_vp_sync_events(dsidev);
dsi_config_blanking_modes(dsidev);
- dsi_config_cmd_mode_interleaving(dssdev);
+ dsi_config_cmd_mode_interleaving(dsidev);
}
dsi_vc_initial_config(dsidev, 0);
@@ -4343,7 +4340,7 @@ int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
int bpp = dsi_get_pixel_size(dsi->pix_fmt);
u8 data_type;
u16 word_count;
@@ -4401,7 +4398,7 @@ void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
if (dsi->mode = OMAP_DSS_DSI_VIDEO_MODE) {
dsi_if_enable(dsidev, false);
@@ -4418,11 +4415,10 @@ void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
}
EXPORT_SYMBOL(dsi_disable_video_output);
-static void dsi_update_screen_dispc(struct omap_dss_device *dssdev)
+static void dsi_update_screen_dispc(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
unsigned bytespp;
unsigned bytespl;
unsigned bytespf;
@@ -4578,7 +4574,7 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
dsi->update_bytes = dw * dh *
dsi_get_pixel_size(dsi->pix_fmt) / 8;
#endif
- dsi_update_screen_dispc(dssdev);
+ dsi_update_screen_dispc(dsidev);
return 0;
}
@@ -4586,9 +4582,8 @@ EXPORT_SYMBOL(omap_dsi_update);
/* Display funcs */
-static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)
+static int dsi_configure_dispc_clocks(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct dispc_clock_info dispc_cinfo;
int r;
@@ -4610,11 +4605,10 @@ static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)
return 0;
}
-static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
+static int dsi_display_init_dispc(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
int r;
if (dsi->mode = OMAP_DSS_DSI_CMD_MODE) {
@@ -4652,7 +4646,7 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
dss_mgr_set_timings(mgr, &dsi->timings);
- r = dsi_configure_dispc_clocks(dssdev);
+ r = dsi_configure_dispc_clocks(dsidev);
if (r)
goto err1;
@@ -4672,20 +4666,18 @@ err:
return r;
}
-static void dsi_display_uninit_dispc(struct omap_dss_device *dssdev)
+static void dsi_display_uninit_dispc(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
if (dsi->mode = OMAP_DSS_DSI_CMD_MODE)
dss_mgr_unregister_framedone_handler(mgr,
dsi_framedone_irq_callback, dsidev);
}
-static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)
+static int dsi_configure_dsi_clocks(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct dsi_clock_info cinfo;
int r;
@@ -4707,18 +4699,17 @@ static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)
return 0;
}
-static int dsi_display_init_dsi(struct omap_dss_device *dssdev)
+static int dsi_display_init_dsi(struct platform_device *dsidev)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
int r;
r = dsi_pll_init(dsidev, true, true);
if (r)
goto err0;
- r = dsi_configure_dsi_clocks(dssdev);
+ r = dsi_configure_dsi_clocks(dsidev);
if (r)
goto err1;
@@ -4734,12 +4725,12 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev)
_dsi_print_reset_status(dsidev);
dsi_proto_timings(dsidev);
- dsi_set_lp_clk_divisor(dssdev);
+ dsi_set_lp_clk_divisor(dsidev);
if (1)
_dsi_print_reset_status(dsidev);
- r = dsi_proto_config(dssdev);
+ r = dsi_proto_config(dsidev);
if (r)
goto err3;
@@ -4764,12 +4755,11 @@ err0:
return r;
}
-static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev,
+static void dsi_display_uninit_dsi(struct platform_device *dsidev,
bool disconnect_lanes, bool enter_ulps)
{
- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dssdev->output->manager;
+ struct omap_overlay_manager *mgr = dsi->output.manager;
if (enter_ulps && !dsi->ulps_enabled)
dsi_enter_ulps(dsidev);
@@ -4791,7 +4781,7 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out = &dsi->output;
int r = 0;
DSSDBG("dsi_display_enable\n");
@@ -4820,11 +4810,11 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
_dsi_initialize_irq(dsidev);
- r = dsi_display_init_dispc(dssdev);
+ r = dsi_display_init_dispc(dsidev);
if (r)
goto err_init_dispc;
- r = dsi_display_init_dsi(dssdev);
+ r = dsi_display_init_dsi(dsidev);
if (r)
goto err_init_dsi;
@@ -4833,7 +4823,7 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
return 0;
err_init_dsi:
- dsi_display_uninit_dispc(dssdev);
+ dsi_display_uninit_dispc(dsidev);
err_init_dispc:
dsi_enable_pll_clock(dsidev, 0);
dsi_runtime_put(dsidev);
@@ -4863,9 +4853,9 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
dsi_sync_vc(dsidev, 2);
dsi_sync_vc(dsidev, 3);
- dsi_display_uninit_dispc(dssdev);
+ dsi_display_uninit_dispc(dsidev);
- dsi_display_uninit_dsi(dssdev, disconnect_lanes, enter_ulps);
+ dsi_display_uninit_dsi(dsidev, disconnect_lanes, enter_ulps);
dsi_runtime_put(dsidev);
dsi_enable_pll_clock(dsidev, 0);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 05/20] OMAPDSS: Taal: remove multi-panel support
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (3 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 04/20] OMAPDSS: DSI: " Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 06/20] OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync Tomi Valkeinen
` (14 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Taal panel driver was originally meant to support multiple different DSI
command mode panel models. This never realized, and the multi-panel
support code is lying there unused, making the driver more difficult to
maintain.
This patch removes the multi-panel support from Taal driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/displays/panel-taal.c | 109 ++++-------------------------
1 file changed, 15 insertions(+), 94 deletions(-)
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index a32407a..038a815 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -54,61 +54,6 @@ static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable);
static int taal_panel_reset(struct omap_dss_device *dssdev);
-/**
- * struct panel_config - panel configuration
- * @name: panel name
- * @type: panel type
- * @timings: panel resolution
- * @sleep: various panel specific delays, passed to msleep() if non-zero
- * @reset_sequence: reset sequence timings, passed to udelay() if non-zero
- * @regulators: array of panel regulators
- * @num_regulators: number of regulators in the array
- */
-struct panel_config {
- const char *name;
- int type;
-
- struct omap_video_timings timings;
-
- struct {
- unsigned int sleep_in;
- unsigned int sleep_out;
- unsigned int hw_reset;
- unsigned int enable_te;
- } sleep;
-
- struct {
- unsigned int high;
- unsigned int low;
- } reset_sequence;
-
-};
-
-enum {
- PANEL_TAAL,
-};
-
-static struct panel_config panel_configs[] = {
- {
- .name = "taal",
- .type = PANEL_TAAL,
- .timings = {
- .x_res = 864,
- .y_res = 480,
- },
- .sleep = {
- .sleep_in = 5,
- .sleep_out = 5,
- .hw_reset = 5,
- .enable_te = 100, /* possible panel bug */
- },
- .reset_sequence = {
- .high = 10,
- .low = 10,
- },
- },
-};
-
struct taal_data {
struct mutex lock;
@@ -121,9 +66,6 @@ struct taal_data {
struct omap_dss_device *dssdev;
- /* panel specific HW info */
- struct panel_config *panel_config;
-
/* panel HW configuration from DT or platform data */
int reset_gpio;
int ext_te_gpio;
@@ -221,8 +163,7 @@ static int taal_sleep_in(struct taal_data *td)
hw_guard_start(td, 120);
- if (td->panel_config->sleep.sleep_in)
- msleep(td->panel_config->sleep.sleep_in);
+ msleep(5);
return 0;
}
@@ -239,8 +180,7 @@ static int taal_sleep_out(struct taal_data *td)
hw_guard_start(td, 120);
- if (td->panel_config->sleep.sleep_out)
- msleep(td->panel_config->sleep.sleep_out);
+ msleep(5);
return 0;
}
@@ -845,17 +785,14 @@ static void taal_hw_reset(struct omap_dss_device *dssdev)
return;
gpio_set_value(td->reset_gpio, 1);
- if (td->panel_config->reset_sequence.high)
- udelay(td->panel_config->reset_sequence.high);
+ udelay(10);
/* reset the panel */
gpio_set_value(td->reset_gpio, 0);
/* assert reset */
- if (td->panel_config->reset_sequence.low)
- udelay(td->panel_config->reset_sequence.low);
+ udelay(10);
gpio_set_value(td->reset_gpio, 1);
/* wait after releasing reset */
- if (td->panel_config->sleep.hw_reset)
- msleep(td->panel_config->sleep.hw_reset);
+ msleep(5);
}
static void taal_probe_pdata(struct taal_data *td,
@@ -881,8 +818,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
struct backlight_properties props;
struct taal_data *td;
struct backlight_device *bldev = NULL;
- int r, i;
- const char *panel_name;
+ int r;
dev_dbg(&dssdev->dev, "probe\n");
@@ -897,26 +833,12 @@ static int taal_probe(struct omap_dss_device *dssdev)
const struct nokia_dsi_panel_data *pdata = dssdev->data;
taal_probe_pdata(td, pdata);
-
- panel_name = pdata->name;
} else {
return -ENODEV;
}
- if (panel_name = NULL)
- return -EINVAL;
-
- for (i = 0; i < ARRAY_SIZE(panel_configs); i++) {
- if (strcmp(panel_name, panel_configs[i].name) = 0) {
- td->panel_config = &panel_configs[i];
- break;
- }
- }
-
- if (!td->panel_config)
- return -EINVAL;
-
- dssdev->panel.timings = td->panel_config->timings;
+ dssdev->panel.timings.x_res = 864;
+ dssdev->panel.timings.y_res = 480;
dssdev->panel.dsi_pix_fmt = OMAP_DSS_DSI_FMT_RGB888;
dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE |
OMAP_DSS_DISPLAY_CAP_TEAR_ELIM;
@@ -1086,8 +1008,7 @@ static int taal_power_on(struct omap_dss_device *dssdev)
goto err;
/* on early Taal revisions CABC is broken */
- if (td->panel_config->type = PANEL_TAAL &&
- (id2 = 0x00 || id2 = 0xff || id2 = 0x81))
+ if (id2 = 0x00 || id2 = 0xff || id2 = 0x81)
td->cabc_broken = true;
r = taal_dcs_write_1(td, DCS_BRIGHTNESS, 0xff);
@@ -1129,8 +1050,8 @@ static int taal_power_on(struct omap_dss_device *dssdev)
td->enabled = 1;
if (!td->intro_printed) {
- dev_info(&dssdev->dev, "%s panel revision %02x.%02x.%02x\n",
- td->panel_config->name, id1, id2, id3);
+ dev_info(&dssdev->dev, "panel revision %02x.%02x.%02x\n",
+ id1, id2, id3);
if (td->cabc_broken)
dev_info(&dssdev->dev,
"old Taal version, CABC disabled\n");
@@ -1311,8 +1232,8 @@ static int taal_update(struct omap_dss_device *dssdev,
/* XXX no need to send this every frame, but dsi break if not done */
r = taal_set_update_window(td, 0, 0,
- td->panel_config->timings.x_res,
- td->panel_config->timings.y_res);
+ dssdev->panel.timings.x_res,
+ dssdev->panel.timings.y_res);
if (r)
goto err;
@@ -1365,8 +1286,8 @@ static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable)
if (!gpio_is_valid(td->ext_te_gpio))
omapdss_dsi_enable_te(dssdev, enable);
- if (td->panel_config->sleep.enable_te)
- msleep(td->panel_config->sleep.enable_te);
+ /* possible panel bug */
+ msleep(100);
return r;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 06/20] OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (4 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 05/20] OMAPDSS: Taal: remove multi-panel support Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 07/20] OMAPDSS: add missing export for omap_dss_get_output() Tomi Valkeinen
` (13 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
dss_mgr_wait_for_vsync() uses dssdev->type to find out if the output is
going to VENC, HDMI, or something else. This creates a dependency on
dssdev, which we want to remove. The task is more logically done by
looking at the output to which the overlay manager in question is
connected to.
This patch changes the code to use output->id to find out which kind of
output we use.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/apply.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index d446bdf..a4b356a 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -435,20 +435,27 @@ static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_man
static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr)
{
unsigned long timeout = msecs_to_jiffies(500);
- struct omap_dss_device *dssdev = mgr->get_device(mgr);
u32 irq;
int r;
+ if (mgr->output = NULL)
+ return -ENODEV;
+
r = dispc_runtime_get();
if (r)
return r;
- if (dssdev->type = OMAP_DISPLAY_TYPE_VENC)
+ switch (mgr->output->id) {
+ case OMAP_DSS_OUTPUT_VENC:
irq = DISPC_IRQ_EVSYNC_ODD;
- else if (dssdev->type = OMAP_DISPLAY_TYPE_HDMI)
+ break;
+ case OMAP_DSS_OUTPUT_HDMI:
irq = DISPC_IRQ_EVSYNC_EVEN;
- else
+ break;
+ default:
irq = dispc_mgr_get_vsync_irq(mgr->id);
+ break;
+ }
r = omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 07/20] OMAPDSS: add missing export for omap_dss_get_output()
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (5 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 06/20] OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 08/20] OMAPDSS: HDMI: init output earlier Tomi Valkeinen
` (12 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
omap_dss_get_output() is a public function, but was missing
EXPORT_SYMBOL().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/output.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 79dea1a..5214df6 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -113,6 +113,7 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id)
return NULL;
}
+EXPORT_SYMBOL(omap_dss_get_output);
static const struct dss_mgr_ops *dss_mgr_ops;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 08/20] OMAPDSS: HDMI: init output earlier
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (6 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 07/20] OMAPDSS: add missing export for omap_dss_get_output() Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 09/20] OMAPDSS: add output->name Tomi Valkeinen
` (11 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Move hdmi driver's output initialization a bit earlier, so that it
happens before hdmi panel init. In the future the hdmi panel will depend
on the output being ready.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/hdmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index e5682ae..f3768d0 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1094,6 +1094,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
hdmi.ip_data.pll_offset = HDMI_PLLCTRL;
hdmi.ip_data.phy_offset = HDMI_PHY;
+ hdmi_init_output(pdev);
+
r = hdmi_panel_init();
if (r) {
DSSERR("can't init panel\n");
@@ -1102,8 +1104,6 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
- hdmi_init_output(pdev);
-
hdmi_probe_pdata(pdev);
return 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 09/20] OMAPDSS: add output->name
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (7 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 08/20] OMAPDSS: HDMI: init output earlier Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 10/20] OMAPDSS: Resolve channels for outputs Tomi Valkeinen
` (10 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Add name field to omapdss's outputs to help debugging.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 1 +
drivers/video/omap2/dss/dsi.c | 1 +
drivers/video/omap2/dss/hdmi.c | 1 +
drivers/video/omap2/dss/rfbi.c | 1 +
drivers/video/omap2/dss/sdi.c | 1 +
drivers/video/omap2/dss/venc.c | 1 +
include/video/omapdss.h | 3 +++
7 files changed, 9 insertions(+)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index cb6b280..e282456 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -512,6 +512,7 @@ static void __init dpi_init_output(struct platform_device *pdev)
out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_DPI;
out->type = OMAP_DISPLAY_TYPE_DPI;
+ out->name = "dpi";
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 815c930..1a6ad6f 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5183,6 +5183,7 @@ static void __init dsi_init_output(struct platform_device *dsidev)
OMAP_DSS_OUTPUT_DSI1 : OMAP_DSS_OUTPUT_DSI2;
out->type = OMAP_DISPLAY_TYPE_DSI;
+ out->name = dsi->module_id = 0 ? "dsi0" : "dsi1";
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index f3768d0..888cfe3 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1046,6 +1046,7 @@ static void __init hdmi_init_output(struct platform_device *pdev)
out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_HDMI;
out->type = OMAP_DISPLAY_TYPE_HDMI;
+ out->name = "hdmi";
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index e903dd3..a47a9e5 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1025,6 +1025,7 @@ static void __init rfbi_init_output(struct platform_device *pdev)
out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_DBI;
out->type = OMAP_DISPLAY_TYPE_DBI;
+ out->name = "rfbi";
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 62b5374..0802927 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -278,6 +278,7 @@ static void __init sdi_init_output(struct platform_device *pdev)
out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_SDI;
out->type = OMAP_DISPLAY_TYPE_SDI;
+ out->name = "sdi";
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 006caf3..c8130f8 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -819,6 +819,7 @@ static void __init venc_init_output(struct platform_device *pdev)
out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_VENC;
out->type = OMAP_DISPLAY_TYPE_VENC;
+ out->name = "venc";
dss_register_output(out);
}
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 2cb2b0e..ba9cea7 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -541,6 +541,9 @@ struct omap_dss_writeback_info {
struct omap_dss_output {
struct list_head list;
+ /* name of the output for debug */
+ const char *name;
+
/* display type supported by the output */
enum omap_display_type type;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (8 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 09/20] OMAPDSS: add output->name Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-11 5:47 ` Archit Taneja
2013-03-11 5:54 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 11/20] OMAPDSS: add output->recommended_channel Tomi Valkeinen
` (9 subsequent siblings)
19 siblings, 2 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
The DISPC channel used for each output is currently passed in panel
platform data from the board files.
To simplify this, and to make the panel drivers less dependent on OMAP,
this patch changes omapdss to resolve the channel independently. The
channel is resolved based on the OMAP version and, in case of DSI, the
DSI module id.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
drivers/video/omap2/dss/dsi.c | 48 ++++++++++++++++++++++++++++++++++++++++
drivers/video/omap2/dss/rfbi.c | 2 ++
drivers/video/omap2/dss/sdi.c | 2 ++
4 files changed, 84 insertions(+), 5 deletions(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index e282456..3261644 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
return 0;
}
+/*
+ * Return a hardcoded channel for the DPI output. This should work for
+ * current use cases, but this can be later expanded to either resolve
+ * the channel in some more dynamic manner, or get the channel as a user
+ * parameter.
+ */
+static enum omap_channel dpi_get_channel(void)
+{
+ switch (omapdss_get_version()) {
+ case OMAPDSS_VER_OMAP24xx:
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_OMAP3630:
+ case OMAPDSS_VER_AM35xx:
+ return OMAP_DSS_CHANNEL_LCD;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
+ return OMAP_DSS_CHANNEL_LCD2;
+
+ case OMAPDSS_VER_OMAP5:
+ return OMAP_DSS_CHANNEL_LCD2;
+
+ default:
+ DSSWARN("unsupported DSS version\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+}
+
static int __init dpi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev;
DSSDBG("init_display\n");
+ dssdev->channel = dpi_get_channel();
+
if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
dpi.vdds_dsi_reg = NULL) {
struct regulator *vdds_dsi;
@@ -416,11 +448,6 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
dpi.vdds_dsi_reg = vdds_dsi;
}
- /*
- * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
- * source for DPI is SoC integration detail, not something that should
- * be configured in the dssdev
- */
dsidev = dpi_get_dsidev(dssdev->channel);
if (dsidev && dpi_verify_dsi_pll(dsidev)) {
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 1a6ad6f..c39ca86 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4946,6 +4946,52 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
+/*
+ * Return a hardcoded channel for the DSI output. This should work for
+ * current use cases, but this can be later expanded to either resolve
+ * the channel in some more dynamic manner, or get the channel as a user
+ * parameter.
+ */
+static enum omap_channel dsi_get_channel(int module_id)
+{
+ switch (omapdss_get_version()) {
+ case OMAPDSS_VER_OMAP24xx:
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_OMAP3630:
+ case OMAPDSS_VER_AM35xx:
+ return OMAP_DSS_CHANNEL_LCD;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
+ switch (module_id) {
+ case 0:
+ return OMAP_DSS_CHANNEL_LCD;
+ case 1:
+ return OMAP_DSS_CHANNEL_LCD2;
+ default:
+ DSSWARN("unsupported module id\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+
+ case OMAPDSS_VER_OMAP5:
+ switch (module_id) {
+ case 0:
+ return OMAP_DSS_CHANNEL_LCD;
+ case 1:
+ return OMAP_DSS_CHANNEL_LCD3;
+ default:
+ DSSWARN("unsupported module id\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+
+ default:
+ DSSWARN("unsupported DSS version\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+}
+
static int __init dsi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev @@ -4954,6 +5000,8 @@ static int __init dsi_init_display(struct omap_dss_device *dssdev)
DSSDBG("DSI init\n");
+ dssdev->channel = dsi_get_channel(dsi->module_id);
+
if (dsi->vdds_dsi_reg = NULL) {
struct regulator *vdds_dsi;
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index a47a9e5..04c4ab6 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -945,6 +945,8 @@ EXPORT_SYMBOL(omapdss_rfbi_display_disable);
static int __init rfbi_init_display(struct omap_dss_device *dssdev)
{
+ dssdev->channel = OMAP_DSS_CHANNEL_LCD;
+
rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev;
return 0;
}
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 0802927..d24e971 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -186,6 +186,8 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");
+ dssdev->channel = OMAP_DSS_CHANNEL_LCD;
+
if (sdi.vdds_sdi_reg = NULL) {
struct regulator *vdds_sdi;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 11/20] OMAPDSS: add output->recommended_channel
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (9 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 10/20] OMAPDSS: Resolve channels for outputs Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 12/20] OMAPDSS: DPI: use output->recommended_channel Tomi Valkeinen
` (8 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Add recommended_channel for omapdss's outputs. The field tells which
DISPC channel should be used for that output.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 1 +
drivers/video/omap2/dss/dsi.c | 1 +
drivers/video/omap2/dss/hdmi.c | 1 +
drivers/video/omap2/dss/rfbi.c | 1 +
drivers/video/omap2/dss/sdi.c | 1 +
drivers/video/omap2/dss/venc.c | 1 +
include/video/omapdss.h | 3 +++
7 files changed, 9 insertions(+)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 3261644..fb38019 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -540,6 +540,7 @@ static void __init dpi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_DPI;
out->type = OMAP_DISPLAY_TYPE_DPI;
out->name = "dpi";
+ out->recommended_channel = dpi_get_channel();
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index c39ca86..e0c9e31 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5232,6 +5232,7 @@ static void __init dsi_init_output(struct platform_device *dsidev)
out->type = OMAP_DISPLAY_TYPE_DSI;
out->name = dsi->module_id = 0 ? "dsi0" : "dsi1";
+ out->recommended_channel = dsi_get_channel(dsi->module_id);
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 888cfe3..e4c3be4 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1047,6 +1047,7 @@ static void __init hdmi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_HDMI;
out->type = OMAP_DISPLAY_TYPE_HDMI;
out->name = "hdmi";
+ out->recommended_channel = OMAP_DSS_CHANNEL_DIGIT;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 04c4ab6..991ec93 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1028,6 +1028,7 @@ static void __init rfbi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_DBI;
out->type = OMAP_DISPLAY_TYPE_DBI;
out->name = "rfbi";
+ out->recommended_channel = OMAP_DSS_CHANNEL_LCD;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index d24e971..c797b33 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -281,6 +281,7 @@ static void __init sdi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_SDI;
out->type = OMAP_DISPLAY_TYPE_SDI;
out->name = "sdi";
+ out->recommended_channel = OMAP_DSS_CHANNEL_LCD;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index c8130f8..b85fd3d 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -820,6 +820,7 @@ static void __init venc_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_VENC;
out->type = OMAP_DISPLAY_TYPE_VENC;
out->name = "venc";
+ out->recommended_channel = OMAP_DSS_CHANNEL_DIGIT;
dss_register_output(out);
}
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ba9cea7..8647646 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -547,6 +547,9 @@ struct omap_dss_output {
/* display type supported by the output */
enum omap_display_type type;
+ /* recommended DISPC channel for this output */
+ enum omap_channel recommended_channel;
+
/* output instance */
enum omap_dss_output_id id;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 12/20] OMAPDSS: DPI: use output->recommended_channel
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (10 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 11/20] OMAPDSS: add output->recommended_channel Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 13/20] OMAPFB: " Tomi Valkeinen
` (7 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Use output's recommended_channel instead of dssdev->channel in DPI
driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index fb38019..eba6b87 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -448,7 +448,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
dpi.vdds_dsi_reg = vdds_dsi;
}
- dsidev = dpi_get_dsidev(dssdev->channel);
+ dsidev = dpi_get_dsidev(dpi.output.recommended_channel);
if (dsidev && dpi_verify_dsi_pll(dsidev)) {
dsidev = NULL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 13/20] OMAPFB: use output->recommended_channel
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (11 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 12/20] OMAPDSS: DPI: use output->recommended_channel Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments Tomi Valkeinen
` (6 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Use output's recommended_channel instead of dssdev->channel in OMAPFB
driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/omapfb/omapfb-main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index ca585ef..24f159e 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2388,7 +2388,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
struct omap_dss_output *out = dssdev->output;
- mgr = omap_dss_get_overlay_manager(dssdev->channel);
+ mgr = omap_dss_get_overlay_manager(out->recommended_channel);
if (!mgr || !out)
continue;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (12 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 13/20] OMAPFB: " Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-11 6:36 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 15/20] OMAP: dss-common.c: remove uses of dss channel (LATER) Tomi Valkeinen
` (5 subsequent siblings)
19 siblings, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Now that the driver uses ooutput->recommended_channel, we can remove the
uses of the hacky dssdev->channel field.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 2 --
drivers/video/omap2/dss/dsi.c | 2 --
drivers/video/omap2/dss/hdmi.c | 2 --
drivers/video/omap2/dss/rfbi.c | 2 --
drivers/video/omap2/dss/sdi.c | 2 --
drivers/video/omap2/dss/venc.c | 2 --
6 files changed, 12 deletions(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index eba6b87..775214c 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -432,8 +432,6 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
DSSDBG("init_display\n");
- dssdev->channel = dpi_get_channel();
-
if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
dpi.vdds_dsi_reg = NULL) {
struct regulator *vdds_dsi;
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index e0c9e31..f44316a 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5000,8 +5000,6 @@ static int __init dsi_init_display(struct omap_dss_device *dssdev)
DSSDBG("DSI init\n");
- dssdev->channel = dsi_get_channel(dsi->module_id);
-
if (dsi->vdds_dsi_reg = NULL) {
struct regulator *vdds_dsi;
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index e4c3be4..a49e73f 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1012,8 +1012,6 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
hdmi.ls_oe_gpio = priv->ls_oe_gpio;
hdmi.hpd_gpio = priv->hpd_gpio;
- dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
-
r = hdmi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 991ec93..48d51ca 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -945,8 +945,6 @@ EXPORT_SYMBOL(omapdss_rfbi_display_disable);
static int __init rfbi_init_display(struct omap_dss_device *dssdev)
{
- dssdev->channel = OMAP_DSS_CHANNEL_LCD;
-
rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev;
return 0;
}
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index c797b33..eb4ee17 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -186,8 +186,6 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");
- dssdev->channel = OMAP_DSS_CHANNEL_LCD;
-
if (sdi.vdds_sdi_reg = NULL) {
struct regulator *vdds_sdi;
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index b85fd3d..6d25a12 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -786,8 +786,6 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
dss_copy_device_pdata(dssdev, plat_dssdev);
- dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
-
r = venc_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 15/20] OMAP: dss-common.c: remove uses of dss channel (LATER)
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (13 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 16/20] OMAPDSS: omapdss.h: remove channel field from omap_dss_device (LATER) Tomi Valkeinen
` (4 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Now that omap_dss_device's channel is resolved automatically, we can
remove its uses from the board files.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/dss-common.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index 4be5cfc..125c4eb 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -55,7 +55,6 @@ static struct omap_dss_device omap4_panda_dvi_device = {
.data = &omap4_dvi_panel,
.phy.dpi.data_lines = 24,
.reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
- .channel = OMAP_DSS_CHANNEL_LCD2,
};
static struct omap_dss_hdmi_data omap4_panda_hdmi_data = {
@@ -68,7 +67,6 @@ static struct omap_dss_device omap4_panda_hdmi_device = {
.name = "hdmi",
.driver_name = "hdmi_panel",
.type = OMAP_DISPLAY_TYPE_HDMI,
- .channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &omap4_panda_hdmi_data,
};
@@ -132,7 +130,6 @@ static struct omap_dss_device sdp4430_lcd_device = {
.phy.dsi = {
.module = 0,
},
- .channel = OMAP_DSS_CHANNEL_LCD,
};
static struct nokia_dsi_panel_data dsi2_panel = {
@@ -156,7 +153,6 @@ static struct omap_dss_device sdp4430_lcd2_device = {
.module = 1,
},
- .channel = OMAP_DSS_CHANNEL_LCD2,
};
static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
@@ -169,7 +165,6 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.name = "hdmi",
.driver_name = "hdmi_panel",
.type = OMAP_DISPLAY_TYPE_HDMI,
- .channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &sdp4430_hdmi_data,
};
@@ -215,7 +210,6 @@ static struct omap_dss_device sdp4430_picodlp_device = {
.driver_name = "picodlp_panel",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 24,
- .channel = OMAP_DSS_CHANNEL_LCD2,
.platform_enable = sdp4430_panel_enable_picodlp,
.platform_disable = sdp4430_panel_disable_picodlp,
.data = &sdp4430_picodlp_pdata,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 16/20] OMAPDSS: omapdss.h: remove channel field from omap_dss_device (LATER)
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (14 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 15/20] OMAP: dss-common.c: remove uses of dss channel (LATER) Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 17/20] OMAPDSS: add pdata->default_display_name Tomi Valkeinen
` (3 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
include/video/omapdss.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 8647646..cd028c8 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -567,8 +567,6 @@ struct omap_dss_device {
enum omap_display_type type;
- enum omap_channel channel;
-
union {
struct {
u8 data_lines;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 17/20] OMAPDSS: add pdata->default_display_name
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (15 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 16/20] OMAPDSS: omapdss.h: remove channel field from omap_dss_device (LATER) Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization Tomi Valkeinen
` (2 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
We can currently set the default display (i.e. the initial display) in
the omapdss platform data by using a pointer to the default
omap_dss_device. Internally omapdss uses the device's name to resolve
the default display.
As it's difficult to get the omap_dss_device pointer in the future,
after we've changed the omapdss device model, this patch adds a new way
to define the default display, by using the name of the display.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/core.c | 2 ++
include/video/omapdss.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index f8779d4..a9bab9f 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -238,6 +238,8 @@ static int __init omap_dss_probe(struct platform_device *pdev)
if (def_disp_name)
core.default_display_name = def_disp_name;
+ else if (pdata->default_display_name)
+ core.default_display_name = pdata->default_display_name;
else if (pdata->default_device)
core.default_display_name = pdata->default_device->name;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index cd028c8..9057e21 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -334,6 +334,7 @@ struct omap_dss_board_info {
int num_devices;
struct omap_dss_device **devices;
struct omap_dss_device *default_device;
+ const char *default_display_name;
int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
int (*set_min_bus_tput)(struct device *dev, unsigned long r);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (16 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 17/20] OMAPDSS: add pdata->default_display_name Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-11 6:17 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support Tomi Valkeinen
19 siblings, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
We currently setup both DSI and DISPC related things when the DSI bus is
enabled. There's no need for DISPC related thing at that point, though,
but only later when the video output is enabled.
To make it possible to use the DSI bus before DISPC overlay manager is
selected, this patch moves DSI's DISPC initialization to
dsi_enable_video_output(), from omapdss_dsi_display_enable(). We also
move the selection of DISPC's LCD clock to dsi_enable_video_output.
This way there are no DISPC dependencies until the video output is
enabled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dsi.c | 75 ++++++++++++++++++++++-------------------
1 file changed, 40 insertions(+), 35 deletions(-)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index f44316a..da8a678 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -200,6 +200,11 @@ struct dsi_reg { u16 idx; };
typedef void (*omap_dsi_isr_t) (void *arg, u32 mask);
+static int dsi_display_init_dispc(struct platform_device *dsidev,
+ struct omap_overlay_manager *mgr);
+static void dsi_display_uninit_dispc(struct platform_device *dsidev,
+ struct omap_overlay_manager *mgr);
+
#define DSI_MAX_NR_ISRS 2
#define DSI_MAX_NR_LANES 5
@@ -4342,10 +4347,20 @@ int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_overlay_manager *mgr = dsi->output.manager;
int bpp = dsi_get_pixel_size(dsi->pix_fmt);
+ struct omap_dss_output *out = &dsi->output;
u8 data_type;
u16 word_count;
int r;
+ if (out = NULL || out->manager = NULL) {
+ DSSERR("failed to enable display: no output/manager\n");
+ return -ENODEV;
+ }
+
+ r = dsi_display_init_dispc(dsidev, mgr);
+ if (r)
+ goto err_init_dispc;
+
if (dsi->mode = OMAP_DSS_DSI_VIDEO_MODE) {
switch (dsi->pix_fmt) {
case OMAP_DSS_DSI_FMT_RGB888:
@@ -4361,8 +4376,8 @@ int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16;
break;
default:
- BUG();
- return -EINVAL;
+ r = -EINVAL;
+ goto err_pix_fmt;
};
dsi_if_enable(dsidev, false);
@@ -4381,16 +4396,20 @@ int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
}
r = dss_mgr_enable(mgr);
- if (r) {
- if (dsi->mode = OMAP_DSS_DSI_VIDEO_MODE) {
- dsi_if_enable(dsidev, false);
- dsi_vc_enable(dsidev, channel, false);
- }
-
- return r;
- }
+ if (r)
+ goto err_mgr_enable;
return 0;
+
+err_mgr_enable:
+ if (dsi->mode = OMAP_DSS_DSI_VIDEO_MODE) {
+ dsi_if_enable(dsidev, false);
+ dsi_vc_enable(dsidev, channel, false);
+ }
+err_pix_fmt:
+ dsi_display_uninit_dispc(dsidev, mgr);
+err_init_dispc:
+ return r;
}
EXPORT_SYMBOL(dsi_enable_video_output);
@@ -4412,6 +4431,8 @@ void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
}
dss_mgr_disable(mgr);
+
+ dsi_display_uninit_dispc(dsidev, mgr);
}
EXPORT_SYMBOL(dsi_disable_video_output);
@@ -4605,12 +4626,14 @@ static int dsi_configure_dispc_clocks(struct platform_device *dsidev)
return 0;
}
-static int dsi_display_init_dispc(struct platform_device *dsidev)
+static int dsi_display_init_dispc(struct platform_device *dsidev,
+ struct omap_overlay_manager *mgr)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dsi->output.manager;
int r;
+ dss_select_lcd_clk_source(mgr->id, dsi->user_lcd_clk_src);
+
if (dsi->mode = OMAP_DSS_DSI_CMD_MODE) {
dsi->timings.hsw = 1;
dsi->timings.hfp = 1;
@@ -4663,17 +4686,20 @@ err1:
dss_mgr_unregister_framedone_handler(mgr,
dsi_framedone_irq_callback, dsidev);
err:
+ dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
return r;
}
-static void dsi_display_uninit_dispc(struct platform_device *dsidev)
+static void dsi_display_uninit_dispc(struct platform_device *dsidev,
+ struct omap_overlay_manager *mgr)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dsi->output.manager;
if (dsi->mode = OMAP_DSS_DSI_CMD_MODE)
dss_mgr_unregister_framedone_handler(mgr,
dsi_framedone_irq_callback, dsidev);
+
+ dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
}
static int dsi_configure_dsi_clocks(struct platform_device *dsidev)
@@ -4702,7 +4728,6 @@ static int dsi_configure_dsi_clocks(struct platform_device *dsidev)
static int dsi_display_init_dsi(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dsi->output.manager;
int r;
r = dsi_pll_init(dsidev, true, true);
@@ -4714,7 +4739,6 @@ static int dsi_display_init_dsi(struct platform_device *dsidev)
goto err1;
dss_select_dsi_clk_source(dsi->module_id, dsi->user_dsi_fclk_src);
- dss_select_lcd_clk_source(mgr->id, dsi->user_lcd_clk_src);
DSSDBG("PLL OK\n");
@@ -4747,8 +4771,6 @@ err3:
dsi_cio_uninit(dsidev);
err2:
dss_select_dsi_clk_source(dsi->module_id, OMAP_DSS_CLK_SRC_FCK);
- dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
-
err1:
dsi_pll_uninit(dsidev, true);
err0:
@@ -4759,7 +4781,6 @@ static void dsi_display_uninit_dsi(struct platform_device *dsidev,
bool disconnect_lanes, bool enter_ulps)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_overlay_manager *mgr = dsi->output.manager;
if (enter_ulps && !dsi->ulps_enabled)
dsi_enter_ulps(dsidev);
@@ -4772,7 +4793,6 @@ static void dsi_display_uninit_dsi(struct platform_device *dsidev,
dsi_vc_enable(dsidev, 3, 0);
dss_select_dsi_clk_source(dsi->module_id, OMAP_DSS_CLK_SRC_FCK);
- dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
dsi_cio_uninit(dsidev);
dsi_pll_uninit(dsidev, disconnect_lanes);
}
@@ -4781,7 +4801,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
- struct omap_dss_output *out = &dsi->output;
int r = 0;
DSSDBG("dsi_display_enable\n");
@@ -4790,12 +4809,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
mutex_lock(&dsi->lock);
- if (out = NULL || out->manager = NULL) {
- DSSERR("failed to enable display: no output/manager\n");
- r = -ENODEV;
- goto err_start_dev;
- }
-
r = omap_dss_start_device(dssdev);
if (r) {
DSSERR("failed to start device\n");
@@ -4810,10 +4823,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
_dsi_initialize_irq(dsidev);
- r = dsi_display_init_dispc(dsidev);
- if (r)
- goto err_init_dispc;
-
r = dsi_display_init_dsi(dsidev);
if (r)
goto err_init_dsi;
@@ -4823,8 +4832,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
return 0;
err_init_dsi:
- dsi_display_uninit_dispc(dsidev);
-err_init_dispc:
dsi_enable_pll_clock(dsidev, 0);
dsi_runtime_put(dsidev);
err_get_dsi:
@@ -4853,8 +4860,6 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
dsi_sync_vc(dsidev, 2);
dsi_sync_vc(dsidev, 3);
- dsi_display_uninit_dispc(dsidev);
-
dsi_display_uninit_dsi(dsidev, disconnect_lanes, enter_ulps);
dsi_runtime_put(dsidev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (17 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-11 6:22 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support Tomi Valkeinen
19 siblings, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
During the initialization of the DSI protocol registers, we always set
the sources of all DSI channels to L4. However, we don't update the
value in the dsi_data, so we may end up with a different value in the
register and in the dsi_data, leading to DSI problems.
This patch fixes the issue by initializing also the channel source in
the dsi_data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index da8a678..2d95ed9 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2794,6 +2794,7 @@ static int dsi_vc_enable(struct platform_device *dsidev, int channel,
static void dsi_vc_initial_config(struct platform_device *dsidev, int channel)
{
+ struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
u32 r;
DSSDBG("Initial config of virtual channel %d", channel);
@@ -2818,6 +2819,8 @@ static void dsi_vc_initial_config(struct platform_device *dsidev, int channel)
r = FLD_MOD(r, 4, 23, 21); /* DMA_TX_REQ_NB = no dma */
dsi_write_reg(dsidev, DSI_VC_CTRL(channel), r);
+
+ dsi->vc[channel].source = DSI_VC_SOURCE_L4;
}
static int dsi_vc_config_source(struct platform_device *dsidev, int channel,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
` (18 preceding siblings ...)
2013-03-08 11:51 ` [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization Tomi Valkeinen
@ 2013-03-08 11:51 ` Tomi Valkeinen
2013-03-11 6:33 ` Archit Taneja
19 siblings, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-08 11:51 UTC (permalink / raw)
To: Archit Taneja, linux-omap, linux-fbdev; +Cc: Tomi Valkeinen
Taal panel driver has support to set rotation and mirroring. However,
these features cannot be used without causing tearing, and are never
used. The code is just extra bloat, so let's remove it.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/displays/panel-taal.c | 170 +----------------------------
1 file changed, 2 insertions(+), 168 deletions(-)
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 038a815..bc4c95e 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -76,8 +76,6 @@ struct taal_data {
/* runtime variables */
bool enabled;
- u8 rotate;
- bool mirror;
bool te_enabled;
@@ -202,49 +200,6 @@ static int taal_get_id(struct taal_data *td, u8 *id1, u8 *id2, u8 *id3)
return 0;
}
-static int taal_set_addr_mode(struct taal_data *td, u8 rotate, bool mirror)
-{
- int r;
- u8 mode;
- int b5, b6, b7;
-
- r = taal_dcs_read_1(td, MIPI_DCS_GET_ADDRESS_MODE, &mode);
- if (r)
- return r;
-
- switch (rotate) {
- default:
- case 0:
- b7 = 0;
- b6 = 0;
- b5 = 0;
- break;
- case 1:
- b7 = 0;
- b6 = 1;
- b5 = 1;
- break;
- case 2:
- b7 = 1;
- b6 = 1;
- b5 = 0;
- break;
- case 3:
- b7 = 1;
- b6 = 0;
- b5 = 1;
- break;
- }
-
- if (mirror)
- b6 = !b6;
-
- mode &= ~((1<<7) | (1<<6) | (1<<5));
- mode |= (b7 << 7) | (b6 << 6) | (b5 << 5);
-
- return taal_dcs_write_1(td, MIPI_DCS_SET_ADDRESS_MODE, mode);
-}
-
static int taal_set_update_window(struct taal_data *td,
u16 x, u16 y, u16 w, u16 h)
{
@@ -455,15 +410,8 @@ static const struct backlight_ops taal_bl_ops = {
static void taal_get_resolution(struct omap_dss_device *dssdev,
u16 *xres, u16 *yres)
{
- struct taal_data *td = dev_get_drvdata(&dssdev->dev);
-
- if (td->rotate = 0 || td->rotate = 2) {
- *xres = dssdev->panel.timings.x_res;
- *yres = dssdev->panel.timings.y_res;
- } else {
- *yres = dssdev->panel.timings.x_res;
- *xres = dssdev->panel.timings.y_res;
- }
+ *xres = dssdev->panel.timings.x_res;
+ *yres = dssdev->panel.timings.y_res;
}
static ssize_t taal_num_errors_show(struct device *dev,
@@ -1025,10 +973,6 @@ static int taal_power_on(struct omap_dss_device *dssdev)
if (r)
goto err;
- r = taal_set_addr_mode(td, td->rotate, td->mirror);
- if (r)
- goto err;
-
if (!td->cabc_broken) {
r = taal_dcs_write_1(td, DCS_WRITE_CABC, td->cabc_mode);
if (r)
@@ -1340,112 +1284,6 @@ static int taal_get_te(struct omap_dss_device *dssdev)
return r;
}
-static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
-{
- struct taal_data *td = dev_get_drvdata(&dssdev->dev);
- u16 dw, dh;
- int r;
-
- dev_dbg(&dssdev->dev, "rotate %d\n", rotate);
-
- mutex_lock(&td->lock);
-
- if (td->rotate = rotate)
- goto end;
-
- dsi_bus_lock(dssdev);
-
- if (td->enabled) {
- r = taal_wake_up(dssdev);
- if (r)
- goto err;
-
- r = taal_set_addr_mode(td, rotate, td->mirror);
- if (r)
- goto err;
- }
-
- if (rotate = 0 || rotate = 2) {
- dw = dssdev->panel.timings.x_res;
- dh = dssdev->panel.timings.y_res;
- } else {
- dw = dssdev->panel.timings.y_res;
- dh = dssdev->panel.timings.x_res;
- }
-
- omapdss_dsi_set_size(dssdev, dw, dh);
-
- td->rotate = rotate;
-
- dsi_bus_unlock(dssdev);
-end:
- mutex_unlock(&td->lock);
- return 0;
-err:
- dsi_bus_unlock(dssdev);
- mutex_unlock(&td->lock);
- return r;
-}
-
-static u8 taal_get_rotate(struct omap_dss_device *dssdev)
-{
- struct taal_data *td = dev_get_drvdata(&dssdev->dev);
- int r;
-
- mutex_lock(&td->lock);
- r = td->rotate;
- mutex_unlock(&td->lock);
-
- return r;
-}
-
-static int taal_mirror(struct omap_dss_device *dssdev, bool enable)
-{
- struct taal_data *td = dev_get_drvdata(&dssdev->dev);
- int r;
-
- dev_dbg(&dssdev->dev, "mirror %d\n", enable);
-
- mutex_lock(&td->lock);
-
- if (td->mirror = enable)
- goto end;
-
- dsi_bus_lock(dssdev);
- if (td->enabled) {
- r = taal_wake_up(dssdev);
- if (r)
- goto err;
-
- r = taal_set_addr_mode(td, td->rotate, enable);
- if (r)
- goto err;
- }
-
- td->mirror = enable;
-
- dsi_bus_unlock(dssdev);
-end:
- mutex_unlock(&td->lock);
- return 0;
-err:
- dsi_bus_unlock(dssdev);
- mutex_unlock(&td->lock);
- return r;
-}
-
-static bool taal_get_mirror(struct omap_dss_device *dssdev)
-{
- struct taal_data *td = dev_get_drvdata(&dssdev->dev);
- int r;
-
- mutex_lock(&td->lock);
- r = td->mirror;
- mutex_unlock(&td->lock);
-
- return r;
-}
-
static int taal_run_test(struct omap_dss_device *dssdev, int test_num)
{
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
@@ -1679,10 +1517,6 @@ static struct omap_dss_driver taal_driver = {
.enable_te = taal_enable_te,
.get_te = taal_get_te,
- .set_rotate = taal_rotate,
- .get_rotate = taal_get_rotate,
- .set_mirror = taal_mirror,
- .get_mirror = taal_get_mirror,
.run_test = taal_run_test,
.memory_read = taal_memory_read,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-08 11:51 ` [PATCH 10/20] OMAPDSS: Resolve channels for outputs Tomi Valkeinen
@ 2013-03-11 5:47 ` Archit Taneja
2013-03-11 11:02 ` Tomi Valkeinen
2013-03-11 12:05 ` Tomi Valkeinen
2013-03-11 5:54 ` Archit Taneja
1 sibling, 2 replies; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 5:47 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
Hi,
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> The DISPC channel used for each output is currently passed in panel
> platform data from the board files.
>
> To simplify this, and to make the panel drivers less dependent on OMAP,
> this patch changes omapdss to resolve the channel independently. The
> channel is resolved based on the OMAP version and, in case of DSI, the
> DSI module id.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
> drivers/video/omap2/dss/dsi.c | 48 ++++++++++++++++++++++++++++++++++++++++
> drivers/video/omap2/dss/rfbi.c | 2 ++
> drivers/video/omap2/dss/sdi.c | 2 ++
> 4 files changed, 84 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
> index e282456..3261644 100644
> --- a/drivers/video/omap2/dss/dpi.c
> +++ b/drivers/video/omap2/dss/dpi.c
> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
> return 0;
> }
>
> +/*
> + * Return a hardcoded channel for the DPI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dpi_get_channel(void)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP4430_ES1:
> + case OMAPDSS_VER_OMAP4430_ES2:
> + case OMAPDSS_VER_OMAP4:
> + return OMAP_DSS_CHANNEL_LCD2;
> +
> + case OMAPDSS_VER_OMAP5:
> + return OMAP_DSS_CHANNEL_LCD2;
> +
> + default:
> + DSSWARN("unsupported DSS version\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +}
> +
> static int __init dpi_init_display(struct omap_dss_device *dssdev)
> {
> struct platform_device *dsidev;
>
> DSSDBG("init_display\n");
>
> + dssdev->channel = dpi_get_channel();
In patch 14 of the series, we remove these dssdev->channel assignments.
I don't see the point of adding them in this patch in the first place.
The dssdev->channel assignments will not be modified in this series, so
we don't need to worry about a kernel crash or something after this patch.
I feel this patch should only add the dpi_get_channel and
dsi_get_channel funcs.
> +
> if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
> dpi.vdds_dsi_reg = NULL) {
> struct regulator *vdds_dsi;
> @@ -416,11 +448,6 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
> dpi.vdds_dsi_reg = vdds_dsi;
> }
>
> - /*
> - * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
> - * source for DPI is SoC integration detail, not something that should
> - * be configured in the dssdev
> - */
> dsidev = dpi_get_dsidev(dssdev->channel);
>
> if (dsidev && dpi_verify_dsi_pll(dsidev)) {
> diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> index 1a6ad6f..c39ca86 100644
> --- a/drivers/video/omap2/dss/dsi.c
> +++ b/drivers/video/omap2/dss/dsi.c
> @@ -4946,6 +4946,52 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
> }
> EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
>
> +/*
> + * Return a hardcoded channel for the DSI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dsi_get_channel(int module_id)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
We should remove the above case so that we hit the default case and get
a warning about omap2 not having DSI.
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
<snip>
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-08 11:51 ` [PATCH 10/20] OMAPDSS: Resolve channels for outputs Tomi Valkeinen
2013-03-11 5:47 ` Archit Taneja
@ 2013-03-11 5:54 ` Archit Taneja
2013-03-11 11:54 ` Tomi Valkeinen
2013-03-11 12:01 ` Tomi Valkeinen
1 sibling, 2 replies; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 5:54 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> The DISPC channel used for each output is currently passed in panel
> platform data from the board files.
>
> To simplify this, and to make the panel drivers less dependent on OMAP,
> this patch changes omapdss to resolve the channel independently. The
> channel is resolved based on the OMAP version and, in case of DSI, the
> DSI module id.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
> drivers/video/omap2/dss/dsi.c | 48 ++++++++++++++++++++++++++++++++++++++++
> drivers/video/omap2/dss/rfbi.c | 2 ++
> drivers/video/omap2/dss/sdi.c | 2 ++
> 4 files changed, 84 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
> index e282456..3261644 100644
> --- a/drivers/video/omap2/dss/dpi.c
> +++ b/drivers/video/omap2/dss/dpi.c
> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
> return 0;
> }
>
> +/*
> + * Return a hardcoded channel for the DPI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dpi_get_channel(void)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP4430_ES1:
> + case OMAPDSS_VER_OMAP4430_ES2:
> + case OMAPDSS_VER_OMAP4:
> + return OMAP_DSS_CHANNEL_LCD2;
> +
> + case OMAPDSS_VER_OMAP5:
> + return OMAP_DSS_CHANNEL_LCD2;
> +
> + default:
> + DSSWARN("unsupported DSS version\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +}
I had another comment for this patch. On OMAP5, it makes sense for us to
not use LCD2 as the recommended channel. LCD2_CLK's only source is
DSS_CLK from PRCM. So it's not a very flexible channel to use. We could
use LCD3 (at the cost of not using DSI2).
We also need to fix dpi_get_dsidev() for OMAP5. Currently, it assumes
that LCD2_CLK can be sourced from DSI2 PLL, we need to ensure DPI has a
dsidev only if it's LCD1 or LCD3.
Archit
> +
> static int __init dpi_init_display(struct omap_dss_device *dssdev)
> {
> struct platform_device *dsidev;
>
> DSSDBG("init_display\n");
>
> + dssdev->channel = dpi_get_channel();
> +
> if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
> dpi.vdds_dsi_reg = NULL) {
> struct regulator *vdds_dsi;
> @@ -416,11 +448,6 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
> dpi.vdds_dsi_reg = vdds_dsi;
> }
>
> - /*
> - * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
> - * source for DPI is SoC integration detail, not something that should
> - * be configured in the dssdev
> - */
> dsidev = dpi_get_dsidev(dssdev->channel);
>
> if (dsidev && dpi_verify_dsi_pll(dsidev)) {
> diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> index 1a6ad6f..c39ca86 100644
> --- a/drivers/video/omap2/dss/dsi.c
> +++ b/drivers/video/omap2/dss/dsi.c
> @@ -4946,6 +4946,52 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
> }
> EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
>
> +/*
> + * Return a hardcoded channel for the DSI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dsi_get_channel(int module_id)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP4430_ES1:
> + case OMAPDSS_VER_OMAP4430_ES2:
> + case OMAPDSS_VER_OMAP4:
> + switch (module_id) {
> + case 0:
> + return OMAP_DSS_CHANNEL_LCD;
> + case 1:
> + return OMAP_DSS_CHANNEL_LCD2;
> + default:
> + DSSWARN("unsupported module id\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +
> + case OMAPDSS_VER_OMAP5:
> + switch (module_id) {
> + case 0:
> + return OMAP_DSS_CHANNEL_LCD;
> + case 1:
> + return OMAP_DSS_CHANNEL_LCD3;
> + default:
> + DSSWARN("unsupported module id\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +
> + default:
> + DSSWARN("unsupported DSS version\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +}
> +
> static int __init dsi_init_display(struct omap_dss_device *dssdev)
> {
> struct platform_device *dsidev > @@ -4954,6 +5000,8 @@ static int __init dsi_init_display(struct omap_dss_device *dssdev)
>
> DSSDBG("DSI init\n");
>
> + dssdev->channel = dsi_get_channel(dsi->module_id);
> +
> if (dsi->vdds_dsi_reg = NULL) {
> struct regulator *vdds_dsi;
>
> diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
> index a47a9e5..04c4ab6 100644
> --- a/drivers/video/omap2/dss/rfbi.c
> +++ b/drivers/video/omap2/dss/rfbi.c
> @@ -945,6 +945,8 @@ EXPORT_SYMBOL(omapdss_rfbi_display_disable);
>
> static int __init rfbi_init_display(struct omap_dss_device *dssdev)
> {
> + dssdev->channel = OMAP_DSS_CHANNEL_LCD;
> +
> rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev;
> return 0;
> }
> diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
> index 0802927..d24e971 100644
> --- a/drivers/video/omap2/dss/sdi.c
> +++ b/drivers/video/omap2/dss/sdi.c
> @@ -186,6 +186,8 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev)
> {
> DSSDBG("SDI init\n");
>
> + dssdev->channel = OMAP_DSS_CHANNEL_LCD;
> +
> if (sdi.vdds_sdi_reg = NULL) {
> struct regulator *vdds_sdi;
>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization
2013-03-08 11:51 ` [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization Tomi Valkeinen
@ 2013-03-11 6:17 ` Archit Taneja
0 siblings, 0 replies; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 6:17 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> We currently setup both DSI and DISPC related things when the DSI bus is
> enabled. There's no need for DISPC related thing at that point, though,
> but only later when the video output is enabled.
>
> To make it possible to use the DSI bus before DISPC overlay manager is
> selected, this patch moves DSI's DISPC initialization to
> dsi_enable_video_output(), from omapdss_dsi_display_enable(). We also
> move the selection of DISPC's LCD clock to dsi_enable_video_output.
>
> This way there are no DISPC dependencies until the video output is
> enabled.
This is a good patch. I hope CDF also makes sure the Display controller
and DSI bus are made more independent in this manner.
One thing which we should eventually add is to ensure that
omap_dsi_update() for command mode panels is called only after
dsi_enable_video_output() is called. I think we manage this in our panel
driver, but maybe some sort of check could help there.
<snip>
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization
2013-03-08 11:51 ` [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization Tomi Valkeinen
@ 2013-03-11 6:22 ` Archit Taneja
2013-03-11 7:02 ` Tomi Valkeinen
0 siblings, 1 reply; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 6:22 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
Hi,
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> During the initialization of the DSI protocol registers, we always set
> the sources of all DSI channels to L4. However, we don't update the
> value in the dsi_data, so we may end up with a different value in the
> register and in the dsi_data, leading to DSI problems.
>
> This patch fixes the issue by initializing also the channel source in
> the dsi_data.
We set in omap_dsihw_probe:
static int __init omap_dsihw_probe(struct platform_device *dsidev)
{
...
...
/* DSI VCs initialization */
for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
dsi->vc[i].source = DSI_VC_SOURCE_L4;
dsi->vc[i].dssdev = NULL;
dsi->vc[i].vc_id = 0;
}
...
...
}
<snip>
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support
2013-03-08 11:51 ` [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support Tomi Valkeinen
@ 2013-03-11 6:33 ` Archit Taneja
2013-03-11 6:51 ` Tomi Valkeinen
0 siblings, 1 reply; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 6:33 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
Hi,
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> Taal panel driver has support to set rotation and mirroring. However,
> these features cannot be used without causing tearing, and are never
> used. The code is just extra bloat, so let's remove it.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
<snip>
> static ssize_t taal_num_errors_show(struct device *dev,
> @@ -1025,10 +973,6 @@ static int taal_power_on(struct omap_dss_device *dssdev)
> if (r)
> goto err;
>
> - r = taal_set_addr_mode(td, td->rotate, td->mirror);
> - if (r)
> - goto err;
> -
I'm curious if we need to set the address mode(to the default value) at
least once. It may not be a requirement for Taal, but if that's the
case, why did we have a set_addr_mode() call in taal_power_on() in the
first place? Is it because we can prepare rotation and mirroring before
we enable the panel?
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments
2013-03-08 11:51 ` [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments Tomi Valkeinen
@ 2013-03-11 6:36 ` Archit Taneja
0 siblings, 0 replies; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 6:36 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
> Now that the driver uses ooutput->recommended_channel, we can remove the
Typo above for 'output'. We could discard this patch if we don't add
dssdev->channel assignments in patch # 10.
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support
2013-03-11 6:33 ` Archit Taneja
@ 2013-03-11 6:51 ` Tomi Valkeinen
0 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 6:51 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
On 2013-03-11 08:21, Archit Taneja wrote:
> Hi,
>
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> Taal panel driver has support to set rotation and mirroring. However,
>> these features cannot be used without causing tearing, and are never
>> used. The code is just extra bloat, so let's remove it.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>
> <snip>
>> static ssize_t taal_num_errors_show(struct device *dev,
>> @@ -1025,10 +973,6 @@ static int taal_power_on(struct omap_dss_device
>> *dssdev)
>> if (r)
>> goto err;
>>
>> - r = taal_set_addr_mode(td, td->rotate, td->mirror);
>> - if (r)
>> - goto err;
>> -
>
> I'm curious if we need to set the address mode(to the default value) at
> least once. It may not be a requirement for Taal, but if that's the
> case, why did we have a set_addr_mode() call in taal_power_on() in the
> first place? Is it because we can prepare rotation and mirroring before
> we enable the panel?
The panel resets its registers at HW reset, so in case we have changed
the rotation or mirroring, we need to set the addr more at power_on to
keep the user's rotation and mirroring after resuming from blanking. But
now that the rotation or mirroring is never changed, the default value
is always fine.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization
2013-03-11 6:22 ` Archit Taneja
@ 2013-03-11 7:02 ` Tomi Valkeinen
2013-03-11 8:27 ` Archit Taneja
0 siblings, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 7:02 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On 2013-03-11 08:10, Archit Taneja wrote:
> Hi,
>
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> During the initialization of the DSI protocol registers, we always set
>> the sources of all DSI channels to L4. However, we don't update the
>> value in the dsi_data, so we may end up with a different value in the
>> register and in the dsi_data, leading to DSI problems.
>>
>> This patch fixes the issue by initializing also the channel source in
>> the dsi_data.
>
> We set in omap_dsihw_probe:
>
> static int __init omap_dsihw_probe(struct platform_device *dsidev)
> {
> ...
> ...
> /* DSI VCs initialization */
> for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
> dsi->vc[i].source = DSI_VC_SOURCE_L4;
> dsi->vc[i].dssdev = NULL;
> dsi->vc[i].vc_id = 0;
> }
> ...
> ...
> }
Hmm... I did have a bug related to this when prototyping CDF. Ah.
Consider this:
Panel powers up and uses DSI normally. A DSI VC is set to video mode.
Then the panel power down. Then it powers up again, and enables DSI. At
this time, dsi_vc_initial_config() is called again, setting the source
in the registers to L4. But the source in dsi_data is still VP.
So perhaps the whole piece of code from omap_dsihw_probe should be moved
to somewhere else (dsi_vc_initial_config() sounds like a good place), so
that they are initialized each time the registers are initialized.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization
2013-03-11 8:27 ` Archit Taneja
@ 2013-03-11 8:25 ` Tomi Valkeinen
0 siblings, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 8:25 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 2211 bytes --]
On 2013-03-11 10:15, Archit Taneja wrote:
> On Monday 11 March 2013 12:32 PM, Tomi Valkeinen wrote:
>> On 2013-03-11 08:10, Archit Taneja wrote:
>>> Hi,
>>>
>>> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>>>> During the initialization of the DSI protocol registers, we always set
>>>> the sources of all DSI channels to L4. However, we don't update the
>>>> value in the dsi_data, so we may end up with a different value in the
>>>> register and in the dsi_data, leading to DSI problems.
>>>>
>>>> This patch fixes the issue by initializing also the channel source in
>>>> the dsi_data.
>>>
>>> We set in omap_dsihw_probe:
>>>
>>> static int __init omap_dsihw_probe(struct platform_device *dsidev)
>>> {
>>> ...
>>> ...
>>> /* DSI VCs initialization */
>>> for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
>>> dsi->vc[i].source = DSI_VC_SOURCE_L4;
>>> dsi->vc[i].dssdev = NULL;
>>> dsi->vc[i].vc_id = 0;
>>> }
>>> ...
>>> ...
>>> }
>>
>> Hmm... I did have a bug related to this when prototyping CDF. Ah.
>> Consider this:
>>
>> Panel powers up and uses DSI normally. A DSI VC is set to video mode.
>> Then the panel power down. Then it powers up again, and enables DSI. At
>> this time, dsi_vc_initial_config() is called again, setting the source
>> in the registers to L4. But the source in dsi_data is still VP.
>
> Oh ok.
>
>>
>> So perhaps the whole piece of code from omap_dsihw_probe should be moved
>> to somewhere else (dsi_vc_initial_config() sounds like a good place), so
>> that they are initialized each time the registers are initialized.
>
> VC source is something which seems fine to do in
> dsi_vc_initial_config(). I'm not sure about the dssdev and vc_id fields
> though, we would need to call omap_dsi_request_vc() and
> omap_dsi_set_vc_id() again after a power off. Currently, we do it only
> once in taal_probe().
Oh, right. Well, neither dssdev nor vc_id is written to registers, so
they won't have similar issues in any case. So I guess this patch is
fine as it is, and we do not need to touch dssdev nor vc_id.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization
2013-03-11 7:02 ` Tomi Valkeinen
@ 2013-03-11 8:27 ` Archit Taneja
2013-03-11 8:25 ` Tomi Valkeinen
0 siblings, 1 reply; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 8:27 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
On Monday 11 March 2013 12:32 PM, Tomi Valkeinen wrote:
> On 2013-03-11 08:10, Archit Taneja wrote:
>> Hi,
>>
>> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>>> During the initialization of the DSI protocol registers, we always set
>>> the sources of all DSI channels to L4. However, we don't update the
>>> value in the dsi_data, so we may end up with a different value in the
>>> register and in the dsi_data, leading to DSI problems.
>>>
>>> This patch fixes the issue by initializing also the channel source in
>>> the dsi_data.
>>
>> We set in omap_dsihw_probe:
>>
>> static int __init omap_dsihw_probe(struct platform_device *dsidev)
>> {
>> ...
>> ...
>> /* DSI VCs initialization */
>> for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
>> dsi->vc[i].source = DSI_VC_SOURCE_L4;
>> dsi->vc[i].dssdev = NULL;
>> dsi->vc[i].vc_id = 0;
>> }
>> ...
>> ...
>> }
>
> Hmm... I did have a bug related to this when prototyping CDF. Ah.
> Consider this:
>
> Panel powers up and uses DSI normally. A DSI VC is set to video mode.
> Then the panel power down. Then it powers up again, and enables DSI. At
> this time, dsi_vc_initial_config() is called again, setting the source
> in the registers to L4. But the source in dsi_data is still VP.
Oh ok.
>
> So perhaps the whole piece of code from omap_dsihw_probe should be moved
> to somewhere else (dsi_vc_initial_config() sounds like a good place), so
> that they are initialized each time the registers are initialized.
VC source is something which seems fine to do in
dsi_vc_initial_config(). I'm not sure about the dssdev and vc_id fields
though, we would need to call omap_dsi_request_vc() and
omap_dsi_set_vc_id() again after a power off. Currently, we do it only
once in taal_probe().
Archit
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-11 5:47 ` Archit Taneja
@ 2013-03-11 11:02 ` Tomi Valkeinen
2013-03-11 12:05 ` Tomi Valkeinen
1 sibling, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 11:02 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 4497 bytes --]
On 2013-03-11 07:35, Archit Taneja wrote:
> Hi,
>
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> The DISPC channel used for each output is currently passed in panel
>> platform data from the board files.
>>
>> To simplify this, and to make the panel drivers less dependent on OMAP,
>> this patch changes omapdss to resolve the channel independently. The
>> channel is resolved based on the OMAP version and, in case of DSI, the
>> DSI module id.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
>> drivers/video/omap2/dss/dsi.c | 48
>> ++++++++++++++++++++++++++++++++++++++++
>> drivers/video/omap2/dss/rfbi.c | 2 ++
>> drivers/video/omap2/dss/sdi.c | 2 ++
>> 4 files changed, 84 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dpi.c
>> b/drivers/video/omap2/dss/dpi.c
>> index e282456..3261644 100644
>> --- a/drivers/video/omap2/dss/dpi.c
>> +++ b/drivers/video/omap2/dss/dpi.c
>> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct
>> platform_device *dsidev)
>> return 0;
>> }
>>
>> +/*
>> + * Return a hardcoded channel for the DPI output. This should work for
>> + * current use cases, but this can be later expanded to either resolve
>> + * the channel in some more dynamic manner, or get the channel as a user
>> + * parameter.
>> + */
>> +static enum omap_channel dpi_get_channel(void)
>> +{
>> + switch (omapdss_get_version()) {
>> + case OMAPDSS_VER_OMAP24xx:
>> + case OMAPDSS_VER_OMAP34xx_ES1:
>> + case OMAPDSS_VER_OMAP34xx_ES3:
>> + case OMAPDSS_VER_OMAP3630:
>> + case OMAPDSS_VER_AM35xx:
>> + return OMAP_DSS_CHANNEL_LCD;
>> +
>> + case OMAPDSS_VER_OMAP4430_ES1:
>> + case OMAPDSS_VER_OMAP4430_ES2:
>> + case OMAPDSS_VER_OMAP4:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + case OMAPDSS_VER_OMAP5:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + default:
>> + DSSWARN("unsupported DSS version\n");
>> + return OMAP_DSS_CHANNEL_LCD;
>> + }
>> +}
>> +
>> static int __init dpi_init_display(struct omap_dss_device *dssdev)
>> {
>> struct platform_device *dsidev;
>>
>> DSSDBG("init_display\n");
>>
>> + dssdev->channel = dpi_get_channel();
>
> In patch 14 of the series, we remove these dssdev->channel assignments.
> I don't see the point of adding them in this patch in the first place.
> The dssdev->channel assignments will not be modified in this series, so
> we don't need to worry about a kernel crash or something after this patch.
>
> I feel this patch should only add the dpi_get_channel and
> dsi_get_channel funcs.
Yes, you're right. It's just extra going back and forth. I think I'll
merge this with the patch adding recommended channel.
>> +
>> if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) &&
>> dpi.vdds_dsi_reg == NULL) {
>> struct regulator *vdds_dsi;
>> @@ -416,11 +448,6 @@ static int __init dpi_init_display(struct
>> omap_dss_device *dssdev)
>> dpi.vdds_dsi_reg = vdds_dsi;
>> }
>>
>> - /*
>> - * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
>> - * source for DPI is SoC integration detail, not something that
>> should
>> - * be configured in the dssdev
>> - */
>> dsidev = dpi_get_dsidev(dssdev->channel);
>>
>> if (dsidev && dpi_verify_dsi_pll(dsidev)) {
>> diff --git a/drivers/video/omap2/dss/dsi.c
>> b/drivers/video/omap2/dss/dsi.c
>> index 1a6ad6f..c39ca86 100644
>> --- a/drivers/video/omap2/dss/dsi.c
>> +++ b/drivers/video/omap2/dss/dsi.c
>> @@ -4946,6 +4946,52 @@ void omapdss_dsi_set_videomode_timings(struct
>> omap_dss_device *dssdev,
>> }
>> EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
>>
>> +/*
>> + * Return a hardcoded channel for the DSI output. This should work for
>> + * current use cases, but this can be later expanded to either resolve
>> + * the channel in some more dynamic manner, or get the channel as a user
>> + * parameter.
>> + */
>> +static enum omap_channel dsi_get_channel(int module_id)
>> +{
>> + switch (omapdss_get_version()) {
>> + case OMAPDSS_VER_OMAP24xx:
>
> We should remove the above case so that we hit the default case and get
> a warning about omap2 not having DSI.
Yep, I'll fix that.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-11 5:54 ` Archit Taneja
@ 2013-03-11 11:54 ` Tomi Valkeinen
2013-03-11 12:01 ` Tomi Valkeinen
1 sibling, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 11:54 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 2978 bytes --]
On 2013-03-11 07:53, Archit Taneja wrote:
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> The DISPC channel used for each output is currently passed in panel
>> platform data from the board files.
>>
>> To simplify this, and to make the panel drivers less dependent on OMAP,
>> this patch changes omapdss to resolve the channel independently. The
>> channel is resolved based on the OMAP version and, in case of DSI, the
>> DSI module id.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
>> drivers/video/omap2/dss/dsi.c | 48
>> ++++++++++++++++++++++++++++++++++++++++
>> drivers/video/omap2/dss/rfbi.c | 2 ++
>> drivers/video/omap2/dss/sdi.c | 2 ++
>> 4 files changed, 84 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dpi.c
>> b/drivers/video/omap2/dss/dpi.c
>> index e282456..3261644 100644
>> --- a/drivers/video/omap2/dss/dpi.c
>> +++ b/drivers/video/omap2/dss/dpi.c
>> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct
>> platform_device *dsidev)
>> return 0;
>> }
>>
>> +/*
>> + * Return a hardcoded channel for the DPI output. This should work for
>> + * current use cases, but this can be later expanded to either resolve
>> + * the channel in some more dynamic manner, or get the channel as a user
>> + * parameter.
>> + */
>> +static enum omap_channel dpi_get_channel(void)
>> +{
>> + switch (omapdss_get_version()) {
>> + case OMAPDSS_VER_OMAP24xx:
>> + case OMAPDSS_VER_OMAP34xx_ES1:
>> + case OMAPDSS_VER_OMAP34xx_ES3:
>> + case OMAPDSS_VER_OMAP3630:
>> + case OMAPDSS_VER_AM35xx:
>> + return OMAP_DSS_CHANNEL_LCD;
>> +
>> + case OMAPDSS_VER_OMAP4430_ES1:
>> + case OMAPDSS_VER_OMAP4430_ES2:
>> + case OMAPDSS_VER_OMAP4:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + case OMAPDSS_VER_OMAP5:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + default:
>> + DSSWARN("unsupported DSS version\n");
>> + return OMAP_DSS_CHANNEL_LCD;
>> + }
>> +}
>
> I had another comment for this patch. On OMAP5, it makes sense for us to
> not use LCD2 as the recommended channel. LCD2_CLK's only source is
> DSS_CLK from PRCM. So it's not a very flexible channel to use. We could
> use LCD3 (at the cost of not using DSI2).
Ok. Yes, this looks to be the case. I'll use LCD3 for DPI for now. In
the worst case we may need to pass some channel setup parameters via
omapdss DT data or platform data, but I'd really much like the driver to
be able to resolve the dispc channels by itself...
> We also need to fix dpi_get_dsidev() for OMAP5. Currently, it assumes
> that LCD2_CLK can be sourced from DSI2 PLL, we need to ensure DPI has a
> dsidev only if it's LCD1 or LCD3.
Right. I'll add if (OMAP5) there, and return DSI2 PLL for LCD3, and NULL
for LCD2.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-11 5:54 ` Archit Taneja
2013-03-11 11:54 ` Tomi Valkeinen
@ 2013-03-11 12:01 ` Tomi Valkeinen
1 sibling, 0 replies; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 12:01 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 4243 bytes --]
On 2013-03-11 07:53, Archit Taneja wrote:
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> The DISPC channel used for each output is currently passed in panel
>> platform data from the board files.
>>
>> To simplify this, and to make the panel drivers less dependent on OMAP,
>> this patch changes omapdss to resolve the channel independently. The
>> channel is resolved based on the OMAP version and, in case of DSI, the
>> DSI module id.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
>> drivers/video/omap2/dss/dsi.c | 48
>> ++++++++++++++++++++++++++++++++++++++++
>> drivers/video/omap2/dss/rfbi.c | 2 ++
>> drivers/video/omap2/dss/sdi.c | 2 ++
>> 4 files changed, 84 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dpi.c
>> b/drivers/video/omap2/dss/dpi.c
>> index e282456..3261644 100644
>> --- a/drivers/video/omap2/dss/dpi.c
>> +++ b/drivers/video/omap2/dss/dpi.c
>> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct
>> platform_device *dsidev)
>> return 0;
>> }
>>
>> +/*
>> + * Return a hardcoded channel for the DPI output. This should work for
>> + * current use cases, but this can be later expanded to either resolve
>> + * the channel in some more dynamic manner, or get the channel as a user
>> + * parameter.
>> + */
>> +static enum omap_channel dpi_get_channel(void)
>> +{
>> + switch (omapdss_get_version()) {
>> + case OMAPDSS_VER_OMAP24xx:
>> + case OMAPDSS_VER_OMAP34xx_ES1:
>> + case OMAPDSS_VER_OMAP34xx_ES3:
>> + case OMAPDSS_VER_OMAP3630:
>> + case OMAPDSS_VER_AM35xx:
>> + return OMAP_DSS_CHANNEL_LCD;
>> +
>> + case OMAPDSS_VER_OMAP4430_ES1:
>> + case OMAPDSS_VER_OMAP4430_ES2:
>> + case OMAPDSS_VER_OMAP4:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + case OMAPDSS_VER_OMAP5:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + default:
>> + DSSWARN("unsupported DSS version\n");
>> + return OMAP_DSS_CHANNEL_LCD;
>> + }
>> +}
>
> I had another comment for this patch. On OMAP5, it makes sense for us to
> not use LCD2 as the recommended channel. LCD2_CLK's only source is
> DSS_CLK from PRCM. So it's not a very flexible channel to use. We could
> use LCD3 (at the cost of not using DSI2).
>
> We also need to fix dpi_get_dsidev() for OMAP5. Currently, it assumes
> that LCD2_CLK can be sourced from DSI2 PLL, we need to ensure DPI has a
> dsidev only if it's LCD1 or LCD3.
I fixed it this way:
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Mon Mar 11 13:57:38 2013 +0200
OMAPDSS: DPI: fix dpi_get_dsidev() for omap5
On OMAP5 the DISPC channels and DSI PLLs are not connected the same way.
LCD2 on OMAP5 cannot use any DSI PLL as a source clock, but LCD3 can use
DSI2's PLL.
This patch fixes dpi_get_dsidev() by adding separate case for OMAP5 to
handle the difference.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 409e53b..433eff7 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -63,15 +63,29 @@ static struct platform_device *dpi_get_dsidev(enum omap_channel channel)
case OMAPDSS_VER_OMAP3630:
case OMAPDSS_VER_AM35xx:
return NULL;
- default:
- break;
- }
- switch (channel) {
- case OMAP_DSS_CHANNEL_LCD:
- return dsi_get_dsidev_from_id(0);
- case OMAP_DSS_CHANNEL_LCD2:
- return dsi_get_dsidev_from_id(1);
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
+ switch (channel) {
+ case OMAP_DSS_CHANNEL_LCD:
+ return dsi_get_dsidev_from_id(0);
+ case OMAP_DSS_CHANNEL_LCD2:
+ return dsi_get_dsidev_from_id(1);
+ default:
+ return NULL;
+ }
+
+ case OMAPDSS_VER_OMAP5:
+ switch (channel) {
+ case OMAP_DSS_CHANNEL_LCD:
+ return dsi_get_dsidev_from_id(0);
+ case OMAP_DSS_CHANNEL_LCD3:
+ return dsi_get_dsidev_from_id(1);
+ default:
+ return NULL;
+ }
+
default:
return NULL;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-11 5:47 ` Archit Taneja
2013-03-11 11:02 ` Tomi Valkeinen
@ 2013-03-11 12:05 ` Tomi Valkeinen
2013-03-11 12:31 ` Archit Taneja
1 sibling, 1 reply; 36+ messages in thread
From: Tomi Valkeinen @ 2013-03-11 12:05 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 11242 bytes --]
On 2013-03-11 07:35, Archit Taneja wrote:
> Hi,
>
> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>> The DISPC channel used for each output is currently passed in panel
>> platform data from the board files.
>>
>> To simplify this, and to make the panel drivers less dependent on OMAP,
>> this patch changes omapdss to resolve the channel independently. The
>> channel is resolved based on the OMAP version and, in case of DSI, the
>> DSI module id.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
>> drivers/video/omap2/dss/dsi.c | 48
>> ++++++++++++++++++++++++++++++++++++++++
>> drivers/video/omap2/dss/rfbi.c | 2 ++
>> drivers/video/omap2/dss/sdi.c | 2 ++
>> 4 files changed, 84 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dpi.c
>> b/drivers/video/omap2/dss/dpi.c
>> index e282456..3261644 100644
>> --- a/drivers/video/omap2/dss/dpi.c
>> +++ b/drivers/video/omap2/dss/dpi.c
>> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct
>> platform_device *dsidev)
>> return 0;
>> }
>>
>> +/*
>> + * Return a hardcoded channel for the DPI output. This should work for
>> + * current use cases, but this can be later expanded to either resolve
>> + * the channel in some more dynamic manner, or get the channel as a user
>> + * parameter.
>> + */
>> +static enum omap_channel dpi_get_channel(void)
>> +{
>> + switch (omapdss_get_version()) {
>> + case OMAPDSS_VER_OMAP24xx:
>> + case OMAPDSS_VER_OMAP34xx_ES1:
>> + case OMAPDSS_VER_OMAP34xx_ES3:
>> + case OMAPDSS_VER_OMAP3630:
>> + case OMAPDSS_VER_AM35xx:
>> + return OMAP_DSS_CHANNEL_LCD;
>> +
>> + case OMAPDSS_VER_OMAP4430_ES1:
>> + case OMAPDSS_VER_OMAP4430_ES2:
>> + case OMAPDSS_VER_OMAP4:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + case OMAPDSS_VER_OMAP5:
>> + return OMAP_DSS_CHANNEL_LCD2;
>> +
>> + default:
>> + DSSWARN("unsupported DSS version\n");
>> + return OMAP_DSS_CHANNEL_LCD;
>> + }
>> +}
>> +
>> static int __init dpi_init_display(struct omap_dss_device *dssdev)
>> {
>> struct platform_device *dsidev;
>>
>> DSSDBG("init_display\n");
>>
>> + dssdev->channel = dpi_get_channel();
>
> In patch 14 of the series, we remove these dssdev->channel assignments.
> I don't see the point of adding them in this patch in the first place.
> The dssdev->channel assignments will not be modified in this series, so
> we don't need to worry about a kernel crash or something after this patch.
>
> I feel this patch should only add the dpi_get_channel and
> dsi_get_channel funcs.
Here's the combined patch. I changed the recommended_channel to dispc_channel.
"recommended" was not that good name, as currently the channel cannot be changed
later, because, for example in DPI case, we store the DSI PLL which is based on
the channel.
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Wed Feb 13 11:23:54 2013 +0200
OMAPDSS: add output->dispc_channel
The DISPC channel used for each output is currently passed in panel
platform data from the board files.
To simplify this, and to make the panel drivers less dependent on OMAP,
this patch changes omapdss to resolve the channel independently. The
channel is resolved based on the OMAP version and, in case of DSI, the
DSI module id. This resolved channel is stored into a new field in
output, dispc_channel.
The few places where dssdev->channel was used are changed to use
output->recommended_channel. After this patch, dssdev->channel is
obsolete.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index e282456..409e53b 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -396,6 +396,36 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
return 0;
}
+/*
+ * Return a hardcoded channel for the DPI output. This should work for
+ * current use cases, but this can be later expanded to either resolve
+ * the channel in some more dynamic manner, or get the channel as a user
+ * parameter.
+ */
+static enum omap_channel dpi_get_channel(void)
+{
+ switch (omapdss_get_version()) {
+ case OMAPDSS_VER_OMAP24xx:
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_OMAP3630:
+ case OMAPDSS_VER_AM35xx:
+ return OMAP_DSS_CHANNEL_LCD;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
+ return OMAP_DSS_CHANNEL_LCD2;
+
+ case OMAPDSS_VER_OMAP5:
+ return OMAP_DSS_CHANNEL_LCD3;
+
+ default:
+ DSSWARN("unsupported DSS version\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+}
+
static int __init dpi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev;
@@ -416,12 +446,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
dpi.vdds_dsi_reg = vdds_dsi;
}
- /*
- * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
- * source for DPI is SoC integration detail, not something that should
- * be configured in the dssdev
- */
- dsidev = dpi_get_dsidev(dssdev->channel);
+ dsidev = dpi_get_dsidev(dpi.output.dispc_channel);
if (dsidev && dpi_verify_dsi_pll(dsidev)) {
dsidev = NULL;
@@ -513,6 +538,7 @@ static void __init dpi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_DPI;
out->type = OMAP_DISPLAY_TYPE_DPI;
out->name = "dpi";
+ out->dispc_channel = dpi_get_channel();
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 1a6ad6f..28e0b99 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4946,6 +4946,55 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
+/*
+ * Return a hardcoded channel for the DSI output. This should work for
+ * current use cases, but this can be later expanded to either resolve
+ * the channel in some more dynamic manner, or get the channel as a user
+ * parameter.
+ */
+static enum omap_channel dsi_get_channel(int module_id)
+{
+ switch (omapdss_get_version()) {
+ case OMAPDSS_VER_OMAP24xx:
+ DSSWARN("DSI not supported\n");
+ return OMAP_DSS_CHANNEL_LCD;
+
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_OMAP3630:
+ case OMAPDSS_VER_AM35xx:
+ return OMAP_DSS_CHANNEL_LCD;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
+ switch (module_id) {
+ case 0:
+ return OMAP_DSS_CHANNEL_LCD;
+ case 1:
+ return OMAP_DSS_CHANNEL_LCD2;
+ default:
+ DSSWARN("unsupported module id\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+
+ case OMAPDSS_VER_OMAP5:
+ switch (module_id) {
+ case 0:
+ return OMAP_DSS_CHANNEL_LCD;
+ case 1:
+ return OMAP_DSS_CHANNEL_LCD3;
+ default:
+ DSSWARN("unsupported module id\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+
+ default:
+ DSSWARN("unsupported DSS version\n");
+ return OMAP_DSS_CHANNEL_LCD;
+ }
+}
+
static int __init dsi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev =
@@ -5184,6 +5233,7 @@ static void __init dsi_init_output(struct platform_device *dsidev)
out->type = OMAP_DISPLAY_TYPE_DSI;
out->name = dsi->module_id == 0 ? "dsi0" : "dsi1";
+ out->dispc_channel = dsi_get_channel(dsi->module_id);
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 888cfe3..e03619a 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1012,8 +1012,6 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
hdmi.ls_oe_gpio = priv->ls_oe_gpio;
hdmi.hpd_gpio = priv->hpd_gpio;
- dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
-
r = hdmi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
@@ -1047,6 +1045,7 @@ static void __init hdmi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_HDMI;
out->type = OMAP_DISPLAY_TYPE_HDMI;
out->name = "hdmi";
+ out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index a47a9e5..05c0646 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1026,6 +1026,7 @@ static void __init rfbi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_DBI;
out->type = OMAP_DISPLAY_TYPE_DBI;
out->name = "rfbi";
+ out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 0802927..5d37db5 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -279,6 +279,7 @@ static void __init sdi_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_SDI;
out->type = OMAP_DISPLAY_TYPE_SDI;
out->name = "sdi";
+ out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index c8130f8..866e015 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -786,8 +786,6 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
dss_copy_device_pdata(dssdev, plat_dssdev);
- dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
-
r = venc_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
@@ -820,6 +818,7 @@ static void __init venc_init_output(struct platform_device *pdev)
out->id = OMAP_DSS_OUTPUT_VENC;
out->type = OMAP_DISPLAY_TYPE_VENC;
out->name = "venc";
+ out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
dss_register_output(out);
}
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index ca585ef..f38348e 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2388,7 +2388,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
struct omap_dss_output *out = dssdev->output;
- mgr = omap_dss_get_overlay_manager(dssdev->channel);
+ mgr = omap_dss_get_overlay_manager(out->dispc_channel);
if (!mgr || !out)
continue;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ba9cea7..ec322a7 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -547,6 +547,9 @@ struct omap_dss_output {
/* display type supported by the output */
enum omap_display_type type;
+ /* DISPC channel for this output */
+ enum omap_channel dispc_channel;
+
/* output instance */
enum omap_dss_output_id id;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 10/20] OMAPDSS: Resolve channels for outputs
2013-03-11 12:05 ` Tomi Valkeinen
@ 2013-03-11 12:31 ` Archit Taneja
0 siblings, 0 replies; 36+ messages in thread
From: Archit Taneja @ 2013-03-11 12:31 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
On Monday 11 March 2013 05:35 PM, Tomi Valkeinen wrote:
> On 2013-03-11 07:35, Archit Taneja wrote:
>> Hi,
>>
>> On Friday 08 March 2013 05:21 PM, Tomi Valkeinen wrote:
>>> The DISPC channel used for each output is currently passed in panel
>>> platform data from the board files.
>>>
>>> To simplify this, and to make the panel drivers less dependent on OMAP,
>>> this patch changes omapdss to resolve the channel independently. The
>>> channel is resolved based on the OMAP version and, in case of DSI, the
>>> DSI module id.
>>>
>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>> ---
>>> drivers/video/omap2/dss/dpi.c | 37 ++++++++++++++++++++++++++-----
>>> drivers/video/omap2/dss/dsi.c | 48
>>> ++++++++++++++++++++++++++++++++++++++++
>>> drivers/video/omap2/dss/rfbi.c | 2 ++
>>> drivers/video/omap2/dss/sdi.c | 2 ++
>>> 4 files changed, 84 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/video/omap2/dss/dpi.c
>>> b/drivers/video/omap2/dss/dpi.c
>>> index e282456..3261644 100644
>>> --- a/drivers/video/omap2/dss/dpi.c
>>> +++ b/drivers/video/omap2/dss/dpi.c
>>> @@ -396,12 +396,44 @@ static int __init dpi_verify_dsi_pll(struct
>>> platform_device *dsidev)
>>> return 0;
>>> }
>>>
>>> +/*
>>> + * Return a hardcoded channel for the DPI output. This should work for
>>> + * current use cases, but this can be later expanded to either resolve
>>> + * the channel in some more dynamic manner, or get the channel as a user
>>> + * parameter.
>>> + */
>>> +static enum omap_channel dpi_get_channel(void)
>>> +{
>>> + switch (omapdss_get_version()) {
>>> + case OMAPDSS_VER_OMAP24xx:
>>> + case OMAPDSS_VER_OMAP34xx_ES1:
>>> + case OMAPDSS_VER_OMAP34xx_ES3:
>>> + case OMAPDSS_VER_OMAP3630:
>>> + case OMAPDSS_VER_AM35xx:
>>> + return OMAP_DSS_CHANNEL_LCD;
>>> +
>>> + case OMAPDSS_VER_OMAP4430_ES1:
>>> + case OMAPDSS_VER_OMAP4430_ES2:
>>> + case OMAPDSS_VER_OMAP4:
>>> + return OMAP_DSS_CHANNEL_LCD2;
>>> +
>>> + case OMAPDSS_VER_OMAP5:
>>> + return OMAP_DSS_CHANNEL_LCD2;
>>> +
>>> + default:
>>> + DSSWARN("unsupported DSS version\n");
>>> + return OMAP_DSS_CHANNEL_LCD;
>>> + }
>>> +}
>>> +
>>> static int __init dpi_init_display(struct omap_dss_device *dssdev)
>>> {
>>> struct platform_device *dsidev;
>>>
>>> DSSDBG("init_display\n");
>>>
>>> + dssdev->channel = dpi_get_channel();
>>
>> In patch 14 of the series, we remove these dssdev->channel assignments.
>> I don't see the point of adding them in this patch in the first place.
>> The dssdev->channel assignments will not be modified in this series, so
>> we don't need to worry about a kernel crash or something after this patch.
>>
>> I feel this patch should only add the dpi_get_channel and
>> dsi_get_channel funcs.
>
> Here's the combined patch. I changed the recommended_channel to dispc_channel.
> "recommended" was not that good name, as currently the channel cannot be changed
> later, because, for example in DPI case, we store the DSI PLL which is based on
> the channel.
The patch looks fine now.
Reviewed-by: Archit Taneja <archit@ti.com>
Archit
>
>
> Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Date: Wed Feb 13 11:23:54 2013 +0200
>
> OMAPDSS: add output->dispc_channel
>
> The DISPC channel used for each output is currently passed in panel
> platform data from the board files.
>
> To simplify this, and to make the panel drivers less dependent on OMAP,
> this patch changes omapdss to resolve the channel independently. The
> channel is resolved based on the OMAP version and, in case of DSI, the
> DSI module id. This resolved channel is stored into a new field in
> output, dispc_channel.
>
> The few places where dssdev->channel was used are changed to use
> output->recommended_channel. After this patch, dssdev->channel is
> obsolete.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>
> diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
> index e282456..409e53b 100644
> --- a/drivers/video/omap2/dss/dpi.c
> +++ b/drivers/video/omap2/dss/dpi.c
> @@ -396,6 +396,36 @@ static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
> return 0;
> }
>
> +/*
> + * Return a hardcoded channel for the DPI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dpi_get_channel(void)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP4430_ES1:
> + case OMAPDSS_VER_OMAP4430_ES2:
> + case OMAPDSS_VER_OMAP4:
> + return OMAP_DSS_CHANNEL_LCD2;
> +
> + case OMAPDSS_VER_OMAP5:
> + return OMAP_DSS_CHANNEL_LCD3;
> +
> + default:
> + DSSWARN("unsupported DSS version\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +}
> +
> static int __init dpi_init_display(struct omap_dss_device *dssdev)
> {
> struct platform_device *dsidev;
> @@ -416,12 +446,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
> dpi.vdds_dsi_reg = vdds_dsi;
> }
>
> - /*
> - * XXX We shouldn't need dssdev->channel for this. The dsi pll clock
> - * source for DPI is SoC integration detail, not something that should
> - * be configured in the dssdev
> - */
> - dsidev = dpi_get_dsidev(dssdev->channel);
> + dsidev = dpi_get_dsidev(dpi.output.dispc_channel);
>
> if (dsidev && dpi_verify_dsi_pll(dsidev)) {
> dsidev = NULL;
> @@ -513,6 +538,7 @@ static void __init dpi_init_output(struct platform_device *pdev)
> out->id = OMAP_DSS_OUTPUT_DPI;
> out->type = OMAP_DISPLAY_TYPE_DPI;
> out->name = "dpi";
> + out->dispc_channel = dpi_get_channel();
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> index 1a6ad6f..28e0b99 100644
> --- a/drivers/video/omap2/dss/dsi.c
> +++ b/drivers/video/omap2/dss/dsi.c
> @@ -4946,6 +4946,55 @@ void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
> }
> EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
>
> +/*
> + * Return a hardcoded channel for the DSI output. This should work for
> + * current use cases, but this can be later expanded to either resolve
> + * the channel in some more dynamic manner, or get the channel as a user
> + * parameter.
> + */
> +static enum omap_channel dsi_get_channel(int module_id)
> +{
> + switch (omapdss_get_version()) {
> + case OMAPDSS_VER_OMAP24xx:
> + DSSWARN("DSI not supported\n");
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP34xx_ES1:
> + case OMAPDSS_VER_OMAP34xx_ES3:
> + case OMAPDSS_VER_OMAP3630:
> + case OMAPDSS_VER_AM35xx:
> + return OMAP_DSS_CHANNEL_LCD;
> +
> + case OMAPDSS_VER_OMAP4430_ES1:
> + case OMAPDSS_VER_OMAP4430_ES2:
> + case OMAPDSS_VER_OMAP4:
> + switch (module_id) {
> + case 0:
> + return OMAP_DSS_CHANNEL_LCD;
> + case 1:
> + return OMAP_DSS_CHANNEL_LCD2;
> + default:
> + DSSWARN("unsupported module id\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +
> + case OMAPDSS_VER_OMAP5:
> + switch (module_id) {
> + case 0:
> + return OMAP_DSS_CHANNEL_LCD;
> + case 1:
> + return OMAP_DSS_CHANNEL_LCD3;
> + default:
> + DSSWARN("unsupported module id\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +
> + default:
> + DSSWARN("unsupported DSS version\n");
> + return OMAP_DSS_CHANNEL_LCD;
> + }
> +}
> +
> static int __init dsi_init_display(struct omap_dss_device *dssdev)
> {
> struct platform_device *dsidev > @@ -5184,6 +5233,7 @@ static void __init dsi_init_output(struct platform_device *dsidev)
>
> out->type = OMAP_DISPLAY_TYPE_DSI;
> out->name = dsi->module_id = 0 ? "dsi0" : "dsi1";
> + out->dispc_channel = dsi_get_channel(dsi->module_id);
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
> index 888cfe3..e03619a 100644
> --- a/drivers/video/omap2/dss/hdmi.c
> +++ b/drivers/video/omap2/dss/hdmi.c
> @@ -1012,8 +1012,6 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
> hdmi.ls_oe_gpio = priv->ls_oe_gpio;
> hdmi.hpd_gpio = priv->hpd_gpio;
>
> - dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
> -
> r = hdmi_init_display(dssdev);
> if (r) {
> DSSERR("device %s init failed: %d\n", dssdev->name, r);
> @@ -1047,6 +1045,7 @@ static void __init hdmi_init_output(struct platform_device *pdev)
> out->id = OMAP_DSS_OUTPUT_HDMI;
> out->type = OMAP_DISPLAY_TYPE_HDMI;
> out->name = "hdmi";
> + out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
> index a47a9e5..05c0646 100644
> --- a/drivers/video/omap2/dss/rfbi.c
> +++ b/drivers/video/omap2/dss/rfbi.c
> @@ -1026,6 +1026,7 @@ static void __init rfbi_init_output(struct platform_device *pdev)
> out->id = OMAP_DSS_OUTPUT_DBI;
> out->type = OMAP_DISPLAY_TYPE_DBI;
> out->name = "rfbi";
> + out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
> index 0802927..5d37db5 100644
> --- a/drivers/video/omap2/dss/sdi.c
> +++ b/drivers/video/omap2/dss/sdi.c
> @@ -279,6 +279,7 @@ static void __init sdi_init_output(struct platform_device *pdev)
> out->id = OMAP_DSS_OUTPUT_SDI;
> out->type = OMAP_DISPLAY_TYPE_SDI;
> out->name = "sdi";
> + out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
> index c8130f8..866e015 100644
> --- a/drivers/video/omap2/dss/venc.c
> +++ b/drivers/video/omap2/dss/venc.c
> @@ -786,8 +786,6 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
>
> dss_copy_device_pdata(dssdev, plat_dssdev);
>
> - dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;
> -
> r = venc_init_display(dssdev);
> if (r) {
> DSSERR("device %s init failed: %d\n", dssdev->name, r);
> @@ -820,6 +818,7 @@ static void __init venc_init_output(struct platform_device *pdev)
> out->id = OMAP_DSS_OUTPUT_VENC;
> out->type = OMAP_DISPLAY_TYPE_VENC;
> out->name = "venc";
> + out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
>
> dss_register_output(out);
> }
> diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
> index ca585ef..f38348e 100644
> --- a/drivers/video/omap2/omapfb/omapfb-main.c
> +++ b/drivers/video/omap2/omapfb/omapfb-main.c
> @@ -2388,7 +2388,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
> struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
> struct omap_dss_output *out = dssdev->output;
>
> - mgr = omap_dss_get_overlay_manager(dssdev->channel);
> + mgr = omap_dss_get_overlay_manager(out->dispc_channel);
>
> if (!mgr || !out)
> continue;
> diff --git a/include/video/omapdss.h b/include/video/omapdss.h
> index ba9cea7..ec322a7 100644
> --- a/include/video/omapdss.h
> +++ b/include/video/omapdss.h
> @@ -547,6 +547,9 @@ struct omap_dss_output {
> /* display type supported by the output */
> enum omap_display_type type;
>
> + /* DISPC channel for this output */
> + enum omap_channel dispc_channel;
> +
> /* output instance */
> enum omap_dss_output_id id;
>
>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2013-03-11 12:31 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 11:51 [PATCH 00/20] OMAPDSS: misc improvements Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 01/20] OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 02/20] OMAPDSS: HDMI: remove HDMI " Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 03/20] OMAPDSS: DPI: remove omap_dss_device uses Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 04/20] OMAPDSS: DSI: " Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 05/20] OMAPDSS: Taal: remove multi-panel support Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 06/20] OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 07/20] OMAPDSS: add missing export for omap_dss_get_output() Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 08/20] OMAPDSS: HDMI: init output earlier Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 09/20] OMAPDSS: add output->name Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 10/20] OMAPDSS: Resolve channels for outputs Tomi Valkeinen
2013-03-11 5:47 ` Archit Taneja
2013-03-11 11:02 ` Tomi Valkeinen
2013-03-11 12:05 ` Tomi Valkeinen
2013-03-11 12:31 ` Archit Taneja
2013-03-11 5:54 ` Archit Taneja
2013-03-11 11:54 ` Tomi Valkeinen
2013-03-11 12:01 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 11/20] OMAPDSS: add output->recommended_channel Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 12/20] OMAPDSS: DPI: use output->recommended_channel Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 13/20] OMAPFB: " Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 14/20] OMAPDSS: remove dssdev->channel assignments Tomi Valkeinen
2013-03-11 6:36 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 15/20] OMAP: dss-common.c: remove uses of dss channel (LATER) Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 16/20] OMAPDSS: omapdss.h: remove channel field from omap_dss_device (LATER) Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 17/20] OMAPDSS: add pdata->default_display_name Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 18/20] OMAPDSS: DSI: delay dispc initialization Tomi Valkeinen
2013-03-11 6:17 ` Archit Taneja
2013-03-08 11:51 ` [PATCH 19/20] OMAPDSS: DSI: fix DSI channel source initialization Tomi Valkeinen
2013-03-11 6:22 ` Archit Taneja
2013-03-11 7:02 ` Tomi Valkeinen
2013-03-11 8:27 ` Archit Taneja
2013-03-11 8:25 ` Tomi Valkeinen
2013-03-08 11:51 ` [PATCH 20/20] OMAPDSS: Taal: remove rotate & mirror support Tomi Valkeinen
2013-03-11 6:33 ` Archit Taneja
2013-03-11 6:51 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).