public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Hans de Goede <hdegoede@redhat.com>, intel-gfx@lists.freedesktop.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>, stable@vger.kernel.org
Subject: Re: [PATCH v3] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT
Date: Wed, 15 Feb 2017 11:31:56 +0200	[thread overview]
Message-ID: <87inobre9f.fsf@intel.com> (raw)
In-Reply-To: <a24e0b19-c0e5-119c-4e1d-237950d573e8@redhat.com>

On Wed, 15 Feb 2017, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 14-02-17 17:12, Jani Nikula wrote:
>> From: Hans de Goede <hdegoede@redhat.com>
>>
>> If there is no OPREGION_ASLE_EXT then a VBT stored in mailbox #4 may
>> use the ASLE_EXT parts of the opregion. Adjust the vbt_size calculation
>> for a vbt in mailbox #4 for this.
>>
>> This fixes the driver not finding the VBT on a jumper ezpad mini3
>> cherrytrail tablet and on a ACER SW5_017 machine.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> ---
>>
>> Hans, I'm resending because for some reason our CI didn't pick this
>> up. Fixed a s/one/on/ typo in the comment while at it.
>
> Ok. Let me know if you need me to do anything to move this forward.

No, just sit back. Pushed to drm-intel-next-queued, thanks for the
patch.

BR,
Jani.

>
> Regards,
>
> Hans
>
>
>> ---
>>  drivers/gpu/drm/i915/intel_opregion.c | 13 ++++++++++++-
>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
>> index f4429f67a4e3..4a862a358c70 100644
>> --- a/drivers/gpu/drm/i915/intel_opregion.c
>> +++ b/drivers/gpu/drm/i915/intel_opregion.c
>> @@ -982,7 +982,18 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv)
>>  			opregion->vbt_size = vbt_size;
>>  		} else {
>>  			vbt = base + OPREGION_VBT_OFFSET;
>> -			vbt_size = OPREGION_ASLE_EXT_OFFSET - OPREGION_VBT_OFFSET;
>> +			/*
>> +			 * The VBT specification says that if the ASLE ext
>> +			 * mailbox is not used its area is reserved, but
>> +			 * on some CHT boards the VBT extends into the
>> +			 * ASLE ext area. Allow this even though it is
>> +			 * against the spec, so we do not end up rejecting
>> +			 * the VBT on those boards (and end up not finding the
>> +			 * LCD panel because of this).
>> +			 */
>> +			vbt_size = (mboxes & MBOX_ASLE_EXT) ?
>> +				OPREGION_ASLE_EXT_OFFSET : OPREGION_SIZE;
>> +			vbt_size -= OPREGION_VBT_OFFSET;
>>  			if (intel_bios_is_valid_vbt(vbt, vbt_size)) {
>>  				DRM_DEBUG_KMS("Found valid VBT in ACPI OpRegion (Mailbox #4)\n");
>>  				opregion->vbt = vbt;
>>

-- 
Jani Nikula, Intel Open Source Technology Center

      reply	other threads:[~2017-02-15  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 16:12 [PATCH v3] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT Jani Nikula
2017-02-14 19:51 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-15  8:58 ` [PATCH v3] " Hans de Goede
2017-02-15  9:31   ` Jani Nikula [this message]

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=87inobre9f.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox