diff options
author | Rob Clark <robdclark@gmail.com> | 2015-01-30 20:18:11 +0530 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-06-11 13:11:01 -0400 |
commit | 570655b09b065d2fff1b8ab9bdb8308f4c5a05a3 (patch) | |
tree | 6e1be5f7f3df8643969d915f9702214a03dc7134 /drivers/gpu/drm/drm_crtc.c | |
parent | af6cb4c1a451b0e68a0581a6487f6c0423caeeb3 (diff) | |
download | lwn-570655b09b065d2fff1b8ab9bdb8308f4c5a05a3.tar.gz lwn-570655b09b065d2fff1b8ab9bdb8308f4c5a05a3.zip |
drm/msm/mdp4: Support NV12MT format in mdp4
Using fb modifier flag, support NV12MT format in MDP4.
v2:
- rework the modifier's description [Daniel Vetter's comment]
- drop .set_mode_config() callback [Rob Clark's comment]
v3:
- change VENDOR's name and restrict usage to NV12 [pointed by Daniel]
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 77f87b23a6e7..b69ed97d447c 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3255,6 +3255,24 @@ static int framebuffer_check(const struct drm_mode_fb_cmd2 *r) r->modifier[i], i); return -EINVAL; } + + /* modifier specific checks: */ + switch (r->modifier[i]) { + case DRM_FORMAT_MOD_SAMSUNG_64_32_TILE: + /* NOTE: the pitch restriction may be lifted later if it turns + * out that no hw has this restriction: + */ + if (r->pixel_format != DRM_FORMAT_NV12 || + width % 128 || height % 32 || + r->pitches[i] % 128) { + DRM_DEBUG_KMS("bad modifier data for plane %d\n", i); + return -EINVAL; + } + break; + + default: + break; + } } for (i = num_planes; i < 4; i++) { |