Bug 92792 - [HDMI Braswell N3150 ] forced Edid file seems still to use broken tv edid for sound
Summary: [HDMI Braswell N3150 ] forced Edid file seems still to use broken tv edid for...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: PatchSubmitted
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-03 10:47 UTC by kaufmann.mobil
Modified: 2017-09-26 10:17 UTC (History)
5 users (show)

See Also:
i915 platform: BSW/CHT
i915 features: display/audio, display/HDMI


Attachments

Description kaufmann.mobil 2015-11-03 10:47:00 UTC
My TV Pioneer pdp 434 seems to have an broken EDID (CRC error). It is connected via an Onkyo AVR.

The System (ASROCK n3150m) is not enabling HDMI when TV is on and/or is connected directly. HDMI is enabled when the AVR is on and TV off.

This issue is handled with drm_kms_kernel_helper edid overridings. But HDMI sound is not working when TV is on. /proc/asound/card0/eld* is not populated although drm is detecting 8 SAD in the valid edid file which i have given. 

Currently i am attaching an udev rule to drm events which is disabling and enabling audio via xrandr when /proc/asound/card0/eld* is not populated. The rule is executed when i am switching tv off. After switching TV on i have got sound until the system is not executing any xrandr command.

Distribution is OpenElec by fritsch with 4.3 Kernel. I was redirected to here from http://forum.kodi.tv/showthread.php?tid=231955&pid=2148990#pid2148990

here some debug boot logs with drm.debug=0x1e

Pioneer connected direct: http://sprunge.us/jVMi
TV via AVR both on: http://sprunge.us/HfQf
TV off / AVR on: http://sprunge.us/QSae
same run as above but tv is switched on afterwards: http://sprunge.us/CebX
xrandr after above: http://sprunge.us/fYJZ
forced EDID, TV off(Standby), tv is connected directly: http://sprunge.us/TgWa
forced EDID, TV off / AVR off: http://sprunge.us/LPXi
forced EDID, TV off / AVR on: http://sprunge.us/ULKT
forced EDID, TV on / AVR on: http://sprunge.us/AZjX

I am not sure if it is the same issue: /proc/asound/card0/eld* is also not populated with given edid file without any connected HDMI.

if you need more info, please let me know.
Comment 1 Jani Nikula 2015-11-03 11:52:39 UTC
At a light reading of the code, the edid override is done only at fill_modes (get connector), but by that time we have already setup the codec using eld from the edid loaded from the sink. It's a valid bug.
Comment 2 keqiao 2017-02-10 01:36:04 UTC
hi kaufmann,

Is this still a issue to you? if yes, please try the latest drm-tip branch(url = git://anongit.freedesktop.org/drm-tip). if this issue is already be fixed, please help to close this bug. thanks~
Comment 3 kaufmann.mobil 2017-02-10 08:29:38 UTC
I am following all the time the change log (archiv) and saw no solution until now. 
So long 'intel_hdmi_set_edid' is calling 'drm_get_edid' it will always ignore the firmware EDID which is loaded during drm helper on boot cmd line.

intel_hdmi_set_edid needs to use the firmware file if available. drm-tip is also using drm_get_edid and i am using linux kernel 4.9.8. So yes the bug is still valid.

i have tried the patch commited in december: https://lists.freedesktop.org/archives/intel-gfx/2016-December/115248.html

but even with this patch the edid is once loaded from TV and not from the firmware.
Comment 4 keqiao 2017-02-12 12:13:52 UTC
Thanks for your info.
please retest latest drm-tips, with which GFX driver use SW API to sync ELD with audio driver on hot plug, then provide the kernel logs to us.
Comment 5 Jani Nikula 2017-02-22 09:13:54 UTC
Please try [1] on top of current drm-tip. With that, the forced EDID loading gets moved at a lower level, and should work transparently for everything. The module parameter gets changed to drm.edid_firmware.

For future reference, please attach all files to bugzilla instead of external sites. (And please attach logs etc. individually as text/plain.) If the logs get dropped from the external sites, our job gets much harder. Thanks.

[1] http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-5-git-send-email-jani.nikula@intel.com
Comment 6 davide benini 2017-04-26 08:42:43 UTC
The pathc indicated works well for me.
I am still doing some test, but forcing an edid to kernel command line I have now /proc/asound/card0/eld* popultaed although I have the monitor disconnected
Comment 7 kaufmann.mobil 2017-05-19 15:03:41 UTC
I have build Linux Kernel 4.11 with patchset: https://patchwork.freedesktop.org/series/19764/
which includes given patch.

And when all devices are off resolution and eld from EDID are used. Looking good so far.
Comment 8 Elizabeth 2017-08-31 20:43:14 UTC
[1] http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-5-git-send-email-jani.nikula@intel.com

According to the linked page, [1] still isn't upstream.
Comment 9 Jani Nikula 2017-09-19 15:42:43 UTC
Please try current drm-tip, with:

commit ac6c35a4d8c77083525044a192cb1a8711381e94
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Mon Sep 18 21:20:03 2017 +0300

    drm: add backwards compatibility support for drm_kms_helper.edid_firmware

commit 53fd40a90f3c0bdad86ec266ee5df833f54ace39
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Tue Sep 12 11:19:26 2017 +0300

    drm: handle override and firmware EDID at drm_do_get_edid() level
Comment 10 Jani Nikula 2017-09-21 09:05:18 UTC
Actually, based on the comments above and testing internally, closing as fixed. I'm afraid the change has such a wide impact on all drm drivers that it'll only hit Linus' tree at v4.15-rc1 timeframe. Can't backport to stable kernels.

Please file new bugs if there are related issues, and please reopen if the commits don't do what they claim. Thanks for the report.
Comment 11 kaufmann.mobil 2017-09-22 08:52:33 UTC
For me it is okay to have the fix "drm: handle override and firmware EDID at drm_do_get_edid() Level" included in 4.15. Until then i will continue to compile the kernel with the patch by my own. 

I am now using the patch for a longer time and had never any issue regarding missing sound or resolution. Edid override fully works. Thanks for fixing this!
Comment 12 Jani Nikula 2017-09-26 10:17:31 UTC
(In reply to kaufmann.mobil from comment #11)
> For me it is okay to have the fix "drm: handle override and firmware EDID at
> drm_do_get_edid() Level" included in 4.15. Until then i will continue to
> compile the kernel with the patch by my own. 
> 
> I am now using the patch for a longer time and had never any issue regarding
> missing sound or resolution. Edid override fully works. Thanks for fixing
> this!

Thanks for the report and testing!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.