Op 08-11-16 om 15:11 schreef Ville Syrjälä: > On Tue, Nov 08, 2016 at 01:55:36PM +0100, Maarten Lankhorst wrote: >> This is a hack and not needed. Use the right mask by checking >> intel_state->modeset. This works for watermark sanitization too. >> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> >> --- >> drivers/gpu/drm/i915/intel_pm.c | 38 +++++++++++++++----------------------- >> 1 file changed, 15 insertions(+), 23 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c >> index 02f52b52a03d..d38a46efcfed 100644 >> --- a/drivers/gpu/drm/i915/intel_pm.c >> +++ b/drivers/gpu/drm/i915/intel_pm.c >> @@ -3089,26 +3089,22 @@ skl_ddb_get_pipe_allocation_limits(struct drm_device *dev, >> struct intel_atomic_state *intel_state = to_intel_atomic_state(state); >> struct drm_i915_private *dev_priv = to_i915(dev); >> struct drm_crtc *for_crtc = cstate->base.crtc; >> - unsigned int pipe_size, ddb_size; >> + unsigned int pipe_size, ddb_size, active_crtcs; >> int nth_active_pipe; >> >> + if (intel_state->modeset) >> + active_crtcs = intel_state->active_crtcs; >> + else >> + active_crtcs = dev_priv->active_crtcs; > What's the story with the locking here? if !modeset, 3 things can happen: 1. fastset, connection_mutex held, dev_priv->active_crtcs cannot change. 2. crtc disabled, active_crtcs is potentially garbage, but harmless since we don't write disabled wm's when the crtc is already disabled. (same as what happens currently) 3. crtc enabled, dev_priv->active_crtcs is valid because ddb reallocation requires locking all active crtc's for reallocation, which requires taking this lock for this crtc. This wouldn't be valid for gen8-, but is valid because of skl reallocation requirements. ~Maarten _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx