提交 57f50d70 编写于 作者: A Alex Deucher 提交者: 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: NAlex Deucher <alexdeucher@gmail.com>
上级 29fb52ca
......@@ -279,7 +279,8 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
list_for_each_entry(connector,
&ddev->mode_config.connector_list, head) {
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);
rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id);
++count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册