From patchwork Sun Aug 19 19:13:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1345291 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 937BF3FC33 for ; Sun, 19 Aug 2012 20:57:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9720FA1044 for ; Sun, 19 Aug 2012 13:57:24 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id D1739A102C for ; Sun, 19 Aug 2012 13:21:28 -0700 (PDT) Received: by mail-wg0-f43.google.com with SMTP id dr1so4210645wgb.12 for ; Sun, 19 Aug 2012 13:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=SN6eGcsQtNYtvBfKe9i8ol8yvQrMdkeMjx1tmd3PKcQ=; b=hSi66COEtpHFG9++n58BNvIMaQaBCnZ5m4ukORKVeEE16rsnsHuSH7TW35K/+v8hts itiwByStAIX7180nUXoBOiWcD8V349aBuz43Ak5TCkEGHVB75DeGgQlBZY2kxx0L8qHR Wamgi2NVR38MQu0+OwL0s6RHIEmW/6KVa4rpI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SN6eGcsQtNYtvBfKe9i8ol8yvQrMdkeMjx1tmd3PKcQ=; b=ApkF6q7R5hD4i6qMaAHvIy+hi0qORjjY88/BzCG8EQUFON0vpciKkaFvzRKW0ZMm0t 3b191gQw5JCg7Lf91ray4icP2kpTp3N8qnoQDOpZQZNhyf53Qu6FwE+eg9n/Puq7D8Gl 6ecZFmNpipsbctg+aJ2BxEPu/Ma8rAkt3i+gHND7BhwHNeOlyoPsarpPAQYeNtKEd5D4 Sj/TYo45gSxYdEWUiQAukFRkt0lOIksMFjT+UpQjhcWL0ZH3HUJUpzsLD5pNU8UqEDCA U7+Z9EFJBVKytWBfgxHDt0/mLs/QZ4aZBFfWpgEDQlXtdmiKoKF88SZ/kgniINK59XSK I+Ig== Received: by 10.180.105.6 with SMTP id gi6mr22887138wib.4.1345407688527; Sun, 19 Aug 2012 13:21:28 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id fu8sm24194367wib.5.2012.08.19.13.21.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 13:21:27 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 19 Aug 2012 21:13:12 +0200 Message-Id: <1345403595-9678-56-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> References: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnw74cI70pFAfF3AZPG7uyF7Kafwn213hzXYIT8G861amxHM+vRXTr82bOYeLMPP2Dwowt+ Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 55/58] drm/i915: switch the load detect code to the staged modeset config 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 Now that set_mode also disables crtcs and expects it's new configuration in the staged output links we need to adjust the load detect code a bit. Signed-Off-by: Daniel Vetter Reviewed-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index da45d39..5a72a27 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5796,8 +5796,8 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector, return false; } - encoder->crtc = crtc; - connector->encoder = encoder; + intel_encoder->new_crtc = to_intel_crtc(crtc); + to_intel_connector(connector)->new_encoder = intel_encoder; intel_crtc = to_intel_crtc(crtc); old->dpms_mode = connector->dpms; @@ -5849,16 +5849,17 @@ void intel_release_load_detect_pipe(struct drm_connector *connector, struct intel_encoder *intel_encoder = intel_attached_encoder(connector); struct drm_encoder *encoder = &intel_encoder->base; - struct drm_device *dev = encoder->dev; DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", connector->base.id, drm_get_connector_name(connector), encoder->base.id, drm_get_encoder_name(encoder)); if (old->load_detect_temp) { - connector->encoder = NULL; - encoder->crtc = NULL; - drm_helper_disable_unused_functions(dev); + struct drm_crtc *crtc = encoder->crtc; + + to_intel_connector(connector)->new_encoder = NULL; + intel_encoder->new_crtc = NULL; + intel_set_mode(crtc, NULL, 0, 0, NULL); if (old->release_fb) old->release_fb->funcs->destroy(old->release_fb);