public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 3/4] drm/dp: Add DisplayPort link helpers
Date: Tue, 21 Jan 2014 20:30:40 +0100	[thread overview]
Message-ID: <20140121193039.GA12023@ulmo.nvidia.com> (raw)
In-Reply-To: <87bnzabv5r.fsf@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --]

On Fri, Jan 17, 2014 at 03:22:08PM +0200, Jani Nikula wrote:
> On Tue, 14 Jan 2014, Thierry Reding <thierry.reding@gmail.com> wrote:
[...]
> > +int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link)
> > +{
> > +	u8 values[3];
> > +	int err;
> > +
> > +	memset(link, 0, sizeof(*link));
> > +
> > +	err = drm_dp_dpcd_read(aux, DP_DPCD_REV, values, sizeof(values));
> > +	if (err < 0)
> > +		return err;
> > +
> > +	link->revision = values[0];
> > +	link->rate = drm_dp_bw_code_to_link_rate(values[1]);
> > +	link->num_lanes = values[2] & DP_MAX_LANE_COUNT_MASK;
> > +
> > +	if (values[2] & DP_ENHANCED_FRAME_CAP)
> > +		link->capabilities |= DP_LINK_CAP_ENHANCED_FRAMING;
> 
> Since DP_DPCD_REV == 0, you could use the #defines for the indexes (if
> you're going to send another version anyway). Ditto below for
> drm_dp_link_configure.

We write to DP_LINK_BW_SET in drm_dp_link_configure() so I don't think
we can apply the same trick there. Also I'm not sure if it's really
worth having that here. Given that it only works if we actually read
DP_DPCD_REV, the number of locations where it can be done is fairly
small and they will look asymmetric with respect to other functions
using the drm_dp_dpcd_read/write() helpers.

So unless you feel strongly I'd prefer not to do this.

> Other than that nitpick, the series looks good to me. If we face any
> issues migrating i915 on top of this, we can iron them out later on.
> 
> On the series,
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Thanks!

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-01-21 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 14:55 [PATCH v3 0/4] drm/dp: Introduce AUX channel infrastructure Thierry Reding
2014-01-14 14:55 ` [PATCH v3 1/4] drm/dp: Add " Thierry Reding
2014-01-14 14:55 ` [PATCH v3 2/4] drm/dp: Add drm_dp_dpcd_read_link_status() Thierry Reding
2014-01-14 14:55 ` [PATCH v3 3/4] drm/dp: Add DisplayPort link helpers Thierry Reding
2014-01-14 15:52   ` Alex Deucher
2014-01-15  9:00     ` Thierry Reding
2014-01-17 13:22   ` Jani Nikula
2014-01-21 19:30     ` Thierry Reding [this message]
2014-01-14 14:55 ` [PATCH v3 4/4] drm/dp: Allow registering AUX channels as I2C busses Thierry Reding
2014-01-14 15:54 ` [PATCH v3 0/4] drm/dp: Introduce AUX channel infrastructure Alex Deucher
2014-01-14 15:55   ` Alex Deucher

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=20140121193039.GA12023@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.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