From 249c4f538b1aae55d41699f8bafc6cb762a7f48f Mon Sep 17 00:00:00 2001 From: Deepak M Date: Wed, 30 Mar 2016 17:03:39 +0300 Subject: drm: Add new DCS commands in the enum list Adding new DCS commands which are specified in the DCS 1.3 spec related to CABC. v2: Sorted the Macro`s by value (Andrzej) v3 by Jani: sort all of enum, refer to MIPI DCS 1.3 Cc: Andrzej Hajda Cc: Thierry Reding Cc: David Airlie Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Suggested-by: Jani Nikula Signed-off-by: Deepak M Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1459346623-30752-1-git-send-email-jani.nikula@intel.com --- include/video/mipi_display.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/video') diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h index ddcc8ca7316b..19aa65a35546 100644 --- a/include/video/mipi_display.h +++ b/include/video/mipi_display.h @@ -115,6 +115,14 @@ enum { MIPI_DCS_READ_MEMORY_CONTINUE = 0x3E, MIPI_DCS_SET_TEAR_SCANLINE = 0x44, MIPI_DCS_GET_SCANLINE = 0x45, + MIPI_DCS_SET_DISPLAY_BRIGHTNESS = 0x51, /* MIPI DCS 1.3 */ + MIPI_DCS_GET_DISPLAY_BRIGHTNESS = 0x52, /* MIPI DCS 1.3 */ + MIPI_DCS_WRITE_CONTROL_DISPLAY = 0x53, /* MIPI DCS 1.3 */ + MIPI_DCS_GET_CONTROL_DISPLAY = 0x54, /* MIPI DCS 1.3 */ + MIPI_DCS_WRITE_POWER_SAVE = 0x55, /* MIPI DCS 1.3 */ + MIPI_DCS_GET_POWER_SAVE = 0x56, /* MIPI DCS 1.3 */ + MIPI_DCS_SET_CABC_MIN_BRIGHTNESS = 0x5E, /* MIPI DCS 1.3 */ + MIPI_DCS_GET_CABC_MIN_BRIGHTNESS = 0x5F, /* MIPI DCS 1.3 */ MIPI_DCS_READ_DDB_START = 0xA1, MIPI_DCS_READ_DDB_CONTINUE = 0xA8, }; -- cgit v1.2.3-55-g7522 From b5bf0f1ea3658254bd72ef64abc97786e8a32255 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Tue, 12 Apr 2016 09:59:11 +0900 Subject: drm/exynos: clean up register definions for fimd and decon This patch removes suffixes from I80 relevant register definitions, which are misleading. This is based on top of below patch set, http://www.spinics.net/lists/dri-devel/msg104057.html Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 23 +++++++++++------------ include/video/exynos5433_decon.h | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) (limited to 'include/video') diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 9051c9ac685a..4ab5bfc23647 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -121,7 +121,7 @@ static void decon_setup_trigger(struct decon_context *ctx) ? TRIGCON_TRIGEN_PER_F | TRIGCON_TRIGEN_F | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN : TRIGCON_TRIGEN_PER_F | TRIGCON_TRIGEN_F | - TRIGCON_HWTRIGMASK_I80_RGB | TRIGCON_HWTRIGEN_I80_RGB; + TRIGCON_HWTRIGMASK | TRIGCON_HWTRIGEN; writel(val, ctx->addr + DECON_TRIGCON); } diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index c9828eb8c9c9..547d759a0a6f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -68,15 +68,15 @@ /* color key value register for hardware window 1 ~ 4. */ #define WKEYCON1_BASE(x) ((WKEYCON1 + 0x140) + ((x - 1) * 8)) -/* I80 / RGB trigger control register */ +/* I80 trigger control register */ #define TRIGCON 0x1A4 -#define TRGMODE_I80_RGB_ENABLE_I80 (1 << 0) -#define SWTRGCMD_I80_RGB_ENABLE (1 << 1) +#define TRGMODE_ENABLE (1 << 0) +#define SWTRGCMD_ENABLE (1 << 1) /* Exynos3250, 3472, 4415, 5260 5410, 5420 and 5422 only supported. */ -#define HWTRGEN_I80_RGB_ENABLE (1 << 3) -#define HWTRGMASK_I80_RGB_ENABLE (1 << 4) +#define HWTRGEN_ENABLE (1 << 3) +#define HWTRGMASK_ENABLE (1 << 4) /* Exynos3250, 3472, 4415, 5260, 5420 and 5422 only supported. */ -#define HWTRIGEN_PER_RGB_ENABLE (1 << 31) +#define HWTRIGEN_PER_ENABLE (1 << 31) /* display mode change control register except exynos4 */ #define VIDOUT_CON 0x000 @@ -420,16 +420,15 @@ static void fimd_setup_trigger(struct fimd_context *ctx) u32 trg_type = ctx->driver_data->trg_type; u32 val = readl(timing_base + TRIGCON); - val &= ~(TRGMODE_I80_RGB_ENABLE_I80); + val &= ~(TRGMODE_ENABLE); if (trg_type == I80_HW_TRG) { if (ctx->driver_data->has_hw_trigger) - val |= HWTRGEN_I80_RGB_ENABLE | - HWTRGMASK_I80_RGB_ENABLE; + val |= HWTRGEN_ENABLE | HWTRGMASK_ENABLE; if (ctx->driver_data->has_trigger_per_te) - val |= HWTRIGEN_PER_RGB_ENABLE; + val |= HWTRIGEN_PER_ENABLE; } else { - val |= TRGMODE_I80_RGB_ENABLE_I80; + val |= TRGMODE_ENABLE; } writel(val, timing_base + TRIGCON); @@ -879,7 +878,7 @@ static void fimd_trigger(struct device *dev) atomic_set(&ctx->triggering, 1); reg = readl(timing_base + TRIGCON); - reg |= (TRGMODE_I80_RGB_ENABLE_I80 | SWTRGCMD_I80_RGB_ENABLE); + reg |= (TRGMODE_ENABLE | SWTRGCMD_ENABLE); writel(reg, timing_base + TRIGCON); /* diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h index c1c1ca18abc0..0098a522d9f4 100644 --- a/include/video/exynos5433_decon.h +++ b/include/video/exynos5433_decon.h @@ -179,9 +179,9 @@ #define TRIGCON_TRIGMODE_W1BUF (1 << 10) #define TRIGCON_SWTRIGCMD_W0BUF (1 << 6) #define TRIGCON_TRIGMODE_W0BUF (1 << 5) -#define TRIGCON_HWTRIGMASK_I80_RGB (1 << 4) -#define TRIGCON_HWTRIGEN_I80_RGB (1 << 3) -#define TRIGCON_HWTRIG_INV_I80_RGB (1 << 2) +#define TRIGCON_HWTRIGMASK (1 << 4) +#define TRIGCON_HWTRIGEN (1 << 3) +#define TRIGCON_HWTRIG_INV (1 << 2) #define TRIGCON_SWTRIGCMD (1 << 1) #define TRIGCON_SWTRIGEN (1 << 0) -- cgit v1.2.3-55-g7522