[Intel-gfx] [PATCH] drm/i915: Reject the colorkey ioctls for primary and cursor planes
Daniel Vetter
daniel at ffwll.ch
Mon Mar 30 02:45:57 PDT 2015
On Fri, Mar 27, 2015 at 07:59:40PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> The legcy colorkey ioctls are only implemented for sprite planes, so
> reject the ioctl for primary/cursor planes. If we want to support
> colorkeying with these planes (assuming we have hw support of course)
> we should just move ahead with the colorkey property conversion.
>
> Cc: Tommi Rantala <tt.rantala at gmail.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Testcase: kms_legacy_colorkey
Cc: stable at vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index f41e872..7017384 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1113,7 +1113,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
> drm_modeset_lock_all(dev);
>
> plane = drm_plane_find(dev, set->plane_id);
> - if (!plane) {
> + if (!plane || plane->type != DRM_PLANE_TYPE_OVERLAY) {
> ret = -ENOENT;
> goto out_unlock;
> }
> @@ -1145,7 +1145,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, void *data,
> drm_modeset_lock_all(dev);
>
> plane = drm_plane_find(dev, get->plane_id);
> - if (!plane) {
> + if (!plane || plane->type != DRM_PLANE_TYPE_OVERLAY) {
> ret = -ENOENT;
> goto out_unlock;
> }
> --
> 2.0.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list