All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Paulo Zanoni <przanoni@gmail.com>, intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 07/11] drm/i915: disable DIP while changing the port
Date: Fri, 25 May 2012 00:07:56 +0100	[thread overview]
Message-ID: <1337900901_233449@CP5-2952> (raw)
In-Reply-To: <1337892594-31908-8-git-send-email-przanoni@gmail.com>

On Thu, 24 May 2012 17:49:49 -0300, Paulo Zanoni <przanoni@gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> The register specification says we need to do this.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |   30 +++++++++++++++++++++++-------
>  1 file changed, 23 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index ce68ec0..5bcd609 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -309,6 +309,7 @@ void g4x_set_infoframes(struct drm_encoder *encoder,
>  	struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
>  	u32 reg = VIDEO_DIP_CTL;
>  	u32 val = I915_READ(reg);
> +	u32 port;
>  
>  	if (!intel_hdmi->has_hdmi_sink) {
>  		/* If the registers were not initialized yet, they might be
> @@ -329,18 +330,25 @@ void g4x_set_infoframes(struct drm_encoder *encoder,
>  		return;
>  	}
>  
> -	val &= ~VIDEO_DIP_PORT_MASK;
>  	switch (intel_hdmi->sdvox_reg) {
>  	case SDVOB:
> -		val |= VIDEO_DIP_PORT_B;
> +		port = VIDEO_DIP_PORT_B;
>  		break;
>  	case SDVOC:
> -		val |= VIDEO_DIP_PORT_C;
> +		port = VIDEO_DIP_PORT_C;
>  		break;
>  	default:
>  		return;
>  	}
>  
> +	if (port != (val & VIDEO_DIP_PORT_MASK)) {
> +		val &= ~VIDEO_DIP_ENABLE;
> +		val |= VIDEO_DIP_SELECT_AVI | VIDEO_DIP_FREQ_VSYNC;
> +		I915_WRITE(reg, val);

When does this write latch? (i.e. do we need to wait upon any event or
timeout?) At the very least you probably want to flush the write (with a
 POSTING_READ) before continuing.

> +		val &= ~VIDEO_DIP_PORT_MASK;
> +		val |= port;
> +	}
> +
>  	val |= VIDEO_DIP_ENABLE;
>  	val &= ~VIDEO_DIP_ENABLE_VENDOR;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-05-24 23:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 20:49 [PATCH 00/11] More HDMI fixes Paulo Zanoni
2012-05-24 20:49 ` [PATCH 01/11] drm/i915: add set_infoframes to struct intel_hdmi Paulo Zanoni
2012-05-24 23:02   ` Chris Wilson
2012-05-24 20:49 ` [PATCH 02/11] drm/i915: properly alternate between DVI and HDMI Paulo Zanoni
2012-05-24 20:49 ` [PATCH 03/11] drm/i915: only set the HDMI port on the DIP once Paulo Zanoni
2012-05-24 20:49 ` [PATCH 04/11] drm/i915: enable DIP before enabling each InfoFrame Paulo Zanoni
2012-05-24 20:49 ` [PATCH 05/11] drm/i915: don't wait for vblank while writing InfoFrames Paulo Zanoni
2012-05-24 20:49 ` [PATCH 06/11] drm/i915: explicitly disable the DIPs we're not using Paulo Zanoni
2012-05-24 20:49 ` [PATCH 07/11] drm/i915: disable DIP while changing the port Paulo Zanoni
2012-05-24 23:07   ` Chris Wilson [this message]
2012-05-24 20:49 ` [PATCH 08/11] drm/i915: don't write 0 to DIP control at HDMI init Paulo Zanoni
2012-05-24 20:58   ` Jesse Barnes
2012-05-24 20:49 ` [PATCH 09/11] drm/i915: don't set SDVO_BORDER_ENABLE when we're HDMI Paulo Zanoni
2012-05-24 20:49 ` [PATCH 10/11] drm/i915: rename sdvox_reg to hdmi_reg on HDMI context Paulo Zanoni
2012-05-24 20:49 ` [PATCH 11/11] drm/i915: remove comment about HSW HDMI DIPs Paulo Zanoni

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=1337900901_233449@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.