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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 17, 2013 at 06:44:30PM +0200, Jani Nikula wrote:
> On Tue, 17 Dec 2013, Thierry Reding <thierry.reding@xxxxxxxxx> 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

Attachment: pgp3knrC4W9HT.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux