[PATCH] drm/radeon: Read back ring buffer before updating WPTR
Alex Deucher
alexdeucher at gmail.com
Fri Aug 8 06:36:42 PDT 2014
On Fri, Aug 8, 2014 at 4:45 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> This fixes a ring test failure reported on a Kabini system which was
> triggered by write-combined CPU mappings of the ring buffers.
>
> Reported-and-Tested-by: Will Trives <renevant at internode.on.net>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Applied to my fixes tree.
Alex
> ---
> drivers/gpu/drm/radeon/radeon_ring.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
> index 5b4e0cf..6dff529 100644
> --- a/drivers/gpu/drm/radeon/radeon_ring.c
> +++ b/drivers/gpu/drm/radeon/radeon_ring.c
> @@ -193,6 +193,10 @@ void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *ring)
> radeon_ring_write(ring, ring->nop);
> }
> mb();
> + /* This is necessary to prevent ring test failures on some systems
> + * with write-combined CPU mappings of the ring buffers
> + */
> + (void)ring->ring[ring->wptr];
> /* If we are emitting the HDP flush via MMIO, we need to do it after
> * all CPU writes to VRAM finished.
> */
> --
> 2.0.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