[PATCH] drm/radeon/kms: fix bug in r600_gpu_is_lockup
Jerome Glisse
j.glisse at gmail.com
Wed Dec 22 08:21:42 PST 2010
On Tue, Dec 21, 2010 at 4:05 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
> We were using the lockup struct from the wrong union.
>
> Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
> Cc: Jerome Glisse <jglisse at redhat.com>
Reviewed-by: Jerome Glisse <jglisse at redhat.com>
> ---
> drivers/gpu/drm/radeon/r600.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index 2078108..292b282 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -1345,13 +1345,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
> u32 srbm_status;
> u32 grbm_status;
> u32 grbm_status2;
> + struct r100_gpu_lockup *lockup;
> int r;
>
> + if (rdev->family >= CHIP_RV770)
> + lockup = &rdev->config.rv770.lockup;
> + else
> + lockup = &rdev->config.r600.lockup;
> +
> srbm_status = RREG32(R_000E50_SRBM_STATUS);
> grbm_status = RREG32(R_008010_GRBM_STATUS);
> grbm_status2 = RREG32(R_008014_GRBM_STATUS2);
> if (!G_008010_GUI_ACTIVE(grbm_status)) {
> - r100_gpu_lockup_update(&rdev->config.r300.lockup, &rdev->cp);
> + r100_gpu_lockup_update(lockup, &rdev->cp);
> return false;
> }
> /* force CP activities */
> @@ -1363,7 +1369,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
> radeon_ring_unlock_commit(rdev);
> }
> rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
> - return r100_gpu_cp_is_lockup(rdev, &rdev->config.r300.lockup, &rdev->cp);
> + return r100_gpu_cp_is_lockup(rdev, lockup, &rdev->cp);
> }
>
> int r600_asic_reset(struct radeon_device *rdev)
> --
> 1.7.1.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
More information about the dri-devel
mailing list