From patchwork Thu Apr 11 14:29: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: 2428971 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 A646F3FD8C for ; Thu, 11 Apr 2013 14:31:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FAA5E6635 for ; Thu, 11 Apr 2013 07:31:30 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 06DE6E5CFD for ; Thu, 11 Apr 2013 07:30:46 -0700 (PDT) Received: by mail-ea0-f178.google.com with SMTP id o10so798129eaj.23 for ; Thu, 11 Apr 2013 07:30:46 -0700 (PDT) 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=Pw9fZnssmAQPN7pDpdkhqsQ9JEHpxr0DL1GzTRv8BA4=; b=YYyk68EW989CYDjZlePF5l9HHFylwvx2JdSO1T5Lak8R/iS1xwRONj7mdrUlgGKAlR CBW2PZEAqqu9ScSRfUtKrKS50kjaiXliq6tolwKjYA2lEW7wLg+yZx5YNBmCCkBKwHfV ziUCq+Mkf2B6GEd+rdnvHKweIPH1LPuONBfko= 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=Pw9fZnssmAQPN7pDpdkhqsQ9JEHpxr0DL1GzTRv8BA4=; b=I2jk8CctNlrTBOIZQEIz1o/h4RC56rwjoOO6Qnq4+4BYSum27pcZ3jdDUF2wvaHGIk v+kB7yGkOA5Pjb4dJj7ge2Ujc9fTNZLO30YPq5zuWqTnwosrAdqppPrC4uK99dwA49C/ cwE+TX36kBNkZ7XpdNT5GQLiYY+HcHw9PxmNID6naGmsf6llBbyzsfQbxgJmHd9zq/l5 WdkX1O/pyvZZqPIUHXaF5uu2rVt5KLthOiclnOcAszZkLNGT9meNtQWSxw/GX0Zfu+xM xJqytZ+fYr/mB32tnU9nDe9gHDV0O4CSfC46h/T9ovyEfY+J4/tHfshStzbHRKeKF/RE 2ZdA== X-Received: by 10.14.181.196 with SMTP id l44mr10271612eem.44.1365690646047; Thu, 11 Apr 2013 07:30:46 -0700 (PDT) Received: from gina.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id a41sm5965845eei.4.2013.04.11.07.30.44 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 07:30:45 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 11 Apr 2013 16:29:05 +0200 Message-Id: <1365690550-5716-2-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365690550-5716-1-git-send-email-daniel.vetter@ffwll.ch> References: <1365690550-5716-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQlyuTt78Y/gbrOhoY1WCZhVHJNfvdp1HB/TdgixmYiKci7fuYRPfirpFiCR4DwSoRDY7Xft Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/7] drm/i915: Fixup Oops in the pipe config computation 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 Yet again our current confusion between doing the modeset globally, but only having the new parameters for one crtc at a time. This time things blew up when restoring modes in the switchless resume code - intel_modeset_affected_pipes figured out that pipe 2 should be restored, but since pipe 1 was disabled there was no mode nor fb when trying to restore the first crtc. Hilarity ensued and broke resume on my i945gme machine since the pipe_config_set_bpp added in commit 4e53c2e010e531b4a014692199e978482d471c7e Author: Daniel Vetter Date: Wed Mar 27 00:44:58 2013 +0100 drm/i915: precompute pipe bpp before touching the hw fell over the lack of an fb. Fix this mess by now by justing shunting all the cool new global modeset logic in intel_modeset_affected_pipes. Signed-off-by: Daniel Vetter Tested-by: Richard Cochran --- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f60493b..58c6bb6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7629,6 +7629,10 @@ intel_modeset_affected_pipes(struct drm_crtc *crtc, unsigned *modeset_pipes, /* ... and mask these out. */ *modeset_pipes &= ~(*disable_pipes); *prepare_pipes &= ~(*disable_pipes); + + /* HACK: We don't (yet) fully support global modesets. */ + *modeset_pipes &= 1 << intel_crtc->pipe; + *prepare_pipes &= 1 << intel_crtc->pipe; } static bool intel_crtc_in_use(struct drm_crtc *crtc)