From: Hans de Goede Subject: Re: [PATCH] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT Date: Mon, 23 Jan 2017 17:04:55 +0100 Message-ID: <4d80a27f-00fe-38cd-3981-f73a741fc4d5@redhat.com> References: <20161225101928.7618-1-hdegoede@redhat.com> <87pokd4p0k.fsf@intel.com> <067c9e05-a9a5-2432-22a8-bfd49ae706ff@redhat.com> <877f5m83n2.fsf@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------99B6D2CD388D58E89BC71078" Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id D15F96E08D for ; Mon, 23 Jan 2017 16:04:57 +0000 (UTC) In-Reply-To: <877f5m83n2.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula , Daniel Vetter , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org This is a multi-part message in MIME format. --------------99B6D2CD388D58E89BC71078 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, On 23-01-17 11:36, Jani Nikula wrote: > On Fri, 20 Jan 2017, Hans de Goede wrote: >> Hi, >> >> On 31-12-16 17:00, Hans de Goede wrote: >>> Hi, >>> >>> On 27-12-16 11:58, Jani Nikula wrote: >>>> On Sun, 25 Dec 2016, Hans de Goede wrote: >>>>> 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. >>>> >>>> Thanks for the patch. I think you're onto something, but I don't think >>>> the patch is quite correct. That said, I'm not sure myself yet what >>>> would be. ;) >>>> >>>> Without the change, does intel_bios_is_valid_vbt() return true anyway? >>> >>> No. >>> >>>> I.e. do you get "Found valid VBT in ACPI OpRegion (Mailbox #4)\n" in >>>> log? >>> >>> No. >>> >>>> If not, which of the debug messages in intel_bios_is_valid_vbt() do >>>> you get? >>> >>> I get "BDB incomplete", which is why I wrote this patch and believe >>> this patch is the right solution. With this patch everything works, >>> >>>> In the latter case, I suspect you'll end up with failure in intel_bios.c >>>> with either "No MIPI config BDB found" or "No MIPI Sequence found, >>>> parsing complete\n". >>> >>> I don't remember the exact error, other then getting the >>> "BDB incomplete" error, and the i915 driver not listing the DSI connector >>> under /sys/class drm. >>> >>> What makes you say: "but I don't think the patch is quite correct" why >>> should the code still keep the OPREGION_ASLE_EXT start as end of the >>> mailbox #4 vbt if there is the ASLE extenstion is not used ? >> >> Ping, any progress on this ? I still believe my original patch is >> correct. Eitherway I would like to see a fix for this, be it this fix >> or something else, as a fix is necessary to get the LCD panel to work >> on jumper ezpad mini3 tablets. > > Please send me /sys/kernel/debug/dri/0/i915_opregion on that machine. > > Perusing the opregion spec (which I regret I can't share with you), I > found this: > > * On mailboxes in general, "Mail-box locations are fixed and should > always be allocated irrespective of the support for a given mail box > is available or not." > > * On opregion->asle->rvda, "This is mainly used when VBT size exceeds > 6KB and can't be stored in Mailbox4." It isn't clear to me whether > ->rvda was used or not. The opregion dump should shed light on > this. You can of course check that by adding debug prints in the code > too. > > * On mailbox 4 (the VBT), "Holds a maximum of 6KB sized Raw VBT data > (not VBIOS image) from VBIOS image." > > Clearly the patch is against the spec. Let's see if the opregion you > have there is against the spec too, and proceed from there... Ok, I've attached a dump of the opregion on the tablet in question. Regards, Hans --------------99B6D2CD388D58E89BC71078 Content-Type: application/gzip; name="jumper-ezpad-mini3-i915_opregion.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="jumper-ezpad-mini3-i915_opregion.gz" H4sICGMphlgAA2p1bXBlci1lenBhZC1taW5pMy1pOTE1X29wcmVnaW9uAO1YDUwcxxV+s7t3 tzu3xMe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w9GhegYmqY+WmWPCmIohzSRiHcYcDm7TBpMJ3nQswWd5g08/ JTE5wde477bbGHguP5+Bw/V83iPLlqXNxb37C2Lx+lhxLvQiN1S7gJ67cDOEU6Hiyg7YAna8 VDZoDKbom7DVPo50NIyenT1oXJCFdqFj9qBxYY9wjrVPiETsFO+bPWhCfFh8Sjw8e9CE+Lr4 Rwb3iRfFZNpCnDxo4OFB03IZmLjRy2PiC/CYFPNnsT8YZOCADQ7a4FAQ87jZmiM2OOrmYNLW HLPBL23wvFLMwFRgEQMv5Ocx8OLCHAZeyuZP85Q96mWFd37F7vyq3fm1bO788WI+6nV71Bs2 eNMGJ4JuBt6yNW/b4FeYg2lb844NTtrg18Cd/02AB/NdO5jv2cH8rY/H8EM6ynoKv6P50sHT +PfmP408NU+np7bInxLheTpOeOuE9QuC4QNp+GAaPnLnDD7KsJUKUzPwBUjN+3I3k68YafM7 +JYTkSjavuTx1Bm3wYQN9tngORvsz+NnxiE+y2Euj3B5lG+oSXtjurg3ce7NU/wxOnT+GFEQ yVAtwQl62jL0loksP98B6ROXh+GT4BAotqyc4l58yOVpLs9w+Wcuz3L5kX7JCeaAagQVTGQz EQCneYfQwNQgQSItFLucXEGjusSC0ETbBvIYBEEyb5Q0LYiLwPrz2kHNCtLotxGvBATJc4t5 88y0FwlSvMpu91BTI7TJYR7lrG/aDPM0T/N03dK/AZDwyVMAIAAA --------------99B6D2CD388D58E89BC71078 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --------------99B6D2CD388D58E89BC71078--