From patchwork Fri Oct 26 17:30:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1652921 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id A661440135 for ; Fri, 26 Oct 2012 17:31:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A88859EAF2 for ; Fri, 26 Oct 2012 10:31:07 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=FaOk0OMp0dcnXbwXpqTP5PvrzpSnCf/0Wsho7jlEF1s=; b=Mg1FxcaRQi2gdvH+2rjeQlqt9VIHiM2W9MmjSYzXAe71kl5FhkC2iVZEg7DGxzG4Ag MSv7spfxJsJ5PS6xO11XlB2iCxMWuNqznaVDeKOJ1A0koNlQqCD/QBnb7eC0PMOcf41B J8S7uEeb3Dmt+djqg7cFWzynhSxa8ptaLi3sfG+XtW4VkqjWGgul+8GMbu8wTopHOZtP 3COXs7CxVINQFC48e6qv1Ukm1ePL3u/pVO+D5NUHAP3PNzQFmJIlhhcEy4PLhohXmm0x jdDUahS4bpc/bKYdYk2DUTicpCF0qq5n2GYUCoWTLeXbYsjGH2coZuaAu6WP/Lu0DZyw 6+RQ== Received: by 10.180.87.34 with SMTP id u2mr6035011wiz.3.1351272656585; Fri, 26 Oct 2012 10:30:56 -0700 (PDT) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id az2sm183290wib.10.2012.10.26.10.30.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Oct 2012 10:30:55 -0700 (PDT) From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Oct 2012 18:30:50 +0100 Message-Id: <1351272650-8402-1-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.7 Subject: [Intel-gfx] [PATCH] drm/i915: Error out when trying to set a y-tiled as a sprite X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Damien Lespiau Signed-off-by: Damien Lespiau Reviewed-by: Chris Wilson --- 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.