mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 20:44:32 +08:00
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
This commit is contained in:
parent
a5f2dcdebd
commit
ea83647d5e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user