From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 02/10] drm/i915: VLV PSR: Status/enabled function.
Date: Fri, 7 Nov 2014 10:28:16 +0100 [thread overview]
Message-ID: <20141107092816.GA6135@phenom.ffwll.local> (raw)
In-Reply-To: <1414521943-3479-3-git-send-email-rodrigo.vivi@intel.com>
On Tue, Oct 28, 2014 at 11:45:35AM -0700, Rodrigo Vivi wrote:
> VLV PSR support PSR per pipe, including the status. So we have to check
> if it is enabled per pipe on status.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 82e47da..774eb6c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2076,7 +2076,26 @@ static bool is_edp_psr(struct intel_dp *intel_dp)
> return intel_dp->psr_dpcd[0] & DP_PSR_IS_SUPPORTED;
> }
>
> -static bool intel_edp_is_psr_enabled(struct drm_device *dev)
> +/**
> + * vlv_edp_is_psr_enabled_on_pipe
> + * @dev: DRM device
> + * @pipe: pipe to check for PSR status.
> + *
> + * VLV PSR implements PSR per pipe. This function allows to check if it is
> + * enabled on given pipe.
> + */
> +static bool vlv_edp_is_psr_enabled_on_pipe(struct drm_device *dev, int pipe)
Adding functions without users makes imo patch review harder.
> +{
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + uint32_t val;
> +
> + val = I915_READ(VLV_PSRSTAT(pipe)) &
> + VLV_EDP_PSR_CURR_STATE_MASK;
> + return (val == VLV_EDP_PSR_ACTIVE_NORFB_UP) ||
> + (val == VLV_EDP_PSR_ACTIVE_SF_UPDATE);
> +}
> +
> +static bool hsw_edp_is_psr_enabled(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
>
> @@ -5066,7 +5085,7 @@ void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate)
> * hard to tell without seeing the user of this function of this code.
> * Check locking and ordering once that lands.
> */
> - if (INTEL_INFO(dev)->gen < 8 && intel_edp_is_psr_enabled(dev)) {
> + if (IS_HASWELL(dev) && hsw_edp_is_psr_enabled(dev)) {
Or is there something missing here? Otherwise this hunk here looks like a
separate patch ...
-Daniel
> DRM_DEBUG_KMS("DRRS is disabled as PSR is enabled\n");
> return;
> }
> --
> 1.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-11-07 9:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 18:45 [PATCH 00/10] PSR VLV-Braytrail and CHV-Braswell Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 01/10] drm/i915: Add PSR registers for PSR VLV/CHV Rodrigo Vivi
2014-11-06 18:17 ` R, Durgadoss
2014-11-14 0:34 ` Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 02/10] drm/i915: VLV PSR: Status/enabled function Rodrigo Vivi
2014-11-03 12:30 ` Daniel Vetter
2014-11-06 18:25 ` R, Durgadoss
2014-11-07 9:28 ` Daniel Vetter [this message]
2014-10-28 18:45 ` [PATCH 03/10] drm/i915: Rename psr_do_exit/psr_exit Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 04/10] drm/i915: PSR VLV/CHV: Introduce setup, enable and disable functions Rodrigo Vivi
2014-11-06 18:32 ` R, Durgadoss
2014-11-14 0:33 ` Rodrigo Vivi
2014-11-14 10:02 ` Daniel Vetter
2014-10-28 18:45 ` [PATCH 05/10] drm/i915: PSR activate function Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 06/10] drm/i915: VLV/CHV PSR Software timer mode control Rodrigo Vivi
2014-11-06 18:39 ` R, Durgadoss
2014-11-14 0:27 ` Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 07/10] drm/i915: VLV/CHV PSR: Increase wait delay time before active PSR Rodrigo Vivi
2014-11-06 18:40 ` R, Durgadoss
2014-11-14 0:30 ` Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 08/10] drm/i915: VLV/CHV PSR debugfs Rodrigo Vivi
2014-11-06 18:45 ` R, Durgadoss
2014-11-14 0:26 ` Rodrigo Vivi
2014-10-28 18:45 ` [PATCH 09/10] drm/i915: PSR Baytrail: Not available on Pipe C Rodrigo Vivi
2014-11-03 10:40 ` Imre Deak
2014-10-28 18:45 ` [PATCH 10/10] drm/i915: Enable PSR for Baytrail and Braswell Rodrigo Vivi
2014-11-06 18:49 ` R, Durgadoss
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=20141107092816.GA6135@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--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