diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2015-06-15 12:33:48 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-22 14:25:07 +0200 |
commit | 0583236eaa8f8596c2adf5116020dba9bcf77806 (patch) | |
tree | dfe54f97acd7f287862461e5a70fb92c40f83091 /drivers/gpu/drm/i915/intel_display.c | |
parent | 7fabf5ef18ea76714ff04baaeeddb949faf486dd (diff) | |
download | lwn-0583236eaa8f8596c2adf5116020dba9bcf77806.tar.gz lwn-0583236eaa8f8596c2adf5116020dba9bcf77806.zip |
drm/i915: move detaching scalers to begin_crtc_commit, v2.
This is probably intended to be be done during vblank evasion.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bc55221ffe65..449e07d29b3e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2925,16 +2925,13 @@ unsigned long intel_plane_obj_offset(struct intel_plane *intel_plane, /* * This function detaches (aka. unbinds) unused scalers in hardware */ -void skl_detach_scalers(struct intel_crtc *intel_crtc) +static void skl_detach_scalers(struct intel_crtc *intel_crtc) { struct drm_device *dev; struct drm_i915_private *dev_priv; struct intel_crtc_scaler_state *scaler_state; int i; - if (!intel_crtc || !intel_crtc->config) - return; - dev = intel_crtc->base.dev; dev_priv = dev->dev_private; scaler_state = &intel_crtc->config->scaler_state; @@ -13831,6 +13828,9 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc) intel_crtc->atomic.evade = intel_pipe_update_start(intel_crtc, &intel_crtc->atomic.start_vbl_count); + + if (!needs_modeset(crtc->state) && INTEL_INFO(dev)->gen >= 9) + skl_detach_scalers(intel_crtc); } static void intel_finish_crtc_commit(struct drm_crtc *crtc) |