mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drm/rockchip: vop2: add support yvyu and vyuy format
Change-Id: I0ed523a57b562a6d2aabcebf6d68a0e77cd31eeb Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -939,6 +939,10 @@ static enum vop2_data_format vop2_convert_format(uint32_t format)
|
||||
case DRM_FORMAT_NV24:
|
||||
return VOP2_FMT_YUV444SP;
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_YVYU:
|
||||
return VOP2_FMT_VYUY422;
|
||||
case DRM_FORMAT_VYUY:
|
||||
case DRM_FORMAT_UYVY:
|
||||
return VOP2_FMT_YUYV422;
|
||||
default:
|
||||
DRM_ERROR("unsupported format[%08x]\n", format);
|
||||
@@ -1089,6 +1093,9 @@ static bool is_yuv_support(uint32_t format)
|
||||
case DRM_FORMAT_NV16:
|
||||
case DRM_FORMAT_NV24:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_UYVY:
|
||||
case DRM_FORMAT_VYUY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -42,6 +42,27 @@ static const uint32_t formats_win_full_10bit[] = {
|
||||
DRM_FORMAT_NV24,
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_full_10bit_yuyv[] = {
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_ABGR8888,
|
||||
DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_BGR888,
|
||||
DRM_FORMAT_RGB565,
|
||||
DRM_FORMAT_BGR565,
|
||||
DRM_FORMAT_NV12,
|
||||
DRM_FORMAT_NV16,
|
||||
DRM_FORMAT_NV24,
|
||||
DRM_FORMAT_NV15,
|
||||
/*
|
||||
* DRM_FORMAT_NV16_10,
|
||||
* DRM_FORMAT_NV24_10,
|
||||
*/
|
||||
DRM_FORMAT_YVYU,
|
||||
DRM_FORMAT_VYUY,
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_lite[] = {
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB8888,
|
||||
@@ -1063,8 +1084,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
{
|
||||
.name = "Esmart0-win0",
|
||||
.phys_id = 2,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x0,
|
||||
.layer_sel_id = 2,
|
||||
@@ -1107,8 +1128,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
{
|
||||
.name = "Esmart1-win0",
|
||||
.phys_id = 3,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x200,
|
||||
.layer_sel_id = 6,
|
||||
|
||||
Reference in New Issue
Block a user