From patchwork Sun Aug 19 19:13:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1345231 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 4EBD33FC33 for ; Sun, 19 Aug 2012 20:53:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D982A1024 for ; Sun, 19 Aug 2012 13:53:19 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 7114AA1047 for ; Sun, 19 Aug 2012 13:21:20 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hq4so2753404wib.12 for ; Sun, 19 Aug 2012 13:21:20 -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=NMq5xowNdnxcOoXHTDFTlXTVoUpbLf4aPJ+R/c7T/KU=; b=Pzp3WMY3dvOf99qVmNcf93XaxDgdQS/3E1ejzsrRmtgY87gUBKl+LSz9EeQ1cocDrn GYpVPJTfiuLNHnyZymRnyNU2DvsnChwbMXZ7OvQ/QB7kK0Rp+MbJ7xF8jelU/wXlI5SX LmyAomML/3pYfd+Lg79i/Wf4ZUypbK0eEjMVs= 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=NMq5xowNdnxcOoXHTDFTlXTVoUpbLf4aPJ+R/c7T/KU=; b=J81MQNuMWiQzTt2poawViT8XslrH9qdhZo/wzGEpfIYe5FeOBQlGd8Vuoh/+5JJpUS gXktGnoFyefpIOSSlUKeLWhcQcFIMRc0KM0qcZm1gdE9MTGhG4d4Hx825QmvKtPtbe5r wcE4qhNO8amtaJtqItI/8tSq9uZ9uWvna969M1yW8ETFoeDCJ09vo/j4LQjfHdWiFkTS BCpWa4cW8bayn65BMdEtok/G/tyO6t4P7sHELMvkbE8fJhADCzyMxOwq67mb2kucDf8S usw8ugAhlp/lFCHn1YuTW/80XoycyN8AZwtML7ORdBbBlpomk2i3knou6rktNS2Iwc3u 1P8w== Received: by 10.180.81.165 with SMTP id b5mr21975671wiy.17.1345407680117; Sun, 19 Aug 2012 13:21:20 -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.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 13:21:19 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 19 Aug 2012 21:13:06 +0200 Message-Id: <1345403595-9678-50-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: ALoCoQnpoR360CUSakYN5xtvEJWglUs6QGM8UUPZCEE8vox+X0CaOmiHV+zuZY5hN3gi6vhy3j0K Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 49/58] drm/i915: use staged outuput config in lvds->mode_fixup 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 - Use the check_cloned helper from the previous patch. - Use encoder->new_crtc to check crtc properties. Signed-Off-by: Daniel Vetter Reviewed-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_lvds.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 52f9e7f..7f730af 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -250,9 +250,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, { struct drm_device *dev = encoder->dev; struct drm_i915_private *dev_priv = dev->dev_private; - struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); struct intel_lvds *intel_lvds = to_intel_lvds(encoder); - struct intel_encoder *tmp_encoder; + struct intel_crtc *intel_crtc = intel_lvds->base.new_crtc; u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; int pipe; @@ -262,14 +261,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, return false; } - /* Should never happen!! */ - for_each_encoder_on_crtc(dev, encoder->crtc, tmp_encoder) { - if (&tmp_encoder->base != encoder) { - DRM_ERROR("Can't enable LVDS and another " - "encoder on the same pipe\n"); - return false; - } - } + if (!intel_encoder_check_non_cloned(&intel_lvds->base)) + return false; /* * We have timings from the BIOS for the panel, put them in