From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 08/14] drm/i915: break intel_infoframe_flags into _enable and _frequency
Date: Tue, 8 May 2012 14:10:53 +0200 [thread overview]
Message-ID: <20120508121053.GG4802@phenom.ffwll.local> (raw)
In-Reply-To: <1336162707-3504-7-git-send-email-przanoni@gmail.com>
On Fri, May 04, 2012 at 05:18:20PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> This will allow us to disable an infoframe without changing its
> frequency.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
I'm a bit unhappy about intel_infoframe_frequency, a 15 line function to
essentially always return VIDEO_DIP_FREQ_VSYNC (at least for all the
cases). Furthermore the intel_ prefix for both these functions is a bit a
misdenomer because hsw will change all this. Are you ok if I smash a
bikeshed on top of your patches that replaces intel_infoframe_freq with
VIDEO_DIP_FREQ_VSYNC?
-Daniel
> ---
> drivers/gpu/drm/i915/intel_hdmi.c | 32 ++++++++++++++++++++++++++------
> 1 file changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 4ce5f1f..57ab62f 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -94,16 +94,33 @@ static u32 intel_infoframe_index(struct dip_infoframe *frame)
> return flags;
> }
>
> -static u32 intel_infoframe_flags(struct dip_infoframe *frame)
> +static u32 intel_infoframe_enable(struct dip_infoframe *frame)
> {
> u32 flags = 0;
>
> switch (frame->type) {
> case DIP_TYPE_AVI:
> - flags |= VIDEO_DIP_ENABLE_AVI | VIDEO_DIP_FREQ_VSYNC;
> + flags |= VIDEO_DIP_ENABLE_AVI;
> break;
> case DIP_TYPE_SPD:
> - flags |= VIDEO_DIP_ENABLE_SPD | VIDEO_DIP_FREQ_VSYNC;
> + flags |= VIDEO_DIP_ENABLE_SPD;
> + break;
> + default:
> + DRM_DEBUG_DRIVER("unknown info frame type %d\n", frame->type);
> + break;
> + }
> +
> + return flags;
> +}
> +
> +static u32 intel_infoframe_frequency(struct dip_infoframe *frame)
> +{
> + u32 flags = 0;
> +
> + switch (frame->type) {
> + case DIP_TYPE_AVI:
> + case DIP_TYPE_SPD:
> + flags |= VIDEO_DIP_FREQ_VSYNC;
> break;
> default:
> DRM_DEBUG_DRIVER("unknown info frame type %d\n", frame->type);
> @@ -159,7 +176,8 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
> data++;
> }
>
> - val |= intel_infoframe_flags(frame);
> + val |= intel_infoframe_enable(frame);
> + val |= intel_infoframe_frequency(frame);
>
> I915_WRITE(VIDEO_DIP_CTL, val);
> }
> @@ -190,7 +208,8 @@ static void ironlake_write_infoframe(struct drm_encoder *encoder,
> data++;
> }
>
> - val |= intel_infoframe_flags(frame);
> + val |= intel_infoframe_enable(frame);
> + val |= intel_infoframe_frequency(frame);
>
> I915_WRITE(reg, val);
> }
> @@ -221,7 +240,8 @@ static void vlv_write_infoframe(struct drm_encoder *encoder,
> data++;
> }
>
> - val |= intel_infoframe_flags(frame);
> + val |= intel_infoframe_enable(frame);
> + val |= intel_infoframe_frequency(frame);
>
> I915_WRITE(reg, val);
> }
> --
> 1.7.10
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-05-08 12:09 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 1:55 [PATCH 01/12] drm/i915: enable dip before writing data on gen4 Paulo Zanoni
2012-05-03 1:55 ` [PATCH 02/12] drm/i915: DSL_LINEMASK is 12 bits only on gen2 Paulo Zanoni
2012-05-03 11:55 ` Chris Wilson
2012-05-03 1:55 ` [PATCH 03/12] drm/i915: implement ironlake_wait_for_vblank Paulo Zanoni
2012-05-03 12:00 ` Chris Wilson
2012-05-03 1:55 ` [PATCH 04/12] drm/i915: touch the DIP control register after enabling the HDMI port Paulo Zanoni
2012-05-03 1:55 ` [PATCH 05/12] drm/i915: change coding style of the write_infoframe functions Paulo Zanoni
2012-05-03 1:55 ` [PATCH 06/12] drm/i915: start writing infoframes at address 0 on gen 4 Paulo Zanoni
2012-05-03 1:55 ` [PATCH 07/12] drm/i915: mask the video DIP port select Paulo Zanoni
2012-05-03 20:32 ` Eugeni Dodonov
2012-05-03 1:55 ` [PATCH 08/12] drm/i915: break intel_infoframe_flags into _enable and _index Paulo Zanoni
2012-05-03 20:54 ` Eugeni Dodonov
2012-05-04 14:09 ` Paulo Zanoni
2012-05-03 1:55 ` [PATCH 09/12] drm/i915: disable the infoframe before changing it Paulo Zanoni
2012-05-03 20:42 ` Eugeni Dodonov
2012-05-03 1:55 ` [PATCH 10/12] drm/i915: mask the video DIP frequency when " Paulo Zanoni
2012-05-03 20:42 ` Eugeni Dodonov
2012-05-03 1:55 ` [PATCH 11/12] drm/i915: split ironlake_write_infoframe into ibx_ and cpt_ Paulo Zanoni
2012-05-03 1:55 ` [PATCH 12/12] drm/i915: simplify intel_encoder_commit Paulo Zanoni
2012-05-03 9:41 ` [PATCH 01/12] drm/i915: enable dip before writing data on gen4 Daniel Vetter
2012-05-03 13:46 ` Eugeni Dodonov
2012-05-04 20:18 ` [PATCH 02/14] drm/i915: DSL_LINEMASK is 12 bits only on gen2 Paulo Zanoni
2012-05-04 20:18 ` [PATCH 03/14] drm/i915: implement ironlake_wait_for_vblank Paulo Zanoni
2012-05-08 11:55 ` Daniel Vetter
2012-05-08 12:34 ` Paulo Zanoni
2012-05-08 12:44 ` Daniel Vetter
2012-05-08 12:50 ` Daniel Vetter
2012-05-04 20:18 ` [PATCH 04/14] drm/i915: touch the DIP control register after enabling the HDMI port Paulo Zanoni
2012-05-08 11:59 ` Daniel Vetter
2012-05-08 12:29 ` Daniel Vetter
2012-05-04 20:18 ` [PATCH 05/14] drm/i915: change coding style of the write_infoframe functions Paulo Zanoni
2012-05-04 20:18 ` [PATCH 06/14] drm/i915: start writing infoframes at address 0 on gen 4 Paulo Zanoni
2012-05-04 20:18 ` [PATCH 07/14] drm/i915: mask the video DIP port select Paulo Zanoni
2012-05-08 12:07 ` Daniel Vetter
2012-05-04 20:18 ` [PATCH 08/14] drm/i915: break intel_infoframe_flags into _enable and _frequency Paulo Zanoni
2012-05-08 12:10 ` Daniel Vetter [this message]
2012-05-04 20:18 ` [PATCH 09/14] drm/i915: disable the infoframe before changing it Paulo Zanoni
2012-05-04 20:18 ` [PATCH 10/14] drm/i915: mask the video DIP frequency when " Paulo Zanoni
2012-05-04 20:18 ` [PATCH 11/14] drm/i915: simplify intel_encoder_commit Paulo Zanoni
2012-05-04 20:18 ` [PATCH 12/14] drm/i915: split ironlake_write_infoframe into ibx_ and cpt_ Paulo Zanoni
2012-05-04 20:18 ` [PATCH 13/14] drm/i915: ibx_write_infoframe can disable AVI Paulo Zanoni
2012-05-04 20:36 ` Daniel Vetter
2012-05-04 20:18 ` [PATCH 14/14] drm/i915: set the DIP port on ibx_write_infoframe Paulo Zanoni
2012-05-08 12:51 ` Daniel Vetter
2012-05-08 11:49 ` [PATCH 02/14] drm/i915: DSL_LINEMASK is 12 bits only on gen2 Daniel Vetter
2012-05-08 12:27 ` Daniel Vetter
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=20120508121053.GG4802@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox