mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: vop: add support yuv10bit format
Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I720fd9809ed2b628afae086aa64958fdbe4ee2de
This commit is contained in:
@@ -43,6 +43,14 @@ struct iommu_domain;
|
||||
#define VOP_OUTPUT_IF_HDMI0 BIT(11)
|
||||
#define VOP_OUTPUT_IF_HDMI1 BIT(12)
|
||||
|
||||
#ifndef DRM_FORMAT_NV20
|
||||
#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */
|
||||
#endif
|
||||
|
||||
#ifndef DRM_FORMAT_NV30
|
||||
#define DRM_FORMAT_NV30 fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */
|
||||
#endif
|
||||
|
||||
struct rockchip_drm_sub_dev {
|
||||
struct list_head list;
|
||||
struct drm_connector *connector;
|
||||
|
||||
@@ -602,7 +602,10 @@ static enum vop_data_format vop_convert_format(uint32_t format)
|
||||
case DRM_FORMAT_NV24:
|
||||
case DRM_FORMAT_NV30:
|
||||
return VOP_FMT_YUV444SP;
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_VYUY:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_UYVY:
|
||||
return VOP_FMT_YUYV;
|
||||
default:
|
||||
DRM_ERROR("unsupported format[%08x]\n", format);
|
||||
@@ -677,7 +680,10 @@ static bool is_yuv_support(uint32_t format)
|
||||
case DRM_FORMAT_NV20:
|
||||
case DRM_FORMAT_NV24:
|
||||
case DRM_FORMAT_NV30:
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_VYUY:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_UYVY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -687,7 +693,10 @@ static bool is_yuv_support(uint32_t format)
|
||||
static bool is_yuyv_format(uint32_t format)
|
||||
{
|
||||
switch (format) {
|
||||
case DRM_FORMAT_YVYU:
|
||||
case DRM_FORMAT_VYUY:
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_UYVY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -62,9 +62,11 @@ static const uint32_t formats_win_full_10bit[] = {
|
||||
DRM_FORMAT_NV12,
|
||||
DRM_FORMAT_NV16,
|
||||
DRM_FORMAT_NV24,
|
||||
///DRM_FORMAT_NV12_10,
|
||||
//DRM_FORMAT_NV16_10,
|
||||
//DRM_FORMAT_NV24_10,
|
||||
DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */
|
||||
#ifdef CONFIG_NO_GKI
|
||||
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
|
||||
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
|
||||
#endif
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_full_10bit_yuyv[] = {
|
||||
@@ -76,13 +78,18 @@ static const uint32_t formats_win_full_10bit_yuyv[] = {
|
||||
DRM_FORMAT_BGR888,
|
||||
DRM_FORMAT_RGB565,
|
||||
DRM_FORMAT_BGR565,
|
||||
DRM_FORMAT_NV12,
|
||||
DRM_FORMAT_NV16,
|
||||
DRM_FORMAT_NV24,
|
||||
//DRM_FORMAT_NV12_10,
|
||||
//DRM_FORMAT_NV16_10,
|
||||
//DRM_FORMAT_NV24_10,
|
||||
DRM_FORMAT_YUYV,
|
||||
DRM_FORMAT_NV12, /* yuv420_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV16, /* yuv422_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV24, /* yuv444_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */
|
||||
#ifdef CONFIG_NO_GKI
|
||||
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
|
||||
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
|
||||
#endif
|
||||
DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode or non-Linear mode */
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_lite[] = {
|
||||
|
||||
Reference in New Issue
Block a user