]> Git Repo - J-linux.git/commitdiff
Merge commit 'keithp/drm-intel-next' into drm-intel-next
authorEric Anholt <[email protected]>
Mon, 22 Jun 2009 05:14:55 +0000 (22:14 -0700)
committerEric Anholt <[email protected]>
Mon, 22 Jun 2009 05:33:15 +0000 (22:33 -0700)
1  2 
drivers/gpu/drm/i915/intel_hdmi.c

index 4ea2a651b92c43079a4c3185a829e241822ca488,fbe96005fa1ef4f7d9571d3784bc5f6217d18db7..3955476eb64f8886c17a75375eb2a1eac320369e
@@@ -31,6 -31,7 +31,7 @@@
  #include "drmP.h"
  #include "drm.h"
  #include "drm_crtc.h"
+ #include "drm_edid.h"
  #include "intel_drv.h"
  #include "i915_drm.h"
  #include "i915_drv.h"
@@@ -129,20 -130,26 +130,26 @@@ static bool intel_hdmi_mode_fixup(struc
        return true;
  }
  
- static void
- intel_hdmi_sink_detect(struct drm_connector *connector)
+ static enum drm_connector_status
+ intel_hdmi_edid_detect(struct drm_connector *connector)
  {
        struct intel_output *intel_output = to_intel_output(connector);
        struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
        struct edid *edid = NULL;
+       enum drm_connector_status status = connector_status_disconnected;
  
        edid = drm_get_edid(&intel_output->base,
-                           &intel_output->ddc_bus->adapter);
-       if (edid != NULL) {
-               hdmi_priv->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
-               kfree(edid);
+                           intel_output->ddc_bus);
+       hdmi_priv->has_hdmi_sink = false;
+       if (edid) {
 -              if (edid->digital) {
++              if (edid->input & DRM_EDID_INPUT_DIGITAL) {
+                       status = connector_status_connected;
+                       hdmi_priv->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
+               }
                intel_output->base.display_info.raw_edid = NULL;
+               kfree(edid);
        }
+       return status;
  }
  
  static enum drm_connector_status
@@@ -154,11 -161,7 +161,7 @@@ igdng_hdmi_detect(struct drm_connector 
        /* FIXME hotplug detect */
  
        hdmi_priv->has_hdmi_sink = false;
-       intel_hdmi_sink_detect(connector);
-       if (hdmi_priv->has_hdmi_sink)
-               return connector_status_connected;
-       else
-               return connector_status_disconnected;
+       return intel_hdmi_edid_detect(connector);
  }
  
  static enum drm_connector_status
@@@ -201,10 -204,9 +204,9 @@@ intel_hdmi_detect(struct drm_connector 
                return connector_status_unknown;
        }
  
-       if ((I915_READ(PORT_HOTPLUG_STAT) & bit) != 0) {
-               intel_hdmi_sink_detect(connector);
-               return connector_status_connected;
-       } else
+       if ((I915_READ(PORT_HOTPLUG_STAT) & bit) != 0)
+               return intel_hdmi_edid_detect(connector);
+       else
                return connector_status_disconnected;
  }
  
This page took 0.067795 seconds and 4 git commands to generate.