From patchwork Thu Feb 21 00:49:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2169851 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 05B9E3FD4E for ; Thu, 21 Feb 2013 00:52:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB4A8E5FEF for ; Wed, 20 Feb 2013 16:52:42 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by gabe.freedesktop.org (Postfix) with ESMTP id AE052E684F for ; Wed, 20 Feb 2013 16:50:41 -0800 (PST) Received: by mail-ee0-f41.google.com with SMTP id c13so4586903eek.28 for ; Wed, 20 Feb 2013 16:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=GdT0LwpH6Z/lArA6tMpakBBMZ1doS20swgm1bgwMVDE=; b=Oz5v7EOcuiGequZmyd/hexqxDFvnSL+ZVI6CrFoWjP3CL74ujC6+aSmW48OkSfF+Ms FB/Y0XRxe2+/MWmAgnaGnolL0K12O1349zr+IbghvXwWdEvpgx+wFfRw/pM9axy8+BXR Qeng3t6qS5WrzOSRkmZq9ETsC3OGbXcyDmJb4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=GdT0LwpH6Z/lArA6tMpakBBMZ1doS20swgm1bgwMVDE=; b=nJalPLWlGZtpPd/Tf7bjn5LLl0ZIuJ1EYa8LCAAe+bJmevvqZAUqoMn1Ah2KC9dPGE mXX4vPC7GK54MK24dVRMK1CUyqvn6arLjocygq4DwNJXUP2cqkXpeblvayiNgD8+dfHO utUWdRu0p0HHIT4GGX3g0oHG32kPU9dga21E+xGoLSbP1quy7qmaBzj6a0cINwq9/SG1 jrAW3nkHSHbLFETrpJSWEMYdueE0hOX07OhrWsTpgERmiwsocKGWv5slWZ/0gUpFQWOp 4y4/+/FlUwdDYt2V6NZ40caoJXlub1Zn7NdZnb+DP8b+8ikYxnKOsF1wq5f04wwSGa68 28EQ== X-Received: by 10.14.0.73 with SMTP id 49mr74939796eea.21.1361407840726; Wed, 20 Feb 2013 16:50:40 -0800 (PST) Received: from bremse.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id d47sm53318783eem.9.2013.02.20.16.50.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Feb 2013 16:50:39 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 21 Feb 2013 01:49:54 +0100 Message-Id: <1361407828-2419-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1361407828-2419-1-git-send-email-daniel.vetter@ffwll.ch> References: <1361407828-2419-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQmljX+KWEu3PpetY9lkaeRlUPCUurFAAnEAC+T7aNhHT8YHBhsHNIv+vjTnqH+fyWiNj4dZ Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 02/36] drm/i915: compute pipe_config earlier 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 To make decent modeset state checking possible (e.g. for the check mode with atomic modesetting) we want to have the full pipe configuration and state checks done before we touch the hw. To ensure that all the little bits&pieces that are now moved to the pipe_config handle this correctly, move its computation to the right spot now, before we touch the hw in the disable_pipes step. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d2f5e7fd..b348341 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7710,12 +7710,6 @@ int intel_set_mode(struct drm_crtc *crtc, intel_modeset_affected_pipes(crtc, &modeset_pipes, &prepare_pipes, &disable_pipes); - DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n", - modeset_pipes, prepare_pipes, disable_pipes); - - for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc) - intel_crtc_disable(&intel_crtc->base); - *saved_hwmode = crtc->hwmode; *saved_mode = crtc->mode; @@ -7735,6 +7729,12 @@ int intel_set_mode(struct drm_crtc *crtc, } } + DRM_DEBUG_KMS("set mode pipe masks: modeset: %x, prepare: %x, disable: %x\n", + modeset_pipes, prepare_pipes, disable_pipes); + + for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc) + intel_crtc_disable(&intel_crtc->base); + for_each_intel_crtc_masked(dev, prepare_pipes, intel_crtc) { if (intel_crtc->base.enabled) dev_priv->display.crtc_disable(&intel_crtc->base);