All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2] drm/i915: Rename defines for selection of ddi buffer translation slot
Date: Wed, 27 Aug 2014 14:16:13 +0300	[thread overview]
Message-ID: <20140827111613.GQ4193@intel.com> (raw)
In-Reply-To: <20140808123617.GB2751@strange.ger.corp.intel.com>

On Fri, Aug 08, 2014 at 01:36:17PM +0100, Damien Lespiau wrote:
> On Fri, Aug 08, 2014 at 05:47:25PM +0530, sonika.jindal@intel.com wrote:
> >  	/* Start the training iterating through available voltages and emphasis,
> >  	 * testing each value twice. */
> > -	for (i = 0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values) * 2; i++) {
> > +	for (i = 0; i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
> 
> This is correct but obsfucated. You're actually doing
> ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 * 2 and we might as well give
> the ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 a proper name like I
> suggested.

I've been wondering why we don't have something like:

struct ddi_buf_trans {
	u32 deemp;
	u32 vswing;
}

and use that instead of having the magic /2 appear in places.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-08-27 11:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 12:17 [PATCH v2] drm/i915: Rename defines for selection of ddi buffer translation slot sonika.jindal
2014-08-08 12:36 ` Damien Lespiau
2014-08-27 11:16   ` Ville Syrjälä [this message]
2014-08-27 11:26     ` Damien Lespiau
2014-08-27 13:27       ` [PATCH] drm/i915/ddi: use struct for ddi buf translation tables Jani Nikula
2014-08-27 13:47         ` Damien Lespiau
2014-08-27 13:55           ` Daniel Vetter
2014-08-27 13:49         ` 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=20140827111613.GQ4193@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 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.