[PATCH 11/20] media: atomisp: use Yocto Aero default hmm pool sizes

2020-05-27 Thread Mauro Carvalho Chehab
Yocto Aero driver has a different default for hmm pools. Use the definitions there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_

[PATCH 06/20] media: atomisp: get rid of unused memory_realloc code

2020-05-27 Thread Mauro Carvalho Chehab
The code for it is commented out, probably because it is broken or uneeded for the driver to work. So, let's get rid of it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../pci/hive_isp_css_include/memory_realloc.h | 38 - .../media/atomi

[PATCH 12/20] media: atomisp: get rid of a warning message

2020-05-27 Thread Mauro Carvalho Chehab
There's a warning message about an unused code. The code that were using it were commented out, due to a problem causing the firmware load to fail on the machines we're using for testing. Change the place where we're commenting the code out, in order to avoid the warning. Fixes: 95d1f398c4dc ("me

[PATCH 01/20] media: atomisp: simplify hive_isp_css_mm_hrt wrapper

2020-05-27 Thread Mauro Carvalho Chehab
The code there is a wrapper for hmm/ wrapper. Simplify it, and get rid of ION-specific code. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 5 -- .../media/atomisp/include/hmm/hmm_bo.h| 9 --- .../staging/media/atomisp/pci/atomisp_acc.c | 2

[PATCH 09/20] media: atomisp: hmm_bo: untag user pointers

2020-05-27 Thread Mauro Carvalho Chehab
The kernel ABI was extended to allow pass tagged user pointers. Untag the pointers in this function. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/d

[PATCH 03/20] media: atomisp: reduce abstraction at ia_css_memory_access

2020-05-27 Thread Mauro Carvalho Chehab
Yet another memory abstraction layer. Getting rid of this may be a little trickier, but let's reduce it to a minimal. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/include/hmm/hmm.h | 3 - .../memory_access/memory_access.h | 61 +-- drivers/sta

[PATCH 16/20] media: atomisp: improve warning for IRQ enable function

2020-05-27 Thread Mauro Carvalho Chehab
If something gets wrong when enabling or disabling an IRQ, we should know better about what happened. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/ato

[PATCH 08/20] media: atomisp: get rid of memory_access.c

2020-05-27 Thread Mauro Carvalho Chehab
Now that we have everything in place, we can get rid of the memory_access abstraction layer. Now, everything related to heterogeneous memory management (hmm) is under hmm.c & related pools. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../stagin

[PATCH 13/20] media: atomisp: fix driver caps

2020-05-27 Thread Mauro Carvalho Chehab
This device driver is not MC-centric. So, remove the wrong caps from it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers

[PATCH 20/20] media: atomisp: avoid OOPS due to non-existing ref_frames

2020-05-27 Thread Mauro Carvalho Chehab
stage->args->delay_frames array could point to NULL frames. What's weird is that we didn't notice this behavior with the Intel Aero Yocto code. Handle it, while adding a notice at the code, as this could be due to some broken pipeline setup. Signed-off-by: Mauro Carvalho Chehab --- .../pci/isp

[PATCH 05/20] media: atomisp: get rid of mmgr_load and mmgr_store

2020-05-27 Thread Mauro Carvalho Chehab
Those functions are just wrappers for hmm_load/hmm_store. Signed-off-by: Mauro Carvalho Chehab --- .../pci/hive_isp_css_common/host/debug.c | 8 +++--- .../hive_isp_css_common/host/debug_private.h | 8 +++--- .../memory_access/memory_access.h | 20 - drivers/stagi

[PATCH 19/20] media: atomisp: remove kvmalloc/kvcalloc abstractions

2020-05-27 Thread Mauro Carvalho Chehab
The sh_css layer adds an abstraction for kvmalloc/kvcalloc. Get rid of them. Most of the work here was done by this small coccinelle script: @@ expression size; @@ - sh_css_malloc(size) + kvmalloc(size, GFP_KERNEL) @@ expression n; expression size; @@ - sh_css_calloc(n, size) + kvcalloc(n, si

[PATCH 02/20] media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction layer

2020-05-27 Thread Mauro Carvalho Chehab
Simplify the code by removing this extra memory management abstraction layer. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../staging/media/atomisp/pci/atomisp_acc.c | 24 --- .../staging/media/atomisp/pci/atomisp_cmd.c | 2 +- .../medi

[PATCH 15/20] media: atomisp: add debug for hmm alloc

2020-05-27 Thread Mauro Carvalho Chehab
The hmm code is still complex and has bugs. Add a debug print when memory gets allocated, in order to help identifying what's happening out there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH 14/20] media: atomisp: use pin_user_pages() for memory allocation

2020-05-27 Thread Mauro Carvalho Chehab
Instead of using a hacked version of an old copy of get_user_pages(), use pin_user_pages(). Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/include/hmm/hmm_bo.h| 2 + .../staging/media/atomisp/pci/hmm/hmm_bo.c| 145 +++--- 2 files changed, 24 insertions(+), 1

[PATCH 10/20] media: atomisp: add debug message to help debugging hmm code

2020-05-27 Thread Mauro Carvalho Chehab
The hmm code is partially based on a fork from 3.10 code, and has bugs. Add debug there to help tracking what happens there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/ato

[PATCH 00/20] More atomisp fixes and cleanups

2020-05-27 Thread Mauro Carvalho Chehab
Most of this series are working at the memory management abstraction. The last patch contain an important bug fix: the logic which configures the hardware pipelines add some "delay frames" that are NULL, causing the driver to crash when userspace selects a resolution different than the sensor res

[PATCH 17/20] media: atomisp: add debug functions for received events

2020-05-27 Thread Mauro Carvalho Chehab
For debugging purposes, it helps to know what event was actually received. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/dr

[PATCH 18/20] media: atomisp: add more comments about frame allocation

2020-05-27 Thread Mauro Carvalho Chehab
The frame allocation logic happens differently for userptr or normal mmap. On a quick look, this sounded to be unbalanced, but the logic should actually work for both cases. Add an extra comment to reflect it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_io

[PATCH 07/20] media: atomisp: change the type returned by mmgr alloc

2020-05-27 Thread Mauro Carvalho Chehab
The mmgr alloc code returns a different type than hmm, due to some abstraction layer. Change the driver to use just one type to represent the hmm memory. Signed-off-by: Mauro Carvalho Chehab --- .../base/refcount/interface/ia_css_refcount.h | 13 ++-- .../atomisp/pci/base/refcount/src/refcount.

[driver-core:driver-core-testing] BUILD SUCCESS 8c3e315d4296421cd26b3300ee0ac117f0877f20

2020-05-27 Thread kbuild test robot
powerpc allyesconfig powerpc rhel-kconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a001-20200527 i386 randconfig-a004-20200527 i386

[PATCH v2 19/20] media: atomisp: remove kvmalloc/kvcalloc abstractions

2020-05-27 Thread Mauro Carvalho Chehab
The sh_css layer adds an abstraction for kvmalloc/kvcalloc. Get rid of them. Most of the work here was done by this small coccinelle script: @@ expression size; @@ - sh_css_malloc(size) + kvmalloc(size, GFP_KERNEL) @@ expression n; expression size; @@ - sh_css_calloc(n, size) + kvcalloc(n, si

<    1   2