From patchwork Wed Jul 11 14:28:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1184231 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 B42BB3FC5A for ; Wed, 11 Jul 2012 16:27:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8236DA0EEB for ; Wed, 11 Jul 2012 09:27:33 -0700 (PDT) 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 945279ED8F for ; Wed, 11 Jul 2012 08:36:43 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id r3so960506wey.36 for ; Wed, 11 Jul 2012 08:36:43 -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=k6CTBpgKdwM2qIXE1XepJT82+mH6Ea6qKlovOkgtKg4=; b=CdmM83uKqcm1qX17fOIpWIJr8B9VCsraQFQklLc7iI+YSB+T1tR2+yZ7P1HUdT6Yl2 Te3VB/p30BmnxsC1+sYChKP9untl3EVzvnxcdCpptL1l1hUJVYhNyG12jGEbYdsMUhR6 ZZNUAaCkHoKAbp5Sg3SehyjQ79eculRRLPlmM= 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=k6CTBpgKdwM2qIXE1XepJT82+mH6Ea6qKlovOkgtKg4=; b=Pv0s2J/dcAxe3IKtVDPc3YN9KXBu4ey6DJBvVzpNb3kJsjGDgI64wrc2yfR1nBt5CB 9bsjb9DFOQQ+emnV15u4NHglh8Xf4Ln3IjlE+rJYaT4qFA7D1xCITr1G8zG/93lBq2Jh C5sZV3B1YLOOsUDSzb68vYWApdeAg6CpPanKpEvdCX8Ur67nVugASlF4WVzp7FrcNdLQ A/8yEmkllei6UnPRbmgNMnY+iYxE9aOABX+eKvAi52XWq98+UU2/NHM3Q9nETi14BVrI XytzW6zIKufLCFtAVxXOvY8kz6fGU/iu3jenemebL2kysRmQ91dhO/uCBXDJm+AkK3zO IjAA== Received: by 10.180.98.138 with SMTP id ei10mr48201730wib.1.1342021003409; Wed, 11 Jul 2012 08:36:43 -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 bc2sm5777080wib.0.2012.07.11.08.36.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 08:36:42 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 11 Jul 2012 16:28:51 +0200 Message-Id: <1342016944-23395-69-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1342016944-23395-1-git-send-email-daniel.vetter@ffwll.ch> References: <1342016944-23395-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQl6FuVBn4yMVDD5CepXs7cPM7ktREOEFhBnDSLjyk5QxizU0RBUpvT/NPCiihvlH2d/aa79 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 68/81] 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 --- drivers/gpu/drm/i915/intel_display.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 03f3cd3..2815dc9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5713,8 +5713,8 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, 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; @@ -5765,16 +5765,17 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, struct intel_load_detect_pipe *old) { 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_crtc_set_mode(crtc, NULL, 0, 0, NULL); if (old->release_fb) old->release_fb->funcs->destroy(old->release_fb);