| 1 |
diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c
|
| 2 |
--- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx 2009-09-09 08:57:39.000000000 -0400
|
| 3 |
+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c 2009-09-09 09:35:24.000000000 -0400
|
| 4 |
@@ -92,6 +92,18 @@ int drm_helper_probe_single_connector_mo
|
| 5 |
|
| 6 |
connector->status = connector->funcs->detect(connector);
|
| 7 |
|
| 8 |
+ /* fast path if the driver tracks disconnection */
|
| 9 |
+ if (connector->status == connector_status_cached) {
|
| 10 |
+ DRM_DEBUG_KMS("%s still connected\n",
|
| 11 |
+ drm_get_connector_name(connector));
|
| 12 |
+ list_for_each_entry_safe(mode, t, &connector->modes, head) {
|
| 13 |
+ count++;
|
| 14 |
+ mode->status = MODE_OK;
|
| 15 |
+ }
|
| 16 |
+ connector->status = connector_status_connected;
|
| 17 |
+ return count;
|
| 18 |
+ }
|
| 19 |
+
|
| 20 |
if (connector->status == connector_status_disconnected) {
|
| 21 |
DRM_DEBUG_KMS("%s is disconnected\n",
|
| 22 |
drm_get_connector_name(connector));
|
| 23 |
diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c.jx linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c
|
| 24 |
--- linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c.jx 2009-09-09 08:57:39.000000000 -0400
|
| 25 |
+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_lvds.c 2009-09-09 09:56:18.000000000 -0400
|
| 26 |
@@ -593,7 +593,14 @@ static void intel_lvds_mode_set(struct d
|
| 27 |
*/
|
| 28 |
static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
|
| 29 |
{
|
| 30 |
- return connector_status_connected;
|
| 31 |
+ static int done;
|
| 32 |
+
|
| 33 |
+ if (!done) {
|
| 34 |
+ done = 1;
|
| 35 |
+ return connector_status_connected;
|
| 36 |
+ } else {
|
| 37 |
+ return connector_status_cached;
|
| 38 |
+ }
|
| 39 |
}
|
| 40 |
|
| 41 |
/**
|
| 42 |
diff -up linux-2.6.30.noarch/include/drm/drm_crtc.h.jx linux-2.6.30.noarch/include/drm/drm_crtc.h
|
| 43 |
--- linux-2.6.30.noarch/include/drm/drm_crtc.h.jx 2009-09-09 08:57:39.000000000 -0400
|
| 44 |
+++ linux-2.6.30.noarch/include/drm/drm_crtc.h 2009-09-09 09:35:24.000000000 -0400
|
| 45 |
@@ -172,6 +172,7 @@ enum drm_connector_status {
|
| 46 |
connector_status_connected = 1,
|
| 47 |
connector_status_disconnected = 2,
|
| 48 |
connector_status_unknown = 3,
|
| 49 |
+ connector_status_cached = 4,
|
| 50 |
};
|
| 51 |
|
| 52 |
enum subpixel_order {
|
| 53 |
diff -up linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c.jx linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c
|
| 54 |
--- linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c.jx 2009-09-09 10:10:44.000000000 -0400
|
| 55 |
+++ linux-2.6.30.x86_64/drivers/gpu/drm/drm_crtc.c 2009-09-09 11:23:14.000000000 -0400
|
| 56 |
@@ -185,7 +185,8 @@ EXPORT_SYMBOL(drm_get_connector_name);
|
| 57 |
|
| 58 |
char *drm_get_connector_status_name(enum drm_connector_status status)
|
| 59 |
{
|
| 60 |
- if (status == connector_status_connected)
|
| 61 |
+ if (status == connector_status_connected ||
|
| 62 |
+ status == connector_status_cached)
|
| 63 |
return "connected";
|
| 64 |
else if (status == connector_status_disconnected)
|
| 65 |
return "disconnected";
|