summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/radeon/evergreen_hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/radeon/evergreen_hdmi.c')
-rw-r--r--sys/dev/pci/drm/radeon/evergreen_hdmi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon/evergreen_hdmi.c b/sys/dev/pci/drm/radeon/evergreen_hdmi.c
index 0cd87c2e3f1..127f6faf8c2 100644
--- a/sys/dev/pci/drm/radeon/evergreen_hdmi.c
+++ b/sys/dev/pci/drm/radeon/evergreen_hdmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evergreen_hdmi.c,v 1.1 2013/08/12 04:11:53 jsg Exp $ */
+/* $OpenBSD: evergreen_hdmi.c,v 1.2 2014/02/09 13:43:02 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -157,6 +157,9 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
uint32_t offset;
+ if (!dig || !dig->afmt)
+ return;
+
/* Silent, r600_hdmi_enable will raise WARN for us */
if (!dig->afmt->enabled)
return;