From patchwork Tue Jun 7 22:54:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 860042 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p57Mu93N026172 for ; Tue, 7 Jun 2011 22:56:30 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E21419F104 for ; Tue, 7 Jun 2011 15:56:08 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from homiemail-a5.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by gabe.freedesktop.org (Postfix) with ESMTP id 6ABCE9E75B for ; Tue, 7 Jun 2011 15:55:48 -0700 (PDT) Received: from homiemail-a5.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTP id 66698704074; Tue, 7 Jun 2011 15:55:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=whitecape.org; h=from:to:cc :subject:date:message-id; q=dns; s=whitecape.org; b=bQU2FiwK7WkE SAxqGTkNi+ZRTPNtRr6LM3HkCavWUNp2y6pigC+NZbuiGwGACaVC4iOzMH0e+4dk 6KktJzrDtNXXG8UH4vOzPxnJK0dUSKuZXhnSwXekJj/cxbK3Z3hlEPs/1zel3gse Wck9neh+w0SaFBllqXwHSUKyB/jwhm4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=whitecape.org; h=from:to :cc:subject:date:message-id; s=whitecape.org; bh=EBLPc9O+jGosuYX KeC/1EyockEA=; b=t0mc+xRyw4GFnSDe/1553EqvfFy9QmiTFJS7ZqUuzLYCg3B EP7UFd61p+al4oU9s2TujkyevyLYIu24kPf1VM2G37Tvg4BsEiDyWgqFmACWvewS ql9JgDdC/dP1NeJX0bxIQp7RJe0tLqmw3E2KY5f0JK/qmJpy33UFuEjCvc+c= Received: from localhost (c-24-21-202-86.hsd1.or.comcast.net [24.21.202.86]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: kenneth@whitecape.org) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTPSA id 372B0704071; Tue, 7 Jun 2011 15:55:46 -0700 (PDT) From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Jun 2011 15:54:39 -0700 Message-Id: <1307487281-3015-1-git-send-email-kenneth@whitecape.org> X-Mailer: git-send-email 1.7.4.4 Subject: [Intel-gfx] [PATCH 1/3] drm/i915: Fix MI_DISPLAY_FLIP plane select offset on Ivybridge. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 22:56:30 +0000 (UTC) According to BSpec volume 1c.4 section 3.2.9, Display (Plane) Select is now at bits 21:19 instead of 21:20. Signed-off-by: Kenneth Graunke --- drivers/gpu/drm/i915/intel_display.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 81a9059..60b2941 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6390,7 +6390,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, break; case 6: - case 7: OUT_RING(MI_DISPLAY_FLIP | MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); OUT_RING(fb->pitch | obj->tiling_mode); @@ -6400,6 +6399,16 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, pipesrc = I915_READ(PIPESRC(pipe)) & 0x0fff0fff; OUT_RING(pf | pipesrc); break; + + case 7: + OUT_RING(MI_DISPLAY_FLIP | (intel_crtc->plane << 19)); + OUT_RING(fb->pitch | obj->tiling_mode); + OUT_RING(obj->gtt_offset); + + pf = I915_READ(PF_CTL(pipe)) & PF_ENABLE; + pipesrc = I915_READ(PIPESRC(pipe)) & 0x0fff0fff; + OUT_RING(pf | pipesrc); + break; } ADVANCE_LP_RING();