Re: [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Daniel Vetter
On Tue, Oct 3, 2017 at 2:59 PM, Rob Clark wrote: > On Tue, Oct 3, 2017 at 4:08 AM, Daniel Vetter wrote: >> On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: >>> Fixes intermittent corruption of cmdstream dump. >>> >>> Signed-off-by: Rob Clark >> >> Rule of memory barriers: They always n

Re: [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Rob Clark
On Tue, Oct 3, 2017 at 4:08 AM, Daniel Vetter wrote: > On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: >> Fixes intermittent corruption of cmdstream dump. >> >> Signed-off-by: Rob Clark > > Rule of memory barriers: They always need to come in pairs, and you should > put a comment to ea

Re: [PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-03 Thread Daniel Vetter
On Mon, Oct 02, 2017 at 10:37:11AM -0400, Rob Clark wrote: > Fixes intermittent corruption of cmdstream dump. > > Signed-off-by: Rob Clark Rule of memory barriers: They always need to come in pairs, and you should put a comment to each one explaining where the other side is. I.e. for all the sto

[PATCH] drm/msm: use proper memory barriers for updating tail/head

2017-10-02 Thread Rob Clark
Fixes intermittent corruption of cmdstream dump. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c index 5c087a4228ff..918c65e19964 100644 --- a/drivers/gpu