From patchwork Wed Mar 26 23:37:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 3895741 Return-Path: X-Original-To: patchwork-dri-devel@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 593E4BF540 for ; Wed, 26 Mar 2014 23:38:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5396320213 for ; Wed, 26 Mar 2014 23:38:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 45B65201FD for ; Wed, 26 Mar 2014 23:38:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C35C66E467; Wed, 26 Mar 2014 16:38:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by gabe.freedesktop.org (Postfix) with ESMTP id D617B6E467; Wed, 26 Mar 2014 16:38:13 -0700 (PDT) Received: by mail-qg0-f42.google.com with SMTP id q107so1830663qgd.15 for ; Wed, 26 Mar 2014 16:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=VCHmExyHG6ZwbEeuimpysNIxsA2d0BrOSdOhQ1ui8XA=; b=ArjFFGiWkyCmBNJ3y2dgXhp1alQcdmRsUD1wXINoE+Wt7DkFKeNxj4QzD9jmG/UlQ4 oHAcdLUSkXsZPdGI8UxHVF0tUT8UR7Zd+rSTjQ138J/w/5puapvHcNz68hDSpbkIuQIj qYbvuBpp397s6+/7WWop7odCZ3uI9MGeZ2lTnT7iONhKmhUz6ptbL1mF0UV0Qa56SO6R TQwV2xJAWwJNEYN37CSxE9OQKFjM/Dv/jiqw5hW9TjGZf52J18ZpHd49sHS+IbxpbOFO L8gDjstbOBahxNIGJURqjq/q6Z9iO40LerH6sHpf/ije8k+gyrSFLcRQNTAH7OsbHc8O sBRQ== X-Received: by 10.229.112.5 with SMTP id u5mr93366754qcp.3.1395877091177; Wed, 26 Mar 2014 16:38:11 -0700 (PDT) Received: from localhost.localdomain (cpe-74-71-2-122.nyc.res.rr.com. [74.71.2.122]) by mx.google.com with ESMTPSA id a93sm280307qge.14.2014.03.26.16.38.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Mar 2014 16:38:10 -0700 (PDT) From: Ilia Mirkin To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Ben Skeggs Subject: [PATCH] acpi: allow non-optimus setups to load vbios from acpi Date: Wed, 26 Mar 2014 19:37:21 -0400 Message-Id: <1395877041-8646-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.3.2 Cc: patrick.clara@gmail.com, cllorenz@uni-potsdam.de X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 There appear to be a crop of new hardware where the vbios is not available from PROM/PRAMIN, but there is a valid _ROM method in ACPI. The data read from PCIROM almost invariably contains invalid instructions (still has the x86 opcodes), which makes this a low-risk way to try to obtain a valid vbios image. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475 Signed-off-by: Ilia Mirkin Cc: # v2.6.35+ --- Not sure if the stable CC is warranted... it's technically not a regression. But it's a simple change that enables hardware to work. Patrick/Claas -- please test this out (if you're applying this to a linux tree, you'll have to do it manually, but it should be fairly obvious where this should apply). drm/nouveau_acpi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c index 83face3..2792069 100644 --- a/drm/nouveau_acpi.c +++ b/drm/nouveau_acpi.c @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev) acpi_status status; acpi_handle dhandle, rom_handle; - if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected) - return false; - dhandle = ACPI_HANDLE(&pdev->dev); if (!dhandle) return false;