[PATCHv4 06/13] drm: Add primary plane helpers (v2)

Daniel Vetter daniel at ffwll.ch
Tue Apr 1 14:47:21 PDT 2014


On Tue, Apr 1, 2014 at 9:46 PM, Dave Airlie <airlied at gmail.com> wrote:
> On Tue, Apr 1, 2014 at 5:45 PM, Daniel Vetter <daniel at ffwll.ch> wrote:
>> commit a3a0544b2c84e1d7a2022b558ecf66d8c6a8dd93
>> Author: Dave Airlie <airlied at redhat.com>
>> Date:   Mon Aug 31 15:16:30 2009 +1000
>>
>>     drm/kms: add explicit encoder disable function and detach harder.
>>
>>     For shared tv-out and VGA encoders, we really need to know if
>>     the encoder is just being switched off temporarily in blanking
>>     or if we are really disabling it hard.
>>
>>     Also we need to try harder to disconnect encoders from unused
>>     connectors so we can share more efficently.
>>
>>     (shared encoders stuff is coming in radeon tv-out support)
>>
>>     Signed-off-by: Dave Airlie <airlied at redhat.com>
>>
>> To me this always smelled like papering over broken userspace. I've killed
>> this in the i915 modeset rewrite and we didn't really have angry users
>> scaling our walls. But I'm not sure what'll happen if we do this for all
>> other drivers.
>
> I've had to look at this again recently, and while I still don't like
> my commit, its
> not papering over userspace, it might be papering over fbcon :-)
>
> You don't have any hw that operates like this, so I'd be surprised if
> you had users falling over,
>
> The problem is if I have a single DAC encoder, with tv-out and VGA
> connectors, and I unplug the VGA connector, and plug in the tv
> connector, how do I get fbcon to pop-up,
>
> Though that said this commit caused a regression that I'm not sure I
> liked either, since I think we used to allow you to force a mode on
> disconnected outputs, and this stops that from working, I noticed in a
> virtual env.

As discussed on irc I think we should be able to fix the issue with
fbcon by using an atomic modeset. The bug only happens when fbcon
tries to enable the newly plugged-in connector before it disabled the
old one and then can't get at the shared encoder needed to enable
either. If we have atomic modesets the crtc helpers can always first
disable all the unused stuff and then light up the new things, which
should make this work. So imo disabling this hunk as in the patch I've
just sent out looks like the way forward for primary planes and atomic
modeset.
-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