Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -279,6 +279,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
	list_for_each_entry(connector,
		&ddev->mode_config.connector_list, head) {
		if (connector->encoder &&
		    connector->encoder->crtc &&
		    connector->dpms != DRM_MODE_DPMS_OFF) {
			radeon_crtc = to_radeon_crtc(connector->encoder->crtc);
			rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id);