[Intel-gfx] [PATCH] drm/i915: Unpin framebuffers when crtc is deconfigured.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Nov 18 00:52:32 PST 2015


Op 17-11-15 om 19:54 schreef Daniel Vetter:
> On Wed, Nov 04, 2015 at 02:43:31PM +0100, Maarten Lankhorst wrote:
>> When setcrtc is called and steals the last connector away from a crtc
>> it's turned off because it can't stay configured without connectors.
>>
>> The framebuffer is still preserved however, and that causes troubles
>> in the IGT stress test kms_flip.flips-vs-fences which tries to use
>> as many pins as possible and hangs on the third crtc because of
>> framebuffer pins on the first 2 crtc's.
>>
>> Cc: stable at vger.kernel.org #v4.3
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> drm_atomic_helper_set_config clears the fb for the primary plane if we
> clear the mode. Where is the leak?
Steal the last connector from another crtc. The crtc is deconfigured because it has no connectors any more, its the planes are left untouched.

> Also where exactly does it hang - we should have plenty of fences left for
> 3x2 pinned framebuffers. If you allow more than 2 pinned fb per plane then
> that's a bug somewhere with pageflips getting ahead of the unpin worker.
> -Daniel
>
Just try that stress test, it submits max_fences-a few so you will get -ENOSPC because it ran out out of fences. :)

~Maarten


More information about the Intel-gfx mailing list