Thanks for the comments Daniel and Jean<div>I will upload patch set 6.</div><div>This shall include Jean's review coments.</div><div><div>And i will tag Daniel,Jean and Ville as reviewed.</div><div><br></div><div>Regards,</div>
<div>Shirish S</div><div><br><div class="gmail_quote">On Wed, Aug 29, 2012 at 9:12 AM, Daniel Vetter <span dir="ltr"><<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Aug 29, 2012 at 4:46 PM, Shirish S <<a href="mailto:s.shirish@samsung.com">s.shirish@samsung.com</a>> wrote:<br>
> The current logic for probing ddc is limited to<br>
> 2 blocks (256 bytes), this patch adds support<br>
> for the 4 block (512) data.<br>
><br>
> To do this, a single 8-bit segment index is<br>
> passed to the display via the I2C address 30h.<br>
> Data from the selected segment is then immediately<br>
> read via the regular DDC2 address using a repeated<br>
> I2C 'START' signal.<br>
><br>
> Signed-off-by: Shirish S <<a href="mailto:s.shirish@samsung.com">s.shirish@samsung.com</a>><br>
<br>
</div>If you resend patches it'd be nice to keep a changelog of the patch<br>
itself somewhere, otherwise it's just more work to figure that out for<br>
reviewers. Also, you can usually attach reviewed-by tags (like mine)<br>
to a patch resend if you don't change the patch massively ...<br>
-Daniel<br>
<div class="HOEnZb"><div class="h5"><br>
> ---<br>
>  drivers/gpu/drm/drm_edid.c |   22 +++++++++++++++++++---<br>
>  1 files changed, 19 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c<br>
> index bcc4725..b9ffc30 100644<br>
> --- a/drivers/gpu/drm/drm_edid.c<br>
> +++ b/drivers/gpu/drm/drm_edid.c<br>
> @@ -254,6 +254,8 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,<br>
>                       int block, int len)<br>
>  {<br>
>         unsigned char start = block * EDID_LENGTH;<br>
> +       unsigned char segment = block >> 1;<br>
> +       unsigned char xfers = segment ? 3 : 2;<br>
>         int ret, retries = 5;<br>
><br>
>         /* The core i2c driver will automatically retry the transfer if the<br>
> @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,<br>
>         do {<br>
>                 struct i2c_msg msgs[] = {<br>
>                         {<br>
> +                               .addr   = DDC_SEGMENT_ADDR,<br>
> +                               .flags  = segment ? 0 : I2C_M_IGNORE_NAK,<br>
> +                               .len    = 1,<br>
> +                               .buf    = &segment,<br>
> +                       }, {<br>
>                                 .addr   = DDC_ADDR,<br>
>                                 .flags  = 0,<br>
>                                 .len    = 1,<br>
> @@ -276,15 +283,24 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,<br>
>                                 .buf    = buf,<br>
>                         }<br>
>                 };<br>
> -               ret = i2c_transfer(adapter, msgs, 2);<br>
> +<br>
> +       /*<br>
> +        * Avoid sending the segment addr to not upset non-compliant ddc<br>
> +        * monitors.<br>
> +        */<br>
> +               if (!segment)<br>
> +                       ret = i2c_transfer(adapter, &msgs[1], xfers);<br>
> +               else<br>
> +                       ret = i2c_transfer(adapter, msgs, xfers);<br>
> +<br>
>                 if (ret == -ENXIO) {<br>
>                         DRM_DEBUG_KMS("drm: skipping non-existent adapter %s\n",<br>
>                                         adapter->name);<br>
>                         break;<br>
>                 }<br>
> -       } while (ret != 2 && --retries);<br>
> +       } while (ret != xfers && --retries);<br>
><br>
> -       return ret == 2 ? 0 : -1;<br>
> +       return ret == xfers ? 0 : -1;<br>
>  }<br>
><br>
>  static bool drm_edid_is_zero(u8 *in_edid, int length)<br>
> --<br>
> 1.7.0.4<br>
><br>
> _______________________________________________<br>
> dri-devel mailing list<br>
> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Daniel Vetter<br>
<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a> - +41 (0) 79 364 57 48 - <a href="http://blog.ffwll.ch" target="_blank">http://blog.ffwll.ch</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</div></div></blockquote></div><br></div></div>