From patchwork Fri Oct 5 15:06:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1553871 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 84949DF24C for ; Fri, 5 Oct 2012 15:11:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 689B69ECFB for ; Fri, 5 Oct 2012 08:11:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gg0-f177.google.com (mail-gg0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DC609E915 for ; Fri, 5 Oct 2012 08:06:37 -0700 (PDT) Received: by mail-gg0-f177.google.com with SMTP id h1so473014gge.36 for ; Fri, 05 Oct 2012 08:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KpaF6W+myIH6xlSrC9qY9WjtR/W3Wawbefg3GRmXWYA=; b=N0vqEnD9LQpShonLHZDFi0zagQLVPKJIClnPxXEvLD7JtINUpBYTYsBQVTTBDO4pzd oIeyNG8kbB0GMJEBD+UMo4GxyFRetMgXJJzP/WDHvYyA/5uFeU4HJD3GSw7APnhXF0Zl c9+heLrNddDc1TGPXTwvnHCwoY7G+aKsYTfxPJVFSsUK9JxIIfUik17MYi8PO5gCkya+ h0aKSj4J6w1OmgWJ6GkUwg1qipZ2aGPDKpw4L7yu2swbe+fF3NJuTuQijQwpSYiLbSeZ sFY2hzNKfIzk9BdI36O8hA9pPCLeb7Q0mMYtcOhFEBvSFDR+nkjDD8SNj3Npu59eisjD MH/Q== Received: by 10.236.191.6 with SMTP id f6mr8496404yhn.126.1349449597310; Fri, 05 Oct 2012 08:06:37 -0700 (PDT) Received: from vicky.domain.invalid ([177.16.36.207]) by mx.google.com with ESMTPS id a6sm9907901anm.22.2012.10.05.08.06.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 08:06:36 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 5 Oct 2012 12:06:01 -0300 Message-Id: <1349449561-3599-11-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1349449561-3599-1-git-send-email-przanoni@gmail.com> References: <1349211142-4802-1-git-send-email-przanoni@gmail.com> <1349449561-3599-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 10/10] drm/i915: pipe and planes should be disabled on haswell_crtc_mode_set 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: Paulo Zanoni So WARN in case they're not. It also does not make any sense to wait_for_vblank at this point. Signed-off-by: Paulo Zanoni Reviewed-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 709497d..705ed80 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5217,6 +5217,11 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, WARN(num_connectors != 1, "%d connectors attached to pipe %c\n", num_connectors, pipe_name(pipe)); + WARN_ON(I915_READ(PIPECONF(pipe)) & + (PIPECONF_ENABLE | I965_PIPECONF_ACTIVE)); + + WARN_ON(I915_READ(DSPCNTR(plane)) & DISPLAY_PLANE_ENABLE); + if (!intel_ddi_pll_mode_set(crtc, adjusted_mode->clock)) return -EINVAL; @@ -5357,8 +5362,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, haswell_set_pipeconf(crtc, adjusted_mode, dither); - intel_wait_for_vblank(dev, pipe); - /* Set up the display plane register */ I915_WRITE(DSPCNTR(plane), DISPPLANE_GAMMA_ENABLE); POSTING_READ(DSPCNTR(plane));