[PATCH v2 5/7] staging: bcm2835-audio: more generic probe function name

2018-10-17 Thread Nicolas Saenz Julienne
There will only be one probe function, there is no use for appendig "_dt" the end of the name. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren --- drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 4 ++-- 1 file changed, 2 insert

[PATCH v2 6/7] staging: bcm2835-audio: rename platform_driver structure

2018-10-17 Thread Nicolas Saenz Julienne
It was called bcm2835_alsa0_driver, that "0" didn't mean much. Suggested-by: Takashi Iwai Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc0

[PATCH v2 4/7] staging: bcm2835-audio: use anonymous union in struct vc_audio_msg

2018-10-17 Thread Nicolas Saenz Julienne
In this case explicitly naming the union doesn't help overall code comprehension and clutters it. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren --- .../bcm2835-audio/bcm2835-vchiq.c | 30 +-- .../bcm2835-audio

[PATCH v2 7/7] staging: bcm2835-audio: update TODO

2018-10-17 Thread Nicolas Saenz Julienne
/2018/9/4/587 Also, adds a new task as per mailing list conversation. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/bcm2835-audio/TODO | 25 +++ 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/TODO b

[PATCH v2 0/7] staging: bcm2835-audio: Cleanups and upgrades

2018-10-17 Thread Nicolas Saenz Julienne
with sound so I only tested the mini jack output. Thanks, Nicolas v2: Removes the device tree related patches, updates TODO accordingly and adds suggestions from Takashi. Nicolas Saenz Julienne (7): staging: bcm2835-audio: unify FOURCC command definitions staging: bcm2835-audio: don't

[PATCH v2 2/7] staging: bcm2835-audio: don't initialize memory twice

2018-10-17 Thread Nicolas Saenz Julienne
The memory is being allocated with devres_alloc(), wich ultimately uses __GFP_ZERO to call kmalloc. We don't need to zero the memory area again in bcm2835-audio. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren --- drivers/staging/vc04_services/bcm2835

[PATCH v2 1/7] staging: bcm2835-audio: unify FOURCC command definitions

2018-10-17 Thread Nicolas Saenz Julienne
The device communicates with the audio core using FOURCC codes. The driver was generating them using different macros/expressions. We now use the same macro to create them and centralize all the definitions. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren

[PATCH v2 3/7] staging: bcm2835-audio: reorder variable declarations & remove trivial comments

2018-10-17 Thread Nicolas Saenz Julienne
When it comes to declaring variables it's preferred, when possible, to use an inverted tree organization scheme. Also, removes some comments that were useless. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren --- .../vc04_services/bcm2835-audio/bcm2835

[PATCH RFC 03/18] staging: vchiq_shim: delete vchi_service_create

2018-10-26 Thread Nicolas Saenz Julienne
No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 5 --- .../interface/vchiq_arm/vchiq_shim.c | 32

[PATCH RFC 06/18] staging: vchiq_arm: rework vchiq_ioc_copy_element_data

2018-10-26 Thread Nicolas Saenz Julienne
ll the elements into memory as long as they fit". The resulting function is shorter and simpler. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 89 +++ 1 file changed, 31 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc0

[PATCH RFC 08/18] staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state

2018-10-26 Thread Nicolas Saenz Julienne
changed in between functions, making the checks useless. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH RFC 01/18] staging: vchiq_core: rework vchiq_get_config

2018-10-26 Thread Nicolas Saenz Julienne
The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 12 .../interface/vchiq_arm/vchiq_core.c | 30 +-- .../interface

[PATCH RFC 10/18] staging: vchiq_core: don't add a wmb() before remote_event_signal()

2018-10-26 Thread Nicolas Saenz Julienne
It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH RFC 00/18] staging: vchiq: remove dead code & misc fixes

2018-10-26 Thread Nicolas Saenz Julienne
-next, and was tested on a RPIv3B+ with audio, video and running vchiq_test. Regards, Nicolas === Nicolas Saenz Julienne (18): staging: vchiq_core: rework vchiq_get_config staging: vchiq_arm: rework close/remove_service IOCTLS staging: vchiq_shim: delete vchi_service_create stagning

[PATCH RFC 11/18] staging: vchiq_arm: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 58 ++- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging

[PATCH RFC 07/18] staging: vchiq-core: get rid of is_master distinction

2018-10-26 Thread Nicolas Saenz Julienne
". There seems to be an option to switch roles in vchiq. Which nobody is using nor is properly implemented. So we get rid of the "is_master == 1" option, and all the related code. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 12 +- .../in

[PATCH RFC 05/18] staging: vchiq_arm: get rid of vchi_mh.h

2018-10-26 Thread Nicolas Saenz Julienne
The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne

[PATCH RFC 12/18] staging: vchiq_util: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c | 16 .../interface/vchiq_arm/vchiq_util.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging

[PATCH RFC 17/18] staging: vchiq_arm: fix open/release cdev functions

2018-10-26 Thread Nicolas Saenz Julienne
Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm

[PATCH RFC 18/18] staging: vchiq: add more tasks to the TODO list

2018-10-26 Thread Nicolas Saenz Julienne
The more the better. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 46 ++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO b/drivers/staging/vc04_services/interface/vchi

[PATCH RFC 04/18] stagning: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2018-10-26 Thread Nicolas Saenz Julienne
The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/drivers/staging/vc04_services

[PATCH RFC 13/18] staging: vchiq_core: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 2 +- .../interface/vchiq_arm/vchiq_core.c | 94 +-- .../interface/vchiq_arm/vchiq_core.h | 26 ++--- 3 files changed, 61 insertions(+), 61

[PATCH RFC 16/18] staging: vchiq_arm: rework probe and init functions

2018-10-26 Thread Nicolas Saenz Julienne
Some operations performed in the probe function should have been implemented in the init function. Namely class and dev region creations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 71 --- 1 file changed, 45 insertions(+), 26

[PATCH RFC 15/18] stagning: vchiq_core: fix logic redundancy in parse_open

2018-10-26 Thread Nicolas Saenz Julienne
We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 +--- 1 file changed, 1 insertion

[PATCH RFC 14/18] staging: vchiq_util: get rid of unneeded memory barriers

2018-10-26 Thread Nicolas Saenz Julienne
All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c

[PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice

2018-10-26 Thread Nicolas Saenz Julienne
vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 - 1 file changed, 5 deletions(-) diff

[PATCH RFC 02/18] staging: vchiq_arm: rework close/remove_service IOCTLS

2018-10-26 Thread Nicolas Saenz Julienne
The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 66 +++ 1 file changed, 24

Re: [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config

2018-10-26 Thread Nicolas Saenz Julienne
On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote: > As per default the GPU memory config of the Raspberry Pi isn't > sufficient > for the camera usage. Even worse the bcm2835 camera driver doesn't > provide a > helpful error message in this case. So let's add a hint to point the > user > to

Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload

2018-10-26 Thread Nicolas Saenz Julienne
amera/mmal-vchiq.c | 5 +- > .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 27 ++-- > 5 files changed, 102 insertions(+), 71 deletions(-) > I prefer Dan's approach to error checking in vchiq_probe(). Apart from that seems good to me. Revi

Re: [PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice

2018-11-06 Thread Nicolas Saenz Julienne
On Tue, 2018-11-06 at 17:06 +0100, Stefan Wahren wrote: > Am 06.11.18 um 16:41 schrieb Nicolas Saenz Julienne: > > Hi Stefan, > > thanks for spending the time reviewing the code. I took note of the > > rest of comments. > > > > On Sun, 2018-10-28 at 21:45 +01

[PATCH 03/16] staging: vchiq_shim: delete vchi_service_create

2018-11-14 Thread Nicolas Saenz Julienne
No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 5 --- .../interface/vchiq_arm/vchiq_shim.c | 32

[PATCH 01/16] staging: vchiq_core: rework vchiq_get_config

2018-11-14 Thread Nicolas Saenz Julienne
The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 12 .../interface/vchiq_arm/vchiq_core.c | 30 +-- .../interface

[PATCH 00/16] staging: vchiq: dead code removal & misc fixes

2018-11-14 Thread Nicolas Saenz Julienne
on the topic, which is nice. It was developed on top of the latest linux-next, and was tested on a RPIv3B+ with audio, video and running vchiq_test. Regards, Nicolas === Nicolas Saenz Julienne (16): staging: vchiq_core: rework vchiq_get_config staging: vchiq_arm: rework close/remove_service IOCTLS

[PATCH 06/16] staging: vchiq_arm: rework vchiq_ioc_copy_element_data

2018-11-14 Thread Nicolas Saenz Julienne
ll the elements into memory as long as they fit". The resulting function is shorter and simpler. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 89 +++ 1 file changed, 31 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc0

[PATCH 13/16] staging: vchiq_core: fix logic redundancy in parse_open

2018-11-14 Thread Nicolas Saenz Julienne
We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 +--- 1 file changed, 1 insertion

[PATCH 09/16] staging: vchiq_core: do not initialize semaphores twice

2018-11-14 Thread Nicolas Saenz Julienne
vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. We get rid of the second initialization. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c| 11

[PATCH 04/16] staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2018-11-14 Thread Nicolas Saenz Julienne
The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/drivers/staging/vc04_services

[PATCH 02/16] staging: vchiq_arm: rework close/remove_service IOCTLS

2018-11-14 Thread Nicolas Saenz Julienne
The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 66 +++ 1 file changed, 24

Re: [PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice

2018-11-06 Thread Nicolas Saenz Julienne
Hi Stefan, thanks for spending the time reviewing the code. I took note of the rest of comments. On Sun, 2018-10-28 at 21:45 +0100, Stefan Wahren wrote: > Hi Nicolas, > > > Nicolas Saenz Julienne hat am 26. Oktober > > 2018 um 15:48 geschrieben: > > > > >

[PATCH 07/16] staging: vchiq-core: get rid of is_master distinction

2018-11-14 Thread Nicolas Saenz Julienne
". There seems to be an option to switch roles in vchiq. Which nobody is using nor is properly implemented. So we get rid of the "is_master == 1" option, and all the related code. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 12 +- .../in

[PATCH 14/16] staging: vchiq_arm: rework probe and init functions

2018-11-14 Thread Nicolas Saenz Julienne
Moves the allocation of a chardev region and class creation to the init function of the driver since those functions are meant to be run on a per driver basis, as opposed to the code run in the probe function which is run in a per device basis. Signed-off-by: Nicolas Saenz Julienne

[PATCH 15/16] staging: vchiq_arm: fix open/release cdev functions

2018-11-14 Thread Nicolas Saenz Julienne
Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm

[PATCH 10/16] staging: vchiq_core: don't add a wmb() before remote_event_signal()

2018-11-14 Thread Nicolas Saenz Julienne
It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH 05/16] staging: vchiq_arm: get rid of vchi_mh.h

2018-11-14 Thread Nicolas Saenz Julienne
The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne

[PATCH 12/16] staging: vchiq_util: get rid of unneeded memory barriers

2018-11-14 Thread Nicolas Saenz Julienne
All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c

[PATCH 08/16] staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state

2018-11-14 Thread Nicolas Saenz Julienne
changed in between functions, making the checks useless. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH 16/16] staging: vchiq: add more tasks to the TODO list

2018-11-14 Thread Nicolas Saenz Julienne
The TODO list was missing some tasks needed before upstreaming the device. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO b

[PATCH 11/16] staging: vchiq: use completions instead of semaphores

2018-11-14 Thread Nicolas Saenz Julienne
are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 60 ++- .../interface/vchiq_arm/vchiq_core.c | 100 +- .../interface/vchiq_arm/vchiq_core.h | 26 ++--- .../interface/vchiq_arm

Re: [PATCH] staging: vchiq: rework remove_event handling

2018-12-12 Thread Nicolas Saenz Julienne
On Tue, 2018-12-11 at 15:20 +0100, Arnd Bergmann wrote: > On Tue, Dec 11, 2018 at 1:36 PM Nicolas Saenz Julienne > wrote: > > On Mon, 2018-12-10 at 22:11 +0100, Arnd Bergmann wrote: > > > @@ -447,26 +444,26 @@ remote_event_wait(VCHIQ_STATE_T *state, > &

[PATCH 2/3] staging: vchiq_2835_arm: quit using custom down_interruptible()

2018-12-12 Thread Nicolas Saenz Julienne
vchi_killable.h overrides down_interruptible() by implementing a function similar to down_killable(). To make things simpler we turn calls to down_interruptible() into kernel's implementation of down_killable(). Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface

[PATCH 3/3] staging: vchiq: delete vchiq_killable.h

2018-12-12 Thread Nicolas Saenz Julienne
There are no users for that header file. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 1 - .../interface/vchiq_arm/vchiq_arm.c | 1 - .../interface/vchiq_arm/vchiq_connected.c | 1 - .../interface/vchiq_arm/vchiq_core.c | 1

[PATCH 1/3] staging: vchiq: switch to wait_for_completion_killable

2018-12-12 Thread Nicolas Saenz Julienne
letions instead of semaphores") Reported-by: Arnd Bergmann Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 21 +-- .../interface/vchiq_arm/vchiq_core.c | 21 +-- .../interface/vchiq_arm/vchiq_util.c

[PATCH 0/3] staging: vchiq: fix completion routines & semaphores

2018-12-12 Thread Nicolas Saenz Julienne
and gets rid of vchiq_killable.h. I took into account Arnd's commit to avoid merge conflicts. [1] https://www.spinics.net/lists/arm-kernel/msg694422.html === Nicolas Saenz Julienne (3): staging: vchiq: switch to wait_for_completion_killable staging: vchiq_2835_arm: quit using custom

Re: [PATCH] staging: vchiq: rework remove_event handling

2018-12-11 Thread Nicolas Saenz Julienne
On Tue, 2018-12-11 at 13:07 +0300, Dan Carpenter wrote: > On Mon, Dec 10, 2018 at 10:11:58PM +0100, Arnd Bergmann wrote: > > Note that I'm changing it back to 'killable' after the previous > > patch > > changed 'killable' to 'interruptible', apparently based on a > > misunderstanding > > of the

Re: [PATCH] staging: vchiq: rework remove_event handling

2018-12-11 Thread Nicolas Saenz Julienne
Hi Arnd, thanks for the patch! On Mon, 2018-12-10 at 22:11 +0100, Arnd Bergmann wrote: > I had started the removal of semaphores in this driver without > knowing > that Nicolas Saenz Julienne also worked on this. In case of the > "remote > event" infrastructure, my solu

Re: [PATCH 00/16] staging: vchiq: dead code removal & misc fixes

2018-11-20 Thread Nicolas Saenz Julienne
On Tue, 2018-11-20 at 10:57 +0100, Greg KH wrote: > On Sun, Nov 18, 2018 at 04:55:49PM +0100, Stefan Wahren wrote: > > Hi Nicolas, > > > > > Nicolas Saenz Julienne hat am 14. > > > November 2018 um 13:59 geschrieben: > > > > > > > > &

[PATCH 03/16] staging: vchiq_shim: delete vchi_service_create

2018-11-20 Thread Nicolas Saenz Julienne
No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 5 --- .../interface/vchiq_arm/vchiq_shim.c | 32

[PATCH 16/16] staging: vchiq: add more tasks to the TODO list

2018-11-20 Thread Nicolas Saenz Julienne
The TODO list was missing some tasks needed before upstreaming the device. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO b

[PATCH 15/16] staging: vchiq_arm: fix open/release cdev functions

2018-11-20 Thread Nicolas Saenz Julienne
Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm

[PATCH 02/16] staging: vchiq_arm: rework close/remove_service IOCTLS

2018-11-20 Thread Nicolas Saenz Julienne
The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 66 +++ 1 file changed, 24

[PATCH 06/16] staging: vchiq_arm: rework vchiq_ioc_copy_element_data

2018-11-20 Thread Nicolas Saenz Julienne
ll the elements into memory as long as they fit". The resulting function is shorter and simpler. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 89 +++ 1 file changed, 31 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc0

[PATCH 10/16] staging: vchiq_core: don't add a wmb() before remote_event_signal()

2018-11-20 Thread Nicolas Saenz Julienne
It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH 11/16] staging: vchiq: use completions instead of semaphores

2018-11-20 Thread Nicolas Saenz Julienne
are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 60 ++- .../interface/vchiq_arm/vchiq_core.c | 100 +- .../interface/vchiq_arm/vchiq_core.h | 26 ++--- .../interface/vchiq_arm

[PATCH 09/16] staging: vchiq_core: do not initialize semaphores twice

2018-11-20 Thread Nicolas Saenz Julienne
vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. We get rid of the second initialization. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c| 11

[PATCH 12/16] staging: vchiq_util: get rid of unneeded memory barriers

2018-11-20 Thread Nicolas Saenz Julienne
All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c

[PATCH 14/16] staging: vchiq_arm: rework probe and init functions

2018-11-20 Thread Nicolas Saenz Julienne
Moves the allocation of a chardev region and class creation to the init function of the driver since those functions are meant to be run on a per driver basis, as opposed to the code run in the probe function which is run in a per device basis. Signed-off-by: Nicolas Saenz Julienne

[PATCH 08/16] staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state

2018-11-20 Thread Nicolas Saenz Julienne
changed in between functions, making the checks useless. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging

[PATCH 07/16] staging: vchiq-core: get rid of is_master distinction

2018-11-20 Thread Nicolas Saenz Julienne
". There seems to be an option to switch roles in vchiq. Which nobody is using nor is properly implemented. So we get rid of the "is_master == 1" option, and all the related code. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_2835_arm.c | 12 +- .../in

[PATCH 13/16] staging: vchiq_core: fix logic redundancy in parse_open

2018-11-20 Thread Nicolas Saenz Julienne
We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 +--- 1 file changed, 1 insertion

[PATCH 01/16] staging: vchiq_core: rework vchiq_get_config

2018-11-20 Thread Nicolas Saenz Julienne
The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 12 .../interface/vchiq_arm/vchiq_core.c | 30 +-- .../interface

[PATCH 05/16] staging: vchiq_arm: get rid of vchi_mh.h

2018-11-20 Thread Nicolas Saenz Julienne
The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne

[PATCH 00/16] staging: vchiq: dead code removal & misc fixes

2018-11-20 Thread Nicolas Saenz Julienne
ree semaphore to completion patches (commit 11) - Update probe/init commit message (commit 14) - Update TODO commit message and clean up (commit 16) - Fix spelling on some of the patches === Nicolas Saenz Julienne (16): staging: vchiq_core: rework vchiq_get_config staging: vchiq_arm: rew

[PATCH 04/16] staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2018-11-20 Thread Nicolas Saenz Julienne
The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/drivers/staging/vc04_services

Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload

2019-01-09 Thread Nicolas Saenz Julienne
Hi Stefan, On Wed, 2019-01-09 at 09:33 +0100, Stefan Wahren wrote: > > But i noticed a regression introduced in 5.0-rc1, which might be > related. I > tried to run "vchiq_test -f 1" and it never completes. After > reverting commit > 852b2876a8a8 ("staging: vchiq: rework remove_event handling") >

Re: [PATCH 1/3] Revert "staging: vchiq_2835_arm: quit using custom down_interruptible()"

2019-04-05 Thread Nicolas Saenz Julienne
On Fri, 2019-04-05 at 15:02 +0300, Dan Carpenter wrote: > On Fri, Apr 05, 2019 at 01:34:20PM +0200, Nicolas Saenz Julienne wrote: > > This reverts commit ff5979ad86368425b7da3a25f4e84650b51ff5fd. > > --- > > Git kind of sets you up for failure with reverts... > > Fi

[PATCH 2/3] Revert "staging: vchiq: switch to wait_for_completion_killable"

2019-04-05 Thread Nicolas Saenz Julienne
This reverts commit a772f116702e3f0afdd7e6acadc1b8fb3b20b9ff. --- .../interface/vchiq_arm/vchiq_arm.c | 21 ++- .../interface/vchiq_arm/vchiq_core.c | 21 ++- .../interface/vchiq_arm/vchiq_util.c | 6 +++--- 3 files changed, 25

[PATCH 1/3] Revert "staging: vchiq_2835_arm: quit using custom down_interruptible()"

2019-04-05 Thread Nicolas Saenz Julienne
This reverts commit ff5979ad86368425b7da3a25f4e84650b51ff5fd. --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c

[PATCH 3/3] staging: vchiq: make wait events interruptible

2019-04-05 Thread Nicolas Saenz Julienne
this criteria, as it's mainly used as an interface to V4L2 and ALSA devices. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH 0/3] staging: vchiq: use interruptible waits

2019-04-05 Thread Nicolas Saenz Julienne
we follow through. If needed we can always go back to killable. But at least we'll have a proper understanding on the actual needs. In the end the driver is in staging, and the potential for errors small. Regards, Nicolas [1] https://github.com/raspberrypi/linux/issues/2881 --- Nicolas Saenz J

[PATCH v3 1/4] staging: vchiq_2835_arm: revert "quit using custom down_interruptible()"

2019-05-09 Thread Nicolas Saenz Julienne
("staging: vchiq_2835_arm: quit using custom down_interruptible()") Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH v3 0/4] staging: vchiq: use interruptible waits

2019-05-09 Thread Nicolas Saenz Julienne
rg/message/GBXGJ7DOV5CQQXFPOZCXTRD6W4BEPT4Q/ -- Changes since v2: - Cleaned up revert commit message - Rebase & merge conflict resolutions - Add code cleanup suggested by Dan Carpenter Changes since v1: - Proplery format revert commits - Add code comment to remind of this issue - Add Fixes tags Nicolas

[PATCH v3 3/4] staging: vchiq: make wait events interruptible

2019-05-09 Thread Nicolas Saenz Julienne
. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH v3 2/4] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-09 Thread Nicolas Saenz Julienne
: a772f116702e ("staging: vchiq: switch to wait_for_completion_killable") Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 21 ++- .../interface/vchiq_arm/vchiq_core.c | 21 ++- .../interface/vchiq_arm/vc

[PATCH v3 4/4] staging: vchiq: stop explicitly comparing with zero to catch errors

2019-05-09 Thread Nicolas Saenz Julienne
. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 11 ++-- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../interface/vchiq_arm/vchiq_arm.c | 66 --- .../interface/vchiq_arm/vchiq_connected.c | 4 +- .../interface

Re: [PATCH v2 0/3] staging: vchiq: use interruptible waits

2019-05-06 Thread Nicolas Saenz Julienne
On Mon, 2019-05-06 at 20:12 +0200, Stefan Wahren wrote: > Hi Nicolas, > > Am 06.05.19 um 16:40 schrieb Nicolas Saenz Julienne: > > Hi, > > ... > > > > Regards, > > Nicolas > > > > [1] https://github.com/raspberrypi/linux/issues/2881 > &

[PATCH v2 0/3] staging: vchiq: use interruptible waits

2019-05-06 Thread Nicolas Saenz Julienne
s Nicolas Saenz Julienne (3): staging: vchiq_2835_arm: revert "quit using custom down_interruptible()" staging: vchiq: revert "switch to wait_for_completion_killable" staging: vchiq: make wait events interruptible .../interface/vchiq_arm/vchiq_2835_arm.c |

[PATCH v2 3/3] staging: vchiq: make wait events interruptible

2019-05-06 Thread Nicolas Saenz Julienne
. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH v2 2/3] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-06 Thread Nicolas Saenz Julienne
: a772f116702e ("staging: vchiq: switch to wait_for_completion_killable") Signed-off-by: Nicolas Saenz Julienne This reverts commit a772f116702e3f0afdd7e6acadc1b8fb3b20b9ff. --- .../interface/vchiq_arm/vchiq_arm.c | 21 ++- .../interface/vchiq_arm/vc

[PATCH v2 1/3] staging: vchiq_2835_arm: revert "quit using custom down_interruptible()"

2019-05-06 Thread Nicolas Saenz Julienne
("staging: vchiq_2835_arm: quit using custom down_interruptible()") Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface

Re: [PATCH v2 2/3] staging: vchiq: revert "switch to wait_for_completion_killable"

2019-05-06 Thread Nicolas Saenz Julienne
Hi Dan, thanks for reviewing. On Mon, 2019-05-06 at 18:20 +0300, Dan Carpenter wrote: > On Mon, May 06, 2019 at 04:40:29PM +0200, Nicolas Saenz Julienne wrote: > > @@ -1740,7 +1740,8 @@ parse_rx_slots(struct vchiq_state *state) > > >

Re: [PATCH] Staging: fbtft: Fix GPIO handling

2019-07-15 Thread Nicolas Saenz Julienne
n, this version is indeed more complete. Reviewed-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/2] Staging: fbtft: Fix probing of gpio descriptor

2019-07-15 Thread Nicolas Saenz Julienne
ptor > Staging: fbtft: Fix reset assertion when using gpio descriptor > > drivers/staging/fbtft/fbtft-core.c | 43 ++--- > - > 1 file changed, 20 insertions(+), 23 deletions(-) > You can add my: Reviewed-by: Nicolas Saenz Julienne Test

[PATCH] Staging: fbtft: Fix wrong check in fbtft_write_wmem16_bus8()

2019-07-15 Thread Nicolas Saenz Julienne
We actually want to set the gpio pin if it's avilable, not the other way around. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/fbtft/fbtft-bus.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2] Staging: fbtft: Fix GPIO handling

2019-07-25 Thread Nicolas Saenz Julienne
ace") > > Tested-by: Jan Sebastian Götte > > Reviewed-by: Nicolas Saenz Julienne > > Signed-off-by: Jan Sebastian Götte > > --- > > Can this go on top of Phil's patches? Or does it replace it? This is needed on top of

Re: BUG: Staging: fbtft: Switch to the gpio descriptor interface

2019-07-10 Thread Nicolas Saenz Julienne
On Wed, 2019-07-10 at 17:27 +0800, Phil Reid wrote: > On 10/07/2019 17:05, Nicolas Saenz Julienne wrote: > > On Wed, 2019-07-10 at 16:31 +0800, Phil Reid wrote: > > > G'day Nishad, > > > > > > I'm just wondering if the commit > > > c440eee1a7a1d0f &

Re: BUG: Staging: fbtft: Switch to the gpio descriptor interface

2019-07-10 Thread Nicolas Saenz Julienne
On Wed, 2019-07-10 at 16:31 +0800, Phil Reid wrote: > G'day Nishad, > > I'm just wondering if the commit > c440eee1a7a1d0f "Staging: fbtft: Switch to the gpio descriptor interface" > was tested on anything. > > I've had to apply the following patch to get my display functioning again. > > in

Re: [PATCH 0/3] staging: vchiq: Fix vchiq_read return value in case of error

2019-11-21 Thread Nicolas Saenz Julienne
On Thu, 2019-11-21 at 11:42 +0100, Stefan Wahren wrote: [...] > > Help with testing would be appreciated. So far I've basically just > > diffed the output of 'cat /dev/vchiq', run the program above with > > a few different values, and run vchiq_test a few times. > > i consider this as sufficient,

Re: [PATCH v2 0/4] staging: vchiq: Fix vchiq_read return value in case of error

2019-11-21 Thread Nicolas Saenz Julienne
reciated. So far I've basically just > diffed the output of 'cat /dev/vchiq', run the program above with > a few different values, and run vchiq_test a few times. > > These were applied to the staging-next branch of the tree > at git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.

Re: [PATCH] staging: vchiq: call unregister_chrdev_region() when driver registration fails

2019-12-04 Thread Nicolas Saenz Julienne
_driver); > + unregister_chrdev_region(vchiq_devid, 1); > > class_destroy: > class_destroy(vchiq_class); Thanks! Reviewed-by: Nicolas Saenz Julienne signature.asc Description: This is a digitally signed message part __

Re: [PATCH for-5.6 2/4] staging: bcm2835-audio: Use managed buffer allocation

2019-12-12 Thread Nicolas Saenz Julienne
On Tue, 2019-12-10 at 15:13 +0100, Takashi Iwai wrote: > Clean up the driver with the new managed buffer allocation API. > The hw_params and hw_free callbacks became superfluous and dropped. > > Signed-off-by: Takashi Iwai Reviewed-by: Nicolas Saenz Julienne Thanks! s

  1   2   3   4   5   >