All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Preston <thomas.preston@codethink.co.uk>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	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
Subject: Re: [PATCH] drm/i915/ddi: Fix default eDP detection on port A
Date: Thu, 7 Mar 2019 16:03:45 +0000	[thread overview]
Message-ID: <6f2fc1d7-544c-da3b-d374-633b6bf8a9da@codethink.co.uk> (raw)
In-Reply-To: <87va0vkm6e.fsf@intel.com>

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;




WARNING: multiple messages have this Message-ID (diff)
From: Thomas Preston <thomas.preston@codethink.co.uk>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	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
Subject: Re: [PATCH] drm/i915/ddi: Fix default eDP detection on port A
Date: Thu, 7 Mar 2019 16:03:45 +0000	[thread overview]
Message-ID: <6f2fc1d7-544c-da3b-d374-633b6bf8a9da@codethink.co.uk> (raw)
In-Reply-To: <87va0vkm6e.fsf@intel.com>

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;



_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-03-07 16:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 20:06 [PATCH] drm/i915/ddi: Fix default eDP detection on port A Thomas Preston
2019-03-06 21:44 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-07  8:18 ` [PATCH] " Jani Nikula
2019-03-07  8:18   ` Jani Nikula
2019-03-07 10:02   ` Thomas Preston
2019-03-07 10:34     ` Jani Nikula
2019-03-07 10:49       ` Thomas Preston
2019-03-07 10:49         ` Thomas Preston
2019-03-07 11:32         ` Jani Nikula
2019-03-07 11:32           ` Jani Nikula
2019-03-13 16:13           ` Jani Nikula
2019-03-07 16:03       ` Thomas Preston [this message]
2019-03-07 16:03         ` Thomas Preston
2019-03-07 14:43 ` ✓ Fi.CI.BAT: success for drm/i915/ddi: Fix default eDP detection on port A (rev2) Patchwork
2019-03-07 16:06 ` ✗ Fi.CI.BAT: failure for drm/i915/ddi: Fix default eDP detection on port A (rev3) Patchwork
2019-03-07 17:20 ` ✓ Fi.CI.IGT: success for drm/i915/ddi: Fix default eDP detection on port A (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f2fc1d7-544c-da3b-d374-633b6bf8a9da@codethink.co.uk \
    --to=thomas.preston@codethink.co.uk \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.