diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2012-10-29 15:14:51 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-11 23:51:00 +0100 |
commit | 94c6419ed8f45e6682d766672b9ceb54867d3d2d (patch) | |
tree | 59294d2c81d385ee125dab510a852e7ff41c4265 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | f5d8491a92e4e5146edf61ed5dda8b4f808b460a (diff) | |
download | lwn-94c6419ed8f45e6682d766672b9ceb54867d3d2d.tar.gz lwn-94c6419ed8f45e6682d766672b9ceb54867d3d2d.zip |
drm/i915: Error out when trying to set a y-tiled as a sprite
v2: Use a switch for consistency (Chris Wilson)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index e69035d40aee..f9001af4a30d 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -450,6 +450,15 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, if (intel_plane->pipe != intel_crtc->pipe) return -EINVAL; + /* Sprite planes can be linear or x-tiled surfaces */ + switch (obj->tiling_mode) { + case I915_TILING_NONE: + case I915_TILING_X: + break; + default: + return -EINVAL; + } + /* * Clamp the width & height into the visible area. Note we don't * try to scale the source if part of the visible region is offscreen. |