Hello Daniel,<br><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 4:18 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">
On Tue, Aug 21, 2012 at 9:10 AM, 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>
> drivers/gpu/drm/drm_edid.c | 17 ++++++++++++-----<br>
> 1 files changed, 12 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c<br>
> index a8743c3..2c2996e 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 short segFlags = segment ? 0 : I2C_M_IGNORE_NAK;<br>
<br>
Have you tested this on i915 with gmbus enabled? I'm asking since we<br>
don't implement the IGNORE_NAK flag and hence I'd expect spurious<br>
failures on displays that don't support E-DDC ...<br>
<br></blockquote><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I have verified this on samsung exynos5 platform, and it passed the HDMI compliance test for the same.</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I also verified this on HDMI analyser- Agilent N5988A , this analyser does not support 4 block EDID data(EDDC),</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">it passed in this analyser as well.</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Is there any specific reason why you dont implement IGNORE_NAK?</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Infact if i think for EDDC, if one does not pass IGNORE_NAK flag it might give errors.</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers, Daniel<br>
<br>
> int ret, retries = 5;<br>
><br>
> /* The core i2c driver will automatically retry the transfer if the<br>
> @@ -264,27 +266,32 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,<br>
> */<br>
> do {<br>
> struct i2c_msg msgs[] = {<br>
> - {<br>
> + { /*set segment pointer */<br>
> + .addr = DDC_SEGMENT_ADDR,<br>
> + .flags = segFlags,<br>
> + .len = 1,<br>
> + .buf = &start,<br>
> + }, { /*set offset */<br>
> .addr = DDC_ADDR,<br>
> .flags = 0,<br>
> .len = 1,<br>
> .buf = &start,<br>
> - }, {<br>
> + }, { /*set data */<br>
> .addr = DDC_ADDR,<br>
> .flags = I2C_M_RD,<br>
> .len = len,<br>
> .buf = buf,<br>
> }<br>
> };<br>
> - ret = i2c_transfer(adapter, msgs, 2);<br>
> + ret = i2c_transfer(adapter, msgs, 3);<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 != 3 && --retries);<br>
><br>
> - return ret == 2 ? 0 : -1;<br>
> + return ret == 3 ? 0 : -1;<br>
> }<br>
><br>
> static bool drm_edid_is_zero(u8 *in_edid, int length)<br>
<span class="HOEnZb"><font color="#888888">> --<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>
--<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>
_______________________________________________<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>
</font></span></blockquote></div>Regards,<div>Shirish S</div>