drm_do_probe_ddc_edid ENXIO check too aggressive?

Daniel Vetter daniel at ffwll.ch
Mon Dec 16 15:40:27 PST 2013


On Mon, Dec 16, 2013 at 11:55 PM, Daniel Drake <drake at endlessm.com> wrote:
> On Mon, Dec 16, 2013 at 4:19 PM, Daniel Vetter <daniel at ffwll.ch> wrote:
>> This usually happens if the hpd isn't properly recessed and we start
>> the i2c transaction while the physical connection hasn't been
>> established properly yet. If you're _really_ slow and careful you can
>> probably even break your current delay (presuming this theory is
>> correct).
>
> Hmm yes, I think you are probably right. Without touching the HDMI
> cable I disconnect and reconnect the power cable of my TV. Presumably
> that plug is more "atomic" :)
>
> When I do that, it detects the resolution fine.
>
> Do you have any suggestions on how to fix this then? Anything nicer
> than e.g. a 1 second delay before processing hpd events? That would
> still fail in the "slow connect" case but might be the best option?

Have a bit of logic in the exynos ->detect function to re-try a 2nd
round of edid probing after each hdp interrupt if the first one
returns an -ENXIO. Only tricky part is to be careful with edge
detection so that userspace gets all the hotplug events still.
Presuming you don't have any funkiness with reprobing causing yet
another hpd interrupt and stuff like that (seen it all), as long as
you're using the helpers in drm_crtc_helper.c it should all be working
correctly. So you want a work item which just grabs all modeset locks
and then calls drm_helper_probe_single_connector_modes or something on
the right connector.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list