From patchwork Fri Feb 7 20:37:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 3607681 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6A771BF418 for ; Fri, 7 Feb 2014 20:37:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3EF720131 for ; Fri, 7 Feb 2014 20:37:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D0B892012F for ; Fri, 7 Feb 2014 20:37:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1CEC1057AE; Fri, 7 Feb 2014 12:37:36 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C6481057AD for ; Fri, 7 Feb 2014 12:37:30 -0800 (PST) Received: by mail-yk0-f177.google.com with SMTP id q200so494455ykb.8 for ; Fri, 07 Feb 2014 12:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=2UN8G8s0ywsOnx+HH4EgGzhIBFiqg/nRQ1wj/iD7ZFI=; b=KQ3gueMIhoRdzLaPwMUIixsXtS/S8tB16xqCuaofwIQmvQMepNL9r0p9JYvLDXZ4Gn gFWoAKGCb7j+wBwd0p+gkNF/+dxmEf5nL8OBEmPqD3D41oW+RWHcGvy0m2BUQKZt6adl WZqIBg5Z57gXHPgN4Bl0eT8SW+BW5YU0GXt868AVZdxVFqnVgY8i0pjWzZHTP4ZUFXN1 JYOa0fjZQu49ctPD9AO2YzjWIun2RsK4rUqtBmo21CIOaCi10+5LRidix6fn7kl9DRKJ 2pX9xprA3qLF+lsaMhn6tzzve9U74aKCXalE58OCnQ/Cwhc9cPEpgq+IgYfnDr8S0Y4J fBLw== X-Received: by 10.236.147.129 with SMTP id t1mr1635447yhj.91.1391805447896; Fri, 07 Feb 2014 12:37:27 -0800 (PST) Received: from localhost.localdomain ([189.67.97.168]) by mx.google.com with ESMTPSA id q9sm13697981yhk.16.2014.02.07.12.37.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2014 12:37:27 -0800 (PST) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Feb 2014 18:37:03 -0200 Message-Id: <1391805427-4576-6-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1391805427-4576-1-git-send-email-rodrigo.vivi@gmail.com> References: <1391805427-4576-1-git-send-email-rodrigo.vivi@gmail.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 5/9] drm/i915: Short-circuit no-op vga_set_state() 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: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chris Wilson Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1e9dd84..c411bf8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11575,6 +11575,9 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state) return -EIO; } + if (!!(gmch_ctrl & INTEL_GMCH_VGA_DISABLE) == !state) + return 0; + if (state) gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE; else