From patchwork Tue Oct 23 17:24:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1631641 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 529303FD85 for ; Tue, 23 Oct 2012 17:24:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 578179EAF9 for ; Tue, 23 Oct 2012 10:24:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D9D5C9E74E for ; Tue, 23 Oct 2012 10:24:34 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj13so2947669wib.12 for ; Tue, 23 Oct 2012 10:24:33 -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=lnvBXASyznn1K9BQJnOwMW0OWIUitPheASeiK8ST1IY=; b=gouif7VyBiy+3M7BeI04bH04vmSiDrETIOr4gsC1KNbfntthgxetqcLWoloM/whCYz VK2pbiikJWa/AaC1+iOxhOQpu6mU7+Qk5pBKLWgLNwaZ9iNVXK9EnXy1qpvvS+GM5Hc8 NT5f0DefRstU2P90rFhWdkXYvsoYYBWBOEmZPWIp7QbLeCjE5VrQzYgt4d2RGYGGfm3p wkPYfHiPsFWDkp3zNeVw0qeXHYyrqCtbLUVAbc4lUa7uIpXA+6zyAnr7Pva5NnPUoq9Q NSvPd1LxjvGC41c4WobsI72eUDmiuKiBjgp+IJ6P580HDPbYdnNWAGBcdEoC+DyQCXWI 8hGg== Received: by 10.216.213.28 with SMTP id z28mr8597398weo.47.1351013073546; Tue, 23 Oct 2012 10:24:33 -0700 (PDT) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id dt9sm57270334wib.1.2012.10.23.10.24.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 10:24:32 -0700 (PDT) From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Tue, 23 Oct 2012 18:24:25 +0100 Message-Id: <1351013065-12057-1-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.7 Subject: [Intel-gfx] [PATCH] drm/i915: Don't try to write to SPR_SCALE when disabling the plane 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 A left over from: drm/i915: Don't try to use SPR_SCALE when we don't have a sprite scaler We also need to avoid to reset this register in _disable() Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_sprite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index ccfaa6f..fa68e2a 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -153,7 +153,8 @@ ivb_disable_plane(struct drm_plane *plane) I915_WRITE(SPRCTL(pipe), I915_READ(SPRCTL(pipe)) & ~SPRITE_ENABLE); /* Can't leave the scaler enabled... */ - I915_WRITE(SPRSCALE(pipe), 0); + if (intel_plane->can_scale) + I915_WRITE(SPRSCALE(pipe), 0); /* Activate double buffered register update */ I915_MODIFY_DISPBASE(SPRSURF(pipe), 0); POSTING_READ(SPRSURF(pipe));