Commit 4b9cdd96 authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 6d86278c
...@@ -946,14 +946,6 @@ static void dispc_ovl_set_color_mode(enum omap_plane_id plane, ...@@ -946,14 +946,6 @@ static void dispc_ovl_set_color_mode(enum omap_plane_id plane,
} }
} else { } else {
switch (color_mode) { 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: case OMAP_DSS_COLOR_RGB12U:
m = 0x4; break; m = 0x4; break;
case OMAP_DSS_COLOR_ARGB16: case OMAP_DSS_COLOR_ARGB16:
...@@ -1878,13 +1870,6 @@ static void dispc_ovl_set_rotation_attrs(enum omap_plane_id plane, u8 rotation, ...@@ -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) static int color_mode_to_bpp(enum omap_color_mode color_mode)
{ {
switch (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: case OMAP_DSS_COLOR_NV12:
return 8; return 8;
case OMAP_DSS_COLOR_RGB12U: case OMAP_DSS_COLOR_RGB12U:
...@@ -1933,14 +1918,7 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror, ...@@ -1933,14 +1918,7 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
{ {
u8 ps; u8 ps;
/* FIXME CLUT formats */
switch (color_mode) { 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_YUV2:
case OMAP_DSS_COLOR_UYVY: case OMAP_DSS_COLOR_UYVY:
ps = 4; ps = 4;
...@@ -2019,18 +1997,7 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror, ...@@ -2019,18 +1997,7 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
u8 ps; u8 ps;
u16 fbw, fbh; u16 fbw, fbh;
/* FIXME CLUT formats */ ps = color_mode_to_bpp(color_mode) / 8;
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;
}
DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width, DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
width, height); width, height);
...@@ -2171,17 +2138,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width, ...@@ -2171,17 +2138,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width,
{ {
u8 ps; u8 ps;
switch (color_mode) { ps = color_mode_to_bpp(color_mode) / 8;
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;
}
DSSDBG("scrw %d, width %d\n", screen_width, width); 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, ...@@ -2582,16 +2539,6 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
2 : max_decim_limit; 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_x = DIV_ROUND_UP(DIV_ROUND_UP(width, out_width), maxdownscale);
decim_y = DIV_ROUND_UP(DIV_ROUND_UP(height, out_height), maxdownscale); decim_y = DIV_ROUND_UP(DIV_ROUND_UP(height, out_height), maxdownscale);
......
...@@ -233,8 +233,6 @@ static const enum omap_dss_output_id omap5_dss_supported_outputs[] = { ...@@ -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[] = { static const enum omap_color_mode omap2_dss_supported_color_modes[] = {
/* OMAP_DSS_GFX */ /* 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_RGB12U | OMAP_DSS_COLOR_RGB16 |
OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P,
...@@ -251,8 +249,6 @@ static const enum omap_color_mode omap2_dss_supported_color_modes[] = { ...@@ -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[] = { static const enum omap_color_mode omap3_dss_supported_color_modes[] = {
/* OMAP_DSS_GFX */ /* 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_RGB12U | OMAP_DSS_COLOR_ARGB16 |
OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
...@@ -273,8 +269,6 @@ static const enum omap_color_mode omap3_dss_supported_color_modes[] = { ...@@ -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[] = { static const enum omap_color_mode omap4_dss_supported_color_modes[] = {
/* OMAP_DSS_GFX */ /* 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_RGB12U | OMAP_DSS_COLOR_ARGB16 |
OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
......
...@@ -92,10 +92,6 @@ enum omap_channel { ...@@ -92,10 +92,6 @@ enum omap_channel {
}; };
enum omap_color_mode { 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_RGB12U = 1 << 4, /* RGB12, 16-bit container */
OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment