drm/radeon: check that we have a clock before PLL setup
authorChristian König <christian.koenig@amd.com>
Fri, 2 May 2014 12:27:42 +0000 (14:27 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 6 May 2014 10:18:42 +0000 (12:18 +0200)
Partially fixes: https://bugzilla.kernel.org/show_bug.cgi?id=75211

Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/atombios_crtc.c

index 229be38cc6cadb1940dfcf15bbe6d97d9dae582d..b7983aaee44560a290fa8af6352d7411ad8b3302 100644 (file)
@@ -1901,6 +1901,9 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc,
            (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))
                is_tvcv = true;
 
+       if (!radeon_crtc->adjusted_clock)
+               return -EINVAL;
+
        atombios_crtc_set_pll(crtc, adjusted_mode);
 
        if (ASIC_IS_DCE4(rdev))