From patchwork Wed Jul 11 14:27:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1183461 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 B2EEF3FC8E for ; Wed, 11 Jul 2012 15:43:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 770EBA0E82 for ; Wed, 11 Jul 2012 08:43:20 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FEB19E8A8 for ; Wed, 11 Jul 2012 08:35:19 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hm11so928073wib.12 for ; Wed, 11 Jul 2012 08:35:19 -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=qiMJF9FaqJ99xE3zqXTn0YTLlPNjTMepy23Aysqj6/E=; b=V4cy5XxWkcz2oWQfNTIA4F0VhoSO53rGiXiKphzkbSdxMsFRLqQNzAIz4vFfvPYUIq Mlgqnp53aCeXfZIrmBu83B7bkMqCa3pVtaLrW7klF4USrpsPLmMO/GrYAMWPpj4sOtx5 d1N0GV97dli6K9vfTP2bzFmVITwoq2jB+WRNM= 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=qiMJF9FaqJ99xE3zqXTn0YTLlPNjTMepy23Aysqj6/E=; b=A7+uoWZ0AJcM1Wy9X4i8ldZGbBZHgcrq++dx60qVWW+1b99x3aaWJETXOvx0DGjA6g jexZmvP8/NgOpejdbY/IwMaRFnDvWdrX7rci39AVDiVFTeXgmd+QzIK6qG0wuDqsrefe EziMx5z88Ily2e9f8cnCAam0wNgUPNUxgkkkqoMtgSABazmGTliy8jCuTO/M/EdWK013 HBoLkxB/KKyGuZobkjIO9HlG9QPAqs0TLdlUNCAbbDiY1IeGW5J1c6x8Os/8bxTT0rGO 7B7fYurJedb0d3JvYPLa2Z/S1cf0E8OIGVQ3PoLHpb1x9cok+Wpa40iFoSdBd/z2ZAVB kN3g== Received: by 10.216.136.203 with SMTP id w53mr21612681wei.63.1342020918572; Wed, 11 Jul 2012 08:35:18 -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.35.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 08:35:17 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 11 Jul 2012 16:27:52 +0200 Message-Id: <1342016944-23395-10-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: ALoCoQm0DkoLsMOd3Zfayspakpj3KbHrcs6a9JG4iwcU7LAgEhpzfbuePvjW7CQeLls5XZMhWkdL Cc: Takashi Iwai , Daniel Vetter Subject: [Intel-gfx] [PATCH 09/81] drm/i915/lvds: ditch ->prepare special case 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 LVDS is the first output where dpms on/off and prepare/commit don't perfectly match. Now the idea behind this special case seems to be that for simple resolution changes on the LVDS we don't need to stop the pipe, because (at least on newer chips) we can adjust the panel fitter on the fly. There are a few problems with the current code though: - We still stop and restart the pipe unconditionally, because the crtc helper code isn't flexible enough. - We show some ugly flickering, especially when changing crtcs (this the crtc helper would actually take into account, but we don't implement the encoder->get_crtc callback required to make this work properly). So it doesn't even work as advertised. I agree that it would be nice to do resolution changes on LVDS (and also eDP) whithout blacking the screen where the panel fitter allows to do that. But imo we should implement this as a special case a few layers up in the mode set code, akin to how we already detect simple framebuffer changes (and only update the required registers with ->mode_set_base). Until this is all in place, make our lives easier and just rip it out. Also note that this seems to fix actual bugs with enabling the lvds output, see: http://lists.freedesktop.org/archives/intel-gfx/2012-July/018614.html Cc: Takashi Iwai Cc: Giacomo Comes Signed-Off-by: Daniel Vetter Tested-by: Takashi Iwai --- drivers/gpu/drm/i915/intel_lvds.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 9b706a5..73d0079 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -409,13 +409,7 @@ static void intel_lvds_prepare(struct drm_encoder *encoder) { struct intel_lvds *intel_lvds = to_intel_lvds(encoder); - /* - * Prior to Ironlake, we must disable the pipe if we want to adjust - * the panel fitter. However at all other times we can just reset - * the registers regardless. - */ - if (!HAS_PCH_SPLIT(encoder->dev) && intel_lvds->pfit_dirty) - intel_lvds_disable(intel_lvds); + intel_lvds_disable(intel_lvds); } static void intel_lvds_commit(struct drm_encoder *encoder)