Commit 57f50d70 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms/pm: fix segfault in clock code

Make sure we have a crtc assigned to the encoder
before dereferencing it.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
parent 29fb52ca
...@@ -279,7 +279,8 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev) ...@@ -279,7 +279,8 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
list_for_each_entry(connector, list_for_each_entry(connector,
&ddev->mode_config.connector_list, head) { &ddev->mode_config.connector_list, head) {
if (connector->encoder && if (connector->encoder &&
connector->dpms != DRM_MODE_DPMS_OFF) { connector->encoder->crtc &&
connector->dpms != DRM_MODE_DPMS_OFF) {
radeon_crtc = to_radeon_crtc(connector->encoder->crtc); radeon_crtc = to_radeon_crtc(connector->encoder->crtc);
rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id); rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id);
++count; ++count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment