[Intel-gfx] [PATCH 2/2] drm/i915/dp: use opregion mailbox #5 EDID for eDP, if available
Lee, Shawn C
shawn.c.lee at intel.com
Wed Oct 14 14:11:37 UTC 2020
On Tue, Oct 13, 2020 at 7:05 PM, Jani Nikula wrote:
>On Tue, 13 Oct 2020, "Lee, Shawn C" <shawn.c.lee at intel.com> wrote:
>> On Mon, Oct 12, 2020 at 5:09 PM, Jani Nikula wrote:
>>>On Mon, 12 Oct 2020, "Lee, Shawn C" <shawn.c.lee at intel.com> wrote:
>>>> On Fri, Aug 28, 2020 at 06:19AM, Shankar Uma wrote:
>>>>>> -----Original Message-----
>>>>>> From: Jani Nikula <jani.nikula at intel.com>
>>>>>> Sent: Friday, August 28, 2020 11:50 AM
>>>>>> To: intel-gfx at lists.freedesktop.org
>>>>>> Cc: Nikula, Jani <jani.nikula at intel.com>; Shankar, Uma
>>>>>> <uma.shankar at intel.com>
>>>>>> Subject: [PATCH 2/2] drm/i915/dp: use opregion mailbox #5 EDID for
>>>>>> eDP, if available
>>>>>>
>>>>>> If a panel's EDID is broken, there may be an override EDID set in
>>>>>> the ACPI OpRegion mailbox #5. Use it if available.
>>>>>
>>>>>Looks Good to me.
>>>>>Reviewed-by: Uma Shankar <uma.shankar at intel.com>
>>>>>
>>>>>> Cc: Uma Shankar <uma.shankar at intel.com>
>>>>>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>>>>>> ---
>>>>>> drivers/gpu/drm/i915/display/intel_dp.c | 3 +++
>>>>>> 1 file changed, 3 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
>>>>>> b/drivers/gpu/drm/i915/display/intel_dp.c
>>>>>> index c57ac83bf563..d1307be196a2 100644
>>>>>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>>>>>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>>>>>> @@ -8114,6 +8114,9 @@ static bool intel_edp_init_connector(struct
>>>>>> intel_dp *intel_dp, goto out_vdd_off; }
>>>>>>
>>>>>> +/* Set up override EDID, if any, from ACPI OpRegion */
>>>>>> +intel_opregion_edid_override(intel_connector);
>>>>>> +
>>>>
>>>> Customer report DUT still get EDID from eDP panel instead of mailbox #5.
>>>> After some investigations, this change can retrieve EDID from mailbox #5 properly.
>>>> But driver still used panel's EDID to enable eDP display. This is
>>>> because of drm_get_edid() was executed after
>>>> intel_opregion_edid_override(). drm_get_edid() return panel's EDID and overwrite mailbox #5's.
>>>
>>>In recent kernels, drm_get_edid() respects EDID override, and calling
>>>drm_get_edid() will return the override EDID from mailbox #5 instead of retrieving the actual EDID.
>>>
>>>Check the kernel version they're using and the drm_get_edid() implementation.
>>>
>>>BR,
>>>Jani.
>>>
>>
>> Just confirm customer is using kernel v5.8. Seems drm_edid.c already
>> include the change for override_edid.
>>
>> BTW. override_edid should be "true" and used to over EDID in intel_opregion_edid_override() in patch 1. Right?
>> But it is "false" in the patch 1.
>>
>> +connector->override_edid = false;
>>
>
>
>+
>+ connector->override_edid = false;
>+ ret = drm_connector_update_edid_property(connector, edid);
>+ if (ret)
>+ return;
>+
>+ connector->override_edid = true;
>+ drm_dbg_kms(&i915->drm, "Using OpRegion EDID for [CONNECTOR:%d:%s]\n",
>+ connector->base.id, connector->name);
>
>
>http://lore.kernel.org/r/20200831083657.15600-1-jani.nikula@intel.com
>
>BR,
>Jani.
>
I think I got the problem now. The patch you attached is correct.
http://lore.kernel.org/r/20200831083657.15600-1-jani.nikula@intel.com
But customer refer to below patch without "override_edid = true".
https://patchwork.freedesktop.org/patch/388309/?series=81121&rev=1
This is why they can't get EDID from mailbox #5 properly.
Best regards,
Shawn
>
>
>> Best regards,
>> Shawn
>>
>>>
>>>>
>>>> We try to move drm_get_edid() before intel_opregion_edid_override().
>>>> The test result is positive, mailbox #5 EDID will substitute for panel's.
>>>> It seems we may need some additional change for this patch. Thanks!
>>>>
>>>> Best regards,
>>>> Shawn
>>>>
>>>>>> mutex_lock(&dev->mode_config.mutex);
>>>>>> edid = drm_get_edid(connector, &intel_dp->aux.ddc); if (edid) {
>>>>>> --
>>>>>> 2.20.1
>>>
>>>--
>>>Jani Nikula, Intel Open Source Graphics Center
>>>_______________________________________________
>>>Intel-gfx mailing list
>>>Intel-gfx at lists.freedesktop.org
>>>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>--
>Jani Nikula, Intel Open Source Graphics Center _______________________________________________
>Intel-gfx mailing list
>Intel-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
More information about the Intel-gfx
mailing list