From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/i915/sdvo: Port the infoframe code to the shared infrastructure
Date: Mon, 5 Aug 2013 21:08:30 +0300 [thread overview]
Message-ID: <20130805180830.GB5004@intel.com> (raw)
In-Reply-To: <1375464180-7259-8-git-send-email-damien.lespiau@intel.com>
On Fri, Aug 02, 2013 at 06:22:59PM +0100, Damien Lespiau wrote:
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
Looks all right.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_sdvo.c | 38 ++++++++++++++++++++------------------
> 1 file changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 47423f3..02f220b 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -963,30 +963,32 @@ static bool intel_sdvo_write_infoframe(struct intel_sdvo *intel_sdvo,
> static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo,
> const struct drm_display_mode *adjusted_mode)
> {
> - struct dip_infoframe avi_if = {
> - .type = DIP_TYPE_AVI,
> - .ver = DIP_VERSION_AVI,
> - .len = DIP_LEN_AVI,
> - };
> - uint8_t sdvo_data[4 + sizeof(avi_if.body.avi)];
> - struct intel_crtc *intel_crtc = to_intel_crtc(intel_sdvo->base.base.crtc);
> + uint8_t sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
> + struct drm_crtc *crtc = intel_sdvo->base.base.crtc;
> + struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> + union hdmi_infoframe frame;
> + int ret;
> + ssize_t len;
> +
> + ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
> + adjusted_mode);
> + if (ret < 0) {
> + DRM_ERROR("couldn't fill AVI infoframe\n");
> + return false;
> + }
>
> if (intel_sdvo->rgb_quant_range_selectable) {
> if (intel_crtc->config.limited_color_range)
> - avi_if.body.avi.ITC_EC_Q_SC |= DIP_AVI_RGB_QUANT_RANGE_LIMITED;
> + frame.avi.quantization_range =
> + HDMI_QUANTIZATION_RANGE_LIMITED;
> else
> - avi_if.body.avi.ITC_EC_Q_SC |= DIP_AVI_RGB_QUANT_RANGE_FULL;
> + frame.avi.quantization_range =
> + HDMI_QUANTIZATION_RANGE_FULL;
> }
>
> - avi_if.body.avi.VIC = drm_match_cea_mode(adjusted_mode);
> -
> - intel_dip_infoframe_csum(&avi_if);
> -
> - /* sdvo spec says that the ecc is handled by the hw, and it looks like
> - * we must not send the ecc field, either. */
> - memcpy(sdvo_data, &avi_if, 3);
> - sdvo_data[3] = avi_if.checksum;
> - memcpy(&sdvo_data[4], &avi_if.body, sizeof(avi_if.body.avi));
> + len = hdmi_infoframe_pack(&frame, sdvo_data, sizeof(sdvo_data));
> + if (len < 0)
> + return false;
>
> return intel_sdvo_write_infoframe(intel_sdvo, SDVO_HBUF_INDEX_AVI_IF,
> SDVO_HBUF_TX_VSYNC,
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-08-05 18:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 17:22 Port the i915 HDMI infoframe code to the common infrastructure Damien Lespiau
2013-08-02 17:22 ` [PATCH 1/8] video/hdmi: Replace the payload length by their defines Damien Lespiau
2013-08-05 17:11 ` Ville Syrjälä
2013-08-02 17:22 ` [PATCH 2/8] video/hdmi: Introduce a generic hdmi_infoframe union Damien Lespiau
2013-08-05 17:30 ` Ville Syrjälä
2013-08-02 17:22 ` [PATCH 3/8] video/hdmi: Add a macro to return the size of a full infoframe Damien Lespiau
2013-08-05 17:31 ` Ville Syrjälä
2013-08-02 17:22 ` [PATCH 4/8] drm/i915/hdmi: Change the write_infoframe vfunc to take a buffer and a type Damien Lespiau
2013-08-05 17:40 ` Ville Syrjälä
2013-08-02 17:22 ` [PATCH 5/8] drm/i915/hdmi: Port the infoframe code to the common hdmi helpers Damien Lespiau
2013-08-05 13:12 ` Ville Syrjälä
2013-08-06 19:17 ` Damien Lespiau
2013-08-02 17:22 ` [PATCH 6/8] drm/i915/hmdi: Rename set_infoframe() to write_infoframe() Damien Lespiau
2013-08-05 17:50 ` Ville Syrjälä
2013-08-06 17:49 ` Damien Lespiau
2013-08-06 18:01 ` Daniel Vetter
2013-08-06 18:18 ` Damien Lespiau
2013-08-02 17:22 ` [PATCH 7/8] drm/i915/sdvo: Port the infoframe code to the shared infrastructure Damien Lespiau
2013-08-05 18:08 ` Ville Syrjälä [this message]
2013-08-02 17:23 ` [PATCH 8/8] drm/i915: Remove the now obsolete infoframe definitions Damien Lespiau
2013-08-05 18:27 ` Ville Syrjälä
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=20130805180830.GB5004@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).