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; 78+ 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] 78+ messages in thread
* Re: [PATCH 4/5] drm/i915: Check live status before reading edid
@ 2015-07-10  4:31 Jindal, Sonika
  2015-07-13 11:05 ` [PATCH] " Sonika Jindal
  0 siblings, 1 reply; 78+ messages in thread
From: Jindal, Sonika @ 2015-07-10  4:31 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx



On 7/9/2015 10:57 PM, Daniel Vetter wrote:
> On Thu, Jul 09, 2015 at 05:34:29PM +0530, Sonika Jindal wrote:
>> Adding this for SKL onwards.
>>
>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
>
> I think this is the critical piece really, and I'd like to roll it out for
> all platforms. git has the code for all the old ones, so no big deal to
> digg that out. Also we need your fix for the interrupt handling first ofc,
> otherwise this won't work.
>
We have tested this with VLV/CHV too, and it works fine. I'l add those 
platforms also in the next version of this patch and change the gen 
check in the next patch as well.

> Then we can apply this and give it some good testing before we start
> relying on it with caching hdmi probe status. I know this means that
> things will be slower, but I've been burned a bit too much the last few
> times we've tried this. And I really think we need the most amount of
> testing we can get (hence rolling this out for all platforms). If your
> hpd irq handling bugfix is indeed the bug that will be confirmed quickly,
> otherwise it means back to debugging.
>
>> ---
>>   drivers/gpu/drm/i915/intel_hdmi.c |   49 ++++++++++++++++++++++++++++++++++---
>>   1 file changed, 45 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>> index 1fb6919..769cf4f 100644
>> --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> @@ -1300,6 +1300,46 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
>>   	to_intel_connector(connector)->detect_edid = NULL;
>>   }
>>
>> +static bool intel_hdmi_live_status(struct intel_digital_port *intel_dig_port)
>> +{
>> +	struct drm_device *dev = intel_dig_port->base.base.dev;
>> +	struct drm_i915_private *dev_priv = to_i915(dev);
>> +	enum port port = intel_dig_port->port;
>> +
>> +	if (IS_SKYLAKE(dev)) {
>> +		u32 temp = I915_READ(SDEISR);
>> +
>> +		switch (port) {
>> +		case PORT_B:
>> +			return temp & SDE_PORTB_HOTPLUG_CPT;
>> +
>> +		case PORT_C:
>> +			return temp & SDE_PORTC_HOTPLUG_CPT;
>> +
>> +		case PORT_D:
>> +			return temp & SDE_PORTD_HOTPLUG_CPT;
>> +
>> +		default:
>> +			return false;
>> +		}
>
> The old code had per-platform helper functions for this instead of a big
> if-ladder. I think that would look better.
>
Hmm, I see g4x_digital_port_connected and ibx_digital_port_connected 
which already checks for these bits. We can reuse that here instead.
I'l send the next version.

Thanks,
Sonika

> Also when you digg out these old versions please also cite the commit sha1
> of the patches where we had to last revert this (and explain why it's now
> save).
> -Daniel
>
>> +	} else if (IS_BROXTON(dev)) {
>> +		u32 temp = I915_READ(GEN8_DE_PORT_ISR);
>> +
>> +		switch (port) {
>> +		case PORT_B:
>> +			return temp & BXT_DE_PORT_HP_DDIB;
>> +
>> +		case PORT_C:
>> +			return temp & BXT_DE_PORT_HP_DDIC;
>> +
>> +		default:
>> +			return false;
>> +
>> +		}
>> +	}
>> +	return true;
>> +}
>> +
>>   static bool
>>   intel_hdmi_set_edid(struct drm_connector *connector)
>>   {
>> @@ -1308,15 +1348,16 @@ intel_hdmi_set_edid(struct drm_connector *connector)
>>   	struct intel_encoder *intel_encoder =
>>   		&hdmi_to_dig_port(intel_hdmi)->base;
>>   	enum intel_display_power_domain power_domain;
>> -	struct edid *edid;
>> +	struct edid *edid = NULL;
>>   	bool connected = false;
>>
>>   	power_domain = intel_display_port_power_domain(intel_encoder);
>>   	intel_display_power_get(dev_priv, power_domain);
>>
>> -	edid = drm_get_edid(connector,
>> -			    intel_gmbus_get_adapter(dev_priv,
>> -						    intel_hdmi->ddc_bus));
>> +	if (intel_hdmi_live_status(hdmi_to_dig_port(intel_hdmi)))
>> +		edid = drm_get_edid(connector,
>> +				intel_gmbus_get_adapter(dev_priv,
>> +					intel_hdmi->ddc_bus));
>>
>>   	intel_display_power_put(dev_priv, power_domain);
>>
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

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

Thread overview: 78+ 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
  -- strict thread matches above, loose matches on Subject: below --
2015-07-10  4:31 [PATCH 4/5] drm/i915: Check live status before reading edid Jindal, Sonika
2015-07-13 11:05 ` [PATCH] " Sonika Jindal
2015-07-13 14:55   ` Daniel Vetter
2015-07-14  4:46     ` Jindal, Sonika
2015-07-14  7:55       ` 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.