MLK-17802 drm/imx: dpu: plane: Remove pixel formats unsupported by DPR
authorLiu Ying <victor.liu@nxp.com>
Wed, 14 Mar 2018 03:07:42 +0000 (11:07 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:56:57 +0000 (14:56 -0500)
The RGB888/BGR888/NV16/NV61/NV24/NV42 pixel formats are not supported
by DPR.  They cannot get the benefits(i.e., tile resolving and
underrun-proof) from the prefetch engines.  Also, 16bit and 32bit
RGB pixel formats are widely used by GUI, while NV12 pixel format
is the only pixel format supported by VPU.  Thus, it makes little
sense to support the pixel formats which are not supported by DPR.
Another idea is that removing the pixel formats makes the driver
a bit simpler since we don't have to deal with the cases in which
prefetch engines are bypassed.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/gpu/drm/imx/dpu/dpu-plane.c

index 847cc2e..b22c1f5 100644 (file)
@@ -35,18 +35,12 @@ static const uint32_t dpu_common_formats[] = {
        DRM_FORMAT_RGBX8888,
        /* DRM_FORMAT_BGRA8888, */
        DRM_FORMAT_BGRX8888,
-       DRM_FORMAT_RGB888,
-       DRM_FORMAT_BGR888,
        DRM_FORMAT_RGB565,
 
        DRM_FORMAT_YUYV,
        DRM_FORMAT_UYVY,
        DRM_FORMAT_NV12,
        DRM_FORMAT_NV21,
-       DRM_FORMAT_NV16,
-       DRM_FORMAT_NV61,
-       DRM_FORMAT_NV24,
-       DRM_FORMAT_NV42,
 };
 
 static const uint64_t dpu_format_modifiers[] = {
@@ -130,14 +124,8 @@ static bool dpu_drm_plane_format_mod_supported(struct drm_plane *plane,
                return false;
 
        switch (format) {
-       case DRM_FORMAT_RGB888:
-       case DRM_FORMAT_BGR888:
        case DRM_FORMAT_YUYV:
        case DRM_FORMAT_UYVY:
-       case DRM_FORMAT_NV16:
-       case DRM_FORMAT_NV61:
-       case DRM_FORMAT_NV24:
-       case DRM_FORMAT_NV42:
                return modifier == DRM_FORMAT_MOD_LINEAR;
        case DRM_FORMAT_XRGB8888:
        case DRM_FORMAT_XBGR8888:
@@ -372,10 +360,6 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
                break;
        case DRM_FORMAT_NV12:
        case DRM_FORMAT_NV21:
-       case DRM_FORMAT_NV16:
-       case DRM_FORMAT_NV61:
-       case DRM_FORMAT_NV24:
-       case DRM_FORMAT_NV42:
                bpp = 8;
                break;
        default:
@@ -502,10 +486,6 @@ static void dpu_plane_atomic_update(struct drm_plane *plane,
                break;
        case DRM_FORMAT_NV12:
        case DRM_FORMAT_NV21:
-       case DRM_FORMAT_NV16:
-       case DRM_FORMAT_NV61:
-       case DRM_FORMAT_NV24:
-       case DRM_FORMAT_NV42:
                bpp = 8;
                break;
        default: