dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@iki.fi>
To: dri-devel@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 4/4] drm/i915: make DBLCLK modes work
Date: Thu, 03 May 2012 17:14:05 +0300	[thread overview]
Message-ID: <4FA292AD.2090705@iki.fi> (raw)
In-Reply-To: <1334345501-2868-4-git-send-email-przanoni@gmail.com>

13.04.2012 22:31, Paulo Zanoni kirjoitti:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> They require an AVI InfoFrame with a proper Pixel Repetition field.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45729
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> 
> I'm still waiting for confirmation on bugzilla, but I have access to a
> TV that reproduces the problem and the problem goes away with this patch
> series.

Shouldn't all this infoframe stuff be shared between the drivers (like
e.g. EDID stuff is)? I see i915, radeon, nouveau all have separate
implementations of it, and i915 seems to have it even twice (in
intel_hdmi.c and intel_sdvo.c).

The patch below only fixes the issue on one of those four places where
the avi/video infoframe is generated.


>  drivers/gpu/drm/i915/intel_drv.h  |    2 ++
>  drivers/gpu/drm/i915/intel_hdmi.c |    8 ++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 175cca7..3afa7ab 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -215,6 +215,8 @@ struct intel_plane {
>  #define DIP_TYPE_AVI    0x82
>  #define DIP_VERSION_AVI 0x2
>  #define DIP_LEN_AVI     13
> +#define DIP_AVI_PR_1    0
> +#define DIP_AVI_PR_2    1
>  
>  #define DIP_TYPE_SPD	0x83
>  #define DIP_VERSION_SPD	0x1
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 7de2d3b..8d25017 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -220,7 +220,8 @@ static void intel_set_infoframe(struct drm_encoder *encoder,
>  	intel_hdmi->write_infoframe(encoder, frame);
>  }
>  
> -static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
> +static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
> +					 struct drm_display_mode *adjusted_mode)
>  {
>  	struct dip_infoframe avi_if = {
>  		.type = DIP_TYPE_AVI,
> @@ -228,6 +229,9 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
>  		.len = DIP_LEN_AVI,
>  	};
>  
> +	if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK)
> +		avi_if.body.avi.YQ_CN_PR |= DIP_AVI_PR_2;
> +
>  	intel_set_infoframe(encoder, &avi_if);
>  }
>  
> @@ -290,7 +294,7 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
>  	I915_WRITE(intel_hdmi->sdvox_reg, sdvox);
>  	POSTING_READ(intel_hdmi->sdvox_reg);
>  
> -	intel_hdmi_set_avi_infoframe(encoder);
> +	intel_hdmi_set_avi_infoframe(encoder, adjusted_mode);
>  	intel_hdmi_set_spd_infoframe(encoder);
>  }
>  


-- 
Anssi Hannula

  parent reply	other threads:[~2012-05-03 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 19:31 [PATCH 1/4] drm: add the VIC number to the CEA EDID modes Paulo Zanoni
2012-04-13 19:31 ` [PATCH 2/4] drm: add DRM_MODE_FLAG_DBLCLK to CEA modes requiring it Paulo Zanoni
2012-04-13 19:31 ` [PATCH 3/4] drm/i915: rename AVI InfoFrame field 'PR' to 'YQ_CN_PR' Paulo Zanoni
2012-04-13 19:31 ` [PATCH 4/4] drm/i915: make DBLCLK modes work Paulo Zanoni
2012-05-03  9:28   ` Daniel Vetter
2012-05-03 14:14   ` Anssi Hannula [this message]
2012-04-13 20:38 ` [PATCH 1/4] drm: add the VIC number to the CEA EDID modes Adam Jackson

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=4FA292AD.2090705@iki.fi \
    --to=anssi.hannula@iki.fi \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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