diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-08 18:16:56 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-14 10:10:53 -0400 |
commit | c2b4cacfe9816c1fe378c785ce8a678cf0635ec6 (patch) | |
tree | 5231af1e1499a7b201b6a0526ffc1893edf01609 /drivers/gpu/drm/radeon/r600_hdmi.c | |
parent | 774d8e34e46506222bb5e2888e3ef42b2775715f (diff) | |
download | linux-stable-c2b4cacfe9816c1fe378c785ce8a678cf0635ec6.tar.gz linux-stable-c2b4cacfe9816c1fe378c785ce8a678cf0635ec6.tar.bz2 linux-stable-c2b4cacfe9816c1fe378c785ce8a678cf0635ec6.zip |
drm/radeon/hdmi: make sure we have an afmt block assigned
Prevents a segfault if an afmt block is not assigned to the
encoder such as in the LVDS or eDP case.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=66714
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index e73b2a73494a..f48240bb8c56 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -266,6 +266,9 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod uint32_t offset; ssize_t err; + if (!dig || !dig->afmt) + return; + /* Silent, r600_hdmi_enable will raise WARN for us */ if (!dig->afmt->enabled) return; @@ -448,6 +451,9 @@ void r600_hdmi_enable(struct drm_encoder *encoder, bool enable) struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; u32 hdmi = HDMI0_ERROR_ACK; + if (!dig || !dig->afmt) + return; + /* Silent, r600_hdmi_enable will raise WARN for us */ if (enable && dig->afmt->enabled) return; |