|
@@ -81,6 +81,23 @@ static void radeon_hotplug_work_func(struct work_struct *work)
|
|
|
drm_helper_hpd_irq_event(dev);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * radeon_irq_reset_work_func - execute gpu reset
|
|
|
+ *
|
|
|
+ * @work: work struct
|
|
|
+ *
|
|
|
+ * Execute scheduled gpu reset (cayman+).
|
|
|
+ * This function is called when the irq handler
|
|
|
+ * thinks we need a gpu reset.
|
|
|
+ */
|
|
|
+static void radeon_irq_reset_work_func(struct work_struct *work)
|
|
|
+{
|
|
|
+ struct radeon_device *rdev = container_of(work, struct radeon_device,
|
|
|
+ reset_work);
|
|
|
+
|
|
|
+ radeon_gpu_reset(rdev);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* radeon_driver_irq_preinstall_kms - drm irq preinstall callback
|
|
|
*
|
|
@@ -243,6 +260,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
|
|
|
|
|
|
INIT_WORK(&rdev->hotplug_work, radeon_hotplug_work_func);
|
|
|
INIT_WORK(&rdev->audio_work, r600_audio_update_hdmi);
|
|
|
+ INIT_WORK(&rdev->reset_work, radeon_irq_reset_work_func);
|
|
|
|
|
|
spin_lock_init(&rdev->irq.lock);
|
|
|
r = drm_vblank_init(rdev->ddev, rdev->num_crtc);
|