drm/rockchip: support 10bit yuv format
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / rockchip / rockchip_vop_reg.c
index 85fc43d45e0730f53c1ae1ac5575ff3975adf055..edf4454441da88c6bb36740851581030ba13edd2 100644 (file)
@@ -53,6 +53,9 @@ static const uint32_t formats_win_full[] = {
        DRM_FORMAT_NV12,
        DRM_FORMAT_NV16,
        DRM_FORMAT_NV24,
+       DRM_FORMAT_NV12_10,
+       DRM_FORMAT_NV16_10,
+       DRM_FORMAT_NV24_10,
 };
 
 static const uint32_t formats_win_lite[] = {
@@ -104,6 +107,7 @@ static const struct vop_win_phy rk3288_win01_data = {
        .nformats = ARRAY_SIZE(formats_win_full),
        .enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),
        .format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),
+       .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 4),
        .rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),
        .xmirror = VOP_REG_VER(RK3368_WIN0_CTRL0, 0x1, 21, 3, 2, -1),
        .ymirror = VOP_REG_VER(RK3368_WIN0_CTRL0, 0x1, 22, 3, 2, -1),