2018-05-12 18:31:44 +00:00
|
|
|
From 593a007e969e7d71725a05abf86636185cccfcc0 Mon Sep 17 00:00:00 2001
|
2018-01-09 16:42:55 +00:00
|
|
|
From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com>
|
|
|
|
Date: Sat, 28 Oct 2017 14:39:23 +0200
|
2018-03-03 11:01:35 +00:00
|
|
|
Subject: [PATCH 03/11] drm/omap: panel-dsi-cm: use defines from mipi_display.h
|
2018-01-09 16:42:55 +00:00
|
|
|
MIME-Version: 1.0
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
|
|
Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
|
|
|
|
---
|
|
|
|
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 12 ++++++------
|
|
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
|
2018-05-12 18:31:44 +00:00
|
|
|
index d096185683cb..09ddbb001123 100644
|
2018-01-09 16:42:55 +00:00
|
|
|
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
|
|
|
|
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
|
|
|
|
@@ -33,8 +33,6 @@
|
|
|
|
#define TCH 0
|
2018-03-03 11:01:35 +00:00
|
|
|
|
2018-01-09 16:42:55 +00:00
|
|
|
#define DCS_READ_NUM_ERRORS 0x05
|
|
|
|
-#define DCS_BRIGHTNESS 0x51
|
|
|
|
-#define DCS_CTRL_DISPLAY 0x53
|
|
|
|
#define DCS_GET_ID1 0xda
|
|
|
|
#define DCS_GET_ID2 0xdb
|
|
|
|
#define DCS_GET_ID3 0xdc
|
2018-03-03 11:01:35 +00:00
|
|
|
@@ -386,7 +384,8 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
|
|
|
|
|
|
|
|
r = dsicm_wake_up(ddata);
|
|
|
|
if (!r)
|
2018-01-09 16:42:55 +00:00
|
|
|
- r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level);
|
|
|
|
+ r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
|
|
|
|
+ level);
|
2018-03-03 11:01:35 +00:00
|
|
|
|
|
|
|
in->ops.dsi->bus_unlock(in);
|
|
|
|
}
|
|
|
|
@@ -668,11 +667,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
|
|
|
|
if (r)
|
|
|
|
goto err;
|
|
|
|
|
2018-01-09 16:42:55 +00:00
|
|
|
- r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff);
|
|
|
|
+ r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, 0xff);
|
2018-03-03 11:01:35 +00:00
|
|
|
if (r)
|
|
|
|
goto err;
|
|
|
|
|
2018-01-09 16:42:55 +00:00
|
|
|
- r = dsicm_dcs_write_1(ddata, DCS_CTRL_DISPLAY,
|
|
|
|
+ r = dsicm_dcs_write_1(ddata, MIPI_DCS_WRITE_CONTROL_DISPLAY,
|
2018-03-03 11:01:35 +00:00
|
|
|
(1<<2) | (1<<5)); /* BL | BCTRL */
|
|
|
|
if (r)
|
|
|
|
goto err;
|
2018-05-12 18:31:44 +00:00
|
|
|
@@ -1113,7 +1112,8 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev,
|
2018-03-03 11:01:35 +00:00
|
|
|
goto err2;
|
|
|
|
|
|
|
|
while (buf_used < size) {
|
2018-01-09 16:42:55 +00:00
|
|
|
- u8 dcs_cmd = first ? 0x2e : 0x3e;
|
|
|
|
+ u8 dcs_cmd = first ? MIPI_DCS_READ_MEMORY_START :
|
|
|
|
+ MIPI_DCS_READ_MEMORY_CONTINUE;
|
2018-03-03 11:01:35 +00:00
|
|
|
first = 0;
|
|
|
|
|
|
|
|
r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd,
|
|
|
|
--
|
2018-05-12 18:31:44 +00:00
|
|
|
2.17.0
|
2018-03-03 11:01:35 +00:00
|
|
|
|