Re: [PATCH] staging: bcm2835-camera: Avoid apotential sleep while holding a spin_lock

2019-06-23 Thread Nicholas Mc Guire
On Mon, Jun 24, 2019 at 07:33:51AM +0200, Christophe JAILLET wrote: > Do not allocate memory with GFP_KERNEL when holding a spin_lock, it may > sleep. Use GFP_NOWAIT instead. > checking for this in the rest of the kernel with a cocci spatch virtual report @nonatomic@ position p; identifier var;

[PATCH 06/10] staging: rtl8712: Remove r8712_setrttbl_cmd()

2019-06-23 Thread Nishka Dasgupta
Remove unused function r8712_setrttbl_cmd. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 22 -- drivers/staging/rtl8712/rtl871x_cmd.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/

[PATCH 10/10] staging: rtl8712: Change return values of r8712_setrfreg_cmd()

2019-06-23 Thread Nishka Dasgupta
Change return values of function r8712_setrfreg_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Modify call site accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 8 drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl871

[PATCH 07/10] staging: rtl8712: Replace r8712_find_network()

2019-06-23 Thread Nishka Dasgupta
Remove function r8712_find_network as all it does is call _r8712_find_network. Rename _r8712_find_network to r8712_find_network for compatibility with call sites. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_mlme.c | 18 ++ 1 file changed, 2 insertions(+), 1

[PATCH 09/10] staging: rtl8712: Remove r8712_setassocsta_cmd()

2019-06-23 Thread Nishka Dasgupta
Remove function r8712_setassocsta_cmd as it is only called by mp_start_joinbss, which was removed in the previous patch. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 29 --- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 30 de

[PATCH 05/10] staging: rtl8712: Replace r8712_free_evt_priv()

2019-06-23 Thread Nishka Dasgupta
Remove function r8712_free_evt_priv as all it does is call _free_evt_priv. Rename _free_evt_priv to r8712_free_evt_priv to maintain compatibility with call sites. Change type of new r8712_free_evt_priv from static to non-static to match old definition. Signed-off-by: Nishka Dasgupta --- drivers/

[PATCH 04/10] staging: rtl8712: Replace r8712_free_cmd_priv()

2019-06-23 Thread Nishka Dasgupta
Remove function r8712_free_cmd_priv as all it does is call _free_cmd_priv. Change type of new r8712_free_cmd_priv from static to non-static to match definition of original r8712_free_cmd_priv. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +-- 1 file changed, 1

[PATCH 08/10] staging: rtl8712: Remove mp_start_joinbss()

2019-06-23 Thread Nishka Dasgupta
Remove unused function mp_start_joinbss. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 16 drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 2 -- 2 files changed, 18 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/s

[PATCH 03/10] staging: rtl8712: Change return values of r8712_init_evt_priv()

2019-06-23 Thread Nishka Dasgupta
Change return values of the function r8712_init_evt_priv from _SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/os_intfs.c| 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(

[PATCH 02/10] staging: rtl8712: Replace function r8712_init_evt_priv()

2019-06-23 Thread Nishka Dasgupta
Remove function r8712_init_evt_priv as all it does is call _init_evt_priv. Rename _init_evt_priv to r8712_init_evt_priv to maintain compatibility with call sites. Change type of new r8712_init_evt_priv from static to non-static as original r8712_init_evt_priv was non-static. Change return type of n

[PATCH 01/10] staging: rtl8712: Change return values in r8712_init_cmd_priv()

2019-06-23 Thread Nishka Dasgupta
Change return values in r8712_init_cmd_priv from _SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/os_intfs.c| 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --

[PATCH] staging: bcm2835-camera: Avoid apotential sleep while holding a spin_lock

2019-06-23 Thread Christophe JAILLET
Do not allocate memory with GFP_KERNEL when holding a spin_lock, it may sleep. Use GFP_NOWAIT instead. Fixes: 950fd867c635 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.") Signed-off-by: Christophe JAILLET --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +

Rep: EML780214-2019

2019-06-23 Thread SBC Grupo SA.
--- ATTN: Do you need an investor/financier? Do you need a commercial or personal loan? We give out loan to any individual and company at 2% interest rate yearly. Our investors also fund projects. For more information, contact Email: m...@shqi

[PATCH 1/2] staging: rtl8188eu: remove unused function get_bsstype()

2019-06-23 Thread Michael Straube
Function get_bsstype() is not used in the driver code, so remove it. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 -- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 11 deletions(-) diff --git a/drivers/staging/rtl818

[PATCH 2/2] staging: rtl8188eu: remove unused function is_ap_in_wep()

2019-06-23 Thread Michael Straube
Function is_ap_in_wep() is not used in the driver code, so remove it. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 30 --- .../staging/rtl8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 31 deletions(-) diff --git a/drivers/staging/rt

[PATCH v3 3/4] staging: media: tegra-vde: Add IOMMU support

2019-06-23 Thread Dmitry Osipenko
All Tegra's could provide memory isolation for the video decoder hardware using IOMMU, it is also required for Tegra30+ in order to handle sparse dmabuf's which GPU exports in a default kernel configuration. Inspired-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/staging/media/te

[PATCH v3 4/4] staging: media: tegra-vde: Defer dmabuf's unmapping

2019-06-23 Thread Dmitry Osipenko
Frequent IOMMU remappings take about 50% of CPU usage because there is quite a lot to remap. Defer dmabuf's unmapping by 5 seconds in order to mitigate the mapping overhead which goes away completely and driver works as fast as in a case of a disabled IOMMU. The case of a disabled IOMMU should also

[PATCH v3 1/4] staging: media: tegra-vde: Remove BIT() macro from UAPI header

2019-06-23 Thread Dmitry Osipenko
The BIT macro isn't available in userspace. Checkpatch complains about shifts being used instead of the macro and people are starting to send patches without realizing that it's a UAPI header file. Hence let's replace the BIT macro with a hex values to make everyone happy. Signed-off-by: Dmitry Os

[PATCH v3 2/4] staging: media: tegra-vde: Manually pack UAPI structures

2019-06-23 Thread Dmitry Osipenko
The __packed macro isn't available in userspace with the kernel headers. Checkpatch asks to use the macro, which is unwanted in a case of a UAPI header. There is no much benefit in a tight packing of the structures, hence let's pack them manually to cleanup things a tad. Note that there is no old-s

[PATCH v3] ARM: dts: tegra30: Connect SMMU with Video Decoder Engine

2019-06-23 Thread Dmitry Osipenko
Enable IOMMU support for the video decoder. Signed-off-by: Dmitry Osipenko --- No changes since v1. arch/arm/boot/dts/tegra30.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 934caa83c8db..ce162125e7bf 100644 --- a/a

[PATCH v3] media: dt: bindings: tegra-vde: Document new optional IOMMU property

2019-06-23 Thread Dmitry Osipenko
All NVIDIA Tegra SoC generations provide IOMMU support for the video decoder engine. Document new optional device-tree property that connects VDE with the IOMMU provider. Signed-off-by: Dmitry Osipenko --- No changes since v1. Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt | 2 ++

[PATCH v3] ARM: tegra: Enable Tegra VDE driver in tegra_defconfig

2019-06-23 Thread Dmitry Osipenko
The video decoder driver was tested by time and works absolutely fine. The reason why it is in staging is because it doesn't provide common V4L interface yet, this shouldn't stop driver enabling in the defconfig since our userspace (libvdpau-tegra) provides combined acceleration of decoding and dis

[PATCH v3 0/4] NVIDIA Tegra Video Decoder driver improvements

2019-06-23 Thread Dmitry Osipenko
Hello, This series cleans up some of minor shortcomings that are caused by checkpatch recommendations that are not very applicable for the driver. Then IOMMU support is added to the driver and now it can handle sparse memory buffers that GPU hands to VDE in a default kernel configuration on Tegra3