Suspect code in drm_crtc_helper.c
daniel at ffwll.ch
Sun Sep 15 11:46:03 PDT 2013
On Fri, Sep 13, 2013 at 11:03 AM, Giovanni Campagna
<scampa.giovanni at gmail.com> wrote:
> I was reading through the drm code to get an understanding of how it
> works, and stumbled upon some really strange code in
> drm_crtc_helper_set_config(), where it computes then new encoder for
> each connector (drm_crtc_helper.c:705 in linux-next/master, aka
> There is a comment there saying "don't break so the fail path works
> correctly", but then immediately after it breaks unconditionally, also
> leaving a block of code unreachable.
> Btw, the break and the comment are from f453ba04 ("DRM: add mode
> setting support"), while the block after is from 25f397a4
> ("drm/crtc-helper: explicit DPMS on after modeset")
> I don't have enough knowledge of DRM internals to know if this is
> correct or not, but I think I should point it out, and then you'll
> know. At least, the unreachable code looks like a bug to me.
When I've fixed up the patch to do an explicti dpms on after each
modeset I've fumbled this. Since then it always fell of the plate to
fix this up properly and test it again (since it's a bit tricky code
with far-reaching consequences in driver code). I need to move this up
on my todo ...
Or if you want you can do the patch yourselves (removing the break)
and test it. Especially radeon resume seems to be the tricky part wrt
changes in this area.
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel