diff --git a/sys/dev/drm2/radeon/r600.c b/sys/dev/drm2/radeon/r600.c index b9d41bcaed49..586427d9c8c3 100644 --- a/sys/dev/drm2/radeon/r600.c +++ b/sys/dev/drm2/radeon/r600.c @@ -3012,6 +3012,12 @@ int r600_init(struct radeon_device *rdev) rdev->accel_working = false; } + /* Don't start up if the ucode is missing. */ + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { + DRM_ERROR("radeon: ucode required for R600+.\n"); + return -EINVAL; + } + return 0; } diff --git a/sys/dev/drm2/radeon/rv770.c b/sys/dev/drm2/radeon/rv770.c index cb875bd9da9e..549ed90af8e1 100644 --- a/sys/dev/drm2/radeon/rv770.c +++ b/sys/dev/drm2/radeon/rv770.c @@ -1186,6 +1186,12 @@ int rv770_init(struct radeon_device *rdev) rdev->accel_working = false; } + /* Don't start up if the ucode is missing. */ + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { + DRM_ERROR("radeon: ucode required for R600+.\n"); + return -EINVAL; + } + return 0; }