<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Now the intel_encoder’s type could be a differentiator. But since, hdmi’s detect gets called, the type of the encoder remains hdmi.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">When hpd occurs, it checks from the list of connectors whose hpd pin is same as the one asserted.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Anyways, that was not a generic implementation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Sonika<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Rodrigo Vivi [mailto:rodrigo.vivi@gmail.com]
<br>
<b>Sent:</b> Thursday, September 10, 2015 12:51 AM<br>
<b>To:</b> Jindal, Sonika; Daniel Vetter<br>
<b>Cc:</b> intel-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [Intel-gfx] [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I was also going to say that I believe this breaks DP hotplug, but this was agreed already...<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">But I also don't understand how hot_plug is called twice since it calls encoder->hot_plug...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and dp has no ->hot_plug... <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">And also if this is happening how this code that checks for connector would help... there is something else strange happening... <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sat, Sep 5, 2015 at 9:31 PM Jindal, Sonika <<a href="mailto:sonika.jindal@intel.com">sonika.jindal@intel.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
<br>
On 9/4/2015 8:17 PM, Daniel Vetter wrote:<br>
> On Fri, Sep 04, 2015 at 06:56:15PM +0530, Sonika Jindal wrote:<br>
>> If the same port is enumerated as hdmi as well as DP, this will get<br>
>> called for DP connector as well which is not required because<br>
>> i915_hotplug_work_func is solely to handle hdmi HPD.<br>
>><br>
>> Signed-off-by: Sonika Jindal <<a href="mailto:sonika.jindal@intel.com" target="_blank">sonika.jindal@intel.com</a>><br>
>> ---<br>
>> drivers/gpu/drm/i915/intel_hotplug.c | 3 ++-<br>
>> 1 file changed, 2 insertions(+), 1 deletion(-)<br>
>><br>
>> diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c<br>
>> index 53c0173..8e1c43e 100644<br>
>> --- a/drivers/gpu/drm/i915/intel_hotplug.c<br>
>> +++ b/drivers/gpu/drm/i915/intel_hotplug.c<br>
>> @@ -325,7 +325,8 @@ static void i915_hotplug_work_func(struct work_struct *work)<br>
>><br>
>> list_for_each_entry(connector, &mode_config->connector_list, head) {<br>
>> intel_connector = to_intel_connector(connector);<br>
>> - if (!intel_connector->encoder)<br>
>> + if (!intel_connector->encoder<br>
>> + && connector->connector_type != DRM_MODE_CONNECTOR_HDMIA)<br>
>> continue;<br>
><br>
> Pretty sure this breaks hotplug detection for everything but HDMI (since<br>
> now nothing but hdmi gets called it's ->detect function, and only if that<br>
> signals a status change will we send out an uevent to userspace). Does<br>
> this really not break DP hotplug?<br>
><br>
> Yes we probe both hdmi and DP always, and probably we could be more<br>
> intelligent with the fallback between the too. But this here doesn't seem<br>
> to be the right solution.<br>
> -Daniel<br>
<br>
Hmm :(<br>
This doesn't allow detect to be called for dp. I missed the part that<br>
hpd_pulse only handles mst. From the name and comments it looks like it<br>
should handle hpd for dp completely. I think this this code needs some<br>
refactoring.<br>
<br>
For now, I think I better move this check to intel_encoder->hot_plug<br>
function because for the connectors with dp and hdmi both, this hot_plug<br>
hook gets called twice.<br>
<br>
><br>
>> intel_encoder = intel_connector->encoder;<br>
>> if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) {<br>
>> --<br>
>> 1.7.10.4<br>
>><br>
>> _______________________________________________<br>
>> Intel-gfx mailing list<br>
>> <a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">
http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
><br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>