All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init
@ 2013-04-10 21:28 Daniel Vetter
  2013-05-04  9:45 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2013-04-10 21:28 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

dp_init_connector adjusts the encoder type if it is a eDP panel. Use
that to decide whether we should set up a hdmi connector or not.

To do so reorder the hdmi connector setup sequence in ddi_init a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_ddi.c |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 22524cb..649bb81 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1513,16 +1513,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 		return;
 	}
 
-	if (port != PORT_A) {
-		hdmi_connector = kzalloc(sizeof(struct intel_connector),
-					 GFP_KERNEL);
-		if (!hdmi_connector) {
-			kfree(dp_connector);
-			kfree(intel_dig_port);
-			return;
-		}
-	}
-
 	intel_encoder = &intel_dig_port->base;
 	encoder = &intel_encoder->base;
 
@@ -1540,8 +1530,6 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 	intel_dig_port->port = port;
 	intel_dig_port->port_reversal = I915_READ(DDI_BUF_CTL(port)) &
 					DDI_BUF_PORT_REVERSAL;
-	if (hdmi_connector)
-		intel_dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
 	intel_dig_port->dp.output_reg = DDI_BUF_CTL(port);
 
 	intel_encoder->type = INTEL_OUTPUT_UNKNOWN;
@@ -1549,7 +1537,16 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
 	intel_encoder->cloneable = false;
 	intel_encoder->hot_plug = intel_ddi_hot_plug;
 
-	if (hdmi_connector)
-		intel_hdmi_init_connector(intel_dig_port, hdmi_connector);
 	intel_dp_init_connector(intel_dig_port, dp_connector);
+
+	if (intel_encoder->type != INTEL_OUTPUT_EDP) {
+		hdmi_connector = kzalloc(sizeof(struct intel_connector),
+					 GFP_KERNEL);
+		if (!hdmi_connector) {
+			return;
+		}
+
+		intel_dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
+		intel_hdmi_init_connector(intel_dig_port, hdmi_connector);
+	}
 }
-- 
1.7.10.4

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

* Re: [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init
  2013-04-10 21:28 [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init Daniel Vetter
@ 2013-05-04  9:45 ` Daniel Vetter
  2013-05-06  8:31   ` Ville Syrjälä
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2013-05-04  9:45 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

On Wed, Apr 10, 2013 at 11:28:35PM +0200, Daniel Vetter wrote:
> dp_init_connector adjusts the encoder type if it is a eDP panel. Use
> that to decide whether we should set up a hdmi connector or not.
> 
> To do so reorder the hdmi connector setup sequence in ddi_init a bit.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Does what it says on the tin and works as advertised on my deskop hsw
machine with edp on port D. Can someone please review?

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init
  2013-05-04  9:45 ` Daniel Vetter
@ 2013-05-06  8:31   ` Ville Syrjälä
  2013-05-06  9:19     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2013-05-06  8:31 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development

On Sat, May 04, 2013 at 11:45:33AM +0200, Daniel Vetter wrote:
> On Wed, Apr 10, 2013 at 11:28:35PM +0200, Daniel Vetter wrote:
> > dp_init_connector adjusts the encoder type if it is a eDP panel. Use
> > that to decide whether we should set up a hdmi connector or not.
> > 
> > To do so reorder the hdmi connector setup sequence in ddi_init a bit.
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Does what it says on the tin and works as advertised on my deskop hsw
> machine with edp on port D. Can someone please review?

Looks all right to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

-- 
Ville Syrjälä
Intel OTC

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

* Re: [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init
  2013-05-06  8:31   ` Ville Syrjälä
@ 2013-05-06  9:19     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-05-06  9:19 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Daniel Vetter, Intel Graphics Development

On Mon, May 06, 2013 at 11:31:57AM +0300, Ville Syrjälä wrote:
> On Sat, May 04, 2013 at 11:45:33AM +0200, Daniel Vetter wrote:
> > On Wed, Apr 10, 2013 at 11:28:35PM +0200, Daniel Vetter wrote:
> > > dp_init_connector adjusts the encoder type if it is a eDP panel. Use
> > > that to decide whether we should set up a hdmi connector or not.
> > > 
> > > To do so reorder the hdmi connector setup sequence in ddi_init a bit.
> > > 
> > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> > Does what it says on the tin and works as advertised on my deskop hsw
> > machine with edp on port D. Can someone please review?
> 
> Looks all right to me.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Queued for -next, thanks for the review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2013-05-06  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 21:28 [PATCH] drm/i915: don't setup hdmi for port D edp in ddi_init Daniel Vetter
2013-05-04  9:45 ` Daniel Vetter
2013-05-06  8:31   ` Ville Syrjälä
2013-05-06  9:19     ` Daniel Vetter

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.