Re: [PATCH V4] drm: edid: add support for E-DDC

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

 





On Wed, Aug 29, 2012 at 4:08 AM, Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
On Sat, Aug 25, 2012 at 03:13:56PM +0530, Shirish S wrote:
> The current logic for probing ddc is limited to
> 2 blocks (256 bytes), this patch adds support
> for the 4 block (512) data.
>
> To do this, a single 8-bit segment index is
> passed to the display via the I2C address 30h.
> Data from the selected segment is then immediately
> read via the regular DDC2 address using a repeated
> I2C 'START' signal.
>
> Signed-off-by: Shirish S <s.shirish@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_edid.c |   22 ++++++++++++++++++----
>  1 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index a8743c3..cde7af0 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -254,6 +254,8 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
>                     int block, int len)
>  {
>       unsigned char start = block * EDID_LENGTH;
> +     unsigned char segment = block >> 1;
> +     unsigned char xfers = segment ? 3 : 2;
>       int ret, retries = 5;
>
>       /* The core i2c driver will automatically retry the transfer if the
> @@ -264,7 +266,12 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
>        */
>       do {
>               struct i2c_msg msgs[] = {
> -                     {
> +                     { /*set segment pointer */

Missing whitespace after '/*'. Perhaps just drop the comment. I don't
see much value in it.

Done. 
> +                             .addr   = DDC_SEGMENT_ADDR,
> +                             .flags  = segment ? 0 : I2C_M_IGNORE_NAK,
> +                             .len    = 1,
> +                             .buf    = &segment,
> +                     }, {
>                               .addr   = DDC_ADDR,
>                               .flags  = 0,
>                               .len    = 1,
> @@ -276,15 +283,22 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
>                               .buf    = buf,
>                       }
>               };
> -             ret = i2c_transfer(adapter, msgs, 2);
> +     /* Avoid sending the segment addr to not upset non-compliant ddc
> +      * monitors.
> +      */

Wrong indentation and comment style is wrong. I'm guessing this didn't go
through checkpatch.pl.

I never got tha above as either an error or warning in the checkpatch,
anyways have uploaded patch set 5 incorporating your comments. 
Otherwise looks OK to me.

--
Ville Syrjälä
Intel OTC

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

_______________________________________________
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