Op 13-06-16 om 10:59 schreef Maarten Lankhorst:
> Op 10-06-16 om 00:14 schreef Matt Roper:
>> intel_state->active_crtcs is usually only initialized when doing a
>> modeset.  During our first atomic commit after boot, we're effectively
>> faking a modeset to sanitize the DDB/wm setup, so ensure that this field
>> gets initialized before use.
>>
>> Reported-by: Tvrtko Ursulin <[email protected]>
>> Cc: Tvrtko Ursulin <[email protected]>
>> Signed-off-by: Matt Roper <[email protected]>
>> ---
>>  drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
> Ah right. Code assumes that it's valid.
>
> However this still leaves open a hole in case a modeset changes active_crtcs 
> during the first commit.
>
> intel_state->active_crtcs is set at the same time intel_state->modeset is, so
> resend with if (!intel_state->modeset) intel_state->active_crtcs = 
> dev_priv->active_crtcs; ?
Hm you need connection_mutex lock for that one, so need to lock that first 
before assigning active_crtcs.
You can grab that lock unconditionally, since we already hold it in case of 
modeset..

~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to