If user NV12MT uses as pixel format, the Addfb2 ioctl is failed because of missing to check DRM_FORMAT_NV12MT. The NV12MT pixel format is supported by exynos4 and some qualcomm chipset and it is used by exynos drm driver. Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> --- drivers/gpu/drm/drm_crtc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 1ccf5cb..5d7bd49 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2960,6 +2960,7 @@ static int format_check(const struct drm_mode_fb_cmd2 *r) case DRM_FORMAT_NV61: case DRM_FORMAT_NV24: case DRM_FORMAT_NV42: + case DRM_FORMAT_NV12MT: case DRM_FORMAT_YUV410: case DRM_FORMAT_YVU410: case DRM_FORMAT_YUV411: @@ -4800,6 +4801,7 @@ int drm_format_num_planes(uint32_t format) case DRM_FORMAT_NV61: case DRM_FORMAT_NV24: case DRM_FORMAT_NV42: + case DRM_FORMAT_NV12MT: return 2; default: return 1; @@ -4835,6 +4837,7 @@ int drm_format_plane_cpp(uint32_t format, int plane) case DRM_FORMAT_NV61: case DRM_FORMAT_NV24: case DRM_FORMAT_NV42: + case DRM_FORMAT_NV12MT: return plane ? 2 : 1; case DRM_FORMAT_YUV410: case DRM_FORMAT_YVU410: @@ -4878,6 +4881,7 @@ int drm_format_horz_chroma_subsampling(uint32_t format) case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_NV12MT: case DRM_FORMAT_YUV422: case DRM_FORMAT_YVU422: case DRM_FORMAT_YUV420: @@ -4907,6 +4911,7 @@ int drm_format_vert_chroma_subsampling(uint32_t format) case DRM_FORMAT_YVU420: case DRM_FORMAT_NV12: case DRM_FORMAT_NV21: + case DRM_FORMAT_NV12MT: return 2; default: return 1; -- 1.8.1.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel