<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000"><br>
Looks good.<br>
<br>
<span>Reviewed-by: Todd Previte <a class="moz-txt-link-rfc2396E" href="mailto:tprevite@gmail.com"><tprevite@gmail.com></a><br> 
</span><br>
<blockquote style="border: 0px none;" 
cite="mid:1400640904-16847-10-git-send-email-airlied@gmail.com" 
type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="display:table;width:100%;border-top:1px solid 
#EDEEF0;padding-top:5px">       <div 
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
 photoaddress="airlied@gmail.com" photoname="Dave Airlie" 
src="cid:part1.03000801.01080509@gmail.com" name="postbox-contact.jpg" 
height="25px" width="25px"></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a moz-do-not-send="true" href="mailto:airlied@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Dave Airlie</a></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;">   
  <font color="#9FA2A5"><span style="padding-left:6px">Tuesday, May 20, 
2014 7:55 PM</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><div>From: Dave Airlie 
<a class="moz-txt-link-rfc2396E" href="mailto:airlied@redhat.com"><airlied@redhat.com></a><br><br>DP MST will need connectors that 
aren't connected to specific<br>encoders, add some checks in advance to 
avoid oopses.<br><br>Signed-off-by: Dave Airlie 
<a class="moz-txt-link-rfc2396E" href="mailto:airlied@redhat.com"><airlied@redhat.com></a><br>---<br> 
drivers/gpu/drm/i915/i915_debugfs.c  | 16 +++++++++-------<br> 
drivers/gpu/drm/i915/i915_irq.c      |  4 ++++<br> 
drivers/gpu/drm/i915/intel_display.c | 25 ++++++++++++++-----------<br> 3
 files changed, 27 insertions(+), 18 deletions(-)<br><br>diff --git 
a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c<br>index 1e83ae4..88e944f 100644<br>---
 a/drivers/gpu/drm/i915/i915_debugfs.c<br>+++ 
b/drivers/gpu/drm/i915/i915_debugfs.c<br>@@ -2279,13 +2279,15 @@ static 
void intel_connector_info(struct seq_file *m,<br>                 seq_printf(m, "\tCEA
 rev: %d\n",<br>                        connector->display_info.cea_rev);<br>       }<br>-    
if (intel_encoder->type == INTEL_OUTPUT_DISPLAYPORT ||<br>-        
intel_encoder->type == INTEL_OUTPUT_EDP)<br>-          intel_dp_info(m, 
intel_connector);<br>-    else if (intel_encoder->type == 
INTEL_OUTPUT_HDMI)<br>-           intel_hdmi_info(m, intel_connector);<br>- else 
if (intel_encoder->type == INTEL_OUTPUT_LVDS)<br>-             
intel_lvds_info(m, intel_connector);<br>+ if (intel_encoder) {<br>+         if 
(intel_encoder->type == INTEL_OUTPUT_DISPLAYPORT ||<br>+                   
intel_encoder->type == INTEL_OUTPUT_EDP)<br>+                  intel_dp_info(m, 
intel_connector);<br>+            else if (intel_encoder->type == 
INTEL_OUTPUT_HDMI)<br>+                   intel_hdmi_info(m, intel_connector);<br>+         
else if (intel_encoder->type == INTEL_OUTPUT_LVDS)<br>+                        
intel_lvds_info(m, intel_connector);<br>+ }<br> <br>  seq_printf(m, 
"\tmodes:\n");<br>      list_for_each_entry(mode, &connector->modes, 
head)<br>diff --git a/drivers/gpu/drm/i915/i915_irq.c 
b/drivers/gpu/drm/i915/i915_irq.c<br>index afa5519..5852dee 100644<br>---
 a/drivers/gpu/drm/i915/i915_irq.c<br>+++ 
b/drivers/gpu/drm/i915/i915_irq.c<br>@@ -1016,6 +1016,8 @@ static void 
i915_hotplug_work_func(struct work_struct *work)<br>      
dev_priv->hpd_event_bits = 0;<br>      list_for_each_entry(connector, 
&mode_config->connector_list, head) {<br>          intel_connector = 
to_intel_connector(connector);<br>+               if (!intel_connector->encoder)<br>+
                        continue;<br>             intel_encoder = intel_connector->encoder;<br>          if
 (intel_encoder->hpd_pin > HPD_NONE &&<br>              
dev_priv->hpd_stats[intel_encoder->hpd_pin].hpd_mark == 
HPD_MARK_DISABLED &&<br>@@ -1046,6 +1048,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>+                       continue;<br>             intel_encoder = 
intel_connector->encoder;<br>          if (hpd_event_bits & (1 << 
intel_encoder->hpd_pin)) {<br>                         if (intel_encoder->hot_plug)<br>diff
 --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c<br>index b39d036..75b2aaf 100644<br>---
 a/drivers/gpu/drm/i915/intel_display.c<br>+++ 
b/drivers/gpu/drm/i915/intel_display.c<br>@@ -4600,20 +4600,23 @@ static
 void intel_connector_check_state(struct intel_connector *connector)<br>
                     "wrong connector dpms state\n");<br>               
WARN(connector->base.encoder != &encoder->base,<br>                  
"active connector not linked to encoder\n");<br>-               
WARN(!encoder->connectors_active,<br>-              
"encoder->connectors_active not set\n");<br> <br>-             encoder_enabled =
 encoder->get_hw_state(encoder, &pipe);<br>-               
WARN(!encoder_enabled, "encoder not enabled\n");<br>-           if 
(WARN_ON(!encoder->base.crtc))<br>-                    return;<br>+              if (encoder) {<br>+
                        WARN(!encoder->connectors_active,<br>+                      
"encoder->connectors_active not set\n");<br>+<br>+                     encoder_enabled =
 encoder->get_hw_state(encoder, &pipe);<br>+                       
WARN(!encoder_enabled, "encoder not enabled\n");<br>+                   if 
(WARN_ON(!encoder->base.crtc))<br>+                            return;<br> <br>-           crtc = 
encoder->base.crtc;<br>+                       crtc = encoder->base.crtc;<br> <br>-             
WARN(!crtc->enabled, "crtc not enabled\n");<br>-             
WARN(!to_intel_crtc(crtc)->active, "crtc not active\n");<br>-                
WARN(pipe != to_intel_crtc(crtc)->pipe,<br>-                "encoder active on
 the wrong pipe\n");<br>+                    WARN(!crtc->enabled, "crtc not 
enabled\n");<br>+                    WARN(!to_intel_crtc(crtc)->active, "crtc not 
active\n");<br>+                     WARN(pipe != to_intel_crtc(crtc)->pipe,<br>+                      
  "encoder active on the wrong pipe\n");<br>+           }<br>     }<br> }<br> <br></div></div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="display:table;width:100%;border-top:1px solid 
#EDEEF0;padding-top:5px">       <div 
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
 photoaddress="airlied@gmail.com" photoname="Dave Airlie" 
src="cid:part1.03000801.01080509@gmail.com" name="postbox-contact.jpg" 
height="25px" width="25px"></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a moz-do-not-send="true" href="mailto:airlied@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Dave Airlie</a></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;">   
  <font color="#9FA2A5"><span style="padding-left:6px">Tuesday, May 20, 
2014 7:54 PM</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><div>Hey,<br><br>So this set is
 pretty close to what I think we should be merging initially,<br><br>Since
 the last set, it makes fbcon and suspend/resume work a lot better,<br><br>I've
 also fixed a couple of bugs in -intel that make things work a lot<br>better.<br><br>I've
 bashed on this a bit using kms-flip from intel-gpu-tools, hacked<br>to 
add 3 monitor support.<br><br>It still generates a fair few i915 state 
checker backtraces, and some<br>of them are fairly hard to work out, it 
might be we should just tone<br>down the state checker for 
encoders/connectors with no actual hw backing<br>them.<br><br>Dave.<br><br>_______________________________________________<br>Intel-gfx
 mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br><a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br></div></div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div><font size="-1">Sent using Postbox:<br><a 
href="http://www.getpostbox.com"><span style="color: rgb(51, 102, 153);">http://www.getpostbox.com</span></a></font></div></div>
</body></html>