aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-04-30Merge tag 'drm-next-2021-04-30' of git://anongit.freedesktop.org/drm/drmLinus Torvalds1-3/+3
Pull more drm updates from Dave Airlie: "Looks like I missed a tegra feature request for next, but should still be fine since it's pretty self contained. Apart from that got a set of i915 and amdgpu fixes as per usual along with a few misc fixes. tegra: - Tegra186 hardware cursor support - better capability reporting for different SoC - better framebuffer modifier support - host1x fixes ttm: - fix unswappable BO handling efifb: - check for PCI before using it amdgpu: - Fixes for Aldebaran - Display LTTPR fixes - eDP fixes - Fixes for Vangogh - RAS fixes - ASPM support - Renoir SMU fixes - Modifier fixes - Misc code cleanups - Freesync fixes i915: - Several fixes to GLK handling in recent display refactoring - Rare watchdog timer race fix - Cppcheck redundant condition fix - Overlay error code propagation fix - Documentation fix - gvt: Remove one unused function warning - gvt: Fix intel_gvt_init_device() return type - gvt: Remove one duplicated register accessible check" * tag 'drm-next-2021-04-30' of git://anongit.freedesktop.org/drm/drm: (111 commits) efifb: Check efifb_pci_dev before using it drm/i915: Fix docbook descriptions for i915_gem_shrinker drm/i915: fix an error code in intel_overlay_do_put_image() drm/i915/display/psr: Fix cppcheck warnings drm/i915: Disable LTTPR detection on GLK once again drm/i915: Restore lost glk ccs w/a drm/i915: Restore lost glk FBC 16bpp w/a drm/i915: Take request reference before arming the watchdog timer drm/ttm: fix error handling if no BO can be swapped out v4 drm/i915/gvt: Remove duplicated register accessible check drm/amdgpu/gmc9: remove dummy read workaround for newer chips drm/amdgpu: Add mem sync flag for IB allocated by SA drm/amdgpu: Fix SDMA RAS error reporting on Aldebaran drm/amdgpu: Reset RAS error count and status regs Revert "drm/amdgpu: workaround the TMR MC address issue (v2)" drm/amd/display: 3.2.132 drm/amd/display: [FW Promotion] Release 0.0.62 drm/amd/display: add helper for enabling mst stream features drm/amd/display: Report Proper Quantization Range in AVI Infoframe drm/amd/display: Fix call to pass bpp in 16ths of a bit ...
2021-04-15media: cedrus: Fix H265 status definitionsJernej Skrabec1-8/+9
Some of the H265 status flags are wrong. Redefine them to corespond to Allwinner CedarC open source userspace library. Only one of these flags is actually used and new value also matches value used in libvdpau-sunxi library, which is proven to be working. Note that wrong (old) value in right circumstances (in combination with another H265 decoding bug) causes driver lock up. With this fix decoding is still broken (green output) but at least driver doesn't lock up. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media/meson: remove redundant dev_err callMuhammad Usama Anjum1-6/+2
devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'He' to 'he'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'He' to 'he' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'We' to 'we'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'We' to 'we' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VidWinHt' to 'vid_win_ht'Zhansaya Bagdauletkyzy1-5/+5
Rename 'VidWinHt' to 'vid_win_ht' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VidWinWid' to 'vid_win_wid'Zhansaya Bagdauletkyzy1-5/+5
Rename variable 'VidWinWid' to 'vid_win_wid' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'DispMode' to 'disp_mode'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'DispMode' to 'disp_mode' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VEnd' to 'v_end'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'VEnd' to 'v_end' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'HEnd' to 'h_end'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'HEnd' to 'h_end' to eliminate camelcase Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: omap4iss: align arguments with open parenthesisBeatriz Martins de Carvalho1-1/+1
Cleans up checks of "Alignment should match open parenthesis" in iss.c:96. Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging/intel-ipu3: Fix race condition during set_fmtRicardo Ribalda1-16/+14
Do not modify imgu_pipe->nodes[inode].vdev_fmt.fmt.pix_mp, until the format has been correctly validated. Otherwise, even if we use a backup variable, there is a period of time where imgu_pipe->nodes[inode].vdev_fmt.fmt.pix_mp might have an invalid value that can be used by other functions. Cc: stable@vger.kernel.org Fixes: ad91849996f9 ("media: staging/intel-ipu3: Fix set_fmt error handling") Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging/intel-ipu3: Fix memory leak in imu_fmtRicardo Ribalda1-4/+7
We are losing the reference to an allocated memory if try. Change the order of the check to avoid that. Cc: stable@vger.kernel.org Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack usage") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: rkvdec: Do not require all controls to be present in every requestDaniel Almeida2-48/+1
According to the v4l2 api, it is allowed to skip setting a control if its contents haven't changed for performance reasons: userspace should only update the controls that changed from last frame rather then updating them all. Still some ancient code that checks for mandatory controls has been left in this driver. Remove it. Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: staging: ipu3-imgu: No need for kernel-doc comments in driver structSakari Ailus1-5/+0
This part is rather trivial so adding more comments isn't really helpful. Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: omap4iss: Acquire graph mutex for graph traversalSakari Ailus2-0/+8
Acquire the graph_mutex for traversing the media graph. This seems to have been missing all the time. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: staging/intel-ipu3: Fix set_fmt error handlingRicardo Ribalda1-0/+5
If there in an error during a set_fmt, do not overwrite the previous sizes with the invalid config. Without this patch, v4l2-compliance ends up allocating 4GiB of RAM and causing the following OOPs [ 38.662975] ipu3-imgu 0000:00:05.0: swiotlb buffer is full (sz: 4096 bytes) [ 38.662980] DMA: Out of SW-IOMMU space for 4096 bytes at device 0000:00:05.0 [ 38.663010] general protection fault: 0000 [#1] PREEMPT SMP Cc: stable@vger.kernel.org Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack usage") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: staging: ipu3: uapi: Add "WITH Linux-syscall-note" licenseLaurent Pinchart1-1/+1
All Linux headers licensed under the GPL-2.0 must include a "WITH Linux-syscall-note" extension in their SPDX license identifier, as enforced by the scripts/headers_install.sh script. Fix the Intel IPU3 UAPI header currently stored with the driver in staging. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: imx: imx7_mipi_csis: Ensure pads are connectedLaurent Pinchart1-2/+4
The CSI-2 receiver requires both its sink pad and its source pad to be connected through enabled links in order to be started. Ensure this by setting the MEDIA_PAD_FL_MUST_CONNECT flag on both pads. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: imx: imx7_mipi_csis: Don't take state->lock in .link_setup()Laurent Pinchart1-10/+3
The .link_setup() handler uses state->lock to protect the src_sd field. This is only used in mipi_csis_s_stream(), which can't race .link_setup() as the MC core prevents link setup when the pipeline is streaming. Drop the lock. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: imx: imx7_mipi_csis: Runtime suspend in .s_stream() error pathLaurent Pinchart1-2/+6
If the .s_stream() handler fails after calling pm_runtime_get_sync(), call pm_runtime_put() in the error path. While at it add a few blank lines to make the code more readable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: hantro: fix kernel-doc warnings and styleEzequiel Garcia1-0/+12
Add a description for enum values in hantro_enc_fmt, in order to fix these warnings: drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUV420P' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUV420SP' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUYV422' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_UYVY422' not described in enum 'hantro_enc_fmt' While here, improve the kernel-doc style, adding an empty line before the fields of the structs. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-06media: atomisp: fix a typoBhaskar Chowdhury1-1/+1
s/Sysytem/System/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-31gpu: host1x: Cleanup and refcounting for syncpointsMikko Perttunen1-3/+3
Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use host1x_syncpt pointers instead. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-03-23media: atomisp: remove duplicate include in sh_cssZhang Yunkai1-3/+0
'ia_css_isys.h' included in 'sh_css.c' is duplicated. It is also included in the 30th line. Link: https://lore.kernel.org/linux-media/20210306121104.218696-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai <zhang.yunkai@zte.com.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: staging: atomisp: reduce kernel stack usageArnd Bergmann3-36/+33
The atomisp_set_fmt() function has multiple copies of the large v4l2_format structure on its stack, resulting in a warning about excessive stack usage in some rare randconfig builds. drivers/staging/media/atomisp/pci/atomisp_cmd.c:5600:5: error: stack frame size of 1084 bytes in function 'atomisp_set_fmt' [-Werror,-Wframe-larger-than=] Of this structure, only three members in the 'fmt.pix' member are used, so simplify it by using the smaller v4l2_pix_format structure directly. This reduces the stack usage to 612 bytes, and it could be reduced further by only storing the three members that are used. Link: https://lore.kernel.org/linux-media/20210226140524.3478346-1-arnd@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: staging: media: omap4iss: code style - avoid macro argument precedence issuesNikolay Kyx1-8/+8
This patch fixes the following checkpatch.pl check: CHECK: Macro argument 'i' may be better as '(i)' to avoid precedence issues in file iss_regs.h Link: https://lore.kernel.org/linux-media/20210221195308.1451-1-knv418@gmail.com Signed-off-by: Nikolay Kyx <knv418@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: staging: media: ipu3: code style fix - missing a blank line after declarationsNikolay Kyx1-0/+1
This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations in file ipu3-css-fw.h Link: https://lore.kernel.org/linux-media/20210221081236.9758-2-knv418@gmail.com Signed-off-by: Nikolay Kyx <knv418@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: staging: media/atomisp: don't compile unused codekarthik alapati1-2/+3
currently the functions defined in ibuf_ctrl_rmgr.c file are only used by isys_init.c when CONFIG_VIDEO_ATOMISP_ISP2401 is selected so dont't compile it when not needed, also fixes some sparse warnings Link: https://lore.kernel.org/linux-media/YDEZu3oniT/vUMMY@karthik-strix-linux.karthek.com Signed-off-by: karthik alapati <mail@karthek.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: do not free kmalloc memory by vfreeJiri Slaby1-1/+1
fw_minibuffer[i].buffer is allocated by kmalloc in sh_css_load_blob_info and by vmalloc in setup_binary. So use kvfree to decide which of those allocators to use for freeing. Also remove the useless cast. Link: https://lore.kernel.org/linux-media/20210219101216.28406-1-jslaby@suse.cz Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: auto-select VIDEO_V4L2_SUBDEV_APITong Zhang1-0/+1
VIDEO_ATOMISP depends on VIDEO_V4L2_SUBDEV_API, if VIDEO_V4L2_SUBDEV_API is not selected, it will cause compilation error drivers/staging/media/atomisp/pci/atomisp_cmd.c:6079:42: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’ atomisp_subdev_set_ffmt (&asd->subdev, fh.pad, V4L2_SUBDEV_FORMAT_ACTIVE, add auto select VIDEO_V4L2_SUBDEV_API if VIDEO_ATOMISP is selected Link: https://lore.kernel.org/linux-media/20210210033830.961086-1-ztong0001@gmail.com Signed-off-by: Tong Zhang <ztong0001@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: remove redundant NULL checkYang Li1-4/+2
Fix below warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4626:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/1611220312-89384-3-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: remove redundant NULL checkYang Li1-4/+2
Fix below warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/sh_css_params.c:1575:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/staging/media/atomisp/pci/sh_css_params.c:3006:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/1611217731-56866-1-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com> Reviewed-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: fix Wvisiblity warningArnd Bergmann1-0/+2
Some randconfig builds include ia_css_firmware.h without first including linux/device.h: In file included from atomisp/pci/mmu/sh_mmu_mrfld.c:23: In file included from atomisp/pci/atomisp_compat.h:22: In file included from atomisp/pci/atomisp_compat_css20.h:24: In file included from atomisp/pci/ia_css.h:28: In file included from atomisp/pci/ia_css_control.h:25: drivers/staging/media/atomisp//pci/ia_css_firmware.h:52:29: error: declaration of 'struct device' will not be visible outside of this function [-Werror,-Wvisibility] Add a forward declaration to avoid the warning. Link: https://lore.kernel.org/linux-media/20210108082337.2305938-1-arnd@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-23media: atomisp: ov2722: remove unnecessary debug printFilip Kolev1-2/+0
checkpatch.pl emits the following warning: WARNING: Prefer using '"%s...", __func__' to using 'ov2722_remove', this function's name, in a string + dev_dbg(&client->dev, "ov2722_remove...\n"); This is just a "trace" call and therefore should be removed entirely; ftrace should be used instead. Link: https://lore.kernel.org/linux-media/20210106181158.2270-1-fil.kolev@gmail.com Signed-off-by: Filip Kolev <fil.kolev@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Remove redundant NULL checkXu Wang1-2/+1
./drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c:390:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/20201225084524.64839-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Remove redundant NULL checkXu Wang1-2/+1
Fix warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c:159:4-10: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/20201225083818.64588-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: replace boolean comparison of values with bool variablesAditya Srivastava3-13/+13
There are certain expressions in a condition in atomisp, where a boolean variable is compared with true/false in forms such as (foo == true) or (false != bar), which does not comply with the coding style rule by checkpatch.pl (CHK: BOOL_COMPARISON), according to which the boolean variables should be themselves used in the condition, rather than comparing with true or false. E.g. In drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: if (asd->stream_prepared == false) { Can be replaced with: if (!asd->stream_prepared) { Replace such expressions with boolean variables appropriately. Link: https://lore.kernel.org/linux-media/20201214132716.28157-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()Dan Carpenter1-3/+1
The "s3a_buf" is freed along with all the other items on the "asd->s3a_stats" list. It leads to a double free and a use after free. Link: https://lore.kernel.org/linux-media/X9dSO3RGf7r0pq2k@mwanda Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Write function decleration in one linePhilipp Gerlesberger1-33/+11
CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' WARNING:LEADING_SPACE: please, no spaces at the start of a line Avoid these errors by writing the function decleration in one line. Link: https://lore.kernel.org/linux-media/20201214110358.7102-12-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix BLOCK_COMMENT_STYLEPhilipp Gerlesberger1-2/+2
Block comments should align the * on each line Link: https://lore.kernel.org/linux-media/20201214110156.6152-11-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix PARENTHESIS_ALIGNMENTPhilipp Gerlesberger1-2/+1
You can sum up the two lines, because the maximum line length of 100 columns is not exceeded. Link: https://lore.kernel.org/linux-media/20201214110156.6152-10-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Delete bracesPhilipp Gerlesberger1-2/+0
WARNING:BRACES: braces {} are not necessary for single statement blocks Link: https://lore.kernel.org/linux-media/20201214110156.6152-9-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix funciton declerationPhilipp Gerlesberger1-3/+2
Write return_type, function_name and parameters in one line because lines should not end with a '(' [OPEN_ENDED_LINE] Write open brace ’{’ on the next line to fix OPEN_BRACE Error Link: https://lore.kernel.org/linux-media/20201214110156.6152-8-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix overlong linePhilipp Gerlesberger1-1/+2
Line length of 105 exceeds 100 columns. Link: https://lore.kernel.org/linux-media/20201214110156.6152-6-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix OPEN_ENDED_LINEPhilipp Gerlesberger1-2/+1
Lines should not end with a '(' Link: https://lore.kernel.org/linux-media/20201214110156.6152-5-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix EMBEDDED_FUNCTION_NAME warningPhilipp Gerlesberger1-5/+3
Use the automatically defined __func__ macro instead of the function name, so it stays correct when the function is renamed. Link: https://lore.kernel.org/linux-media/20201214110156.6152-4-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Fix Block CommentsPhilipp Gerlesberger1-2/+3
Block comments should use * on subsequent lines and should use a trailing */ on a separate line. Link: https://lore.kernel.org/linux-media/20201214110156.6152-3-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: Convert comments to C99 initializersPhilipp Gerlesberger1-17/+5
The struct initalizers have been changed as recommended on https://kernelnewbies.org/KernelJanitors/Todo Also remove all the false, 0, and NULL members. Link: https://lore.kernel.org/linux-media/20201214110156.6152-2-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Andrey Khlopkov <ij72uhux@stud.informatik.uni-erlangen.de> Signed-off-by: Philipp Gerlesberger <Philipp.Gerlesberger@fau.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22media: atomisp: remove redundant NULL check of "params"Ding Xiang1-3/+1
The check result of (!A || (A && B)) is equivalent to (!A || B), so remove redundant NULL check of "params" Link: https://lore.kernel.org/linux-media/20201117081058.673291-1-dingxiang@cmss.chinamobile.com Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>