All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table
@ 2011-06-16 20:36 Adam Jackson
  2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

I have no evidence for this byte being used this way, and lots of
counterexamples.  Restore the struct to its empirical definition and
patch up gmbus setup to match.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/i915_drv.h   |    1 -
 drivers/gpu/drm/i915/intel_bios.c |    6 ++----
 drivers/gpu/drm/i915/intel_bios.h |    3 +--
 drivers/gpu/drm/i915/intel_sdvo.c |   12 +++++-------
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index f63ee16..ee6a267 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -138,7 +138,6 @@ struct sdvo_device_mapping {
 	u8 slave_addr;
 	u8 dvo_wiring;
 	u8 i2c_pin;
-	u8 i2c_speed;
 	u8 ddc_pin;
 };
 
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 927442a..2da1d7f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -372,15 +372,13 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
 			p_mapping->dvo_wiring = p_child->dvo_wiring;
 			p_mapping->ddc_pin = p_child->ddc_pin;
 			p_mapping->i2c_pin = p_child->i2c_pin;
-			p_mapping->i2c_speed = p_child->i2c_speed;
 			p_mapping->initialized = 1;
-			DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d, i2c_speed=%d\n",
+			DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
 				      p_mapping->dvo_port,
 				      p_mapping->slave_addr,
 				      p_mapping->dvo_wiring,
 				      p_mapping->ddc_pin,
-				      p_mapping->i2c_pin,
-				      p_mapping->i2c_speed);
+				      p_mapping->i2c_pin);
 		} else {
 			DRM_DEBUG_KMS("Maybe one SDVO port is shared by "
 					 "two SDVO device.\n");
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 5f8e4ed..4e67ede 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -197,8 +197,7 @@ struct bdb_general_features {
 struct child_device_config {
 	u16 handle;
 	u16 device_type;
-	u8  i2c_speed;
-	u8  rsvd[9];
+	u8  device_id[10]; /* ascii string */
 	u16 addin_offset;
 	u8  dvo_port; /* See Device_PORT_* above */
 	u8  i2c_pin;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 30fe554..a6339f8 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1945,7 +1945,7 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
 			  struct intel_sdvo *sdvo, u32 reg)
 {
 	struct sdvo_device_mapping *mapping;
-	u8 pin, speed;
+	u8 pin;
 
 	if (IS_SDVOB(reg))
 		mapping = &dev_priv->sdvo_mappings[0];
@@ -1953,18 +1953,16 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
 		mapping = &dev_priv->sdvo_mappings[1];
 
 	pin = GMBUS_PORT_DPB;
-	speed = GMBUS_RATE_1MHZ >> 8;
-	if (mapping->initialized) {
+	if (mapping->initialized)
 		pin = mapping->i2c_pin;
-		speed = mapping->i2c_speed;
-	}
 
 	if (pin < GMBUS_NUM_PORTS) {
 		sdvo->i2c = &dev_priv->gmbus[pin].adapter;
-		intel_gmbus_set_speed(sdvo->i2c, speed);
+		intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ >> 8);
 		intel_gmbus_force_bit(sdvo->i2c, true);
-	} else
+	} else {
 		sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;
+	}
 }
 
 static bool
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/6] drm/i915: Fix multifunction SDVO detection
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
@ 2011-06-16 20:36 ` Adam Jackson
  2011-06-16 20:44   ` Chris Wilson
  2011-06-16 20:36 ` [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect Adam Jackson
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

I can't think of any sensible reason to limit this to a mask of 0x0f,
ie, SDVO_OUTPUT_{TMDS,RGB,CVBS,SVID}0.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a6339f8..475f615 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1281,8 +1281,7 @@ static bool
 intel_sdvo_multifunc_encoder(struct intel_sdvo *intel_sdvo)
 {
 	/* Is there more than one type of output? */
-	int caps = intel_sdvo->caps.output_flags & 0xf;
-	return caps & -caps;
+	return hweight16(intel_sdvo->caps.output_flags) > 1;
 }
 
 static struct edid *
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
  2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
@ 2011-06-16 20:36 ` Adam Jackson
  2011-06-16 20:46   ` Chris Wilson
  2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

This is general TMDS detect, not HDMI specifically.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 475f615..6d3dd09 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1302,7 +1302,7 @@ intel_sdvo_get_analog_edid(struct drm_connector *connector)
 }
 
 enum drm_connector_status
-intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
+intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
 {
 	struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
 	enum drm_connector_status status;
@@ -1397,7 +1397,7 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
 	if ((intel_sdvo_connector->output_flag & response) == 0)
 		ret = connector_status_disconnected;
 	else if (IS_TMDS(intel_sdvo_connector))
-		ret = intel_sdvo_hdmi_sink_detect(connector);
+		ret = intel_sdvo_tmds_sink_detect(connector);
 	else {
 		struct edid *edid;
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
  2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
  2011-06-16 20:36 ` [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect Adam Jackson
@ 2011-06-16 20:36 ` Adam Jackson
  2011-06-16 20:58   ` Chris Wilson
  2012-04-15 23:10   ` Daniel Vetter
  2011-06-16 20:36 ` [PATCH 5/6] drm/i915: Delete a misleading comment Adam Jackson
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

The comment was wrong, bus 0 is the SPD ROM, as we discovered in
14571b4 and b108333.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 6d3dd09..193919e 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1313,11 +1313,8 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
 	if (edid == NULL && intel_sdvo_multifunc_encoder(intel_sdvo)) {
 		u8 ddc, saved_ddc = intel_sdvo->ddc_bus;
 
-		/*
-		 * Don't use the 1 as the argument of DDC bus switch to get
-		 * the EDID. It is used for SDVO SPD ROM.
-		 */
-		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 1; ddc >>= 1) {
+		/* Skip bus 0, it's the SDVO SPD ROM */
+		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 0; ddc >>= 1) {
 			intel_sdvo->ddc_bus = ddc;
 			edid = intel_sdvo_get_edid(connector);
 			if (edid)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/6] drm/i915: Delete a misleading comment
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
                   ` (2 preceding siblings ...)
  2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
@ 2011-06-16 20:36 ` Adam Jackson
  2011-06-16 20:53   ` Chris Wilson
  2011-06-16 20:36 ` [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed Adam Jackson
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

It's not wrong, but the text and the code describe different predicates
and my brain kept stumbling over it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 193919e..c2272f7 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1320,10 +1320,7 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
 			if (edid)
 				break;
 		}
-		/*
-		 * If we found the EDID on the other bus,
-		 * assume that is the correct DDC bus.
-		 */
+
 		if (edid == NULL)
 			intel_sdvo->ddc_bus = saved_ddc;
 	}
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
                   ` (3 preceding siblings ...)
  2011-06-16 20:36 ` [PATCH 5/6] drm/i915: Delete a misleading comment Adam Jackson
@ 2011-06-16 20:36 ` Adam Jackson
  2011-06-16 20:55   ` Chris Wilson
  2011-06-16 20:44 ` [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Chris Wilson
  2011-09-22 14:00 ` Adam Jackson
  6 siblings, 1 reply; 18+ messages in thread
From: Adam Jackson @ 2011-06-16 20:36 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_i2c.c  |    8 +-------
 drivers/gpu/drm/i915/intel_sdvo.c |    2 +-
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index d3b903b..5d707c4 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -423,13 +423,7 @@ void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed)
 {
 	struct intel_gmbus *bus = to_intel_gmbus(adapter);
 
-	/* speed:
-	 * 0x0 = 100 KHz
-	 * 0x1 = 50 KHz
-	 * 0x2 = 400 KHz
-	 * 0x3 = 1000 Khz
-	 */
-	bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | (speed << 8);
+	bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | speed;
 }
 
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c2272f7..82296c3 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1951,7 +1951,7 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
 
 	if (pin < GMBUS_NUM_PORTS) {
 		sdvo->i2c = &dev_priv->gmbus[pin].adapter;
-		intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ >> 8);
+		intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ);
 		intel_gmbus_force_bit(sdvo->i2c, true);
 	} else {
 		sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
                   ` (4 preceding siblings ...)
  2011-06-16 20:36 ` [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed Adam Jackson
@ 2011-06-16 20:44 ` Chris Wilson
  2011-09-22 14:00 ` Adam Jackson
  6 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:44 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Thu, 16 Jun 2011 16:36:23 -0400, Adam Jackson <ajax@redhat.com> wrote:
> I have no evidence for this byte being used this way, and lots of
> counterexamples.  Restore the struct to its empirical definition and
> patch up gmbus setup to match.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] drm/i915: Fix multifunction SDVO detection
  2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
@ 2011-06-16 20:44   ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:44 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Thu, 16 Jun 2011 16:36:24 -0400, Adam Jackson <ajax@redhat.com> wrote:
> I can't think of any sensible reason to limit this to a mask of 0x0f,
> ie, SDVO_OUTPUT_{TMDS,RGB,CVBS,SVID}0.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect
  2011-06-16 20:36 ` [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect Adam Jackson
@ 2011-06-16 20:46   ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:46 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Thu, 16 Jun 2011 16:36:25 -0400, Adam Jackson <ajax@redhat.com> wrote:
> This is general TMDS detect, not HDMI specifically.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.cuk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 5/6] drm/i915: Delete a misleading comment
  2011-06-16 20:36 ` [PATCH 5/6] drm/i915: Delete a misleading comment Adam Jackson
@ 2011-06-16 20:53   ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:53 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Thu, 16 Jun 2011 16:36:27 -0400, Adam Jackson <ajax@redhat.com> wrote:
> It's not wrong, but the text and the code describe different predicates
> and my brain kept stumbling over it.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_sdvo.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 193919e..c2272f7 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1320,10 +1320,7 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
>  			if (edid)
>  				break;
>  		}
> -		/*
> -		 * If we found the EDID on the other bus,
> -		 * assume that is the correct DDC bus.
> -		 */
> +

How about?

If we foudn the EDID on another bus, presume that is the correct DDC bus
and keep using that bus for future queries. Otherwise, restore the
original value.

>  		if (edid == NULL)
>  			intel_sdvo->ddc_bus = saved_ddc;
>  	}

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed
  2011-06-16 20:36 ` [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed Adam Jackson
@ 2011-06-16 20:55   ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:55 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Thu, 16 Jun 2011 16:36:28 -0400, Adam Jackson <ajax@redhat.com> wrote:
> Signed-off-by: Adam Jackson <ajax@redhat.com>

A GMBUS_RATE_MASK would complete the job.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC
  2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
@ 2011-06-16 20:58   ` Chris Wilson
  2011-10-20 20:51     ` Keith Packard
  2012-04-15 23:10   ` Daniel Vetter
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2011-06-16 20:58 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: intel-gfx

Rolf,

This looks to be the missing ingredient for your board. Can you please
give it a test?
-Chris

On Thu, 16 Jun 2011 16:36:26 -0400, Adam Jackson <ajax@redhat.com> wrote:
> The comment was wrong, bus 0 is the SPD ROM, as we discovered in
> 14571b4 and b108333.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_sdvo.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 6d3dd09..193919e 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1313,11 +1313,8 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
>  	if (edid == NULL && intel_sdvo_multifunc_encoder(intel_sdvo)) {
>  		u8 ddc, saved_ddc = intel_sdvo->ddc_bus;
>  
> -		/*
> -		 * Don't use the 1 as the argument of DDC bus switch to get
> -		 * the EDID. It is used for SDVO SPD ROM.
> -		 */
> -		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 1; ddc >>= 1) {
> +		/* Skip bus 0, it's the SDVO SPD ROM */
> +		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 0; ddc >>= 1) {
>  			intel_sdvo->ddc_bus = ddc;
>  			edid = intel_sdvo_get_edid(connector);
>  			if (edid)
> -- 
> 1.7.5.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table
  2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
                   ` (5 preceding siblings ...)
  2011-06-16 20:44 ` [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Chris Wilson
@ 2011-09-22 14:00 ` Adam Jackson
  2011-09-22 18:24   ` Keith Packard
  6 siblings, 1 reply; 18+ messages in thread
From: Adam Jackson @ 2011-09-22 14:00 UTC (permalink / raw)
  To: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 389 bytes --]

On Thu, 2011-06-16 at 16:36 -0400, Adam Jackson wrote:
> I have no evidence for this byte being used this way, and lots of
> counterexamples.  Restore the struct to its empirical definition and
> patch up gmbus setup to match.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>

This code is still present in Linus' tree, and still crap.  Any
reviewers for this series?

- ajax

[-- 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table
  2011-09-22 14:00 ` Adam Jackson
@ 2011-09-22 18:24   ` Keith Packard
  2011-09-22 18:34     ` Adam Jackson
  0 siblings, 1 reply; 18+ messages in thread
From: Keith Packard @ 2011-09-22 18:24 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 387 bytes --]

On Thu, 22 Sep 2011 10:00:14 -0400, Adam Jackson <ajax@redhat.com> wrote:

> This code is still present in Linus' tree, and still crap.  Any
> reviewers for this series?

It all looks reasonable to me, and Chris reviewed or ack'd every patch
but #4, which looks reasonable on the surface to me.

Are you thinking this should land in 3.1? Or 3.2?

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table
  2011-09-22 18:24   ` Keith Packard
@ 2011-09-22 18:34     ` Adam Jackson
  0 siblings, 0 replies; 18+ messages in thread
From: Adam Jackson @ 2011-09-22 18:34 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 710 bytes --]

On Thu, 2011-09-22 at 11:24 -0700, Keith Packard wrote:
> On Thu, 22 Sep 2011 10:00:14 -0400, Adam Jackson <ajax@redhat.com> wrote:
> 
> > This code is still present in Linus' tree, and still crap.  Any
> > reviewers for this series?
> 
> It all looks reasonable to me, and Chris reviewed or ack'd every patch
> but #4, which looks reasonable on the surface to me.
> 
> Are you thinking this should land in 3.1? Or 3.2?

#1 should definitely land in 3.1 if at all possible.  The rest can wait
I guess.

I'd still like to get more dialogue about #4 from Rolf or someone else
with multifunc sdvo.  That, or such a device on my shelf.  I can buy one
if someone knows what I should buy.

- ajax

[-- 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC
  2011-06-16 20:58   ` Chris Wilson
@ 2011-10-20 20:51     ` Keith Packard
  0 siblings, 0 replies; 18+ messages in thread
From: Keith Packard @ 2011-10-20 20:51 UTC (permalink / raw)
  To: Chris Wilson, Rolf Eike Beer; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 303 bytes --]

On Thu, 16 Jun 2011 21:58:42 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Rolf,
> 
> This looks to be the missing ingredient for your board. Can you please
> give it a test?

I haven't seen a tested-by, reviewed-by or even acked-by for this patch
yet.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC
  2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
  2011-06-16 20:58   ` Chris Wilson
@ 2012-04-15 23:10   ` Daniel Vetter
  2012-04-16 14:01     ` Adam Jackson
  1 sibling, 1 reply; 18+ messages in thread
From: Daniel Vetter @ 2012-04-15 23:10 UTC (permalink / raw)
  To: Adam Jackson; +Cc: intel-gfx

On Thu, Jun 16, 2011 at 04:36:26PM -0400, Adam Jackson wrote:
> The comment was wrong, bus 0 is the SPD ROM, as we discovered in
> 14571b4 and b108333.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>

I've checked with the SDVO spec and the ddc bus switch command uses a
bitflag array, and bit 0 (i.e. 1) is used for the spd rom. So the code
seems to be correct.

But while looking through the git history I've noticed that this code got
added before we've figured out the vbios sdvo ddc pin mappings game, so
I'm inclined to just rip this out. Especially since we start at the ddc
that does _not_ read our edid and don't unconditionally test all 3 ddc
buses, potentially leaving out bus 3&2. Does anyone know why we've needed
this or maybe even have the hw?

For reference, the commit that added this code originally is

commit 7c3f0a2726fed78e0e0afe3b6fc3c1f5b298e447
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Fri Jan 8 10:58:20 2010 +0800

    drm/i915: try another possible DDC bus for the SDVO device with
    multiple outputs

Cheers, Daniel

> ---
>  drivers/gpu/drm/i915/intel_sdvo.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 6d3dd09..193919e 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1313,11 +1313,8 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
>  	if (edid == NULL && intel_sdvo_multifunc_encoder(intel_sdvo)) {
>  		u8 ddc, saved_ddc = intel_sdvo->ddc_bus;
>  
> -		/*
> -		 * Don't use the 1 as the argument of DDC bus switch to get
> -		 * the EDID. It is used for SDVO SPD ROM.
> -		 */
> -		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 1; ddc >>= 1) {
> +		/* Skip bus 0, it's the SDVO SPD ROM */
> +		for (ddc = intel_sdvo->ddc_bus >> 1; ddc > 0; ddc >>= 1) {
>  			intel_sdvo->ddc_bus = ddc;
>  			edid = intel_sdvo_get_edid(connector);
>  			if (edid)
> -- 
> 1.7.5.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC
  2012-04-15 23:10   ` Daniel Vetter
@ 2012-04-16 14:01     ` Adam Jackson
  0 siblings, 0 replies; 18+ messages in thread
From: Adam Jackson @ 2012-04-16 14:01 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 542 bytes --]

On Mon, 2012-04-16 at 01:10 +0200, Daniel Vetter wrote:

> But while looking through the git history I've noticed that this code got
> added before we've figured out the vbios sdvo ddc pin mappings game, so
> I'm inclined to just rip this out. Especially since we start at the ddc
> that does _not_ read our edid and don't unconditionally test all 3 ddc
> buses, potentially leaving out bus 3&2. Does anyone know why we've needed
> this or maybe even have the hw?

Yeah, I've never liked this path.  Use the pin mappings.

- ajax

[-- 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-04-16 14:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-16 20:36 [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Adam Jackson
2011-06-16 20:36 ` [PATCH 2/6] drm/i915: Fix multifunction SDVO detection Adam Jackson
2011-06-16 20:44   ` Chris Wilson
2011-06-16 20:36 ` [PATCH 3/6] drm/i915: Rename intel_sdvo_hdmi_sink_detect Adam Jackson
2011-06-16 20:46   ` Chris Wilson
2011-06-16 20:36 ` [PATCH 4/6] drm/i915: Try harder on multifunction SDVO DDC Adam Jackson
2011-06-16 20:58   ` Chris Wilson
2011-10-20 20:51     ` Keith Packard
2012-04-15 23:10   ` Daniel Vetter
2012-04-16 14:01     ` Adam Jackson
2011-06-16 20:36 ` [PATCH 5/6] drm/i915: Delete a misleading comment Adam Jackson
2011-06-16 20:53   ` Chris Wilson
2011-06-16 20:36 ` [PATCH 6/6] drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed Adam Jackson
2011-06-16 20:55   ` Chris Wilson
2011-06-16 20:44 ` [PATCH 1/6] drm/i915: Remove "i2c_speed" nonsense from child device table Chris Wilson
2011-09-22 14:00 ` Adam Jackson
2011-09-22 18:24   ` Keith Packard
2011-09-22 18:34     ` Adam Jackson

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.