]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/radeon/kms: bail on BTC parts if MC ucode is missing
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Dec 2011 16:58:17 +0000 (11:58 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:17:22 +0000 (14:17 -0800)
commit 77e00f2ea94abee1ad13bdfde19cf7aa25992b0e upstream.

We already do this for cayman, need to also do it for
BTC parts.  The default memory and voltage setup is not
adequate for advanced operation.  Continuing will
result in an unusable display.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/radeon/evergreen.c

index d4ee6f0d3c738369418afb02193118d6738a7546..c3f0d428c51dac44f773d14a1e5a1d44a25229e4 100644 (file)
@@ -3258,6 +3258,18 @@ int evergreen_init(struct radeon_device *rdev)
                        rdev->accel_working = false;
                }
        }
+
+       /* Don't start up if the MC ucode is missing on BTC parts.
+        * The default clocks and voltages before the MC ucode
+        * is loaded are not suffient for advanced operations.
+        */
+       if (ASIC_IS_DCE5(rdev)) {
+               if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
+                       DRM_ERROR("radeon: MC ucode required for NI+.\n");
+                       return -EINVAL;
+               }
+       }
+
        return 0;
 }