drm: Check that the plane supports the request format+modifier combo
Currently we only check that the plane supports the pixel format of the fb we're about to feed to it. Extend it to check also the modifier, and more specifically that the combination of the format and modifier is supported. Cc: dri-devel@lists.freedesktop.org Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-8-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -882,12 +882,14 @@ static int drm_atomic_plane_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
/* Check whether this plane supports the fb pixel format. */
|
||||
ret = drm_plane_check_pixel_format(plane, state->fb->format->format);
|
||||
ret = drm_plane_check_pixel_format(plane, state->fb->format->format,
|
||||
state->fb->modifier);
|
||||
if (ret) {
|
||||
struct drm_format_name_buf format_name;
|
||||
DRM_DEBUG_ATOMIC("Invalid pixel format %s\n",
|
||||
drm_get_format_name(state->fb->format->format,
|
||||
&format_name));
|
||||
DRM_DEBUG_ATOMIC("Invalid pixel format %s, modifier 0x%llx\n",
|
||||
drm_get_format_name(state->fb->format->format,
|
||||
&format_name),
|
||||
state->fb->modifier);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user