#include <linux/regmap.h>
#include <linux/of.h>
#include <linux/component.h>
+#include <drm/drm_fourcc.h>
#include "omapdss.h"
#include "dss.h"
*/
DISPC_COLOR_COMPONENT_RGB_Y = 1 << 0,
/* used for UV component for
- * OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_UYVY, OMAP_DSS_COLOR_NV12
+ * DRM_FORMAT_YUYV, DRM_FORMAT_UYVY, DRM_FORMAT_NV12
* color formats on OMAP4
*/
DISPC_COLOR_COMPONENT_UV = 1 << 1,
u32 m = 0;
if (plane != OMAP_DSS_GFX) {
switch (color_mode) {
- case OMAP_DSS_COLOR_NV12:
+ case DRM_FORMAT_NV12:
m = 0x0; break;
- case OMAP_DSS_COLOR_RGBX16:
+ case DRM_FORMAT_XRGB4444:
m = 0x1; break;
- case OMAP_DSS_COLOR_RGBA16:
+ case DRM_FORMAT_RGBA4444:
m = 0x2; break;
- case OMAP_DSS_COLOR_RGB12U:
+ case DRM_FORMAT_RGBX4444:
m = 0x4; break;
- case OMAP_DSS_COLOR_ARGB16:
+ case DRM_FORMAT_ARGB4444:
m = 0x5; break;
- case OMAP_DSS_COLOR_RGB16:
+ case DRM_FORMAT_RGB565:
m = 0x6; break;
- case OMAP_DSS_COLOR_ARGB16_1555:
+ case DRM_FORMAT_ARGB1555:
m = 0x7; break;
- case OMAP_DSS_COLOR_RGB24U:
+ case DRM_FORMAT_XRGB8888:
m = 0x8; break;
- case OMAP_DSS_COLOR_RGB24P:
+ case DRM_FORMAT_RGB888:
m = 0x9; break;
- case OMAP_DSS_COLOR_YUV2:
+ case DRM_FORMAT_YUYV:
m = 0xa; break;
- case OMAP_DSS_COLOR_UYVY:
+ case DRM_FORMAT_UYVY:
m = 0xb; break;
- case OMAP_DSS_COLOR_ARGB32:
+ case DRM_FORMAT_ARGB8888:
m = 0xc; break;
- case OMAP_DSS_COLOR_RGBA32:
+ case DRM_FORMAT_RGBA8888:
m = 0xd; break;
- case OMAP_DSS_COLOR_RGBX32:
+ case DRM_FORMAT_RGBX8888:
m = 0xe; break;
- case OMAP_DSS_COLOR_XRGB16_1555:
+ case DRM_FORMAT_XRGB1555:
m = 0xf; break;
default:
BUG(); return;
}
} else {
switch (color_mode) {
- case OMAP_DSS_COLOR_RGB12U:
+ case DRM_FORMAT_RGBX4444:
m = 0x4; break;
- case OMAP_DSS_COLOR_ARGB16:
+ case DRM_FORMAT_ARGB4444:
m = 0x5; break;
- case OMAP_DSS_COLOR_RGB16:
+ case DRM_FORMAT_RGB565:
m = 0x6; break;
- case OMAP_DSS_COLOR_ARGB16_1555:
+ case DRM_FORMAT_ARGB1555:
m = 0x7; break;
- case OMAP_DSS_COLOR_RGB24U:
+ case DRM_FORMAT_XRGB8888:
m = 0x8; break;
- case OMAP_DSS_COLOR_RGB24P:
+ case DRM_FORMAT_RGB888:
m = 0x9; break;
- case OMAP_DSS_COLOR_RGBX16:
+ case DRM_FORMAT_XRGB4444:
m = 0xa; break;
- case OMAP_DSS_COLOR_RGBA16:
+ case DRM_FORMAT_RGBA4444:
m = 0xb; break;
- case OMAP_DSS_COLOR_ARGB32:
+ case DRM_FORMAT_ARGB8888:
m = 0xc; break;
- case OMAP_DSS_COLOR_RGBA32:
+ case DRM_FORMAT_RGBA8888:
m = 0xd; break;
- case OMAP_DSS_COLOR_RGBX32:
+ case DRM_FORMAT_RGBX8888:
m = 0xe; break;
- case OMAP_DSS_COLOR_XRGB16_1555:
+ case DRM_FORMAT_XRGB1555:
m = 0xf; break;
default:
BUG(); return;
static bool format_is_yuv(u32 color_mode)
{
switch (color_mode) {
- case OMAP_DSS_COLOR_YUV2:
- case OMAP_DSS_COLOR_UYVY:
- case OMAP_DSS_COLOR_NV12:
+ case DRM_FORMAT_YUYV:
+ case DRM_FORMAT_UYVY:
+ case DRM_FORMAT_NV12:
return true;
default:
return false;
}
switch (color_mode) {
- case OMAP_DSS_COLOR_NV12:
+ case DRM_FORMAT_NV12:
if (ilace)
accu_table = accu_nv12_ilace;
else
accu_table = accu_nv12;
break;
- case OMAP_DSS_COLOR_YUV2:
- case OMAP_DSS_COLOR_UYVY:
+ case DRM_FORMAT_YUYV:
+ case DRM_FORMAT_UYVY:
accu_table = accu_yuv;
break;
default:
out_height, ilace, color_mode, rotation);
switch (color_mode) {
- case OMAP_DSS_COLOR_NV12:
+ case DRM_FORMAT_NV12:
if (chroma_upscale) {
/* UV is subsampled by 2 horizontally and vertically */
orig_height >>= 1;
}
break;
- case OMAP_DSS_COLOR_YUV2:
- case OMAP_DSS_COLOR_UYVY:
+ case DRM_FORMAT_YUYV:
+ case DRM_FORMAT_UYVY:
/* For YUV422 with 90/270 rotation, we don't upsample chroma */
if (rotation == OMAP_DSS_ROT_0 ||
rotation == OMAP_DSS_ROT_180) {
bool row_repeat = false;
int vidrot = 0;
- if (color_mode == OMAP_DSS_COLOR_YUV2 ||
- color_mode == OMAP_DSS_COLOR_UYVY) {
+ if (color_mode == DRM_FORMAT_YUYV ||
+ color_mode == DRM_FORMAT_UYVY) {
if (mirroring) {
switch (rotation) {
* NV12 in 1D mode must use ROTATION=1. Otherwise DSS will fetch extra
* rows beyond the framebuffer, which may cause OCP error.
*/
- if (color_mode == OMAP_DSS_COLOR_NV12 &&
+ if (color_mode == DRM_FORMAT_NV12 &&
rotation_type != OMAP_DSS_ROT_TILER)
vidrot = 1;
REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane),
row_repeat ? 1 : 0, 18, 18);
- if (dss_feat_color_mode_supported(plane, OMAP_DSS_COLOR_NV12)) {
+ if (dss_feat_color_mode_supported(plane, DRM_FORMAT_NV12)) {
bool doublestride =
- color_mode == OMAP_DSS_COLOR_NV12 &&
+ color_mode == DRM_FORMAT_NV12 &&
rotation_type == OMAP_DSS_ROT_TILER &&
(rotation == OMAP_DSS_ROT_0 || rotation == OMAP_DSS_ROT_180);
static int color_mode_to_bpp(u32 color_mode)
{
switch (color_mode) {
- case OMAP_DSS_COLOR_NV12:
+ case DRM_FORMAT_NV12:
return 8;
- case OMAP_DSS_COLOR_RGB12U:
- case OMAP_DSS_COLOR_RGB16:
- case OMAP_DSS_COLOR_ARGB16:
- case OMAP_DSS_COLOR_YUV2:
- case OMAP_DSS_COLOR_UYVY:
- case OMAP_DSS_COLOR_RGBA16:
- case OMAP_DSS_COLOR_RGBX16:
- case OMAP_DSS_COLOR_ARGB16_1555:
- case OMAP_DSS_COLOR_XRGB16_1555:
+ case DRM_FORMAT_RGBX4444:
+ case DRM_FORMAT_RGB565:
+ case DRM_FORMAT_ARGB4444:
+ case DRM_FORMAT_YUYV:
+ case DRM_FORMAT_UYVY:
+ case DRM_FORMAT_RGBA4444:
+ case DRM_FORMAT_XRGB4444:
+ case DRM_FORMAT_ARGB1555:
+ case DRM_FORMAT_XRGB1555:
return 16;
- case OMAP_DSS_COLOR_RGB24P:
+ case DRM_FORMAT_RGB888:
return 24;
- case OMAP_DSS_COLOR_RGB24U:
- case OMAP_DSS_COLOR_ARGB32:
- case OMAP_DSS_COLOR_RGBA32:
- case OMAP_DSS_COLOR_RGBX32:
+ case DRM_FORMAT_XRGB8888:
+ case DRM_FORMAT_ARGB8888:
+ case DRM_FORMAT_RGBA8888:
+ case DRM_FORMAT_RGBX8888:
return 32;
default:
BUG();
*row_inc = pixinc(1 + (y_predecim * screen_width - width * x_predecim) +
(fieldmode ? screen_width : 0), ps);
- if (color_mode == OMAP_DSS_COLOR_YUV2 ||
- color_mode == OMAP_DSS_COLOR_UYVY)
+ if (color_mode == DRM_FORMAT_YUYV ||
+ color_mode == DRM_FORMAT_UYVY)
*pix_inc = pixinc(x_predecim, 2 * ps);
else
*pix_inc = pixinc(x_predecim, ps);
do_div(tmp, out_width);
core_clk = max_t(u32, core_clk, tmp);
- if (color_mode == OMAP_DSS_COLOR_RGB24U)
+ if (color_mode == DRM_FORMAT_XRGB8888)
core_clk <<= 1;
}
return -EINVAL;
}
- if (*decim_x > 4 && color_mode != OMAP_DSS_COLOR_NV12) {
+ if (*decim_x > 4 && color_mode != DRM_FORMAT_NV12) {
/*
* Let's disable all scaling that requires horizontal
* decimation with higher factor than 4, until we have
dispc_ovl_set_ba0(plane, paddr + offset0);
dispc_ovl_set_ba1(plane, paddr + offset1);
- if (OMAP_DSS_COLOR_NV12 == color_mode) {
+ if (color_mode == DRM_FORMAT_NV12) {
dispc_ovl_set_ba0_uv(plane, p_uv_addr + offset0);
dispc_ovl_set_ba1_uv(plane, p_uv_addr + offset1);
}
replication, vm, mem_to_mem);
switch (wi->color_mode) {
- case OMAP_DSS_COLOR_RGB16:
- case OMAP_DSS_COLOR_RGB24P:
- case OMAP_DSS_COLOR_ARGB16:
- case OMAP_DSS_COLOR_RGBA16:
- case OMAP_DSS_COLOR_RGB12U:
- case OMAP_DSS_COLOR_ARGB16_1555:
- case OMAP_DSS_COLOR_XRGB16_1555:
- case OMAP_DSS_COLOR_RGBX16:
+ case DRM_FORMAT_RGB565:
+ case DRM_FORMAT_RGB888:
+ case DRM_FORMAT_ARGB4444:
+ case DRM_FORMAT_RGBA4444:
+ case DRM_FORMAT_RGBX4444:
+ case DRM_FORMAT_ARGB1555:
+ case DRM_FORMAT_XRGB1555:
+ case DRM_FORMAT_XRGB4444:
truncation = true;
break;
default:
.ovli = {
.screen_width = 1,
.width = 1, .height = 1,
- .color_mode = OMAP_DSS_COLOR_RGB24U,
+ .color_mode = DRM_FORMAT_XRGB8888,
.rotation = OMAP_DSS_ROT_0,
.rotation_type = OMAP_DSS_ROT_NONE,
.mirror = 0,
#include <linux/types.h>
#include <linux/err.h>
#include <linux/slab.h>
+#include <drm/drm_fourcc.h>
#include "omapdss.h"
#include "dss.h"
/* OMAP_DSS_GFX */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB12U, OMAP_DSS_COLOR_RGB16,
- OMAP_DSS_COLOR_RGB24U, OMAP_DSS_COLOR_RGB24P),
+ DRM_FORMAT_RGBX4444, DRM_FORMAT_RGB565,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_RGB888),
/* OMAP_DSS_VIDEO1 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_YUV2,
- OMAP_DSS_COLOR_UYVY),
+ DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_YUYV,
+ DRM_FORMAT_UYVY),
/* OMAP_DSS_VIDEO2 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_YUV2,
- OMAP_DSS_COLOR_UYVY),
+ DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_YUYV,
+ DRM_FORMAT_UYVY),
};
static const u32 *omap3_dss_supported_color_modes[] = {
/* OMAP_DSS_GFX */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB12U, OMAP_DSS_COLOR_ARGB16,
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_ARGB32,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGBX4444, DRM_FORMAT_ARGB4444,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_RGBX8888),
/* OMAP_DSS_VIDEO1 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB24U, OMAP_DSS_COLOR_RGB24P,
- OMAP_DSS_COLOR_RGB12U, OMAP_DSS_COLOR_RGB16,
- OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_UYVY),
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_RGB888,
+ DRM_FORMAT_RGBX4444, DRM_FORMAT_RGB565,
+ DRM_FORMAT_YUYV, DRM_FORMAT_UYVY),
/* OMAP_DSS_VIDEO2 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB12U, OMAP_DSS_COLOR_ARGB16,
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_YUV2,
- OMAP_DSS_COLOR_UYVY, OMAP_DSS_COLOR_ARGB32,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGBX4444, DRM_FORMAT_ARGB4444,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_YUYV,
+ DRM_FORMAT_UYVY, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_RGBX8888),
};
static const u32 *omap4_dss_supported_color_modes[] = {
/* OMAP_DSS_GFX */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB12U, OMAP_DSS_COLOR_ARGB16,
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_ARGB32,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_RGBX32,
- OMAP_DSS_COLOR_ARGB16_1555, OMAP_DSS_COLOR_RGBX16,
- OMAP_DSS_COLOR_RGBA16, OMAP_DSS_COLOR_XRGB16_1555),
+ DRM_FORMAT_RGBX4444, DRM_FORMAT_ARGB4444,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_RGBX8888,
+ DRM_FORMAT_ARGB1555, DRM_FORMAT_XRGB4444,
+ DRM_FORMAT_RGBA4444, DRM_FORMAT_XRGB1555),
/* OMAP_DSS_VIDEO1 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB12U,
- OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_ARGB16_1555,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_NV12,
- OMAP_DSS_COLOR_RGBA16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_UYVY,
- OMAP_DSS_COLOR_ARGB16, OMAP_DSS_COLOR_XRGB16_1555,
- OMAP_DSS_COLOR_ARGB32, OMAP_DSS_COLOR_RGBX16,
- OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGB565, DRM_FORMAT_RGBX4444,
+ DRM_FORMAT_YUYV, DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_NV12,
+ DRM_FORMAT_RGBA4444, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_UYVY,
+ DRM_FORMAT_ARGB4444, DRM_FORMAT_XRGB1555,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB4444,
+ DRM_FORMAT_RGBX8888),
/* OMAP_DSS_VIDEO2 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB12U,
- OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_ARGB16_1555,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_NV12,
- OMAP_DSS_COLOR_RGBA16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_UYVY,
- OMAP_DSS_COLOR_ARGB16, OMAP_DSS_COLOR_XRGB16_1555,
- OMAP_DSS_COLOR_ARGB32, OMAP_DSS_COLOR_RGBX16,
- OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGB565, DRM_FORMAT_RGBX4444,
+ DRM_FORMAT_YUYV, DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_NV12,
+ DRM_FORMAT_RGBA4444, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_UYVY,
+ DRM_FORMAT_ARGB4444, DRM_FORMAT_XRGB1555,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB4444,
+ DRM_FORMAT_RGBX8888),
/* OMAP_DSS_VIDEO3 */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB12U,
- OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_ARGB16_1555,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_NV12,
- OMAP_DSS_COLOR_RGBA16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_UYVY,
- OMAP_DSS_COLOR_ARGB16, OMAP_DSS_COLOR_XRGB16_1555,
- OMAP_DSS_COLOR_ARGB32, OMAP_DSS_COLOR_RGBX16,
- OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGB565, DRM_FORMAT_RGBX4444,
+ DRM_FORMAT_YUYV, DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_NV12,
+ DRM_FORMAT_RGBA4444, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_UYVY,
+ DRM_FORMAT_ARGB4444, DRM_FORMAT_XRGB1555,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB4444,
+ DRM_FORMAT_RGBX8888),
/* OMAP_DSS_WB */
COLOR_ARRAY(
- OMAP_DSS_COLOR_RGB16, OMAP_DSS_COLOR_RGB12U,
- OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_ARGB16_1555,
- OMAP_DSS_COLOR_RGBA32, OMAP_DSS_COLOR_NV12,
- OMAP_DSS_COLOR_RGBA16, OMAP_DSS_COLOR_RGB24U,
- OMAP_DSS_COLOR_RGB24P, OMAP_DSS_COLOR_UYVY,
- OMAP_DSS_COLOR_ARGB16, OMAP_DSS_COLOR_XRGB16_1555,
- OMAP_DSS_COLOR_ARGB32, OMAP_DSS_COLOR_RGBX16,
- OMAP_DSS_COLOR_RGBX32),
+ DRM_FORMAT_RGB565, DRM_FORMAT_RGBX4444,
+ DRM_FORMAT_YUYV, DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_NV12,
+ DRM_FORMAT_RGBA4444, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_RGB888, DRM_FORMAT_UYVY,
+ DRM_FORMAT_ARGB4444, DRM_FORMAT_XRGB1555,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB4444,
+ DRM_FORMAT_RGBX8888),
};
static const enum omap_overlay_caps omap2_dss_overlay_caps[] = {
};
enum omap_color_mode {
- OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */
- OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
- OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
- OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */
- OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */
- OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
- OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
- OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
- OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
- OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
- OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */
- OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */
- OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */
- OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */
- OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */
+ _UNUSED_,
};
enum omap_dss_load_mode {
uint32_t pixel_format;
} formats[] = {
/* 16bpp [A]RGB: */
- { OMAP_DSS_COLOR_RGB16, DRM_FORMAT_RGB565 }, /* RGB16-565 */
- { OMAP_DSS_COLOR_RGB12U, DRM_FORMAT_RGBX4444 }, /* RGB12x-4444 */
- { OMAP_DSS_COLOR_RGBX16, DRM_FORMAT_XRGB4444 }, /* xRGB12-4444 */
- { OMAP_DSS_COLOR_RGBA16, DRM_FORMAT_RGBA4444 }, /* RGBA12-4444 */
- { OMAP_DSS_COLOR_ARGB16, DRM_FORMAT_ARGB4444 }, /* ARGB16-4444 */
- { OMAP_DSS_COLOR_XRGB16_1555, DRM_FORMAT_XRGB1555 }, /* xRGB15-1555 */
- { OMAP_DSS_COLOR_ARGB16_1555, DRM_FORMAT_ARGB1555 }, /* ARGB16-1555 */
+ { DRM_FORMAT_RGB565, DRM_FORMAT_RGB565 }, /* RGB16-565 */
+ { DRM_FORMAT_RGBX4444, DRM_FORMAT_RGBX4444 }, /* RGB12x-4444 */
+ { DRM_FORMAT_XRGB4444, DRM_FORMAT_XRGB4444 }, /* xRGB12-4444 */
+ { DRM_FORMAT_RGBA4444, DRM_FORMAT_RGBA4444 }, /* RGBA12-4444 */
+ { DRM_FORMAT_ARGB4444, DRM_FORMAT_ARGB4444 }, /* ARGB16-4444 */
+ { DRM_FORMAT_XRGB1555, DRM_FORMAT_XRGB1555 }, /* xRGB15-1555 */
+ { DRM_FORMAT_ARGB1555, DRM_FORMAT_ARGB1555 }, /* ARGB16-1555 */
/* 24bpp RGB: */
- { OMAP_DSS_COLOR_RGB24P, DRM_FORMAT_RGB888 }, /* RGB24-888 */
+ { DRM_FORMAT_RGB888, DRM_FORMAT_RGB888 }, /* RGB24-888 */
/* 32bpp [A]RGB: */
- { OMAP_DSS_COLOR_RGBX32, DRM_FORMAT_RGBX8888 }, /* RGBx24-8888 */
- { OMAP_DSS_COLOR_RGB24U, DRM_FORMAT_XRGB8888 }, /* xRGB24-8888 */
- { OMAP_DSS_COLOR_RGBA32, DRM_FORMAT_RGBA8888 }, /* RGBA32-8888 */
- { OMAP_DSS_COLOR_ARGB32, DRM_FORMAT_ARGB8888 }, /* ARGB32-8888 */
+ { DRM_FORMAT_RGBX8888, DRM_FORMAT_RGBX8888 }, /* RGBx24-8888 */
+ { DRM_FORMAT_XRGB8888, DRM_FORMAT_XRGB8888 }, /* xRGB24-8888 */
+ { DRM_FORMAT_RGBA8888, DRM_FORMAT_RGBA8888 }, /* RGBA32-8888 */
+ { DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB8888 }, /* ARGB32-8888 */
/* YUV: */
- { OMAP_DSS_COLOR_NV12, DRM_FORMAT_NV12 },
- { OMAP_DSS_COLOR_YUV2, DRM_FORMAT_YUYV },
- { OMAP_DSS_COLOR_UYVY, DRM_FORMAT_UYVY },
+ { DRM_FORMAT_NV12, DRM_FORMAT_NV12 },
+ { DRM_FORMAT_YUYV, DRM_FORMAT_YUYV },
+ { DRM_FORMAT_UYVY, DRM_FORMAT_UYVY },
};
/* convert from overlay's pixel formats bitmask to an array of fourcc's */
/* convert to pixels: */
info->screen_width /= format->cpp[0];
- if (omap_fb->dss_format == OMAP_DSS_COLOR_NV12) {
+ if (omap_fb->dss_format == DRM_FORMAT_NV12) {
plane = &omap_fb->planes[1];
if (info->rotation_type == OMAP_DSS_ROT_TILER) {