Update was hardcoded to use virtual channel 0. This patch adds a parameter
that specifies the VC.

Signed-off-by: Tomi Valkeinen <[email protected]>
---
 arch/arm/plat-omap/include/plat/display.h |    1 +
 drivers/video/omap2/dss/dsi.c             |   13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/display.h 
b/arch/arm/plat-omap/include/plat/display.h
index ccf35a8..cd7b769 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -564,6 +564,7 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, 
bool enable);
 int omap_dsi_prepare_update(struct omap_dss_device *dssdev,
                                    u16 *x, u16 *y, u16 *w, u16 *h);
 int omap_dsi_update(struct omap_dss_device *dssdev,
+               int channel,
                u16 x, u16 y, u16 w, u16 h,
                void (*callback)(int, void *), void *data);
 
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 79d27de..624d53e 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -233,6 +233,7 @@ static struct
 
        struct completion bta_completion;
 
+       int update_channel;
        struct dsi_update_region update_region;
 
        bool te_enabled;
@@ -2721,7 +2722,7 @@ static void dsi_update_screen_dispc(struct 
omap_dss_device *dssdev,
        unsigned packet_len;
        u32 l;
        bool use_te_trigger;
-       const unsigned channel = 0;
+       const unsigned channel = dsi.update_channel;
        /* line buffer is 1024 x 24bits */
        /* XXX: for some reason using full buffer size causes considerable TX
         * slowdown with update sizes that fill the whole buffer */
@@ -2732,6 +2733,8 @@ static void dsi_update_screen_dispc(struct 
omap_dss_device *dssdev,
        DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
                        x, y, w, h);
 
+       dsi_vc_config_vp(channel);
+
        bytespp = dssdev->ctrl.pixel_size / 8;
        bytespl = w * bytespp;
        bytespf = bytespl * h;
@@ -2799,7 +2802,7 @@ static void dsi_te_timeout(unsigned long arg)
 static void dsi_framedone_timeout_work_callback(struct work_struct *work)
 {
        int r;
-       const int channel = 0;
+       const int channel = dsi.update_channel;
        bool use_te_trigger;
 
        DSSERR("Framedone not received for 250ms!\n");
@@ -2852,7 +2855,7 @@ static void dsi_framedone_irq_callback(void *data, u32 
mask)
 static void dsi_handle_framedone(void)
 {
        int r;
-       const int channel = 0;
+       const int channel = dsi.update_channel;
        bool use_te_trigger;
 
        use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;
@@ -2935,13 +2938,15 @@ int omap_dsi_prepare_update(struct omap_dss_device 
*dssdev,
 EXPORT_SYMBOL(omap_dsi_prepare_update);
 
 int omap_dsi_update(struct omap_dss_device *dssdev,
+               int channel,
                u16 x, u16 y, u16 w, u16 h,
                void (*callback)(int, void *), void *data)
 {
+       dsi.update_channel = channel;
+
        if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
                dsi.framedone_callback = callback;
                dsi.framedone_data = data;
-               dsi_vc_config_vp(0);
 
                dsi.update_region.x = x;
                dsi.update_region.y = y;
-- 
1.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to