[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-05 Thread Michel Dänzer
On 05.08.2014 07:01, Marek Ol??k wrote: > I'm afraid this won't always work and it can be a source of bugs. > > Userspace doesn't have to call GEM_WAIT_IDLE before a CPU access to a > VRAM buffer. For example, consider a wait-idle request with a non-zero > timeout, which is implemented as a loop w

[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-05 Thread Marek Olšák
No, it doesn't. Marek On Tue, Aug 5, 2014 at 10:55 AM, Michel D?nzer wrote: > On 05.08.2014 07:01, Marek Ol??k wrote: >> I'm afraid this won't always work and it can be a source of bugs. >> >> Userspace doesn't have to call GEM_WAIT_IDLE before a CPU access to a >> VRAM buffer. For example, cons

[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-05 Thread Marek Olšák
I'm afraid this won't always work and it can be a source of bugs. Userspace doesn't have to call GEM_WAIT_IDLE before a CPU access to a VRAM buffer. For example, consider a wait-idle request with a non-zero timeout, which is implemented as a loop which calls GEM_BUSY. Also, userspace can use fence

[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-01 Thread Michel Dänzer
From: Michel D?nzer The HDP cache only applies to CPU access to VRAM. Signed-off-by: Michel D?nzer --- drivers/gpu/drm/radeon/radeon_gem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index

[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-01 Thread Christian König
Am 01.08.2014 um 10:22 schrieb Michel D?nzer: > From: Michel D?nzer > > The HDP cache only applies to CPU access to VRAM. > > Signed-off-by: Michel D?nzer Wanted to suggest the same thing already, looks like a valid optimization to me. Patch is Reviewed-by: Christian K?nig > --- > drivers/

[PATCH] drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAM

2014-08-01 Thread Alex Deucher
On Fri, Aug 1, 2014 at 4:22 AM, Michel D?nzer wrote: > From: Michel D?nzer > > The HDP cache only applies to CPU access to VRAM. > > Signed-off-by: Michel D?nzer Applied to my 3.17 branch. Thanks! > --- > drivers/gpu/drm/radeon/radeon_gem.c | 6 -- > 1 file changed, 4 insertions(+), 2 de