* Patch "drm/radeon: only mark audio as connected if the monitor supports it (v3)" has been added to the 4.0-stable tree
@ 2015-05-10 12:32 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-10 12:32 UTC (permalink / raw)
To: alexander.deucher, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/radeon: only mark audio as connected if the monitor supports it (v3)
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-only-mark-audio-as-connected-if-the-monitor-supports-it-v3.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 0f55db36d49d45b80eff0c0a2a498766016f458b Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Tue, 7 Apr 2015 09:52:42 -0400
Subject: drm/radeon: only mark audio as connected if the monitor supports it (v3)
From: Alex Deucher <alexander.deucher@amd.com>
commit 0f55db36d49d45b80eff0c0a2a498766016f458b upstream.
Otherwise the driver may try and send audio which may confuse the
monitor.
v2: set pin to NULL if no audio
v3: avoid crash with analog encoders
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/radeon_audio.c | 27 +++++++++++++++------------
drivers/gpu/drm/radeon/radeon_connectors.c | 8 ++++++--
2 files changed, 21 insertions(+), 14 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -460,30 +460,33 @@ void radeon_audio_detect(struct drm_conn
if (!connector || !connector->encoder)
return;
+ if (!radeon_encoder_is_digital(connector->encoder))
+ return;
+
rdev = connector->encoder->dev->dev_private;
radeon_encoder = to_radeon_encoder(connector->encoder);
dig = radeon_encoder->enc_priv;
- if (status == connector_status_connected) {
- struct radeon_connector *radeon_connector;
- int sink_type;
-
- if (!drm_detect_monitor_audio(radeon_connector_edid(connector))) {
- radeon_encoder->audio = NULL;
- return;
- }
+ if (!dig->afmt)
+ return;
- radeon_connector = to_radeon_connector(connector);
- sink_type = radeon_dp_getsinktype(radeon_connector);
+ if (status == connector_status_connected) {
+ struct radeon_connector *radeon_connector = to_radeon_connector(connector);
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
- sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT)
+ radeon_dp_getsinktype(radeon_connector) ==
+ CONNECTOR_OBJECT_ID_DISPLAYPORT)
radeon_encoder->audio = rdev->audio.dp_funcs;
else
radeon_encoder->audio = rdev->audio.hdmi_funcs;
dig->afmt->pin = radeon_audio_get_pin(connector->encoder);
- radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
+ if (drm_detect_monitor_audio(radeon_connector_edid(connector))) {
+ radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
+ } else {
+ radeon_audio_enable(rdev, dig->afmt->pin, 0);
+ dig->afmt->pin = NULL;
+ }
} else {
radeon_audio_enable(rdev, dig->afmt->pin, 0);
dig->afmt->pin = NULL;
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1333,8 +1333,10 @@ out:
/* updated in get modes as well since we need to know if it's analog or digital */
radeon_connector_update_scratch_regs(connector, ret);
- if (radeon_audio != 0)
+ if (radeon_audio != 0) {
+ radeon_connector_get_edid(connector);
radeon_audio_detect(connector, ret);
+ }
exit:
pm_runtime_mark_last_busy(connector->dev->dev);
@@ -1659,8 +1661,10 @@ radeon_dp_detect(struct drm_connector *c
radeon_connector_update_scratch_regs(connector, ret);
- if (radeon_audio != 0)
+ if (radeon_audio != 0) {
+ radeon_connector_get_edid(connector);
radeon_audio_detect(connector, ret);
+ }
out:
pm_runtime_mark_last_busy(connector->dev->dev);
Patches currently in stable-queue which might be from alexander.deucher@amd.com are
queue-4.0/drm-radeon-fix-lockup-when-bos-aren-t-part-of-the-vm-on-release.patch
queue-4.0/drm-radeon-reset-bos-address-after-clearing-it.patch
queue-4.0/drm-radeon-adjust-pll-when-audio-is-not-enabled.patch
queue-4.0/drm-radeon-add-si-dpm-quirk-for-sapphire-r9-270-dual-x-2g-gddr5.patch
queue-4.0/drm-radeon-only-enable-audio-streams-if-the-monitor-supports-it.patch
queue-4.0/drm-radeon-only-mark-audio-as-connected-if-the-monitor-supports-it-v3.patch
queue-4.0/drm-radeon-drop-dce6_dp_enable.patch
queue-4.0/drm-radeon-audio-don-t-enable-packets-until-the-end.patch
queue-4.0/drm-radeon-check-new-address-before-removing-old-one.patch
queue-4.0/drm-radeon-fix-ordering-of-avi-packet-setup.patch
queue-4.0/drm-radeon-use-drm_calloc_ab-for-cs-relocs.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-10 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-10 12:32 Patch "drm/radeon: only mark audio as connected if the monitor supports it (v3)" has been added to the 4.0-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).