提交 473ffd59 编写于 作者: H Huacai Chen 提交者: Hongchen Zhang

drm/radeon: Workaround radeon driver bug for Loongson

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB

--------------------------------

Radeon driver can not handle the interrupt is faster than DMA data, so
irq handler must update an old ih.rptr value in IH_RB_RPTR register to
enable interrupt again when interrupt is faster than DMA data.

Change-Id: If15325e6c22c6e01e0fdf78588f0b4f2fd4ef569
Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: NZhijie Zhang <zhangzhijie@loongson.cn>
上级 baf72b3e
......@@ -8108,6 +8108,7 @@ int cik_irq_process(struct radeon_device *rdev)
if (queue_thermal)
schedule_work(&rdev->pm.dpm.thermal.work);
rdev->ih.rptr = rptr;
WREG32(IH_RB_RPTR, rptr);
atomic_set(&rdev->ih.lock, 0);
/* make sure wptr hasn't changed while processing */
......
......@@ -4919,6 +4919,7 @@ int evergreen_irq_process(struct radeon_device *rdev)
if (queue_thermal && rdev->pm.dpm_enabled)
schedule_work(&rdev->pm.dpm.thermal.work);
rdev->ih.rptr = rptr;
WREG32(IH_RB_RPTR, rptr);
atomic_set(&rdev->ih.lock, 0);
/* make sure wptr hasn't changed while processing */
......
......@@ -4331,6 +4331,7 @@ int r600_irq_process(struct radeon_device *rdev)
if (queue_thermal && rdev->pm.dpm_enabled)
schedule_work(&rdev->pm.dpm.thermal.work);
rdev->ih.rptr = rptr;
WREG32(IH_RB_RPTR, rptr);
atomic_set(&rdev->ih.lock, 0);
/* make sure wptr hasn't changed while processing */
......
......@@ -6443,6 +6443,7 @@ int si_irq_process(struct radeon_device *rdev)
if (queue_thermal && rdev->pm.dpm_enabled)
schedule_work(&rdev->pm.dpm.thermal.work);
rdev->ih.rptr = rptr;
WREG32(IH_RB_RPTR, rptr);
atomic_set(&rdev->ih.lock, 0);
/* make sure wptr hasn't changed while processing */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册