Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5114029imb; Thu, 7 Mar 2019 08:04:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxvFvYM28DCGkdxnEn9SF+S4uIqqpKYJbxJ+HopzFtuEGmUl0L5GgoRMVW9Cd+UQvmrT9j1 X-Received: by 2002:a63:4206:: with SMTP id p6mr12255664pga.26.1551974670595; Thu, 07 Mar 2019 08:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551974670; cv=none; d=google.com; s=arc-20160816; b=DbtAfpOBgN7yWCgphl3d2oahA2j7B+MAce5g4lPQtJfuTtobF9D6jYX1exN1r2rW+N /YX5eSgMy+0Y1JdZQKI3OY8DN/81+KF7sdKh7kpzZ955mXpKBNZCfpLohJksI4iKLykn I5qIdNOvcsioZg1BrPpK5MaadVO29WzqFsSA6qhsGIl3iP2p01xKaIfWt1mIbLeKGDFg Wl1tRXx0B6dQALNF4hS+Sy5mJ3fpaWlqQ4qewxRclaI8RASKwPAUJUzwxaY/M67ayLG3 mx/7Zr2ESPxdqOg8tL30KoPVotpb+YC/ETZ//LFnpgPkkUPb0RbgDaTSs6CUSmn10pGP chBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=NS5I/G6QI1Du02xOAvNoh72GxgFaZwmfS3Kl5zk/8VI=; b=iFfurs0pqfaIOkEn9l0P10LeMaaK29ye6UQvooksyYGIWyix9S0uiBWBJ7+7QIkzP8 2fLI9aIuvM1HWw/WRYI6blgKiT6mbftAqUzQ2THBT/9pQOcQw/4HcB9uHktER0jBDh6j qsIEmOPyUiyGbatCsmf3q/CwoZqmZEuoNTaSaABzHLmO5xUW8twuBRXSBMs2Rgb+Csz0 9ergxw9IbjqQ3ety54QtyJDRnVa+nca2BFmcEZiMhU/1+bMjWqPrlT4opjFrFDKFnOxs En+O/cKOKGsvKEwEfifOVTU/p41pkLhOTvB5JfcG2dmCuHkglA9v0YsV3CUuStB8kNcL HPyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y33si4134520pga.134.2019.03.07.08.04.13; Thu, 07 Mar 2019 08:04:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbfCGQDt (ORCPT + 99 others); Thu, 7 Mar 2019 11:03:49 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:39679 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbfCGQDt (ORCPT ); Thu, 7 Mar 2019 11:03:49 -0500 Received: from [167.98.27.226] (helo=[10.35.6.196]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1h1vUo-0003NK-0K; Thu, 07 Mar 2019 16:03:46 +0000 Subject: Re: [PATCH] drm/i915/ddi: Fix default eDP detection on port A To: Jani Nikula , joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20190306200618.17405-1-thomas.preston@codethink.co.uk> <874l8fm72f.fsf@intel.com> <87va0vkm6e.fsf@intel.com> From: Thomas Preston Message-ID: <6f2fc1d7-544c-da3b-d374-633b6bf8a9da@codethink.co.uk> Date: Thu, 7 Mar 2019 16:03:45 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <87va0vkm6e.fsf@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2019 10:34, Jani Nikula wrote: > There are dangers with default VBTs too. They might contain incorrect > information about the specific board you have. You'll also have to set > up the opregion, not just VBT. > > I'm afraid I can't help you there. You already know where to look to see > how the kernel side expects things to work. > > For testing, the i915.vbt_firmware module parameter is helpful, so you > don't need to change your BIOS to change the VBT. Just to clarify, I couldn't get i915.vbt_firmware working with a broken ACPI OpRegion as intel_opregion_setup() bails out before it reaches intel_load_vbt_firmware(). I worked around it by moving the fw load but this isn't a long-term solution. I need to fix ACPI OpRegion / my BIOS before any of this will work. diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c index 1d946240e55f..128a285a5337 100644 --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c @@ -971,6 +971,9 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) BUILD_BUG_ON(sizeof(struct opregion_asle) != 0x100); BUILD_BUG_ON(sizeof(struct opregion_asle_ext) != 0x400); + if (intel_load_vbt_firmware(dev_priv) == 0) + goto out; + pci_read_config_dword(pdev, ASLS, &asls); DRM_DEBUG_DRIVER("graphic opregion physical addr: 0x%x\n", asls); if (asls == 0) { @@ -1016,9 +1019,6 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) if (mboxes & MBOX_ASLE_EXT) DRM_DEBUG_DRIVER("ASLE extension supported\n"); - if (intel_load_vbt_firmware(dev_priv) == 0) - goto out; - if (dmi_check_system(intel_no_opregion_vbt)) goto out;