From patchwork Wed Feb 13 11:32:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2135441 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 56D26DFE75 for ; Wed, 13 Feb 2013 11:48:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D5CCE6636 for ; Wed, 13 Feb 2013 03:48:57 -0800 (PST) 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 E25A9E6623 for ; Wed, 13 Feb 2013 03:43:24 -0800 (PST) Received: by mail-we0-f177.google.com with SMTP id d7so918528wer.22 for ; Wed, 13 Feb 2013 03:43:24 -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=QhcQ09soJSmTH8oAno+GYrCS8DaG2BgggPmIOCeDs1g=; b=TI3+7HhFm+H8qmrzbjP5c1EY3VeA17kSSUglTaiovJ9PxjV1pr7VONojbEl1eYykyw zYjEikfPJVTtyr609hDMkWsbk2rdGz2Gs1p2UOAYTRRgaGMrQixEXRtalAYqthtdV1ph qYqTr9FSIaitq2it/0PAHJMSBOIdrMHw0ITbs= 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=QhcQ09soJSmTH8oAno+GYrCS8DaG2BgggPmIOCeDs1g=; b=Tl49dcNZif30wHPgZ/y78THSAJglip9jP7yIbNbTeI9iQxh5gG+9Unn+FIVK+ltFgm +7s1LPy2imVAibUSG9+IvHe+nSiLRZj2IbYq7lCx7e5aWvjtLaqjFAont3+kcOVDj1SD Ky8Be8pL5H+AYHBOjbd2Jq4YDtGhQ2xNfEfVH4JIzBTHxuekyGAPZUMfn3PqGSSZLXSx c2blsHIujly1kSW494fDAjSgt8JyO3z9ahHVPSWpQbQXh+L6zd9WFb++LtEjsHxEcWj5 ApvMtPa91nT2RlD18r19dPRN21X68w3EEbq2pfZ2NruBt+YTH2o41OEe5yqsAPFm4s1T cKEQ== X-Received: by 10.180.78.137 with SMTP id b9mr9300738wix.30.1360755803985; Wed, 13 Feb 2013 03:43:23 -0800 (PST) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id du2sm17597131wib.0.2013.02.13.03.43.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 13 Feb 2013 03:43:23 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 13 Feb 2013 12:32:05 +0100 Message-Id: <1360755142-19145-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1360755142-19145-1-git-send-email-daniel.vetter@ffwll.ch> References: <1360755142-19145-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnHVlTE62xtYfhYKbRjhdwv8cE8eeCidelJp2Xy1flYu+dsp7jmVDZoJSpnTFA2PJE/LDnu Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 02/19] 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 c79424e..d355773 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; @@ -7732,6 +7726,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);