[Intel-gfx] [PATCH] drm/i915: change CRTC assertion on LCPLL disable

Daniel Vetter daniel at ffwll.ch
Fri Dec 6 23:37:24 CET 2013


On Fri, Dec 06, 2013 at 08:29:01PM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> Currently, PC8 is enabled at modeset_global_resources, which is called
> after intel_modeset_update_state. Due to this, there's a small race
> condition on the case where we start enabling PC8, then do a modeset
> while PC8 is still being enabled. The racing condition triggers a WARN
> because intel_modeset_update_state will mark the CRTC as enabled, then
> the thread that's still enabling PC8 might look at the data structure
> and think that PC8 is being enabled while a pipe is enabled. Despite
> the WARN, this is not really a bug since we'll wait for the
> PC8-enabling thread to finish when we call modeset_global_resources.
> 
> The spec says the CRTC cannot be enabled when we disable LCPLL, so we
> had a check for crtc->base.enabled. If we change to crtc->active we
> will still prevent disabling LCPLL while the CRTC is enabled, and we
> will also prevent the WARN above.
> 
> This is a replacement for the previous patch named
>     "drm/i915: get/put PC8 when we get/put a CRTC"
> 
> Testcase: igt/pm_pc8/modeset-lpsp-stress-no-wait
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list