diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2014-07-28 09:31:21 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:22 +0900 |
commit | 2c8fe1a6820e526d500f721662ae02b352a8f706 (patch) | |
tree | cc5b30f26be177909ddc804766b5adb7cf6fac7d /drivers/gpu | |
parent | 8404761c71d673388eb314500506cd9e0a4afa24 (diff) | |
download | linux-3.10-2c8fe1a6820e526d500f721662ae02b352a8f706.tar.gz linux-3.10-2c8fe1a6820e526d500f721662ae02b352a8f706.tar.bz2 linux-3.10-2c8fe1a6820e526d500f721662ae02b352a8f706.zip |
drm: add checking DRM_FORMAT_NV12MT
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.
Change-Id: I94435dc3bff96377b9dd295d469e862ac637c6bc
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index ae9c4dd7f49..276e6d19da6 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2292,6 +2292,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: @@ -3682,6 +3683,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; @@ -3717,6 +3719,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: @@ -3760,6 +3763,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: @@ -3789,6 +3793,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; |