summaryrefslogtreecommitdiff
path: root/drivers/staging/vc04_services
AgeCommit message (Collapse)AuthorFilesLines
2023-01-31staging: vc04_services: mmal-vchiq: fix typo in commentJongwoo Han1-1/+1
Correct typo from 'witin' to 'within' in comment. Signed-off-by: Jongwoo Han <jongwooo.han@gmail.com> Link: https://lore.kernel.org/r/20230130164250.51877-1-jongwooo.han@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27staging: vchiq_arm: Improve error log for vchiq_platform_initStefan Wahren1-3/+9
During sending the base address of the slots to the VideoCore firmware via mailbox property, issues could happened on the ARM and on the VideoCore side. So better separate the error handling in order to provide more details. This should help to narrow down the possible cause. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20230123191629.21019-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23staging: vc04_services: interface: Drop include Makefile directiveUmang Jain3-4/+3
Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the interface/ files instead. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20230120201104.606876-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23staging: vc04_services: vchiq-mmal: Drop include Makefile directiveUmang Jain2-5/+1
Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the mmal-vchiq.c instead. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20230120201104.606876-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23staging: vc04_services: bcm2835-camera: Drop include Makefile directiveUmang Jain3-12/+8
Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835-camera files instead. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20230120201104.606876-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23staging: vc04_services: bcm2835-audio: Drop include Makefile directiveUmang Jain2-3/+2
Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835.h instead. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20230120201104.606876-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23staging: vc04_services: Drop __VCCOREVER__ remnantsUmang Jain3-5/+3
Commit 8ba5f91bab63 ("staging: vc04_services: remove __VCCOREVER__") was meant to remove all of __VCCOREVER__ definitions but missed to remove a few. Hence, drop them now. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20230120201104.606876-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: vchiq: Drop custom return values from TODOUmang Jain1-5/+0
The custom return values (enum vchiq_status) has been dropped. Remove the TODO entry for the same. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-8-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: Drop enum vchiq_status remnantsUmang Jain3-14/+10
Drop all references to enum vchiq_status as they are no longer in use. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-7-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnectUmang Jain1-2/+2
Drop the usage of VCHIQ_RETRY when the vchiq has connection status VCHIQ_CONNSTATE_DISCONNECTED. Disconnected status will not be valid to carry on a retry, hence replace the VCHIQ_RETRY with -ENOTCONN. This patch removes the usage of vCHIQ_RETRY completely and act as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: Drop VCHIQ_RETRY usageUmang Jain3-53/+53
Drop the usage of VCHIQ_RETRY vchiq_status enum type in most of the places and replace it with -EAGAIN. The exception to this replacement is vchiq_send_remote_use() and vchiq_send_remote_use_active() which will be addressed in the subsequent commit. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: Drop VCHIQ_ERROR usageUmang Jain4-38/+37
Drop the usage of VCHIQ_ERROR vchiq_status enum type. Replace it with -EINVAL to report the error in most cases, -ENOMEM for out-of-memory errors and -EHOSTDOWN for service shutdown. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: Drop VCHIQ_SUCCESS usageUmang Jain6-60/+57
Drop the usage of VCHIQ_SUCCESS vchiq_status enum type. Replace it with 0 to report the success status. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vc04_services: Replace vchiq_status return type to intUmang Jain8-90/+88
Modify the functions' signature using enum vchiq_status to return int. Currently, this patch only touches the function signatures and in subsequent patches each vchiq_status enumerated value will be replaced by a integer value. This patch acts as an initial point to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221223122404.170585-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: vchiq_core: Add comments to remote event partsPhil Elwell2-0/+28
struct remote_event and the related functions remote_event_*() provides a higher function between ARM core and VPU. It's very helpful for a reviewer to have explaining comments about these parts. Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20221222141553.138563-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-22vc04_services: bcm2835-camera: Use bool values for mmal_fmt.remove_paddingUmang Jain1-15/+15
mmal_fmt.remove_padding is defined as a boolean type hence, use boolean values for it instead of 0/1 integers. This enhances code readability. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20221118084244.199909-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-22vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_useUmang Jain2-4/+4
In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20221118084244.199909-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-22Revert "staging: mmal-vchiq: Avoid use of bool in structures"Umang Jain2-8/+8
This reverts commit 640e77466e69d9c28de227bc76881f5501f532ca. In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20221118084244.199909-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-27staging: vchiq_arm: Add missing memory barrier commentsPhil Elwell2-0/+13
One of points on the TODO list was to comment the memory barriers. This patch addresses the missing ones in order to help reviewers. Link: https://github.com/raspberrypi/linux/pull/5066 Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20220624163902.6913-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: vchiq: provide testing instructionsStefan Wahren1-0/+82
This small document should to help kernel developer to test their changes on the VCHIQ driver. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20220618090002.20663-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: remove global 'vchiq_states' arrayAdrien Thierry2-10/+0
Remove global 'vchiq_states' array, which is not used anymore. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-10-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: use state from vchiq instanceAdrien Thierry2-11/+8
In 'handle_to_service', access the vchiq state from the vchiq instance instead of the global 'vchiq_states' array. This will allow getting rid of the global 'vchiq_states' array. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-9-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: pass vchiq instance to 'handle_to_service'Adrien Thierry3-7/+7
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-8-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: pass vchiq instance to 'vchiq_get_service_userdata'Adrien Thierry4-4/+5
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'vchiq_get_service_userdata'. Therefore, pass the vchiq instance reference to it. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-7-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: pass vchiq instance to 'vchiq_get_client_id'Adrien Thierry3-3/+3
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'vchiq_get_client_id'. Therefore, pass the vchiq instance reference to it. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-6-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: pass vchiq instance to 'find_service_by_handle'Adrien Thierry8-103/+118
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'find_service_by_handle'. Therefore, pass the vchiq instance reference to 'find_service_by_handle' and to its callers. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-5-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: pass vchiq instance to service callbacksAdrien Thierry6-12/+18
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array. 'handle_to_service' is called by 'service_callback'. Therefore, pass the vchiq instance reference to 'service_callback'. This also requires adding the vchiq instance reference to the service callbacks prototype, and update all other callbacks accordingly. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-4-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: get rid of global device structureAdrien Thierry7-57/+53
Get rid of the global g_dev structure. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" I chose to pass the vchiq_instance around instead of the device reference because in order to get rid of the 'vchiq_states' global array in the future, we will need another way to access the vchiq_state in the 'handle_to_service' function. Therefore, we will need to pass the vchiq_instance to it (or the vchiq_state), and also pass it to functions higher up in the caller chain, such as 'vchiq_bulk_transmit' and friends which are used in the bcm2835-audio consumer. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-3-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: add reference to vchiq device in vchiq_stateAdrien Thierry3-3/+6
Add a reference to the vchiq device in the vchiq_state structure. This allows the device structure to be passed around, which will be useful in order to get rid of the global g_dev structure. This change will also make it possible to use standard kernel logging macros instead of the custom ones. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-2-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-19staging: vc04_services: remove unused macroGaston Gonzalez1-1/+0
BITSET_CLR is not used. Remove the define. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20220516221741.1015814-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-06staging: vc04_services: Re-use generic struct s32_fractAndy Shevchenko6-49/+46
Instead of custom data type re-use generic struct s32_fract. No changes intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220504092915.72021-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: vc04_services: Re-add dependency on HAS_DMA to BCM2835_VCHIQGeert Uytterhoeven3-3/+4
Thanks to stubs for the NO_DMA=y case, drivers that use the DMA API can be compile-tested on systems that do not support DMA. Hence the dependency of BCM2835_VCHIQ on HAS_DMA was dropped to increase compile coverage. Unfortunately compilers became smarter, leading to new failures. E.g. for a CONFIG_SUN3=y allmodconfig kernel with gcc 9.4.0: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function ‘free_pagelist’: arch/m68k/include/asm/string.h:72:25: warning: argument 2 null where non-null expected [-Wnonnull] 72 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:614:4: note: in expansion of macro ‘memcpy’ 614 | memcpy((char *)kmap(pages[0]) + | ^~~~~~ arch/m68k/include/asm/string.h:72:25: note: in a call to built-in function ‘__builtin_memcpy’ 72 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:614:4: note: in expansion of macro ‘memcpy’ 614 | memcpy((char *)kmap(pages[0]) + | ^~~~~~ This happens because the compiler can trace back the source pointer to a allocation by dma_alloc_attrs(), which always returns NULL if NO_DMA=y. Avoid this reinstating the dependency of the BCM2835_VCHIQ symbol on HAS_DMA, and by restricting the selection of BCM2835_VCHIQ. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/da55bd87eebf1a969dc8ccd807843319833f6c40.1650888813.git.geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-22staging: bcm2835-audio: delete TODOAdrien Thierry1-10/+0
Delete TODO since all tasks were completed: 1 - fixed here: https://lore.kernel.org/all/20220408150359.26661-1-athierry@redhat.com/ 2 - there are no remaining checkpatch.pl errors or warnings Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220420174401.305964-1-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-22staging: vchiq:remove unneeded flush_workqueueran jianping1-1/+0
All work currently pending will be done first by calling destroy_workqueue, so there is no need to flush it explicitly. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ran jianping <ran.jianping@zte.com.cn> Link: https://lore.kernel.org/r/20220422093340.2781311-1-ran.jianping@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: bcm2835-audio: fix mutex definition without commentAdrien Thierry1-1/+1
Fix issue reported by checkpatch: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64: Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-6-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: bcm2835-audio: fix mutex definition without commentAdrien Thierry1-1/+1
Fix issue reported by checkpatch: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14: Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-5-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: bcm2835-audio: fix unnecessary space after castAdrien Thierry1-1/+1
Fix issue reported by checkpatch: CHECK: No space is necessary after a cast FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240: Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-4-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: bcm2835-audio: fix line ending with '('Adrien Thierry1-2/+1
Fix issue reported by checkpatch: CHECK: Lines should not end with a '(' FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85: Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-3-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: bcm2835-audio: fully describe config symbolAdrien Thierry1-2/+4
Explain SND_BCM2835 config option in more detail to fix checkpatch warning: WARNING: please write a help paragraph that fully describes the config symbol FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2 Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-2-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: bcm2835-audio: remove compat ALSA cardAdrien Thierry2-104/+15
Remove compat ALSA card, which has overlapping functionality with the two other cards described by the driver (HDMI and headphones) This handles TODO item "Revisit multi-cards options and PCM route mixer control". Move the S/PDIF device that was part of the compat ALSA card to the HDMI card. Only enable headphones card by default, because HDMI breaks when using both vc4 and bcm2835-audio with HDMI card enabled. Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220408150359.26661-1-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: vc04_services: Convert kmap() to kmap_local_page()Fabio M. De Francesco1-8/+5
The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. In file interface/vchiq_arm/vchiq_arm.c, function free_pagelist() calls kmap() / kunmap() from two places. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, free_pagelist() is a function where the use of kmap_local_page() in place of kmap() is correctly suited. Convert to kmap_local_page() but, instead of open coding it, use the memcpy_to_page() helper. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220330191414.23141-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: vchiq: replace usage of found with dedicated list iterator variableJakob Koschel2-14/+12
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boolean [1]. This removes the need to use a found variable and simply checking if the variable was set, can determine if the break/goto was hit. Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Link: https://lore.kernel.org/r/20220324073024.65943-1-jakobkoschel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-28Merge tag 'staging-5.18-rc1' of ↵Linus Torvalds8-150/+110
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates for 5.18-rc1. Loads of tiny cleanups for almost all staging drivers in here, nothing major at all. Highlights include: - remove the ashmem Android driver. It is long-dead and if there are any legacy userspace applications still using it, the Android kernel images will maintain it, the community shouldn't care about it anymore - wfx wifi driver major cleanups. Should be ready to merge out of staging soon, and will coordinate with the wifi maintainers after -rc1 is out - major cleanups and unwinding of the layers of the r8188eu driver. It's amazing just how many unneeded layers of abstraction is in there, just when we think it's done, another is found... - lots of tiny coding style cleanups in many other staging drivers. All have been in linux-next for a while with no reported problems" * tag 'staging-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (455 commits) staging: r8188eu: remove unnecessary memset in r8188eu staging: greybus: introduce pwm_ops::apply staging: rts5208: Resolve checkpatch.pl issues. staging: sm750fb: fix naming style staging: fbtft: Consider type of init sequence values in fbtft_init_display() staging: fbtft: Constify buf parameter in fbtft_dbg_hex() staging: mmal-vchiq: clear redundant item named bulk_scratch mips: dts: ralink: add MT7621 SoC staging: r8188eu: remove some unused local ieee80211 macros staging: r8188eu: make rtl8188e_process_phy_info static staging: r8188eu: remove unused function prototype staging: r8188eu: remove three unused receive defines staging: r8188eu: remove unnecessary initializations staging: rtl8192e: Fix spelling mistake "RESQUEST" -> "REQUEST" MAINTAINERS: remove the obsolete file entry for staging in ANDROID DRIVERS staging: r8188eu: proper error handling in rtw_init_drv_sw staging: r8188eu: call _cancel_timer_ex from _rtw_free_recv_priv staging: vt6656: Removed unused variable vt3342_vnt_threshold staging: vt6656: Removed unused variable bb_vga_0 staging: remove ashmem ...
2022-03-24Merge tag 'flexible-array-transformations-5.18-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull flexible-array transformations from Gustavo Silva: "Treewide patch that replaces zero-length arrays with flexible-array members. This has been baking in linux-next for a whole development cycle" * tag 'flexible-array-transformations-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: treewide: Replace zero-length arrays with flexible-array members
2022-03-24Merge tag 'media/v5.18-1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - a major reorg at platform Kconfig/Makefile files, organizing them per vendor. The other media Kconfig/Makefile files also sorted - New sensor drivers: hi847, isl7998x, ov08d10 - New Amphion vpu decoder stateful driver - New Atmel microchip csi2dc driver - tegra-vde driver promoted from staging - atomisp: some fixes for it to work on BYT - imx7-mipi-csis driver promoted from staging and renamed - camss driver got initial support for VFE hardware version Titan 480 - mtk-vcodec has gained support for MT8192 - lots of driver changes, fixes and improvements * tag 'media/v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (417 commits) media: nxp: Restrict VIDEO_IMX_MIPI_CSIS to ARCH_MXC or COMPILE_TEST media: amphion: cleanup media device if register it fail media: amphion: fix some issues to improve robust media: amphion: fix some error related with undefined reference to __divdi3 media: amphion: fix an issue that using pm_runtime_get_sync incorrectly media: vidtv: use vfree() for memory allocated with vzalloc() media: m5mols/m5mols.h: document new reset field media: pixfmt-yuv-planar.rst: fix PIX_FMT labels media: platform: Remove unnecessary print function dev_err() media: amphion: Add missing of_node_put() in vpu_core_parse_dt() media: mtk-vcodec: Add missing of_node_put() in mtk_vdec_hw_prob_done() media: platform: amphion: Fix build error without MAILBOX media: spi: Kconfig: Place SPI drivers on a single menu media: i2c: Kconfig: move camera drivers to the top media: atomisp: fix bad usage at error handling logic media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/ media: media/*/Kconfig: sort entries media: Kconfig: cleanup VIDEO_DEV dependencies media: platform/*/Kconfig: make manufacturer menus more uniform media: platform: Create vendor/{Makefile,Kconfig} files ...
2022-03-18staging: mmal-vchiq: clear redundant item named bulk_scratchXiaoke Wang1-7/+0
bulk_scratch is not used anywhere and the original allocation of it does not have proper check. Deleting it directly seems to be a good choice. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_F721901366AB5C720E008AF7F02DA5D3FF07@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-18media: Kconfig: cleanup VIDEO_DEV dependenciesMauro Carvalho Chehab1-1/+1
media Kconfig has two entries associated to V4L API: VIDEO_DEV and VIDEO_V4L2. On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core. while VIDEO_V4L2 where used to distinguish between drivers that implement the newer API and drivers that implemented the former one. With time, such meaning changed, specially after the removal of all V4L version 1 drivers. At the current implementation, VIDEO_DEV only does (1): it enables the media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenu but it doesn't affect anymore the V4L core drivers. The rationale is that the V4L2 core has a "soft" dependency at the I2C bus, and now requires to select a number of other Kconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEV In the past, merging them would be tricky, but it seems that it is now possible to merge those symbols, in order to simplify V4L dependencies. Let's keep VIDEO_DEV, as this one is used on some make *defconfig configurations. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2d Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-14staging: vchiq_arm: make vchiq_platform_get_arm_state() staticGaston Gonzalez1-2/+1
Fix "no previous prototype" W=1 warning by making the function vchiq_platform_get_arm_state() static. While at it, realign the function declaration in one line and reposition the asterisk symbol to fulfill the 'foo *bar' syntax. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/216ad30d674b80e0051ecc233ac26ddb1d3e0e75.1646255044.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-17treewide: Replace zero-length arrays with flexible-array membersGustavo A. R. Silva1-1/+1
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. This code was transformed with the help of Coccinelle: (next-20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch) @@ identifier S, member, array; type T1, T2; @@ struct S { ... T1 member; T2 array[ - 0 ]; }; UAPI and wireless changes were intentionally excluded from this patch and will be sent out separately. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2022-02-14Merge 5.17-rc4 into staging-testingGreg Kroah-Hartman1-2/+18
We need the staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>