All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Jindal, Sonika" <sonika.jindal@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func
Date: Wed, 9 Sep 2015 23:37:23 +0000	[thread overview]
Message-ID: <000C66961D35964B9714611E548C10AD0C2C891B@BGSMSX104.gar.corp.intel.com> (raw)
In-Reply-To: <CABVU7+u710rGCEfn4wqUUweOSgxUPmKs8uxuo+bH9MfzWhHUpw@mail.gmail.com>


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

Since, the port is enumerated as DP as well as hdmi, the init connector is called for both and the same intel encoder gets attached to both the connectors.
Now the intel_encoder’s type could be a differentiator. But since, hdmi’s detect gets called, the type of the encoder remains hdmi.
When hpd occurs, it checks from the list of connectors whose hpd pin is same as the one asserted.
Since both dp and hdmi are INITed, both the connectors have that pin and since DP’s connector is first in the list, it calls the ->hot_plug once when it finds DP connector matching and then again when HDMI connector is found matching as per the pin.

This code check will avoid calling in the case when we have found the DP connector because we are sure that there is no ->hot_plug hook for DP.
Anyways, that was not a generic implementation.

Regards,
Sonika

From: Rodrigo Vivi [mailto:rodrigo.vivi@gmail.com]
Sent: Thursday, September 10, 2015 12:51 AM
To: Jindal, Sonika; Daniel Vetter
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func

I was also going to say that I believe this breaks DP hotplug, but this was agreed already...

But I also don't understand how hot_plug is called twice since it calls encoder->hot_plug...
and dp has no ->hot_plug...
And also if this is happening how this code that checks for connector would help... there is something else strange happening...



On Sat, Sep 5, 2015 at 9:31 PM Jindal, Sonika <sonika.jindal@intel.com<mailto:sonika.jindal@intel.com>> wrote:


On 9/4/2015 8:17 PM, Daniel Vetter wrote:
> On Fri, Sep 04, 2015 at 06:56:15PM +0530, Sonika Jindal wrote:
>> If the same port is enumerated as hdmi as well as DP, this will get
>> called for DP connector as well which is not required because
>> i915_hotplug_work_func is solely to handle hdmi HPD.
>>
>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com<mailto:sonika.jindal@intel.com>>
>> ---
>>   drivers/gpu/drm/i915/intel_hotplug.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c
>> index 53c0173..8e1c43e 100644
>> --- a/drivers/gpu/drm/i915/intel_hotplug.c
>> +++ b/drivers/gpu/drm/i915/intel_hotplug.c
>> @@ -325,7 +325,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
>>
>>      list_for_each_entry(connector, &mode_config->connector_list, head) {
>>              intel_connector = to_intel_connector(connector);
>> -            if (!intel_connector->encoder)
>> +            if (!intel_connector->encoder
>> +                    && connector->connector_type != DRM_MODE_CONNECTOR_HDMIA)
>>                      continue;
>
> Pretty sure this breaks hotplug detection for everything but HDMI (since
> now nothing but hdmi gets called it's ->detect function, and only if that
> signals a status change will we send out an uevent to userspace). Does
> this really not break DP hotplug?
>
> Yes we probe both hdmi and DP always, and probably we could be more
> intelligent with the fallback between the too. But this here doesn't seem
> to be the right solution.
> -Daniel

Hmm :(
This doesn't allow detect to be called for dp. I missed the part that
hpd_pulse only handles mst. From the name and comments it looks like it
should handle hpd for dp completely. I think this this code needs some
refactoring.

For now, I think I better move this check to intel_encoder->hot_plug
function because for the connectors with dp and hdmi both, this hot_plug
hook gets called twice.

>
>>              intel_encoder = intel_connector->encoder;
>>              if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) {
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org<mailto:Intel-gfx@lists.freedesktop.org>
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org<mailto:Intel-gfx@lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[-- Attachment #1.2: Type: text/html, Size: 9468 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

  reply	other threads:[~2015-09-09 23:37 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000C66961D35964B9714611E548C10AD0C2C891B@BGSMSX104.gar.corp.intel.com \
    --to=sonika.jindal@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.