[RFC 33/50] staging: vchi: Use struct vchiq_service_params

2020-05-27 Thread Nicolas Saenz Julienne
For initialization, vchi has its own params structure, which is then translated to vchiq's params structure. They are essentially the same, so lets directly use vchiq's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 9 + .../vc0

[RFC 27/50] staging: vchiq: Get rid of vchiq_util.h

2020-05-27 Thread Nicolas Saenz Julienne
The header file only provides other includes. Move the relevant includes to their respective C files and delete it for good. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h | 1 - .../interface/vchiq_arm/vchiq_2835_arm.c | 1 + .../interface

[RFC 07/50] staging: vchi: Get rid of not implemented function declarations

2020-05-27 Thread Nicolas Saenz Julienne
They don't exist, they have no users, get rid of them. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 59 --- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/st

[RFC 09/50] staging: vchiq: move vchiq_release_message() into vchiq

2020-05-27 Thread Nicolas Saenz Julienne
For messages with a reason different from VCHIQ_MESSAGE_AVAILABLE the responsibility for releasing them is kept in vchi, in other words, services don't need to worry about it. As we're trying to unify vchi and vchiq, move the release code into vchiq. Signed-off-by: Nicolas Saen

[RFC 25/50] staging: vchiq: Introduce vchiq_validate_params()

2020-05-27 Thread Nicolas Saenz Julienne
When adding a new service validate the configuration parameters provided, and remove unnecessary checks in vchi, now that we have validated service's config. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 15 +++ .../interface/vchi

[RFC 14/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-05-27 Thread Nicolas Saenz Julienne
struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services/interface/vchi/vchi.h | 27 .../interface/vchiq_arm

[RFC 29/50] staging: vchiq: Export vchiq_get_service_userdata()

2020-05-27 Thread Nicolas Saenz Julienne
This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/dr

[RFC 36/50] staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()

2020-05-27 Thread Nicolas Saenz Julienne
The services have access to struct vchiq_header's internals, so we can let them get the data pointer. This pretty much makes both functions exactly the same, which will allow us to make a switch to vchiq_msg_hold() further down the road. Signed-off-by: Nicolas Saenz Julienne --- .../st

[RFC 37/50] staging: vchiq: Unify fourcc definition mechanisms

2020-05-27 Thread Nicolas Saenz Julienne
There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-

[RFC 35/50] staging: vchiq: Pass vchiq's message when holding a message

2020-05-27 Thread Nicolas Saenz Julienne
structure and directly pass struct vchiq_header, which is what ultimately vchiq consumes when handling callback messages. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 14 ++- .../interface/vchiq_arm/vchiq_shim.c

[RFC 34/50] staging: vchi: Get rid of struct vchi_service

2020-05-27 Thread Nicolas Saenz Julienne
The structure only contains a single parameter, which is the underlying vchiq handle. Get rid of the struct and directly pass the handle around. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 23 ++--- .../vc04_services/interface/vchi/vchi.h | 25

[RFC 47/50] staging: vchiq: Move conditional barrier definition into vchiq_core.h

2020-05-27 Thread Nicolas Saenz Julienne
The barrier is only used by core code. So keep the barrier definition in the core header. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h| 11 --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 12 2 files changed, 12

[RFC 46/50] staging: vchiq: Get rid of vchi

2020-05-27 Thread Nicolas Saenz Julienne
igned-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile| 1 - .../bcm2835-audio/bcm2835-vchiq.c | 24 +-- .../vc04_services/bcm2835-audio/bcm2835.h | 1 - .../vc04_services/interface/{vchi => }/TODO | 0 .../vc04_services/interface/vch

[RFC 44/50] staging: vchi: Get rid of vchi_bulk_queue_transmit()

2020-05-27 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_transmit()'s retry mechanism into vchiq_bulk_transmit() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vc

[RFC 50/50] staging: vchiq: Move vchiq.h into include directory

2020-05-27 Thread Nicolas Saenz Julienne
To make the separation clear between vchiq's header files and vchiq.h, which is to be used by services and is the 'public' API, move it into a dedicated includes directory. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile

[RFC 48/50] staging: vchiq: Use vchiq.h as the main header file for services

2020-05-27 Thread Nicolas Saenz Julienne
This used to be vchiq_if.h but vchiq.h is more concise for an include file that will hopefully be in the future in the includes directory. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-audio/bcm2835.h | 2 +- .../vc04_services/interface/vchiq_arm/vchiq.h | 107

[RFC 43/50] staging: vchi: Get rid of vchi_bulk_queue_receive()

2020-05-27 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_receive()'s retry mechanism into vchiq_bulk_receive() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/v

[RFC 41/50] staging: vchiq: Make vchiq_add_service() local

2020-05-27 Thread Nicolas Saenz Julienne
The function is being exported although there is no use for it outside of vchiq's core code. Keep it local then. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h

[RFC 42/50] staging: vchiq: Move definitions only used by core into core header

2020-05-27 Thread Nicolas Saenz Julienne
vchiq_if.h is used by service consumers and only the exported API should be present. Move the rest of definitions, which were not exported by the way, to vchiq_core.h where they belong. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.h | 22

[RFC 40/50] staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h

2020-05-27 Thread Nicolas Saenz Julienne
Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_if.h | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if

[RFC 45/50] staging: vchi: Move vchi_queue_kernel_message() into vchiq

2020-05-27 Thread Nicolas Saenz Julienne
We can't really merge it with vchiq_queue_message() as it has internal users that will not benefit from the retry mechanism vchiq_queue_kernel_message() uses. So, for the sake of getting rid of vchi, move it into vchiq. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vc

[RFC 49/50] staging: vchiq: Move defines into core header

2020-05-27 Thread Nicolas Saenz Julienne
Those are only used in the core vchiq code, while present in vchiq's 'public' API header. Move them into the right place. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h| 5 - .../staging/vc04_services/interface/vchiq_a

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-04 Thread Nicolas Saenz Julienne
ice *dev, unsigned long > pfn_offset) As I say above, does this really belong to of/address.c? > +{ > + struct dma_pfn_offset_region *r; > + > + if (!dev) > + return -ENODEV; > + > + if (!pfn_offset) > +

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-04 Thread Nicolas Saenz Julienne
t; > + > > > + r->uniform_offset = true; > > > + r->pfn_offset = pfn_offset; > > > + > > > + return 0; > > > +} > > > +EXPORT_SYMBOL_GPL(attach_uniform_dma_pfn_offset); > > > + > > > /** > > >

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Nicolas Saenz Julienne
-06-04 at 14:01 -0400, Jim Quinlan wrote: > Hi Nicolas, [...] > > I understand the need for dev to be around, devm_*() is key. But also it's > > important to keep the functions on purpose. And if of_dma_get_range() starts > > setting ranges it calls, for the very least, fo

Re: [bug report] staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2020-06-22 Thread Nicolas Saenz Julienne
Hi Dan, Thanks for reaching out. On Fri, 2020-06-19 at 17:31 +0300, Dan Carpenter wrote: > Hello Nicolas Saenz Julienne, Feel free to refer to me as Nicolas, but if you'd rather keep it formal the name is Nicolas Patricio Saenz Julienne. :P > > The patch 46e4b9ec4fa4: "stag

[PATCH 05/50] staging: mmal-vchiq: Make a mmal_buf struct for passing parameters

2020-06-23 Thread Nicolas Saenz Julienne
struct, and pass the appropriate members. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 64 +++ .../vc04_services/vchiq-mmal/mmal-common.h| 5 ++ .../vc04_services/vchiq

[PATCH 12/50] staging: vchi: Get rid of all useless callback reasons

2020-06-23 Thread Nicolas Saenz Julienne
They are neither produced nor expected, so just delete them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 40 ++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH 16/50] staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()

2020-06-23 Thread Nicolas Saenz Julienne
_hold() instead. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 25 +++ 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bc

[PATCH 10/50] staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h

2020-06-23 Thread Nicolas Saenz Julienne
From: Naushir Patuck No functional changes in this commit. - Remove erroneous whitespace. - Remove _t postfix label on structs and enums. Signed-off-by: Naushir Patuck Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 2

[PATCH 14/50] staging: vchi: Get rid of struct vchi_instance_handle

2020-06-23 Thread Nicolas Saenz Julienne
The idea behind this was to create an opaque handle to struct vchiq_instance. This can be achieved without creating a new type by means of a forward declaration of struct vchiq_instance. This saves us from a lot of useless casting and overall simplifies code. Signed-off-by: Nicolas Saenz

[PATCH 15/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-23 Thread Nicolas Saenz Julienne
struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services/interface/vchi/vchi.h | 27 .../interface/vchiq_arm

[PATCH 11/50] staging: vchiq_arm: Add a matching unregister call

2020-06-23 Thread Nicolas Saenz Julienne
ned-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 28

[PATCH 08/50] staging: mmal-vchiq: Always return the param size from param_get

2020-06-23 Thread Nicolas Saenz Julienne
-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

[PATCH 02/50] staging: mmal-vchiq: Allocate and free components as required

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson The existing code assumed that there would only ever be 4 components, and never freed the entries once used. Allow arbitrary creation and destruction of components. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne

[PATCH 07/50] staging: mmal-vchiq: Fix client_component for 64 bit kernel

2020-06-23 Thread Nicolas Saenz Julienne
s are already held in an array per VCHI instance, so use the array index as the client_component handle to avoid having to create a new IDR for this purpose. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal

[PATCH 20/50] staging: vc04_services: Get rid of vchi_cfg.h

2020-06-23 Thread Nicolas Saenz Julienne
Nothing in it is being used. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 1 - .../vc04_services/interface/vchi/vchi_cfg.h | 238 -- 2 files changed, 239 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface

[PATCH 04/50] staging: mmal-vchiq: Make timeout a defined parameter

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson The timeout period for VPU communications is a useful thing to extend when debugging. Set it via a define, rather than a magic number buried in the code. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging

[PATCH 38/50] staging: vchi: Get rid of struct vchiq_instance forward declaration

2020-06-23 Thread Nicolas Saenz Julienne
It's already forward declared in vchiq_if.h. So no need to insist Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/st

[PATCH 21/50] staging: vchi: Get rid of flags argument in vchi_msg_hold()

2020-06-23 Thread Nicolas Saenz Julienne
All users are ignoring the flags argument. So for the sake of simplicity delete it. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +-- drivers/staging/vc04_services/interface/vchi/vchi.h | 1 - .../vc04_services/interface/vchiq_arm

[PATCH 03/50] staging: mmal-vchiq: Avoid use of bool in structures

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson Fixes up a checkpatch error "Avoid using bool structure members because of possible alignment issues". Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

[PATCH 00/50] staging: vchiq: Getting rid of the vchi/vchiq split

2020-06-23 Thread Nicolas Saenz Julienne
easier. Note that in order to keep the divergence between the downstream and upstream versions of this as small as possible I picked up some mmal-vchiq patches that might not be absolutely necessary to the goal of the series. Regards, Nicolas Previous versions: RFC: https://www.mail-archi

[PATCH 22/50] staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags

2020-06-23 Thread Nicolas Saenz Julienne
vchi has a set of transfer flags which almost map 1:1 to vchiq's own transfer modes. For the sake of simplicity let's use the later and delete vchi's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-

[PATCH 29/50] staging: vchiq: Export vchiq_get_service_userdata()

2020-06-23 Thread Nicolas Saenz Julienne
This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/dr

[PATCH 23/50] staging: vchi: Use vchiq's enum vchiq_reason

2020-06-23 Thread Nicolas Saenz Julienne
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to simplify things, let's use the later, and get rid of the extra indirection. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 5 +-- .../interface/vchi/vchi_com

[PATCH 13/50] staging: vchi: Get rid of vchi_msg_peek()

2020-06-23 Thread Nicolas Saenz Julienne
Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 12 .../interface/vchiq_arm/vchiq_shim.c | 64 --- .../interface/vchiq_arm/vchiq_util.c | 12 .../interface/vchiq_arm/vchiq_util.h | 1 - 4 files change

[PATCH 30/50] staging: vchiq: Export vchiq_msg_queue_push

2020-06-23 Thread Nicolas Saenz Julienne
vchiq consumer drivers may need to use this function in order to get the benefits of vchiq's per service message queueing mechanism. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dr

[PATCH 01/50] staging: bcm2835: Break MMAL support out from camera

2020-06-23 Thread Nicolas Saenz Julienne
the ISP driver to use it as well. The only modification to the existing mmal code is the introduction of EXPORT_SYMBOL() for symbols required by bcm2835-camera and the addition of the module author and licenses. Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers

[PATCH 34/50] staging: vchi: Get rid of struct vchi_service

2020-06-23 Thread Nicolas Saenz Julienne
The structure only contains a single parameter, which is the underlying vchiq handle. Get rid of the struct and directly pass the handle around. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 23 ++--- .../vc04_services/interface/vchi/vchi.h | 25

[PATCH 06/50] staging: mmal-vchiq: Fixup vchiq-mmal include ordering

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson There were dependencies on including the headers in the correct order. Fix up the headers so that they include the other headers that they depend on themselves. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers

[PATCH 25/50] staging: vchiq: Introduce vchiq_validate_params()

2020-06-23 Thread Nicolas Saenz Julienne
When adding a new service validate the configuration parameters provided, and remove unnecessary checks in vchi, now that we have validated service's config. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 15 +++ .../interface/vchi

[PATCH 19/50] staging: vchi: Get rid of unnecessary defines

2020-06-23 Thread Nicolas Saenz Julienne
Those defines aren't used by anyone. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h | 11 --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/st

[PATCH 09/50] staging: mmal-vchiq: If the VPU returns an error, don't negate it

2020-06-23 Thread Nicolas Saenz Julienne
. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers

[PATCH 31/50] staging: vchi: Get rid of vchiq_shim's message callback

2020-06-23 Thread Nicolas Saenz Julienne
, which makes for simpler code in the end. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 20 ++--- .../vc04_services/interface/vchi/vchi.h | 9 +- .../interface/vchi/vchi_common.h | 12 --- .../interface/vchiq_arm/v

[PATCH 17/50] staging: vchi: Get rid of vchi_msg_dequeue()

2020-06-23 Thread Nicolas Saenz Julienne
Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 7 .../interface/vchiq_arm/vchiq_shim.c | 39 --- 2 files changed, 46 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH 40/50] staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h

2020-06-23 Thread Nicolas Saenz Julienne
Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_if.h | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if

[PATCH 32/50] staging: vchiq: Don't use a typedef for vchiq_callback

2020-06-23 Thread Nicolas Saenz Julienne
Linux coding style says to avoid typdefs. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/vchi.h| 5 - .../vc04_services/interface/vchiq_arm/vchiq_if.h | 14 -- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH 36/50] staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()

2020-06-23 Thread Nicolas Saenz Julienne
The services have access to struct vchiq_header's internals, so we can let them get the data pointer. This pretty much makes both functions exactly the same, which will allow us to make a switch to vchiq_msg_hold() further down the road. Signed-off-by: Nicolas Saenz Julienne --- .../st

[PATCH 27/50] staging: vchiq: Get rid of vchiq_util.h

2020-06-23 Thread Nicolas Saenz Julienne
The header file only provides other includes. Move the relevant includes to their respective C files and delete it for good. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h | 1 - .../interface/vchiq_arm/vchiq_2835_arm.c | 1 + .../interface

[PATCH 26/50] staging: vchiq: Move message queue into struct vchiq_service

2020-06-23 Thread Nicolas Saenz Julienne
ne to match vchiq's user_service message queue, which could be merged with this one in the future. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile| 1 - .../interface/vchiq_arm/vchiq_core.c | 46 .../interface/vchiq_arm/vc

[PATCH 28/50] staging: vchi: Expose struct vchi_service

2020-06-23 Thread Nicolas Saenz Julienne
This will make further changes easier. The struct will ultimately disappear. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h| 10 +++--- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 7 --- 2 files changed, 7 insertions

[PATCH 37/50] staging: vchiq: Unify fourcc definition mechanisms

2020-06-23 Thread Nicolas Saenz Julienne
There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-

[PATCH 33/50] staging: vchi: Use struct vchiq_service_params

2020-06-23 Thread Nicolas Saenz Julienne
For initialization, vchi has its own params structure, which is then translated to vchiq's params structure. They are essentially the same, so lets directly use vchiq's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 9 + .../vc0

[PATCH 24/50] staging: vchi: Get rid of effect less expression

2020-06-23 Thread Nicolas Saenz Julienne
It was probably there to trick compilers into ignoring unused variables, which isn't needed in Linux. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/vc04_ser

[PATCH 35/50] staging: vchiq: Pass vchiq's message when holding a message

2020-06-23 Thread Nicolas Saenz Julienne
structure and directly pass struct vchiq_header, which is what ultimately vchiq consumes when handling callback messages. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 14 ++- .../interface/vchiq_arm/vchiq_shim.c | 25 ++

[PATCH 18/50] staging: vchi_common: Get rid of all unused definitions

2020-06-23 Thread Nicolas Saenz Julienne
There is a series of structures and enums defined but never used. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 65 --- 1 file changed, 65 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH 39/50] staging: vchi: Don't include vchiq_core.h

2020-06-23 Thread Nicolas Saenz Julienne
This file is internal to vchiq. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface

[PATCH 43/50] staging: vchi: Get rid of vchi_bulk_queue_receive()

2020-06-23 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_receive()'s retry mechanism into vchiq_bulk_receive() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/v

[PATCH 41/50] staging: vchiq: Make vchiq_add_service() local

2020-06-23 Thread Nicolas Saenz Julienne
The function is being exported although there is no use for it outside of vchiq's core code. Keep it local then. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h

[PATCH 44/50] staging: vchi: Get rid of vchi_bulk_queue_transmit()

2020-06-23 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_transmit()'s retry mechanism into vchiq_bulk_transmit() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vc

[PATCH 49/50] staging: vchiq: Move defines into core header

2020-06-23 Thread Nicolas Saenz Julienne
Those are only used in the core vchiq code, while present in vchiq's 'public' API header. Move them into the right place. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h| 5 - .../staging/vc04_services/interface/vchiq_a

[PATCH 48/50] staging: vchiq: Use vchiq.h as the main header file for services

2020-06-23 Thread Nicolas Saenz Julienne
This used to be vchiq_if.h but vchiq.h is more concise for an include file that will hopefully be in the future in the includes directory. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-audio/bcm2835.h | 2 +- .../vc04_services/interface/vchiq_arm/vchiq.h | 107

[PATCH 42/50] staging: vchiq: Move definitions only used by core into core header

2020-06-23 Thread Nicolas Saenz Julienne
vchiq_if.h is used by service consumers and only the exported API should be present. Move the rest of definitions, which were not exported by the way, to vchiq_core.h where they belong. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.h | 22

[PATCH 45/50] staging: vchi: Move vchi_queue_kernel_message() into vchiq

2020-06-23 Thread Nicolas Saenz Julienne
We can't really merge it with vchiq_queue_message() as it has internal users that will not benefit from the retry mechanism vchiq_queue_kernel_message() uses. So, for the sake of getting rid of vchi, move it into vchiq. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vc

[PATCH 46/50] staging: vchiq: Get rid of vchi

2020-06-23 Thread Nicolas Saenz Julienne
igned-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile| 1 - .../bcm2835-audio/bcm2835-vchiq.c | 24 +-- .../vc04_services/bcm2835-audio/bcm2835.h | 1 - .../vc04_services/interface/{vchi => }/TODO | 0 .../vc04_services/interface/vch

[PATCH 50/50] staging: vchiq: Move vchiq.h into include directory

2020-06-23 Thread Nicolas Saenz Julienne
To make the separation clear between vchiq's header files and vchiq.h, which is to be used by services and is the 'public' API, move it into a dedicated includes directory. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile

[PATCH 47/50] staging: vchiq: Move conditional barrier definition into vchiq_core.h

2020-06-23 Thread Nicolas Saenz Julienne
The barrier is only used by core code. So keep the barrier definition in the core header. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h| 11 --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 12 2 files changed, 12

Re: [PATCH 03/50] staging: mmal-vchiq: Avoid use of bool in structures

2020-06-24 Thread Nicolas Saenz Julienne
On Tue, 2020-06-23 at 15:11 -0700, Joe Perches wrote: > On Tue, 2020-06-23 at 18:41 +0200, Nicolas Saenz Julienne wrote: > > From: Dave Stevenson > > > > Fixes up a checkpatch error "Avoid using bool structure members > > because of possible alignment issues

Re: [PATCH 15/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-24 Thread Nicolas Saenz Julienne
On Wed, 2020-06-24 at 17:11 +0300, Dan Carpenter wrote: > On Tue, Jun 23, 2020 at 06:42:01PM +0200, Nicolas Saenz Julienne wrote: > > @@ -437,12 +432,10 @@ static void service_free(struct shim_service *service) > > > > int32_t vchi_service_open(struct vchiq_instance *ins

Re: [PATCH 50/50] staging: vchiq: Move vchiq.h into include directory

2020-06-25 Thread Nicolas Saenz Julienne
> +#include > #include > +#include Just realised that there an include too many here... 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

[PATCH v2 01/47] staging: mmal-vchiq: Make timeout a defined parameter

2020-06-29 Thread Nicolas Saenz Julienne
From: Dave Stevenson The timeout period for VPU communications is a useful thing to extend when debugging. Set it via a define, rather than a magic number buried in the code. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging

[PATCH v2 08/47] staging: vchiq_arm: Add a matching unregister call

2020-06-29 Thread Nicolas Saenz Julienne
ned-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 28

[PATCH v2 03/47] staging: mmal-vchiq: Fixup vchiq-mmal include ordering

2020-06-29 Thread Nicolas Saenz Julienne
From: Dave Stevenson There were dependencies on including the headers in the correct order. Fix up the headers so that they include the other headers that they depend on themselves. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers

[PATCH v2 09/47] staging: vchi: Get rid of all useless callback reasons

2020-06-29 Thread Nicolas Saenz Julienne
They are neither produced nor expected, so just delete them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 40 ++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH v2 04/47] staging: mmal-vchiq: Fix client_component for 64 bit kernel

2020-06-29 Thread Nicolas Saenz Julienne
s are already held in an array per VCHI instance, so use the array index as the client_component handle to avoid having to create a new IDR for this purpose. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal

[PATCH v2 06/47] staging: mmal-vchiq: If the VPU returns an error, don't negate it

2020-06-29 Thread Nicolas Saenz Julienne
. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers

[PATCH v2 05/47] staging: mmal-vchiq: Always return the param size from param_get

2020-06-29 Thread Nicolas Saenz Julienne
-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

[PATCH v2 12/47] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-29 Thread Nicolas Saenz Julienne
struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Open service only if allocation was successful .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services

[PATCH v2 13/47] staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()

2020-06-29 Thread Nicolas Saenz Julienne
_hold() instead. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 25 +++ 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bc

[PATCH v2 26/47] staging: vchiq: Export vchiq_get_service_userdata()

2020-06-29 Thread Nicolas Saenz Julienne
This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/dr

[PATCH v2 20/47] staging: vchi: Use vchiq's enum vchiq_reason

2020-06-29 Thread Nicolas Saenz Julienne
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to simplify things, let's use the later, and get rid of the extra indirection. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 5 +-- .../interface/vchi/vchi_com

[PATCH v2 17/47] staging: vc04_services: Get rid of vchi_cfg.h

2020-06-29 Thread Nicolas Saenz Julienne
Nothing in it is being used. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 1 - .../vc04_services/interface/vchi/vchi_cfg.h | 238 -- 2 files changed, 239 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface

[PATCH v2 28/47] staging: vchi: Get rid of vchiq_shim's message callback

2020-06-29 Thread Nicolas Saenz Julienne
, which makes for simpler code in the end. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 20 ++--- .../vc04_services/interface/vchi/vchi.h | 9 +- .../interface/vchi/vchi_common.h | 12 --- .../interface/vchiq_arm/v

[PATCH v2 19/47] staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags

2020-06-29 Thread Nicolas Saenz Julienne
vchi has a set of transfer flags which almost map 1:1 to vchiq's own transfer modes. For the sake of simplicity let's use the later and delete vchi's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-

[PATCH v2 36/47] staging: vchi: Don't include vchiq_core.h

2020-06-29 Thread Nicolas Saenz Julienne
This file is internal to vchiq. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface

[PATCH v2 37/47] staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h

2020-06-29 Thread Nicolas Saenz Julienne
Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_if.h | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if

[PATCH v2 25/47] staging: vchi: Expose struct vchi_service

2020-06-29 Thread Nicolas Saenz Julienne
This will make further changes easier. The struct will ultimately disappear. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h| 10 +++--- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 7 --- 2 files changed, 7 insertions

[PATCH v2 02/47] staging: mmal-vchiq: Make a mmal_buf struct for passing parameters

2020-06-29 Thread Nicolas Saenz Julienne
struct, and pass the appropriate members. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 64 +++ .../vc04_services/vchiq-mmal/mmal-common.h| 5 ++ .../vc04_services/vchiq

[PATCH v2 29/47] staging: vchiq: Don't use a typedef for vchiq_callback

2020-06-29 Thread Nicolas Saenz Julienne
Linux coding style says to avoid typdefs. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/vchi.h| 5 - .../vc04_services/interface/vchiq_arm/vchiq_if.h | 14 -- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v2 16/47] staging: vchi: Get rid of unnecessary defines

2020-06-29 Thread Nicolas Saenz Julienne
Those defines aren't used by anyone. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h | 11 --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/st

<    1   2   3   4   5   6   >