summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2020-12-15 12:45:48 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-12-15 16:08:21 +0200
commitea83647d5ee0fc24925db04fb8f3181f8fd8b554 (patch)
treeebfec0b3c67ae423c16c1b53a9904af39c1e5592
parenta5f2dcdebd83f27d8c3e7771b8fc1be0058bd3df (diff)
drm/omap: panel-dsi-cm: drop hardcoded VC
Use dsi->channel everywhere, which originates from DT. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-16-tomi.valkeinen@ti.com
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 0a2f6c1234a9..4e5d4450c155 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -27,9 +27,6 @@
#include "../dss/omapdss.h"
-/* DSI Virtual channel. Hardcoded for now. */
-#define TCH 0
-
#define DCS_READ_NUM_ERRORS 0x05
#define DCS_BRIGHTNESS 0x51
#define DCS_CTRL_DISPLAY 0x53
@@ -73,7 +70,6 @@ struct panel_drv_data {
bool te_enabled;
atomic_t do_update;
- int channel;
struct delayed_work te_timeout_work;
@@ -274,7 +270,7 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata)
return 0;
src->ops->enable(src);
- src->ops->dsi.enable_hs(src, ddata->channel, true);
+ src->ops->dsi.enable_hs(src, ddata->dsi->channel, true);
r = _dsicm_enable_te(ddata, true);
if (r) {
@@ -591,7 +587,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
dsicm_hw_reset(ddata);
- src->ops->dsi.enable_hs(src, ddata->channel, false);
+ src->ops->dsi.enable_hs(src, ddata->dsi->channel, false);
r = dsicm_sleep_out(ddata);
if (r)
@@ -622,7 +618,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
if (r)
goto err;
- r = src->ops->dsi.enable_video_output(src, ddata->channel);
+ r = src->ops->dsi.enable_video_output(src, ddata->dsi->channel);
if (r)
goto err;
@@ -634,7 +630,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
ddata->intro_printed = true;
}
- src->ops->dsi.enable_hs(src, ddata->channel, true);
+ src->ops->dsi.enable_hs(src, ddata->dsi->channel, true);
return 0;
err:
@@ -658,7 +654,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata)
struct omap_dss_device *src = ddata->src;
int r;
- src->ops->dsi.disable_video_output(src, ddata->channel);
+ src->ops->dsi.disable_video_output(src, ddata->dsi->channel);
r = mipi_dsi_dcs_set_display_off(ddata->dsi);
if (!r)
@@ -777,7 +773,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data)
if (old) {
cancel_delayed_work(&ddata->te_timeout_work);
- r = src->ops->dsi.update(src, ddata->channel, dsicm_framedone_cb,
+ r = src->ops->dsi.update(src, ddata->dsi->channel, dsicm_framedone_cb,
ddata);
if (r)
goto err;
@@ -834,7 +830,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
msecs_to_jiffies(250));
atomic_set(&ddata->do_update, 1);
} else {
- r = src->ops->dsi.update(src, ddata->channel, dsicm_framedone_cb,
+ r = src->ops->dsi.update(src, ddata->dsi->channel, dsicm_framedone_cb,
ddata);
if (r)
goto err;
@@ -1110,8 +1106,6 @@ static int dsicm_probe_of(struct mipi_dsi_device *dsi)
struct display_timing timing;
int err;
- ddata->channel = TCH;
-
ddata->reset_gpio = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ddata->reset_gpio)) {
err = PTR_ERR(ddata->reset_gpio);