* [PATCH V6] drm: edid: add support for E-DDC @ 2012-08-30 7:04 Shirish S 2012-08-30 7:04 ` Shirish S 0 siblings, 1 reply; 17+ messages in thread From: Shirish S @ 2012-08-30 7:04 UTC (permalink / raw) To: dri-devel This patch adds support in probing 4 block edid data, for E-DDC. This is the first test case in CTS, for HDMI compliance. Changes from V1: 1. Data type of offset adress updated to unsigned short 2. Updated the buf feild of msg[0] Changes from V2: Add switch for DDC and E-DDC Changes from V3: Remove switch,and avoid sending of segment data for non E-DDC Changes from V4: Fix review comments about space and comment indentation. Changes from V5: Compacted the code. Based on drm-next branch Shirish S (1): drm: edid: add support for E-DDC drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH V6] drm: edid: add support for E-DDC 2012-08-30 7:04 [PATCH V6] drm: edid: add support for E-DDC Shirish S @ 2012-08-30 7:04 ` Shirish S 2012-08-30 10:58 ` Ville Syrjälä 2012-09-03 15:54 ` Shirish S 0 siblings, 2 replies; 17+ messages in thread From: Shirish S @ 2012-08-30 7:04 UTC (permalink / raw) To: dri-devel 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@samsung.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index bcc4725..7f62de5 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 @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf, do { struct i2c_msg msgs[] = { { + .addr = DDC_SEGMENT_ADDR, + .flags = 0, + .len = 1, + .buf = &segment, + }, { .addr = DDC_ADDR, .flags = 0, .len = 1, @@ -276,15 +283,21 @@ 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. + */ + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); + if (ret == -ENXIO) { DRM_DEBUG_KMS("drm: skipping non-existent adapter %s\n", adapter->name); break; } - } while (ret != 2 && --retries); + } while (ret != xfers && --retries); - return ret == 2 ? 0 : -1; + return ret == xfers ? 0 : -1; } static bool drm_edid_is_zero(u8 *in_edid, int length) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-08-30 7:04 ` Shirish S @ 2012-08-30 10:58 ` Ville Syrjälä 2012-08-30 16:17 ` Shirish S 2012-09-03 15:54 ` Shirish S 1 sibling, 1 reply; 17+ messages in thread From: Ville Syrjälä @ 2012-08-30 10:58 UTC (permalink / raw) To: Shirish S; +Cc: dri-devel On Thu, Aug 30, 2012 at 12:34:06PM +0530, Shirish S wrote: > @@ -276,15 +283,21 @@ 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. > + */ Indentation is still wrong. Or is it gettimg mangled by some email server? > + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); > + > if (ret == -ENXIO) { > DRM_DEBUG_KMS("drm: skipping non-existent adapter %s\n", > adapter->name); > break; > } > - } while (ret != 2 && --retries); > + } while (ret != xfers && --retries); > > - return ret == 2 ? 0 : -1; > + return ret == xfers ? 0 : -1; > } > > static bool drm_edid_is_zero(u8 *in_edid, int length) -- Ville Syrjälä Intel OTC ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-08-30 10:58 ` Ville Syrjälä @ 2012-08-30 16:17 ` Shirish S 0 siblings, 0 replies; 17+ messages in thread From: Shirish S @ 2012-08-30 16:17 UTC (permalink / raw) To: Ville Syrjälä; +Cc: Shirish S, dri-devel [-- Attachment #1.1: Type: text/plain, Size: 1563 bytes --] On Thu, Aug 30, 2012 at 3:58 AM, Ville Syrjälä < ville.syrjala@linux.intel.com> wrote: > On Thu, Aug 30, 2012 at 12:34:06PM +0530, Shirish S wrote: > > @@ -276,15 +283,21 @@ 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. > > + */ > > Indentation is still wrong. Or is it gettimg mangled by some email server? > > I have double checked with checkpatch, i did not get any errors or warnings, looks like as you are saying may be true. Requesting for merge! > > + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); > > + > > if (ret == -ENXIO) { > > DRM_DEBUG_KMS("drm: skipping non-existent adapter > %s\n", > > adapter->name); > > break; > > } > > - } while (ret != 2 && --retries); > > + } while (ret != xfers && --retries); > > > > - return ret == 2 ? 0 : -1; > > + return ret == xfers ? 0 : -1; > > } > > > > static bool drm_edid_is_zero(u8 *in_edid, int length) > > -- > Ville Syrjälä > Intel OTC > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel > [-- Attachment #1.2: Type: text/html, Size: 2459 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-08-30 7:04 ` Shirish S 2012-08-30 10:58 ` Ville Syrjälä @ 2012-09-03 15:54 ` Shirish S 2012-09-04 13:45 ` Adam Jackson ` (2 more replies) 1 sibling, 3 replies; 17+ messages in thread From: Shirish S @ 2012-09-03 15:54 UTC (permalink / raw) To: airlied; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 3187 bytes --] Hello Dave, My patch-set for adding support for 4 block EDID is now reviewed and ready. Please let me know if you want any further clarification Regards, Shirish S On Thu, Aug 30, 2012 at 12:04 AM, Shirish S <s.shirish@samsung.com> 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@samsung.com> > Reviewed-by: Jean Delvare <jdelvare@suse.de> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- > 1 files changed, 16 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index bcc4725..7f62de5 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 > @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, > unsigned char *buf, > do { > struct i2c_msg msgs[] = { > { > + .addr = DDC_SEGMENT_ADDR, > + .flags = 0, > + .len = 1, > + .buf = &segment, > + }, { > .addr = DDC_ADDR, > .flags = 0, > .len = 1, > @@ -276,15 +283,21 @@ 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. > + */ > + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); > + > if (ret == -ENXIO) { > DRM_DEBUG_KMS("drm: skipping non-existent adapter > %s\n", > adapter->name); > break; > } > - } while (ret != 2 && --retries); > + } while (ret != xfers && --retries); > > - return ret == 2 ? 0 : -1; > + return ret == xfers ? 0 : -1; > } > > static bool drm_edid_is_zero(u8 *in_edid, int length) > -- > 1.7.0.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel > [-- Attachment #1.2: Type: text/html, Size: 4276 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-03 15:54 ` Shirish S @ 2012-09-04 13:45 ` Adam Jackson 2012-09-08 2:30 ` Shirish S 2012-09-13 14:36 ` Shirish S 2 siblings, 0 replies; 17+ messages in thread From: Adam Jackson @ 2012-09-04 13:45 UTC (permalink / raw) To: Shirish S; +Cc: dri-devel On 9/3/12 11:54 AM, Shirish S wrote: > Hello Dave, > > My patch-set for adding support for 4 block EDID is now reviewed and ready. > Please let me know if you want any further clarification I assume you have actual displays with that many EDID extensions. Can you send a sample of the complete EDID block from one such display? I'd be interested to know what extensions are present. - ajax ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-03 15:54 ` Shirish S 2012-09-04 13:45 ` Adam Jackson @ 2012-09-08 2:30 ` Shirish S 2012-09-08 10:35 ` Dave Airlie 2012-09-13 14:36 ` Shirish S 2 siblings, 1 reply; 17+ messages in thread From: Shirish S @ 2012-09-08 2:30 UTC (permalink / raw) To: airlied; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 3503 bytes --] Hi Dave, Gentle Reminder! This patch is required for passing the very first test case of HDMI Compliance test suite. Regards, Shirish S On Mon, Sep 3, 2012 at 8:54 AM, Shirish S <shirish.s12@gmail.com> wrote: > Hello Dave, > > My patch-set for adding support for 4 block EDID is now reviewed and ready. > Please let me know if you want any further clarification > > Regards, > Shirish S > > > On Thu, Aug 30, 2012 at 12:04 AM, Shirish S <s.shirish@samsung.com> 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@samsung.com> >> Reviewed-by: Jean Delvare <jdelvare@suse.de> >> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> >> --- >> drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- >> 1 files changed, 16 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index bcc4725..7f62de5 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 >> @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, >> unsigned char *buf, >> do { >> struct i2c_msg msgs[] = { >> { >> + .addr = DDC_SEGMENT_ADDR, >> + .flags = 0, >> + .len = 1, >> + .buf = &segment, >> + }, { >> .addr = DDC_ADDR, >> .flags = 0, >> .len = 1, >> @@ -276,15 +283,21 @@ 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. >> + */ >> + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); >> + >> if (ret == -ENXIO) { >> DRM_DEBUG_KMS("drm: skipping non-existent adapter >> %s\n", >> adapter->name); >> break; >> } >> - } while (ret != 2 && --retries); >> + } while (ret != xfers && --retries); >> >> - return ret == 2 ? 0 : -1; >> + return ret == xfers ? 0 : -1; >> } >> >> static bool drm_edid_is_zero(u8 *in_edid, int length) >> -- >> 1.7.0.4 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/dri-devel >> > > [-- Attachment #1.2: Type: text/html, Size: 4784 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-08 2:30 ` Shirish S @ 2012-09-08 10:35 ` Dave Airlie 2012-09-08 15:49 ` Shirish S 2012-09-10 18:46 ` Adam Jackson 0 siblings, 2 replies; 17+ messages in thread From: Dave Airlie @ 2012-09-08 10:35 UTC (permalink / raw) To: Shirish S; +Cc: dri-devel On Sat, Sep 8, 2012 at 3:30 AM, Shirish S <shirish.s12@gmail.com> wrote: > Hi Dave, > Gentle Reminder! > This patch is required for passing the very first test case of HDMI > Compliance test suite. > Regards, > Shirish S Can you provide ajax with the sample he asked for previously? Dave. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-08 10:35 ` Dave Airlie @ 2012-09-08 15:49 ` Shirish S 2012-09-08 16:13 ` Paul Menzel 2012-09-10 18:46 ` Adam Jackson 1 sibling, 1 reply; 17+ messages in thread From: Shirish S @ 2012-09-08 15:49 UTC (permalink / raw) To: Dave Airlie; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 458 bytes --] I have already sent him the sample he had asked for. Regards, Shirish S On Sat, Sep 8, 2012 at 3:35 AM, Dave Airlie <airlied@gmail.com> wrote: > On Sat, Sep 8, 2012 at 3:30 AM, Shirish S <shirish.s12@gmail.com> wrote: > > Hi Dave, > > Gentle Reminder! > > This patch is required for passing the very first test case of HDMI > > Compliance test suite. > > Regards, > > Shirish S > > Can you provide ajax with the sample he asked for previously? > > Dave. > [-- Attachment #1.2: Type: text/html, Size: 895 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-08 15:49 ` Shirish S @ 2012-09-08 16:13 ` Paul Menzel 2012-09-09 1:04 ` Shirish S 0 siblings, 1 reply; 17+ messages in thread From: Paul Menzel @ 2012-09-08 16:13 UTC (permalink / raw) To: Shirish S; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 959 bytes --] Dear Shirish, thank you for your answers and patience. Please just sent plain text message to mailings lists and adhere to the netiquette (inline quoting) [1]. That would be awesome. Am Samstag, den 08.09.2012, 08:49 -0700 schrieb Shirish S: > On Sat, Sep 8, 2012 at 3:35 AM, Dave Airlie <airlied@gmail.com> wrote: > > > On Sat, Sep 8, 2012 at 3:30 AM, Shirish S <shirish.s12@gmail.com> wrote: > > > Hi Dave, > > > Gentle Reminder! > > > This patch is required for passing the very first test case of HDMI > > > Compliance test suite. > > > Regards, > > > Shirish S > > > > Can you provide ajax with the sample he asked for previously? > > I have already sent him the sample he had asked for. Could you sent it to the list again as we are all interested in it? If you are allowed that is of course. Thanks and hopefully your patch will go in soon, Paul [1] http://en.opensuse.org/openSUSE:Mailing_list_netiquette [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-08 16:13 ` Paul Menzel @ 2012-09-09 1:04 ` Shirish S 0 siblings, 0 replies; 17+ messages in thread From: Shirish S @ 2012-09-09 1:04 UTC (permalink / raw) To: Paul Menzel; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 1297 bytes --] On Sat, Sep 8, 2012 at 9:13 AM, Paul Menzel < paulepanter@users.sourceforge.net> wrote: > Dear Shirish, > > > thank you for your answers and patience. > > Please just sent plain text message to mailings lists and adhere to the > netiquette (inline quoting) [1]. That would be awesome. > > Have been replying inline, anyways,thanks for the correction. > > Am Samstag, den 08.09.2012, 08:49 -0700 schrieb Shirish S: > > On Sat, Sep 8, 2012 at 3:35 AM, Dave Airlie <airlied@gmail.com> wrote: > > > > > On Sat, Sep 8, 2012 at 3:30 AM, Shirish S <shirish.s12@gmail.com> > wrote: > > > > Hi Dave, > > > > Gentle Reminder! > > > > This patch is required for passing the very first test case of HDMI > > > > Compliance test suite. > > > > Regards, > > > > Shirish S > > > > > > Can you provide ajax with the sample he asked for previously? > > > > I have already sent him the sample he had asked for. > > Could you sent it to the list again as we are all interested in it? If > you are allowed that is of course. > > am not sure if i can mail it to list, but you can get it from http://www.quantumdata.com/index.asp by mailing their technical support. > > Thanks and hopefully your patch will go in soon, > > Paul > > > [1] http://en.opensuse.org/openSUSE:Mailing_list_netiquette > Regards, Shirish S [-- Attachment #1.2: Type: text/html, Size: 2384 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-08 10:35 ` Dave Airlie 2012-09-08 15:49 ` Shirish S @ 2012-09-10 18:46 ` Adam Jackson 1 sibling, 0 replies; 17+ messages in thread From: Adam Jackson @ 2012-09-10 18:46 UTC (permalink / raw) To: Dave Airlie; +Cc: dri-devel On 9/8/12 6:35 AM, Dave Airlie wrote: > On Sat, Sep 8, 2012 at 3:30 AM, Shirish S <shirish.s12@gmail.com> wrote: >> Hi Dave, >> Gentle Reminder! >> This patch is required for passing the very first test case of HDMI >> Compliance test suite. >> Regards, >> Shirish S > > Can you provide ajax with the sample he asked for previously? He did, it even looks like I expected it to look: a (correct) block map and two CEA extension blocks. Which I think means there are now ways two successive CEA blocks could disagree with each other, so that's probably something to audit, but I don't expect that to be common. - ajax ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-03 15:54 ` Shirish S 2012-09-04 13:45 ` Adam Jackson 2012-09-08 2:30 ` Shirish S @ 2012-09-13 14:36 ` Shirish S 2012-09-13 20:08 ` Dave Airlie 2 siblings, 1 reply; 17+ messages in thread From: Shirish S @ 2012-09-13 14:36 UTC (permalink / raw) To: airlied; +Cc: dri-devel [-- Attachment #1.1: Type: text/plain, Size: 3384 bytes --] Gentle Reminder! On Mon, Sep 3, 2012 at 9:24 PM, Shirish S <shirish.s12@gmail.com> wrote: > Hello Dave, > > My patch-set for adding support for 4 block EDID is now reviewed and ready. > Please let me know if you want any further clarification > > Regards, > Shirish S > > > On Thu, Aug 30, 2012 at 12:04 AM, Shirish S <s.shirish@samsung.com> 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@samsung.com> >> Reviewed-by: Jean Delvare <jdelvare@suse.de> >> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> >> --- >> drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- >> 1 files changed, 16 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index bcc4725..7f62de5 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 >> @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, >> unsigned char *buf, >> do { >> struct i2c_msg msgs[] = { >> { >> + .addr = DDC_SEGMENT_ADDR, >> + .flags = 0, >> + .len = 1, >> + .buf = &segment, >> + }, { >> .addr = DDC_ADDR, >> .flags = 0, >> .len = 1, >> @@ -276,15 +283,21 @@ 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. >> + */ >> + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); >> + >> if (ret == -ENXIO) { >> DRM_DEBUG_KMS("drm: skipping non-existent adapter >> %s\n", >> adapter->name); >> break; >> } >> - } while (ret != 2 && --retries); >> + } while (ret != xfers && --retries); >> >> - return ret == 2 ? 0 : -1; >> + return ret == xfers ? 0 : -1; >> } >> >> static bool drm_edid_is_zero(u8 *in_edid, int length) >> -- >> 1.7.0.4 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/dri-devel >> > > [-- Attachment #1.2: Type: text/html, Size: 4653 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH V6] drm: edid: add support for E-DDC 2012-09-13 14:36 ` Shirish S @ 2012-09-13 20:08 ` Dave Airlie 0 siblings, 0 replies; 17+ messages in thread From: Dave Airlie @ 2012-09-13 20:08 UTC (permalink / raw) To: Shirish S; +Cc: dri-devel On Fri, Sep 14, 2012 at 12:36 AM, Shirish S <shirish.s12@gmail.com> wrote: > Gentle Reminder! you are a day late, I pushed it into drm-next yesterday :-) Dave. ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH V6] drm: edid: add support for E-DDC @ 2012-08-30 7:00 y 2012-08-30 7:00 ` [PATCH v6] " y 0 siblings, 1 reply; 17+ messages in thread From: y @ 2012-08-30 7:00 UTC (permalink / raw) To: dri-devel; +Cc: Shirish S From: Shirish S <s.shirish@samsung.com> This patch adds support in probing 4 block edid data, for E-DDC. This is the first test case in CTS, for HDMI compliance. Changes from V1: 1. Data type of offset adress updated to unsigned short 2. Updated the buf feild of msg[0] Changes from V2: Add switch for DDC and E-DDC Changes from V3: Remove switch,and avoid sending of segment data for non E-DDC Changes from V4: Fix review comments about space and comment indentation. Changes from V5: Compacted the code. Based on drm-next branch Shirish S (1): drm: edid: add support for E-DDC drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v6] drm: edid: add support for E-DDC 2012-08-30 7:00 y @ 2012-08-30 7:00 ` y 0 siblings, 0 replies; 17+ messages in thread From: y @ 2012-08-30 7:00 UTC (permalink / raw) To: dri-devel; +Cc: Shirish S From: Shirish S <s.shirish@samsung.com> 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@samsung.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index bcc4725..7f62de5 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 @@ -265,6 +267,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf, do { struct i2c_msg msgs[] = { { + .addr = DDC_SEGMENT_ADDR, + .flags = 0, + .len = 1, + .buf = &segment, + }, { .addr = DDC_ADDR, .flags = 0, .len = 1, @@ -276,15 +283,21 @@ 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. + */ + ret = i2c_transfer(adapter, &msgs[3 - xfers], xfers); + if (ret == -ENXIO) { DRM_DEBUG_KMS("drm: skipping non-existent adapter %s\n", adapter->name); break; } - } while (ret != 2 && --retries); + } while (ret != xfers && --retries); - return ret == 2 ? 0 : -1; + return ret == xfers ? 0 : -1; } static bool drm_edid_is_zero(u8 *in_edid, int length) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH V6] drm: edid: add support for E-DDC @ 2012-08-30 6:53 y 0 siblings, 0 replies; 17+ messages in thread From: y @ 2012-08-30 6:53 UTC (permalink / raw) To: dri-devel; +Cc: Shirish S From: Shirish S <s.shirish@samsung.com> This patch adds support in probing 4 block edid data, for E-DDC. This is the first test case in CTS, for HDMI compliance. Changes from V1: 1. Data type of offset adress updated to unsigned short 2. Updated the buf feild of msg[0] Changes from V2: Add switch for DDC and E-DDC Changes from V3: Remove switch,and avoid sending of segment data for non E-DDC Changes from V4: Fix review comments about space and comment indentation. Changes from V5: Compacted the code. Based on drm-next branch Shirish S (1): drm: edid: add support for E-DDC drivers/gpu/drm/drm_edid.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-09-13 20:08 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-08-30 7:04 [PATCH V6] drm: edid: add support for E-DDC Shirish S 2012-08-30 7:04 ` Shirish S 2012-08-30 10:58 ` Ville Syrjälä 2012-08-30 16:17 ` Shirish S 2012-09-03 15:54 ` Shirish S 2012-09-04 13:45 ` Adam Jackson 2012-09-08 2:30 ` Shirish S 2012-09-08 10:35 ` Dave Airlie 2012-09-08 15:49 ` Shirish S 2012-09-08 16:13 ` Paul Menzel 2012-09-09 1:04 ` Shirish S 2012-09-10 18:46 ` Adam Jackson 2012-09-13 14:36 ` Shirish S 2012-09-13 20:08 ` Dave Airlie -- strict thread matches above, loose matches on Subject: below -- 2012-08-30 7:00 y 2012-08-30 7:00 ` [PATCH v6] " y 2012-08-30 6:53 [PATCH V6] " y
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.