Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 6/8] drm/i915: Enable/Disable PSR
Date: Tue, 26 Feb 2013 14:48:33 +0200	[thread overview]
Message-ID: <20130226124833.GS4469@intel.com> (raw)
In-Reply-To: <1361832922-19801-7-git-send-email-rodrigo.vivi@gmail.com>

On Mon, Feb 25, 2013 at 07:55:20PM -0300, Rodrigo Vivi wrote:
> Adding Enable and Disable PSR functionalities. This includes setting the
> PSR configuration over AUX, sending SDP VSC DIP over the eDP PIPE config,
> enabling PSR in the sink via DPCD register and finally enabling PSR on
> the host.
> 
> This patch is heavily based on initial PSR code by Sateesh Kavuri and
> Kumar Shobhit but in a different implementation.
> 
> Credits-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
> Credits-by: Shobhit Kumar <shobhit.kumar@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h  |  40 +++++++++
>  drivers/gpu/drm/i915/intel_dp.c  | 183 +++++++++++++++++++++++++++++++++++++++
>  drivers/gpu/drm/i915/intel_drv.h |   3 +
>  3 files changed, 226 insertions(+)
> 
<snip>
> +void intel_edp_write_vsc_psr(struct intel_dp* intel_dp,
> +			     struct edp_vsc_psr *vsc_psr)
> +{
> +	struct drm_device *dev =  intel_dp_to_dev(intel_dp);
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct intel_crtc *intel_crtc =  to_intel_crtc(intel_dp_to_crtc(intel_dp));
> +	u32 ctl_reg = HSW_TVIDEO_DIP_CTL(intel_crtc->cpu_transcoder);
> +	u32 data_reg = HSW_TVIDEO_DIP_VSC_DATA(intel_crtc->cpu_transcoder);
> +	uint32_t *data = (uint32_t *)vsc_psr;
> +	unsigned int i;
> +	u32 val = I915_READ(ctl_reg);
> +
> +	if (data_reg == 0)
> +		return;
> +
> +	/* As per eDP spec, wait for vblank to send SDP VSC packet */
> +	intel_wait_for_vblank(dev, intel_crtc->pipe);
> +
> +	mmiowb();

I was curious about these mmiowb()s and apparently they were added to
all infoframe writes "just in case". But AFAICS on x86 mmiowb() ends
up as a compiler barrier, so this stuff seems to be a nop.

And if these writes can get reordered somewhere, why not everything
else too? I'm sure we have places where we write a bunch of registers,
and the final write enables something which requires the earlier
writes to have landed beforehand.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-02-26 12:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 22:55 [PATCH 0/8] Enable eDP PSR functionality at HSW - v3 Rodrigo Vivi
2013-02-25 22:55 ` [PATCH 1/8] drm/i915: Organize VBT stuff inside drm_i915_private Rodrigo Vivi
2013-02-25 22:55 ` [PATCH 2/8] drm/i915: Use cpu_transcoder for HSW_TVIDEO_DIP_* instead of pipe Rodrigo Vivi
2013-02-27 19:44   ` [Intel-gfx] " Paulo Zanoni
2013-03-03 17:26     ` Daniel Vetter
2013-02-25 22:55 ` [PATCH 3/8] drm/i915: Added SDP and VSC structures for handling PSR for eDP Rodrigo Vivi
2013-02-27 21:52   ` [Intel-gfx] " Paulo Zanoni
2013-03-03 17:28   ` Daniel Vetter
2013-02-25 22:55 ` [PATCH 4/8] drm/i915: Read the EDP DPCD and PSR Capability Rodrigo Vivi
2013-02-26 15:02   ` Ville Syrjälä
2013-02-25 22:55 ` [PATCH 5/8] drm/i915: VBT Parsing for the PSR Feature Block for HSW Rodrigo Vivi
2013-02-25 22:55 ` [PATCH 6/8] drm/i915: Enable/Disable PSR Rodrigo Vivi
2013-02-26 12:48   ` Ville Syrjälä [this message]
2013-03-07 16:54     ` Jesse Barnes
2013-02-26 13:27   ` Jani Nikula
2013-02-26 15:02   ` Ville Syrjälä
2013-02-28 17:30     ` [Intel-gfx] " Paulo Zanoni
2013-02-28 17:21   ` Paulo Zanoni
2013-02-25 22:55 ` [PATCH 7/8] drm/i915: Added debugfs support for PSR Status Rodrigo Vivi
2013-02-28 17:44   ` [Intel-gfx] " Paulo Zanoni
2013-02-25 22:55 ` [PATCH 8/8] drm/i915: Hook PSR functionality Rodrigo Vivi
2013-02-28 17:47   ` [Intel-gfx] " Paulo Zanoni
2013-02-28 17:52 ` [Intel-gfx] [PATCH 0/8] Enable eDP PSR functionality at HSW - v3 Paulo Zanoni
2013-02-28 18:02   ` Ville Syrjälä
2013-03-04 23:27     ` Daniel Vetter
2013-03-05  0:39       ` [Intel-gfx] " Rodrigo Vivi

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=20130226124833.GS4469@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.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