diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-03-10 11:32:30 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-06-02 10:57:21 +0300 |
commit | 4b9cdd96e7ea3dc2cd0edac67835f6f38c4f14c9 (patch) | |
tree | 7c570d647669feb23661ef950a4a8d430e1ba81b /drivers/gpu/drm/omapdrm | |
parent | 6d86278c9ddb2026727a6a9ba5a4550561aea940 (diff) | |
download | linux-4b9cdd96e7ea3dc2cd0edac67835f6f38c4f14c9.tar.xz |
drm/omap: remove CLUT
DSS IP versions 2 and 3 support CLUT modes (color lookup table), but the
driver has never supported those. We still have had some code for CLUT
modes. As the newer DSS IP versions have dropped CLUT support, we might
as well clean up the driver by removing the CLUT related code.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dispc.c | 57 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dss_features.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 |
3 files changed, 2 insertions, 65 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index afefdcfdde6c..802d3e72843b 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -946,14 +946,6 @@ static void dispc_ovl_set_color_mode(enum omap_plane_id plane, } } else { switch (color_mode) { - case OMAP_DSS_COLOR_CLUT1: - m = 0x0; break; - case OMAP_DSS_COLOR_CLUT2: - m = 0x1; break; - case OMAP_DSS_COLOR_CLUT4: - m = 0x2; break; - case OMAP_DSS_COLOR_CLUT8: - m = 0x3; break; case OMAP_DSS_COLOR_RGB12U: m = 0x4; break; case OMAP_DSS_COLOR_ARGB16: @@ -1878,13 +1870,6 @@ static void dispc_ovl_set_rotation_attrs(enum omap_plane_id plane, u8 rotation, static int color_mode_to_bpp(enum omap_color_mode color_mode) { switch (color_mode) { - case OMAP_DSS_COLOR_CLUT1: - return 1; - case OMAP_DSS_COLOR_CLUT2: - return 2; - case OMAP_DSS_COLOR_CLUT4: - return 4; - case OMAP_DSS_COLOR_CLUT8: case OMAP_DSS_COLOR_NV12: return 8; case OMAP_DSS_COLOR_RGB12U: @@ -1933,14 +1918,7 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror, { u8 ps; - /* FIXME CLUT formats */ switch (color_mode) { - case OMAP_DSS_COLOR_CLUT1: - case OMAP_DSS_COLOR_CLUT2: - case OMAP_DSS_COLOR_CLUT4: - case OMAP_DSS_COLOR_CLUT8: - BUG(); - return; case OMAP_DSS_COLOR_YUV2: case OMAP_DSS_COLOR_UYVY: ps = 4; @@ -2019,18 +1997,7 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror, u8 ps; u16 fbw, fbh; - /* FIXME CLUT formats */ - switch (color_mode) { - case OMAP_DSS_COLOR_CLUT1: - case OMAP_DSS_COLOR_CLUT2: - case OMAP_DSS_COLOR_CLUT4: - case OMAP_DSS_COLOR_CLUT8: - BUG(); - return; - default: - ps = color_mode_to_bpp(color_mode) / 8; - break; - } + ps = color_mode_to_bpp(color_mode) / 8; DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width, width, height); @@ -2171,17 +2138,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width, { u8 ps; - switch (color_mode) { - case OMAP_DSS_COLOR_CLUT1: - case OMAP_DSS_COLOR_CLUT2: - case OMAP_DSS_COLOR_CLUT4: - case OMAP_DSS_COLOR_CLUT8: - BUG(); - return; - default: - ps = color_mode_to_bpp(color_mode) / 8; - break; - } + ps = color_mode_to_bpp(color_mode) / 8; DSSDBG("scrw %d, width %d\n", screen_width, width); @@ -2582,16 +2539,6 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, 2 : max_decim_limit; } - if (color_mode == OMAP_DSS_COLOR_CLUT1 || - color_mode == OMAP_DSS_COLOR_CLUT2 || - color_mode == OMAP_DSS_COLOR_CLUT4 || - color_mode == OMAP_DSS_COLOR_CLUT8) { - *x_predecim = 1; - *y_predecim = 1; - *five_taps = false; - return 0; - } - decim_x = DIV_ROUND_UP(DIV_ROUND_UP(width, out_width), maxdownscale); decim_y = DIV_ROUND_UP(DIV_ROUND_UP(height, out_height), maxdownscale); diff --git a/drivers/gpu/drm/omapdrm/dss/dss_features.c b/drivers/gpu/drm/omapdrm/dss/dss_features.c index 80c6440a0e08..135b2a511cf0 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss_features.c +++ b/drivers/gpu/drm/omapdrm/dss/dss_features.c @@ -233,8 +233,6 @@ static const enum omap_dss_output_id omap5_dss_supported_outputs[] = { static const enum omap_color_mode omap2_dss_supported_color_modes[] = { /* OMAP_DSS_GFX */ - OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | - OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P, @@ -251,8 +249,6 @@ static const enum omap_color_mode omap2_dss_supported_color_modes[] = { static const enum omap_color_mode omap3_dss_supported_color_modes[] = { /* OMAP_DSS_GFX */ - OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | - OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 | @@ -273,8 +269,6 @@ static const enum omap_color_mode omap3_dss_supported_color_modes[] = { static const enum omap_color_mode omap4_dss_supported_color_modes[] = { /* OMAP_DSS_GFX */ - OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | - OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 | diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 071bfa0089d9..51d2403c201b 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -92,10 +92,6 @@ enum omap_channel { }; enum omap_color_mode { - OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */ - OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */ - OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */ - OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */ OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */ OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ |