<div dir="ltr"><div><div><div>Hello,<br><br></div>Is there any special reason this has not been merged yet?<br><br></div>Regards<br><br></div>Tomas<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 1, 2015 at 6:07 AM, Jani Nikula <span dir="ltr"><<a href="mailto:jani.nikula@linux.intel.com" target="_blank">jani.nikula@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 23 Nov 2015, Maarten Lankhorst <<a href="mailto:maarten.lankhorst@linux.intel.com">maarten.lankhorst@linux.intel.com</a>> wrote:<br>
> Op 13-11-15 om 14:28 schreef Ander Conselvan De Oliveira:<br>
>> On Thu, 2015-11-12 at 14:58 +0100, Maarten Lankhorst wrote:<br>
>>> Op 12-11-15 om 14:37 schreef Ander Conselvan De Oliveira:<br>
>>>> On Wed, 2015-11-11 at 15:36 +0100, Maarten Lankhorst wrote:<br>
>>>>> When disable_noatomic is called plane_mask is not reliable yet,<br>
>>>>> and plane_state->visible = true even after disabling the primary plane.<br>
>>>> So the stale value of plane_state->visible causes a subsequent modeset to<br>
>>>> enable<br>
>>>> the primary again?<br>
>>> Probably not because it would get recalculated in calc_changes, but it should<br>
>>> really be set to false afterwards.<br>
>> So basically I didn't understand how the wrong value of plane_state->visible<br>
>> causes the bug that was mentioned. I think a brief explanation in the commit<br>
>> message would be good.<br>
> Well, apply with git am --scissors. Same patch but mentioning this.<br>
><br>
> Is this better?<br>
<br>
</span>Ander, ping?<br>
<br>
BR,<br>
Jani.<br>
<div><div class="h5"><br>
> ---->8-----<br>
><br>
> When disable_noatomic is called plane_mask is not correct yet,<br>
> and plane_state->visible = true is left as true after disabling<br>
> the primary plane.<br>
><br>
> Other planes are already disabled as part of crtc sanitization, only the<br>
> primary is left active. But the plane_mask is not updated here. It gets updated<br>
> during fb takeover in modeset_gem_init, or set to the new value on resume.<br>
><br>
> This means that to disable the primary plane 1 << drm_plane_index(primary)<br>
> needs to be used.<br>
><br>
> Afterwards because the crtc is no longer active it's forbidden to keep<br>
> plane_state->visible set, or a WARN_ON in intel_plane_atomic_calc_changes<br>
> triggers. There are other code points that rely on accurate plane_state->visible<br>
> too, so make sure the bool is cleared.<br>
><br>
><br>
> The other planes are already disabled in intel_sanitize_crtc, so<br>
> they don't have to be handled here.<br>
><br>
> Cc: <a href="mailto:stable@vger.kernel.org">stable@vger.kernel.org</a> #v4.3, v4.2?<br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=92655" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=92655</a><br>
> Tested-by: Tomas Mezzadra <<a href="mailto:tmezzadra@gmail.com">tmezzadra@gmail.com</a>><br>
> Signed-off-by: Maarten Lankhorst <<a href="mailto:maarten.lankhorst@linux.intel.com">maarten.lankhorst@linux.intel.com</a>><br>
> ---<br>
> drivers/gpu/drm/i915/intel_display.c | 4 +++-<br>
> 1 file changed, 3 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c<br>
> index b5f7493213b7..bc3282ab5ed2 100644<br>
> --- a/drivers/gpu/drm/i915/intel_display.c<br>
> +++ b/drivers/gpu/drm/i915/intel_display.c<br>
> @@ -6267,9 +6267,11 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)<br>
> WARN_ON(intel_crtc->unpin_work);<br>
><br>
> intel_pre_disable_primary(crtc);<br>
> +<br>
> + intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary));<br>
> + to_intel_plane_state(crtc->primary->state)->visible = false;<br>
> }<br>
><br>
> - intel_crtc_disable_planes(crtc, crtc->state->plane_mask);<br>
> dev_priv->display.crtc_disable(crtc);<br>
> intel_crtc->active = false;<br>
> intel_update_watermarks(crtc);<br>
> -- 2.1.0<br>
><br>
</div></div>> _______________________________________________<br>
> Intel-gfx mailing list<br>
> <a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jani Nikula, Intel Open Source Technology Center<br>
</font></span></blockquote></div><br></div>