Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eugeni Dodonov <eugeni.dodonov@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 1/2] drm/i915: implement hsw_write_infoframe
Date: Fri, 11 May 2012 19:53:01 -0300	[thread overview]
Message-ID: <4FAD984D.3000609@linux.intel.com> (raw)
In-Reply-To: <1336765699-11996-1-git-send-email-przanoni@gmail.com>

On 05/11/2012 04:48 PM, Paulo Zanoni wrote:
> From: Paulo Zanoni<paulo.r.zanoni@intel.com>
>
> Both the control and data registers are completely different now.
>
> Signed-off-by: Paulo Zanoni<paulo.r.zanoni@intel.com>

Haswell for the win! :)

Just some comments below, but nothing too critical.

> +static u32 hsw_infoframe_enable(struct dip_infoframe *frame)
> +{
> +	u32 flags = 0;
> +
> +	switch (frame->type) {
> +	case DIP_TYPE_AVI:
> +		flags |= VIDEO_DIP_ENABLE_AVI_HSW;
> +		break;
> +	case DIP_TYPE_SPD:
> +		flags |= VIDEO_DIP_ENABLE_SPD_HSW;
> +		break;
> +	default:
> +		DRM_DEBUG_DRIVER("unknown info frame type %d\n", frame->type);
> +		break;
> +	}
> +
> +	return flags;

I think it makes sense to inverse order of patches, and simplify the 
_infoframe stuff you do in your 2nd patch first; and then add this part 
with new style directly.

And I think it would be worth adding a comment with TODO saying that we 
still need to support other frames (GCP, VSC and so on). We don't have 
any use for them right now, but in the future we might. And we have all 
the registers defined already anyway.

> +}
> +
> +static u32 hsw_infoframe_data_reg(struct dip_infoframe *frame, enum pipe pipe)
> +{
> +	u32 reg = 0;
> +
> +	switch (frame->type) {
> +	case DIP_TYPE_AVI:
> +		reg = HSW_TVIDEO_DIP_AVI_DATA(pipe);
> +		break;
> +	case DIP_TYPE_SPD:
> +		reg = HSW_TVIDEO_DIP_SPD_DATA(pipe);
> +		break;
> +	default:
> +		DRM_DEBUG_DRIVER("unknown info frame type %d\n", frame->type);
> +		break;
> +	}
> +
> +	return reg;
> +}

I think you could simplify it here as well, similarly to what you do in 
your 2nd patch, and return the register directly.

>   static void hsw_write_infoframe(struct drm_encoder *encoder,
> -				     struct dip_infoframe *frame)
> +				struct dip_infoframe *frame)

I think this should go into the other patch (which simplifies tabbing 
and such), no?

But other than that, very nice!

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>

  parent reply	other threads:[~2012-05-11 22:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 19:48 [PATCH 1/2] drm/i915: implement hsw_write_infoframe Paulo Zanoni
2012-05-11 19:48 ` [PATCH 2/2] drm/i915: small hdmi coding style cleanups Paulo Zanoni
2012-05-11 22:53   ` Eugeni Dodonov
2012-05-11 22:53 ` Eugeni Dodonov [this message]
2012-05-13 13:20   ` [PATCH 1/2] drm/i915: implement hsw_write_infoframe 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=4FAD984D.3000609@linux.intel.com \
    --to=eugeni.dodonov@linux.intel.com \
    --cc=eugeni.dodonov@intel.com \
    --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