0003-drm-omap-panel-dsi-cm-use-defines-from-mipi_display..patch (2077B)
1 From 013999e09d13087a9eb4922df3099f5e71035031 Mon Sep 17 00:00:00 2001 2 From: =?UTF-8?q?Filip=20Matijevi=C4=87?= <filip.matijevic.pz@gmail.com> 3 Date: Sat, 28 Oct 2017 14:39:23 +0200 4 Subject: [PATCH 03/11] drm/omap: panel-dsi-cm: use defines from mipi_display.h 5 MIME-Version: 1.0 6 Content-Type: text/plain; charset=UTF-8 7 Content-Transfer-Encoding: 8bit 8 9 Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com> 10 --- 11 drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 12 ++++++------ 12 1 file changed, 6 insertions(+), 6 deletions(-) 13 14 diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c 15 index 7a63d6775a27..418cf5dd2d69 100644 16 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c 17 +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c 18 @@ -33,8 +33,6 @@ 19 #define TCH 0 20 21 #define DCS_READ_NUM_ERRORS 0x05 22 -#define DCS_BRIGHTNESS 0x51 23 -#define DCS_CTRL_DISPLAY 0x53 24 #define DCS_GET_ID1 0xda 25 #define DCS_GET_ID2 0xdb 26 #define DCS_GET_ID3 0xdc 27 @@ -386,7 +384,8 @@ static int dsicm_bl_update_status(struct backlight_device *dev) 28 29 r = dsicm_wake_up(ddata); 30 if (!r) 31 - r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level); 32 + r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, 33 + level); 34 35 in->ops.dsi->bus_unlock(in); 36 } 37 @@ -668,11 +667,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata) 38 if (r) 39 goto err; 40 41 - r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); 42 + r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, 0xff); 43 if (r) 44 goto err; 45 46 - r = dsicm_dcs_write_1(ddata, DCS_CTRL_DISPLAY, 47 + r = dsicm_dcs_write_1(ddata, MIPI_DCS_WRITE_CONTROL_DISPLAY, 48 (1<<2) | (1<<5)); /* BL | BCTRL */ 49 if (r) 50 goto err; 51 @@ -1101,7 +1100,8 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev, 52 goto err2; 53 54 while (buf_used < size) { 55 - u8 dcs_cmd = first ? 0x2e : 0x3e; 56 + u8 dcs_cmd = first ? MIPI_DCS_READ_MEMORY_START : 57 + MIPI_DCS_READ_MEMORY_CONTINUE; 58 first = 0; 59 60 r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, 61 -- 62 2.14.1 63