Commit ea83647d authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Tomi Valkeinen

drm/omap: panel-dsi-cm: drop hardcoded VC

Use dsi->channel everywhere, which originates from DT.
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-16-tomi.valkeinen@ti.com
parent a5f2dcde
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#include "../dss/omapdss.h" #include "../dss/omapdss.h"
/* DSI Virtual channel. Hardcoded for now. */
#define TCH 0
#define DCS_READ_NUM_ERRORS 0x05 #define DCS_READ_NUM_ERRORS 0x05
#define DCS_BRIGHTNESS 0x51 #define DCS_BRIGHTNESS 0x51
#define DCS_CTRL_DISPLAY 0x53 #define DCS_CTRL_DISPLAY 0x53
...@@ -73,7 +70,6 @@ struct panel_drv_data { ...@@ -73,7 +70,6 @@ struct panel_drv_data {
bool te_enabled; bool te_enabled;
atomic_t do_update; atomic_t do_update;
int channel;
struct delayed_work te_timeout_work; struct delayed_work te_timeout_work;
...@@ -274,7 +270,7 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata) ...@@ -274,7 +270,7 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata)
return 0; return 0;
src->ops->enable(src); 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); r = _dsicm_enable_te(ddata, true);
if (r) { if (r) {
...@@ -591,7 +587,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) ...@@ -591,7 +587,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
dsicm_hw_reset(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); r = dsicm_sleep_out(ddata);
if (r) if (r)
...@@ -622,7 +618,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) ...@@ -622,7 +618,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
if (r) if (r)
goto err; 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) if (r)
goto err; goto err;
...@@ -634,7 +630,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) ...@@ -634,7 +630,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
ddata->intro_printed = true; 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; return 0;
err: err:
...@@ -658,7 +654,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata) ...@@ -658,7 +654,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata)
struct omap_dss_device *src = ddata->src; struct omap_dss_device *src = ddata->src;
int r; 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); r = mipi_dsi_dcs_set_display_off(ddata->dsi);
if (!r) if (!r)
...@@ -777,7 +773,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data) ...@@ -777,7 +773,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data)
if (old) { if (old) {
cancel_delayed_work(&ddata->te_timeout_work); 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); ddata);
if (r) if (r)
goto err; goto err;
...@@ -834,7 +830,7 @@ static int dsicm_update(struct omap_dss_device *dssdev, ...@@ -834,7 +830,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
msecs_to_jiffies(250)); msecs_to_jiffies(250));
atomic_set(&ddata->do_update, 1); atomic_set(&ddata->do_update, 1);
} else { } 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); ddata);
if (r) if (r)
goto err; goto err;
...@@ -1110,8 +1106,6 @@ static int dsicm_probe_of(struct mipi_dsi_device *dsi) ...@@ -1110,8 +1106,6 @@ static int dsicm_probe_of(struct mipi_dsi_device *dsi)
struct display_timing timing; struct display_timing timing;
int err; int err;
ddata->channel = TCH;
ddata->reset_gpio = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); ddata->reset_gpio = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ddata->reset_gpio)) { if (IS_ERR(ddata->reset_gpio)) {
err = PTR_ERR(ddata->reset_gpio); err = PTR_ERR(ddata->reset_gpio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment