[PATCH] gpu: amdkfd: fix a missing check of kmemdup

2019-03-09 Thread Kangjie Lu
kmemdup could fail and return NULL. To avoid null pointer dereference, the fix checkes its return value and returns ENOMEM upon failures. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat

[PATCH] drm: check if alloc_workqueue fails

2019-03-09 Thread Kangjie Lu
alloc_workqueue may fail. The fix checks its status. We probably need to add a return value for radeon_crtc_init, so that we can pass an error code upstream. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/radeon/radeon_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/dr

Re: Slow memory access when using OpenCL without X11

2019-03-09 Thread Jan Vesely
On Sat, Mar 9, 2019 at 1:54 AM Lauri Ehrenpreis wrote: > > Even if it's using CPU for OCL (I know it's not doing this), why does memcpy > on CPU slow down permanently, if I'm not doing anything with OpenCL after > clCreateContext? > > As you see from test program it just does clCreateContext and