All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] HDMI optimization series
@ 2015-09-04 13:26 Sonika Jindal
  2015-09-04 13:26 ` [PATCH 1/6] drm/i915: add attached connector to hdmi container Sonika Jindal
                   ` (5 more replies)
  0 siblings, 6 replies; 77+ messages in thread
From: Sonika Jindal @ 2015-09-04 13:26 UTC (permalink / raw)
  To: intel-gfx

This series adds changes in HDMI detection methods and also afew
optimization. The overview of changes are:
1. HDMI EDID is read only at the hot-plug time.
2. EDID is cached in connectoer on hotplug,and released from cache only
   on the hot-unplug.
3. In between, for all detetct calls, only cached EDID is used.
4. HDMI EDID is read, only when live status is up.
5. HDMI is force probed during the connector init time, for connected boot
   scenarios.

v2:
   Some refactoring is with this series.

   Also, right now this is done for platforms gen7 and above because we
   couldn't test with older platforms. For newer platforms it works
   reliably.

   For HPD and live status to work on SKL, following patch is required:
   "drm/i915: Handle HPD when it has actually occurred"

v3:
   Added retrial for live_status.
   Relying on HPD fpr edid detection onlyfrom gen 8 onwards and VLV

v4:
   *Also, including durga's patch for fixing irq_port for edp.
   Without this fix, hdmi hpd breaks with hdmi and edp connected on bxt.
   *Taking off the check for older platforms and now rely on init and 
   hotplug to get the edid updated
   *Some other cleanups.

Durgadoss R (1):
  drm/i915/bxt: Fix irq_port for eDP

Shashank Sharma (2):
  drm/i915: add attached connector to hdmi container
  drm/i915: Add HDMI probe function

Sonika Jindal (3):
  drm/i915: Make intel_digital_port_connected global
  drm/i915: drm/i915: Check live status before reading edid
  drm/i915: drm/i915: Process hpd only for hdmi inside
    hotplug_work_func

 drivers/gpu/drm/i915/intel_ddi.c     |   15 ++++---
 drivers/gpu/drm/i915/intel_dp.c      |   11 +++--
 drivers/gpu/drm/i915/intel_drv.h     |    3 ++
 drivers/gpu/drm/i915/intel_hdmi.c    |   80 +++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/intel_hotplug.c |    3 +-
 5 files changed, 90 insertions(+), 22 deletions(-)

-- 
1.7.10.4

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

^ permalink raw reply	[flat|nested] 77+ messages in thread
* [PATCH 1/2] drm/i915: Call encoder hotplug for init and resume cases
@ 2015-12-16 10:48 Sonika Jindal
  2015-12-16 13:46 ` Daniel Vetter
  0 siblings, 1 reply; 77+ messages in thread
From: Sonika Jindal @ 2015-12-16 10:48 UTC (permalink / raw)
  To: intel-gfx

Call the encoders, call the hot_plug if it is registered.
This is required for connected boot and resume cases to generate
fake hpd resulting in reading of edid.
Removing the initial sdvo hot_plug call too so that it will be called
just once from this loop.

v2: Schedule a work function to call hot_plug. On CHT, it runs into a
deadlock if we call ->hot_plug inside hpd_init. This is because, hot_plug
calls set_edid which tries to acquire the power domain and if power
well is disabled, we enable power well and call hpd_init again.
So, schedule a work function from here to call hot_plug and run a
detect cycle.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---

 drivers/gpu/drm/i915/i915_drv.h      |  1 +
 drivers/gpu/drm/i915/intel_hotplug.c | 26 ++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_sdvo.c    |  1 -
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index bc865e23..4f037b9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -228,6 +228,7 @@ enum hpd_pin {
 
 struct i915_hotplug {
 	struct work_struct hotplug_work;
+	struct work_struct edid_work;
 
 	struct {
 		unsigned long last_jiffies;
diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c
index b177857..72d8fe8 100644
--- a/drivers/gpu/drm/i915/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/intel_hotplug.c
@@ -442,6 +442,24 @@ void intel_hpd_irq_handler(struct drm_device *dev,
 		schedule_work(&dev_priv->hotplug.hotplug_work);
 }
 
+static void i915_edid_work_func(struct work_struct *work)
+{
+	struct drm_i915_private *dev_priv =
+		container_of(work, struct drm_i915_private, hotplug.edid_work);
+	struct drm_device *dev = dev_priv->dev;
+	struct drm_mode_config *mode_config = &dev->mode_config;
+	struct intel_encoder *encoder;
+
+	mutex_lock(&mode_config->mutex);
+	list_for_each_entry(encoder, &mode_config->encoder_list,
+			base.head) {
+		if (encoder->hot_plug)
+			encoder->hot_plug(encoder);
+	}
+	mutex_unlock(&mode_config->mutex);
+	drm_helper_hpd_irq_event(dev);
+}
+
 /**
  * intel_hpd_init - initializes and enables hpd support
  * @dev_priv: i915 device instance
@@ -482,12 +500,19 @@ void intel_hpd_init(struct drm_i915_private *dev_priv)
 	if (dev_priv->display.hpd_irq_setup)
 		dev_priv->display.hpd_irq_setup(dev);
 	spin_unlock_irq(&dev_priv->irq_lock);
+
+	/*
+	 * Connected boot / resume scenarios can't generate new hot plug.
+	 * So, probe it manually.
+	 */
+	schedule_work(&dev_priv->hotplug.edid_work);
 }
 
 void intel_hpd_init_work(struct drm_i915_private *dev_priv)
 {
 	INIT_WORK(&dev_priv->hotplug.hotplug_work, i915_hotplug_work_func);
 	INIT_WORK(&dev_priv->hotplug.dig_port_work, i915_digport_work_func);
+	INIT_WORK(&dev_priv->hotplug.edid_work, i915_edid_work_func);
 	INIT_DELAYED_WORK(&dev_priv->hotplug.reenable_work,
 			  intel_hpd_irq_storm_reenable_work);
 }
@@ -504,5 +529,6 @@ void intel_hpd_cancel_work(struct drm_i915_private *dev_priv)
 
 	cancel_work_sync(&dev_priv->hotplug.dig_port_work);
 	cancel_work_sync(&dev_priv->hotplug.hotplug_work);
+	cancel_work_sync(&dev_priv->hotplug.edid_work);
 	cancel_delayed_work_sync(&dev_priv->hotplug.reenable_work);
 }
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 06679f1..4238a02 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2466,7 +2466,6 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
 		 * Ensure that they get re-enabled when an interrupt happens.
 		 */
 		intel_encoder->hot_plug = intel_sdvo_enable_hotplug;
-		intel_sdvo_enable_hotplug(intel_encoder);
 	} else {
 		intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
 	}
-- 
1.9.1

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

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

end of thread, other threads:[~2016-03-10 11:38 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 13:26 [PATCH 0/6] HDMI optimization series Sonika Jindal
2015-09-04 13:26 ` [PATCH 1/6] drm/i915: add attached connector to hdmi container Sonika Jindal
2015-09-09 18:54   ` Rodrigo Vivi
2015-09-10 15:24     ` Daniel Vetter
2015-09-04 13:26 ` [PATCH 2/6] drm/i915: Add HDMI probe function Sonika Jindal
2015-09-04 14:48   ` Daniel Vetter
2015-09-09 18:55     ` Rodrigo Vivi
2015-09-11 10:45       ` Jindal, Sonika
2015-09-14  8:30         ` Daniel Vetter
2015-09-14  9:55           ` Sharma, Shashank
2015-09-14 13:07             ` Daniel Vetter
2015-09-14 13:45               ` Sharma, Shashank
2015-09-28  8:56                 ` [PATCH] drm/i915: Add hot_plug hook for hdmi encoder Sonika Jindal
2015-09-28 13:34                   ` Daniel Vetter
2015-09-29  4:13                     ` Jindal, Sonika
2015-09-29  9:04                       ` Daniel Vetter
2015-10-05 11:13                     ` [PATCH 1/2] drm/i915: Call encoder hotplug for init and resume cases Sonika Jindal
2015-10-05 11:13                       ` [PATCH 2/2] drm/i915: Add hot_plug hook for hdmi encoder Sonika Jindal
2015-10-06  8:28                         ` Daniel Vetter
2015-12-10  4:30                           ` Sonika Jindal
2015-12-10  4:45                             ` [PATCH] " Sonika Jindal
2015-12-10  8:29                               ` Daniel Vetter
2015-12-10  8:35                                 ` Jindal, Sonika
2015-12-10  8:53                                   ` Daniel Vetter
2015-12-10  9:04                                     ` Jindal, Sonika
2015-10-08 13:35                       ` [PATCH 1/2] drm/i915: Call encoder hotplug for init and resume cases Ville Syrjälä
2015-10-08 14:38                         ` Jani Nikula
2015-10-08 19:54                           ` Daniel Vetter
2015-10-09  4:31                             ` Jindal, Sonika
2015-12-10  4:27                             ` Sonika Jindal
2015-10-12 12:24                         ` Sharma, Shashank
2015-10-15  1:32                           ` Jindal, Sonika
2015-09-04 13:26 ` [PATCH 3/6] drm/i915: Make intel_digital_port_connected global Sonika Jindal
2015-09-09 18:57   ` Rodrigo Vivi
2015-09-11 11:28     ` [PATCH] drm/i915/bxt: Use intel_encoder->hpd_pin to check live status Sonika Jindal
2015-09-11 18:00       ` Rodrigo Vivi
2015-09-12 12:02         ` Jindal, Sonika
2015-09-14  8:34       ` Daniel Vetter
2015-09-14  8:38         ` Jindal, Sonika
2015-09-14  9:15           ` Daniel Vetter
2015-09-04 13:26 ` [PATCH 4/6] drm/i915: drm/i915: Check live status before reading edid Sonika Jindal
2015-09-04 14:49   ` Daniel Vetter
2015-09-07  5:02     ` [PATCH] " Sonika Jindal
2015-09-08 11:21       ` Sonika Jindal
2015-09-09 19:11     ` [PATCH 4/6] drm/i915: " Rodrigo Vivi
2015-09-11 11:26       ` [PATCH] " Sonika Jindal
2015-09-11 17:56         ` Rodrigo Vivi
2015-09-14  8:42           ` Daniel Vetter
2015-09-14  9:14             ` Jindal, Sonika
2015-09-14  9:36               ` Daniel Vetter
2015-09-15  4:14                 ` Sonika Jindal
2015-09-23  8:18                   ` Daniel Vetter
2016-03-08 21:03                   ` Chris Wilson
2016-03-09  5:52                     ` Jindal, Sonika
2016-03-09  5:55                       ` Sharma, Shashank
2016-03-10 11:37                         ` Sharma, Shashank
2015-09-04 13:26 ` [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func Sonika Jindal
2015-09-04 14:47   ` Daniel Vetter
2015-09-06  4:31     ` Jindal, Sonika
2015-09-07  5:04       ` [PATCH] drm/i915: Call encoder hot_plug hook only for hdmi Sonika Jindal
2015-09-07 16:26         ` Daniel Vetter
2015-09-08  4:42           ` Jindal, Sonika
2015-09-08 11:38             ` Jindal, Sonika
2015-09-09 15:17               ` Daniel Vetter
2015-09-10  1:07                 ` Jindal, Sonika
2015-09-10 14:47                   ` Daniel Vetter
2015-09-09 19:20       ` [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func Rodrigo Vivi
2015-09-09 23:37         ` Jindal, Sonika
2015-09-04 13:26 ` [PATCH 6/6] drm/i915/bxt: Fix irq_port for eDP Sonika Jindal
2015-09-09 19:24   ` Rodrigo Vivi
2015-09-10 10:49     ` Jindal, Sonika
2015-09-10 13:07     ` R, Durgadoss
2015-09-10 13:35       ` Ville Syrjälä
2015-09-10 14:51         ` Daniel Vetter
2015-12-16 10:48 [PATCH 1/2] drm/i915: Call encoder hotplug for init and resume cases Sonika Jindal
2015-12-16 13:46 ` Daniel Vetter
2015-12-17  4:23   ` Jindal, Sonika

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.