Re: [PATCH 6/8] drm/i915/skl: Turn DC handling into a power well

Daniel Stone
2015-11-05T15:01:15Z

Hi,

On 3 November 2015 at 12:31, Patrik Jakobsson
<patrik.jakobsson@linux.intel.com> wrote:
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c6d60b8..e401871 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13296,6 +13296,9 @@ static int intel_atomic_commit(struct drm_device *dev,
> to_intel_crtc_state(crtc->state)->update_pipe;
> unsigned long put_domains = 0;
>
> + if (modeset)
> + intel_display_power_get(dev_priv, POWER_DOMAIN_MODESET);
> +
> if (modeset && crtc->state->active) {
> update_scanline_offset(to_intel_crtc(crtc));
> dev_priv->display.crtc_enable(crtc);
> @@ -13319,6 +13322,9 @@ static int intel_atomic_commit(struct drm_device *dev,
> modeset_put_power_domains(dev_priv, put_domains);
>
> intel_post_plane_update(intel_crtc);
> +
> + if (modeset)
> + intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
> }

If it's safe to shift the modeset_put_power_domains call to after
post_plane_update, you might as well just put POWER_DOMAIN_MODESET in
there, saving a call. (But see the comment on the other patch ...)

Cheers,
Daniel