[PATCH v2 1/4] drm/dp: Add AUX channel infrastructure

Thierry Reding thierry.reding at gmail.com
Fri Dec 20 01:03:51 PST 2013


On Tue, Dec 17, 2013 at 06:44:30PM +0200, Jani Nikula wrote:
> On Tue, 17 Dec 2013, Thierry Reding <thierry.reding at gmail.com> wrote:
[...]
> > +/**
> > + * drm_dp_dpcd_write() - write a series of bytes to the DPCD
> > + * @aux: DisplayPort AUX channel
> > + * @offset: address of the (first) register to write
> > + * @buffer: buffer containing the values to write
> > + * @size: number of bytes in @buffer
> > + *
> > + * Returns the number of bytes transferred on success, or a negative error
> > + * code on failure.
> > + */
> > +ssize_t drm_dp_dpcd_write(struct drm_dp_aux *aux, unsigned int offset,
> > +			  void *buffer, size_t size)
[...]
> > +		switch (msg.reply & DP_AUX_NATIVE_REPLY_MASK) {
> > +		case DP_AUX_NATIVE_REPLY_ACK:
> > +			return 0;
> 
> "Returns the number of bytes transferred on success, or a negative error
> code on failure." Compare drm_dp_dpcd_read.

Good catch!

> You could add an internal helper to do both read and write, it's mostly
> the same code.

Yes, I've factored out drm_dp_dpcd_access() which takes an additional
request parameter. That's the only difference between both functions.

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20131220/a1c32aca/attachment.pgp>


More information about the dri-devel mailing list