summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'asm-generic-5.18' of ↵Linus Torvalds2022-03-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "There are three sets of updates for 5.18 in the asm-generic tree: - The set_fs()/get_fs() infrastructure gets removed for good. This was already gone from all major architectures, but now we can finally remove it everywhere, which loses some particularly tricky and error-prone code. There is a small merge conflict against a parisc cleanup, the solution is to use their new version. - The nds32 architecture ends its tenure in the Linux kernel. The hardware is still used and the code is in reasonable shape, but the mainline port is not actively maintained any more, as all remaining users are thought to run vendor kernels that would never be updated to a future release. - A series from Masahiro Yamada cleans up some of the uapi header files to pass the compile-time checks" * tag 'asm-generic-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (27 commits) nds32: Remove the architecture uaccess: remove CONFIG_SET_FS ia64: remove CONFIG_SET_FS support sh: remove CONFIG_SET_FS support sparc64: remove CONFIG_SET_FS support lib/test_lockup: fix kernel pointer check for separate address spaces uaccess: generalize access_ok() uaccess: fix type mismatch warnings from access_ok() arm64: simplify access_ok() m68k: fix access_ok for coldfire MIPS: use simpler access_ok() MIPS: Handle address errors for accesses above CPU max virtual user address uaccess: add generic __{get,put}_kernel_nofault nios2: drop access_ok() check from __put_user() x86: use more conventional access_ok() definition x86: remove __range_not_ok() sparc64: add __{get,put}_kernel_nofault() nds32: fix access_ok() checks in get/put_user uaccess: fix nios2 and microblaze get_user_8() sparc64: fix building assembly files ...
| * nds32: Remove the architectureAlan Kao2022-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nds32 architecture, also known as AndeStar V3, is a custom 32-bit RISC target designed by Andes Technologies. Support was added to the kernel in 2016 as the replacement RISC-V based V5 processors were already announced, and maintained by (current or former) Andes employees. As explained by Alan Kao, new customers are now all using RISC-V, and all known nds32 users are already on longterm stable kernels provided by Andes, with no development work going into mainline support any more. While the port is still in a reasonably good shape, it only gets worse over time without active maintainers, so it seems best to remove it before it becomes unusable. As always, if it turns out that there are mainline users after all, and they volunteer to maintain the port in the future, the removal can be reverted. Link: https://lore.kernel.org/linux-mm/YhdWNLUhk+x9RAzU@yamatobi.andestech.com/ Link: https://lore.kernel.org/lkml/20220302065213.82702-1-alankao@andestech.com/ Link: https://www.andestech.com/en/products-solutions/andestar-architecture/ Signed-off-by: Alan Kao <alankao@andestech.com> [arnd: rewrite changelog to provide more background] Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | Merge tag 'for-5.18/fbdev-1' of ↵Linus Torvalds2022-03-2350-221/+175
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Lots of small fixes and code cleanups across most of the fbdev drivers. This includes conversions to use helper functions, const conversions, spelling fixes, help text updates, adding return value checks, small build fixes, and much more" * tag 'for-5.18/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (59 commits) video: fbdev: kyro: make read-only array ODValues static const video: fbdev: offb: fix warning comparing pointer to 0 video: fbdev: omapfb: Add missing of_node_put() in dvic_probe_of video: fbdev: sm712fb: Fix crash in smtcfb_write() video: fbdev: s3c-fb: fix platform_get_irq.cocci warning video: fbdev: sm712fb: Fix crash in smtcfb_read() video: fbdev: via: check the return value of kstrdup() video: fbdev: au1100fb: Spelling s/palette/palette/ video: fbdev: atari: Atari 2 bpp (STe) palette bugfix video: fbdev: atari: Remove unused atafb_setcolreg() video: fbdev: atari: Convert to standard round_up() helper video: fbdev: atari: Fix TT High video mode video: fbdev: udlfb: replace snprintf in show functions with sysfs_emit video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of snprintf() video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf() video: fbdev: omapfb: Use sysfs_emit() instead of snprintf() video: fbdev: s3c-fb: Use platform_get_irq() to get the interrupt video: fbdev: Fix wrong file path for pvr2fb.c in Kconfig help text video: fbdev: pxa3xx-gcu: Remove unnecessary print function dev_err() video: fbdev: pxa168fb: Remove unnecessary print function dev_err() ...
| * | video: fbdev: kyro: make read-only array ODValues static constColin Ian King2022-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate the read-only array ODValues on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: offb: fix warning comparing pointer to 0Haowen Bai2022-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix the following coccicheck warning: drivers/video/fbdev/offb.c:415:13-14: WARNING comparing pointer to 0 Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: Add missing of_node_put() in dvic_probe_ofMiaoqian Lin2022-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: sm712fb: Fix crash in smtcfb_write()Zheyu Ma2022-03-031-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the sm712fb driver writes three bytes to the framebuffer, the driver will crash: BUG: unable to handle page fault for address: ffffc90001ffffff RIP: 0010:smtcfb_write+0x454/0x5b0 Call Trace: vfs_write+0x291/0xd60 ? do_sys_openat2+0x27d/0x350 ? __fget_light+0x54/0x340 ksys_write+0xce/0x190 do_syscall_64+0x43/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae Fix it by removing the open-coded endianness fixup-code. Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: s3c-fb: fix platform_get_irq.cocci warningYihao Han2022-03-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dev_err() messages after platform_get_irq*() failures. platform_get_irq() already prints an error. Generated by: scripts/coccinelle/api/platform_get_irq.cocci Signed-off-by: Yihao Han <hanyihao@vivo.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: sm712fb: Fix crash in smtcfb_read()Helge Deller2022-02-271-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zheyu Ma reported this crash in the sm712fb driver when reading three bytes from the framebuffer: BUG: unable to handle page fault for address: ffffc90001ffffff RIP: 0010:smtcfb_read+0x230/0x3e0 Call Trace: vfs_read+0x198/0xa00 ? do_sys_openat2+0x27d/0x350 ? __fget_light+0x54/0x340 ksys_read+0xce/0x190 do_syscall_64+0x43/0x90 Fix it by removing the open-coded endianess fixup-code and by moving the pointer post decrement out the fb_readl() function. Reported-by: Zheyu Ma <zheyuma97@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de> Tested-by: Zheyu Ma <zheyuma97@gmail.com> Cc: stable@vger.kernel.org
| * | video: fbdev: via: check the return value of kstrdup()Xiaoke Wang2022-02-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | kstrdup() is a memory allocation function which can return NULL when some internal memory errors happen. It is better to check the return value of it to catch the error in time during the setup of viafb. Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: au1100fb: Spelling s/palette/palette/Geert Uytterhoeven2022-02-162-2/+2
| | | | | | | | | | | | | | | | | | | | | Fix a misspelling of "palette" in a structure member. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atari: Atari 2 bpp (STe) palette bugfixMichael Schmitz2022-02-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to set the shifter STe palette registers has a long standing operator precedence bug, manifesting as colors set on a 2 bits per pixel frame buffer coming up with a distinctive blue tint. Add parentheses around the calculation of the per-color palette data before shifting those into their respective bit field position. This bug goes back a long way (2.4 days at the very least) so there won't be a Fixes: tag. Tested on ARAnyM as well on Falcon030 hardware. Cc: stable@vger.kernel.org Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/all/CAMuHMdU3ievhXxKR_xi_v3aumnYW7UNUO6qMdhgfyWTyVSsCkQ@mail.gmail.com Tested-by: Michael Schmitz <schmitzmic@gmail.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atari: Remove unused atafb_setcolreg()Geert Uytterhoeven2022-02-151-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | atafb_probe() overrides the atafb_ops.fb_setcolreg() method to match the actual graphics hardware. Besides, the shifts by 8 were bogus, as the individual .fb_setcolreg() implementations already take care of that. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atari: Convert to standard round_up() helperGeert Uytterhoeven2022-02-151-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove the custom macro up(), and convert the code to use the standard round_up() helper instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atari: Fix TT High video modeGeert Uytterhoeven2022-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The horizontal resolution (640) for the TT High video mode (1280x960) is definitely bogus. While fixing that, correct the timings to match the TTM195 service manual. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: udlfb: replace snprintf in show functions with sysfs_emitJing Yao2022-02-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Use sysfs_emit instead of scnprintf, snprintf or sprintf. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jing Yao <yao.jing2@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of ↵Jing Yao2022-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snprintf() Use sysfs_emit instead of scnprintf, snprintf or sprintf. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jing Yao <yao.jing2@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf()Jing Yao2022-02-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Use sysfs_emit instead of scnprintf, snprintf or sprintf. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jing Yao <yao.jing2@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: Use sysfs_emit() instead of snprintf()Guo Zhengkui2022-02-111-6/+7
| | | | | | | | | | | | | | | | | | | | | Use sysfs_emit() instead of snprintf(). Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: s3c-fb: Use platform_get_irq() to get the interruptzhaoxiao2022-02-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: Fix wrong file path for pvr2fb.c in Kconfig help textWei Ming Chen2022-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | pvr2fb.c should be under drivers/video/fbdev/ instead of drivers/video/ Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: pxa3xx-gcu: Remove unnecessary print function dev_err()Yang Li2022-02-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/video/fbdev/pxa3xx-gcu.c:615:2-9: line 615 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: pxa168fb: Remove unnecessary print function dev_err()Yang Li2022-02-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/video/fbdev/pxa168fb.c:621:2-9: line 621 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: fbcvt.c: fix printing in fb_cvt_print_name()Dan Carpenter2022-01-301-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code has two bugs: 1) "cnt" is 255 but the size of the buffer is 256 so the last byte is not used. 2) If we try to print more than 255 characters then "cnt" will be negative and that will trigger a WARN() in snprintf(). The fix for this is to use scnprintf() instead of snprintf(). We can re-write this code to be cleaner: 1) Rename "offset" to "off" because that's shorter. 2) Get rid of the "cnt" variable and just use "size - off" directly. 3) Get rid of the "read" variable and just increment "off" directly. Fixes: 96fe6a2109db ("fbdev: Add VESA Coordinated Video Timings (CVT) support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: pxa168fb: Initialize pointers with NULL and not plain integer 0Colin Ian King2022-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Pointers info and fbi are being initialized with plain integer zeros. Fix this by initializing them with NULLs. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe()Dan Carpenter2022-01-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If "sinfo->config" is not found, then return -ENODEV. Don't return success. Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: savagefb: make a variable localDan Carpenter2022-01-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The "edid" struct member is only used during probe() and it's freed right away. There is no point in storing a freed pointer for the whole life of the driver. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: acx565akm: replace snprintf with sysfs_emitYang Guang2022-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | coccinelle report: ./drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c: 479:9-17: WARNING: use scnprintf or sprintf Use sysfs_emit instead of scnprintf or sprintf makes more sense. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbmem: use swap() to make code cleaner in fb_rotate_logo()Changcheng Deng2022-01-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use swap() in order to make code cleaner. Issue found by coccinelle. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: cirrusfb: check pixclock to avoid divide by zeroGeorge Kennedy2022-01-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do a sanity check on pixclock value to avoid divide by zero. If the pixclock value is zero, the cirrusfb driver will round up pixclock to get the derived frequency as close to maxclock as possible. Syzkaller reported a divide error in cirrusfb_check_pixclock. divide error: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 14938 Comm: cirrusfb_test Not tainted 5.15.0-rc6 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2 RIP: 0010:cirrusfb_check_var+0x6f1/0x1260 Call Trace: fb_set_var+0x398/0xf90 do_fb_ioctl+0x4b8/0x6f0 fb_ioctl+0xeb/0x130 __x64_sys_ioctl+0x19d/0x220 do_syscall_64+0x3a/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Signed-off-by: George Kennedy <george.kennedy@oracle.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: mmp: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: s3c-fb: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: ssd1307fb: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: pxa3xx-gcu: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: pxa168fb: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: da8xx-fb: Make use of the helper function dev_err_probe()Cai Huoqing2022-01-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: panel-tpo-td043mtea1: Make use of the helper function ↵Cai Huoqing2022-01-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: panel-sharp-ls037v7dw01: Make use of the helper ↵Cai Huoqing2022-01-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: lcd_ams_delta: Make use of the helper function ↵Cai Huoqing2022-01-291-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: omapfb: panel-lgphilips-lb035q02: Make use of the helper ↵Cai Huoqing2022-01-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: asiliantfb: remove redundant assignment to variable FtargetColin Ian King2022-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Variable Ftarget is being initialized with a value that is never read, it is being re-assigned a different value a little later on. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: atyfb: Remove assigned but never used variable statementsColin Ian King2022-01-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of statements where local variables are being assigned values that are never read because the function returns immediately after the assignment. Clean up the code by removing them. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: w100fb: Reset global stateEvgeny Novikov2022-01-291-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | w100fb_probe() did not reset the global state to its initial state. This can result in invocation of iounmap() even when there was not the appropriate successful call of ioremap(). For instance, this may be the case if first probe fails after two successful ioremap() while second probe fails when first ioremap() fails. The similar issue is with w100fb_remove(). The patch fixes both bugs. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> Co-developed-by: Kirill Shilimanov <kirill.shilimanov@huawei.com> Signed-off-by: Kirill Shilimanov <kirill.shilimanov@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: au1200fb: Make use of dma_mmap_coherent()Cai Huoqing2022-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | replace dma_mmap_attrs() with dma_mmap_coherent() kindly. BTW, fix indentation. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: nvidiafb: Use strscpy() to prevent buffer overflowTim Gardner2022-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complains of a possible buffer overflow. However, given the 'static' scope of nvidia_setup_i2c_bus() it looks like that can't happen after examiniing the call sites. CID 19036 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) 1. fixed_size_dest: You might overrun the 48-character fixed-size string chan->adapter.name by copying name without checking the length. 2. parameter_as_source: Note: This defect has an elevated risk because the source argument is a parameter of the current function. 89 strcpy(chan->adapter.name, name); Fix this warning by using strscpy() which will silence the warning and prevent any future buffer overflows should the names used to identify the channel become much longer. Cc: Antonino Daplas <adaplas@gmail.com> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: via: Fix spelling mistake "bellow" -> "below"Colin Ian King2022-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | There is a spelling mistake in a debug message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: s3c-fb: drop unneeded MODULE_ALIASKrzysztof Kozlowski2022-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The MODULE_DEVICE_TABLE already creates proper alias for platform driver. Having another MODULE_ALIAS causes the alias to be duplicated. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()Wang Hai2022-01-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got a null-ptr-deref report: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... RIP: 0010:fb_destroy_modelist+0x38/0x100 ... Call Trace: ufx_usb_probe.cold+0x2b5/0xac1 [smscufx] usb_probe_interface+0x1aa/0x3c0 [usbcore] really_probe+0x167/0x460 ... ret_from_fork+0x1f/0x30 If fb_alloc_cmap() fails in ufx_usb_probe(), fb_destroy_modelist() will be called to destroy modelist in the error handling path. But modelist has not been initialized yet, so it will result in null-ptr-deref. Initialize modelist before calling fb_alloc_cmap() to fix this bug. Fixes: 3c8a63e22a08 ("Add support for SMSC UFX6000/7000 USB display adapters") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wang Hai <wanghai38@huawei.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: controlfb: Fix COMPILE_TEST buildYueHaibing2022-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If PPC_BOOK3S, PPC_PMAC and PPC32 is n, COMPILE_TEST build fails: drivers/video/fbdev/controlfb.c:70:0: error: "pgprot_cached_wthru" redefined [-Werror] #define pgprot_cached_wthru(prot) (prot) In file included from ./arch/powerpc/include/asm/pgtable.h:20:0, from ./include/linux/pgtable.h:6, from ./include/linux/mm.h:33, from drivers/video/fbdev/controlfb.c:37: ./arch/powerpc/include/asm/nohash/pgtable.h:243:0: note: this is the location of the previous definition #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \ Fixes: a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * | video: fbdev: ocfb: add const to of_device_idChunyang Zhong2022-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | struct of_device_id should normally be const. Signed-off-by: Chunyang Zhong <zhongchunyang@cdjrlc.com> Signed-off-by: Helge Deller <deller@gmx.de>