From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: [PATCH] drm/i915: Error out when trying to set a y-tiled as a sprite Date: Fri, 26 Oct 2012 18:30:50 +0100 Message-ID: <1351272650-8402-1-git-send-email-damien.lespiau@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id C6BE19E837 for ; Fri, 26 Oct 2012 10:30:57 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u50so1490324wey.36 for ; Fri, 26 Oct 2012 10:30:56 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Damien Lespiau Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_sprite.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 3434b6e..aa8d09b 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -465,6 +465,11 @@ 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 */ + if (!(obj->tiling_mode == I915_TILING_NONE || + obj->tiling_mode == I915_TILING_X)) + 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. -- 1.7.11.7