diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0068-drm-radeon-fix-hotplug-of-DP-to-DVI-HDMI-passive-ada.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0068-drm-radeon-fix-hotplug-of-DP-to-DVI-HDMI-passive-ada.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0068-drm-radeon-fix-hotplug-of-DP-to-DVI-HDMI-passive-ada.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0068-drm-radeon-fix-hotplug-of-DP-to-DVI-HDMI-passive-ada.patch new file mode 100644 index 00000000..0872ed35 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0068-drm-radeon-fix-hotplug-of-DP-to-DVI-HDMI-passive-ada.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 0de546b55811738998d83bb6e677306d65e90861 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jerome Glisse <jglisse@redhat.com> | ||
3 | Date: Thu, 19 Jul 2012 17:15:56 -0400 | ||
4 | Subject: [PATCH 68/73] drm/radeon: fix hotplug of DP to DVI|HDMI passive | ||
5 | adapters (v2) | ||
6 | |||
7 | commit 266dcba541a1ef7e5d82d9e67c67fde2910636e8 upstream. | ||
8 | |||
9 | No need to retrain the link for passive adapters. | ||
10 | |||
11 | v2: agd5f | ||
12 | - no passive DP to VGA adapters, update comments | ||
13 | - assign radeon_connector_atom_dig after we are sure | ||
14 | we have a digital connector as analog connectors | ||
15 | have different private data. | ||
16 | - get new sink type before checking for retrain. No | ||
17 | need to check if it's no longer a DP connection. | ||
18 | |||
19 | Signed-off-by: Jerome Glisse <jglisse@redhat.com> | ||
20 | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ||
21 | Signed-off-by: Dave Airlie <airlied@redhat.com> | ||
22 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
23 | --- | ||
24 | drivers/gpu/drm/radeon/radeon_connectors.c | 29 ++++++++++++++++++++------- | ||
25 | 1 files changed, 21 insertions(+), 8 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c | ||
28 | index 4a4493f..fb8db7a 100644 | ||
29 | --- a/drivers/gpu/drm/radeon/radeon_connectors.c | ||
30 | +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | ||
31 | @@ -64,14 +64,27 @@ void radeon_connector_hotplug(struct drm_connector *connector) | ||
32 | |||
33 | /* just deal with DP (not eDP) here. */ | ||
34 | if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { | ||
35 | - int saved_dpms = connector->dpms; | ||
36 | - | ||
37 | - /* Only turn off the display it it's physically disconnected */ | ||
38 | - if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) | ||
39 | - drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); | ||
40 | - else if (radeon_dp_needs_link_train(radeon_connector)) | ||
41 | - drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); | ||
42 | - connector->dpms = saved_dpms; | ||
43 | + struct radeon_connector_atom_dig *dig_connector = | ||
44 | + radeon_connector->con_priv; | ||
45 | + | ||
46 | + /* if existing sink type was not DP no need to retrain */ | ||
47 | + if (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT) | ||
48 | + return; | ||
49 | + | ||
50 | + /* first get sink type as it may be reset after (un)plug */ | ||
51 | + dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); | ||
52 | + /* don't do anything if sink is not display port, i.e., | ||
53 | + * passive dp->(dvi|hdmi) adaptor | ||
54 | + */ | ||
55 | + if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { | ||
56 | + int saved_dpms = connector->dpms; | ||
57 | + /* Only turn off the display if it's physically disconnected */ | ||
58 | + if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) | ||
59 | + drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); | ||
60 | + else if (radeon_dp_needs_link_train(radeon_connector)) | ||
61 | + drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); | ||
62 | + connector->dpms = saved_dpms; | ||
63 | + } | ||
64 | } | ||
65 | } | ||
66 | |||
67 | -- | ||
68 | 1.7.7.6 | ||
69 | |||