Re: [PATCH] drm/i915/ddi: Fix default eDP detection on port A
From: Thomas Preston
Date: Thu Mar 07 2019 - 11:03:51 EST
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;