public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
	rodrigo.vivi@intel.com, paulo.r.zanoni@intel.com
Subject: Re: [PATCH] drm/i915: Restarting the Idleness DRRS in drrs_flush
Date: Mon, 15 Jun 2015 17:46:59 +0200	[thread overview]
Message-ID: <20150615154651.GA23637@phenom.ffwll.local> (raw)
In-Reply-To: <1434381605-19245-1-git-send-email-ramalingam.c@intel.com>

On Mon, Jun 15, 2015 at 08:50:05PM +0530, Ramalingam C wrote:
> Corrected the documentation on the intel_edp_drrs_flush and
> intel_edp_drrs_invalidate.
> 
> And accordingly edp_drrs_flush function is modified to restart the idleness
> detection after upclocking.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Thanks for testing and updating the comments. I've added a note to the
commit that the kerneldoc is from you and applied the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_dp.c |   30 ++++++++++++++++++++----------
>  1 file changed, 20 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index fb3d7f1..d5d5980 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5455,13 +5455,12 @@ unlock:
>  }
>  
>  /**
> - * intel_edp_drrs_invalidate - Invalidate DRRS
> + * intel_edp_drrs_invalidate - Disable Idleness DRRS
>   * @dev: DRM device
>   * @frontbuffer_bits: frontbuffer plane tracking bits
>   *
> - * When there is a disturbance on screen (due to cursor movement/time
> - * update etc), DRRS needs to be invalidated, i.e. need to switch to
> - * high RR.
> + * This function gets called everytime rendering on the given planes start.
> + * Hence DRRS needs to be Upclocked, i.e. (LOW_RR -> HIGH_RR).
>   *
>   * Dirty frontbuffers relevant to DRRS are tracked in busy_frontbuffer_bits.
>   */
> @@ -5486,6 +5485,7 @@ void intel_edp_drrs_invalidate(struct drm_device *dev,
>  	crtc = dp_to_dig_port(dev_priv->drrs.dp)->base.base.crtc;
>  	pipe = to_intel_crtc(crtc)->pipe;
>  
> +	/* invalidate means busy screen hence upclock */
>  	if (dev_priv->drrs.refresh_rate_type == DRRS_LOW_RR) {
>  		intel_dp_set_drrs_state(dev_priv->dev,
>  				dev_priv->drrs.dp->attached_connector->panel.
> @@ -5499,13 +5499,14 @@ void intel_edp_drrs_invalidate(struct drm_device *dev,
>  }
>  
>  /**
> - * intel_edp_drrs_flush - Flush DRRS
> + * intel_edp_drrs_flush - Restart Idleness DRRS
>   * @dev: DRM device
>   * @frontbuffer_bits: frontbuffer plane tracking bits
>   *
> - * When there is no movement on screen, DRRS work can be scheduled.
> - * This DRRS work is responsible for setting relevant registers after a
> - * timeout of 1 second.
> + * This function gets called every time rendering on the given planes has
> + * completed or flip on a crtc is completed. So DRRS should be upclocked
> + * (LOW_RR -> HIGH_RR). And also Idleness detection should be started again,
> + * if no other planes are dirty.
>   *
>   * Dirty frontbuffers relevant to DRRS are tracked in busy_frontbuffer_bits.
>   */
> @@ -5531,8 +5532,17 @@ void intel_edp_drrs_flush(struct drm_device *dev,
>  	pipe = to_intel_crtc(crtc)->pipe;
>  	dev_priv->drrs.busy_frontbuffer_bits &= ~frontbuffer_bits;
>  
> -	if (dev_priv->drrs.refresh_rate_type != DRRS_LOW_RR &&
> -			!dev_priv->drrs.busy_frontbuffer_bits)
> +	/* flush means busy screen hence upclock */
> +	if (dev_priv->drrs.refresh_rate_type == DRRS_LOW_RR)
> +		intel_dp_set_drrs_state(dev_priv->dev,
> +				dev_priv->drrs.dp->attached_connector->panel.
> +				fixed_mode->vrefresh);
> +
> +	/*
> +	 * flush also means no more activity hence schedule downclock, if all
> +	 * other fbs are quiescent too
> +	 */
> +	if (!dev_priv->drrs.busy_frontbuffer_bits)
>  		schedule_delayed_work(&dev_priv->drrs.work,
>  				msecs_to_jiffies(1000));
>  	mutex_unlock(&dev_priv->drrs.mutex);
> -- 
> 1.7.9.5
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-15 15:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 20:38 [PATCH] drm/i915: drrs_invalidate at flip schedule Ramalingam C
2015-05-15 11:58 ` Chris Wilson
2015-05-15 13:24   ` Ramalingam C
2015-05-15 13:56     ` Chris Wilson
2015-05-18  2:49 ` shuang.he
2015-05-18  8:20 ` Daniel Vetter
2015-06-11  9:27   ` Ramalingam C
2015-06-15  9:52     ` Daniel Vetter
2015-06-15 15:15       ` Ramalingam C
2015-06-15 15:20         ` [PATCH] drm/i915: Restarting the Idleness DRRS in drrs_flush Ramalingam C
2015-06-15 15:46           ` Daniel Vetter [this message]
2015-06-11  9:38   ` [PATCH 1/2] drm/i915: fb_obj invalidate is divided into two functions Ramalingam C
2015-06-11  9:38     ` [PATCH 2/2] drm/i915: frontbuffer invalidate at flip schedule Ramalingam C
2015-06-11  9:56       ` Chris Wilson
2015-06-11 10:57         ` Ramalingam C
2015-06-14 20:59       ` shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150615154651.GA23637@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=ramalingam.c@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox