summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'fbdev-for-6.14-rc1' of ↵Linus Torvalds2025-01-2412-77/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Fixes: - omap: use threaded IRQ for LCD DMA - omapfb: Fix an OF node leak in dss_of_port_get_parent_device() - vga16fb: fix orig_video_isVGA confusion Updates & cleanups: - hdmi: Remove unused hdmi_infoframe_check - omapfb: - Remove unused hdmi5_core_handle_irqs - Use of_property_present() to test existence of DT property - Use syscon_regmap_lookup_by_phandle_args - efifb: Change the return value type to void - lcdcfb: Use backlight helper - udlfb: Use const 'struct bin_attribute' callback - radeon: Use const 'struct bin_attribute' callbacks - sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb()" * tag 'fbdev-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: lcdcfb: Use backlight helper fbdev: vga16fb: fix orig_video_isVGA confusion fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_args fbdev: omapfb: Use of_property_present() to test existence of DT property fbdev: sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb() fbdev: omap: use threaded IRQ for LCD DMA fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device() fbdev: efifb: Change the return value type to void fbdev: omapfb: Remove unused hdmi5_core_handle_irqs video: hdmi: Remove unused hdmi_infoframe_check fbdev: radeon: Use const 'struct bin_attribute' callbacks fbdev: udlfb: Use const 'struct bin_attribute' callback
| * fbdev: lcdcfb: Use backlight helperShixiong Ou2025-01-211-5/+1
| | | | | | | | | | Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: vga16fb: fix orig_video_isVGA confusionZsolt Kajtar2025-01-191-3/+4
| | | | | | | | | | | | | | | | | | At some point the orig_video_isVGA field of screen_info was repurposed for video type. Using it directly for video type check is unsafe as it can still mean yes (1) or no-output (0) in certain configurations. I had one of those. Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_argsKrzysztof Kozlowski2025-01-121-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() combined with getting the syscon argument. Except simpler code this annotates within one line that given phandle has arguments, so grepping for code would be easier. There is also no real benefit in printing errors on missing syscon argument, because this is done just too late: runtime check on static/build-time data. Dtschema and Devicetree bindings offer the static/build-time check for this already. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: omapfb: Use of_property_present() to test existence of DT propertyKrzysztof Kozlowski2025-01-121-1/+1
| | | | | | | | | | | | | | | | of_property_read_bool() should be used only on boolean properties. Cc: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb()Thorsten Blum2025-01-121-2/+3
| | | | | | | | | | | | | | | | Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: omap: use threaded IRQ for LCD DMAAaro Koskinen2025-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using touchscreen and framebuffer, Nokia 770 crashes easily with: BUG: scheduling while atomic: irq/144-ads7846/82/0x00010000 Modules linked in: usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs omap_udc ohci_omap ohci_hcd CPU: 0 UID: 0 PID: 82 Comm: irq/144-ads7846 Not tainted 6.12.7-770 #2 Hardware name: Nokia 770 Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x54/0x5c dump_stack_lvl from __schedule_bug+0x50/0x70 __schedule_bug from __schedule+0x4d4/0x5bc __schedule from schedule+0x34/0xa0 schedule from schedule_preempt_disabled+0xc/0x10 schedule_preempt_disabled from __mutex_lock.constprop.0+0x218/0x3b4 __mutex_lock.constprop.0 from clk_prepare_lock+0x38/0xe4 clk_prepare_lock from clk_set_rate+0x18/0x154 clk_set_rate from sossi_read_data+0x4c/0x168 sossi_read_data from hwa742_read_reg+0x5c/0x8c hwa742_read_reg from send_frame_handler+0xfc/0x300 send_frame_handler from process_pending_requests+0x74/0xd0 process_pending_requests from lcd_dma_irq_handler+0x50/0x74 lcd_dma_irq_handler from __handle_irq_event_percpu+0x44/0x130 __handle_irq_event_percpu from handle_irq_event+0x28/0x68 handle_irq_event from handle_level_irq+0x9c/0x170 handle_level_irq from generic_handle_domain_irq+0x2c/0x3c generic_handle_domain_irq from omap1_handle_irq+0x40/0x8c omap1_handle_irq from generic_handle_arch_irq+0x28/0x3c generic_handle_arch_irq from call_with_stack+0x1c/0x24 call_with_stack from __irq_svc+0x94/0xa8 Exception stack(0xc5255da0 to 0xc5255de8) 5da0: 00000001 c22fc620 00000000 00000000 c08384a8 c106fc00 00000000 c240c248 5dc0: c113a600 c3f6ec30 00000001 00000000 c22fc620 c5255df0 c22fc620 c0279a94 5de0: 60000013 ffffffff __irq_svc from clk_prepare_lock+0x4c/0xe4 clk_prepare_lock from clk_get_rate+0x10/0x74 clk_get_rate from uwire_setup_transfer+0x40/0x180 uwire_setup_transfer from spi_bitbang_transfer_one+0x2c/0x9c spi_bitbang_transfer_one from spi_transfer_one_message+0x2d0/0x664 spi_transfer_one_message from __spi_pump_transfer_message+0x29c/0x498 __spi_pump_transfer_message from __spi_sync+0x1f8/0x2e8 __spi_sync from spi_sync+0x24/0x40 spi_sync from ads7846_halfd_read_state+0x5c/0x1c0 ads7846_halfd_read_state from ads7846_irq+0x58/0x348 ads7846_irq from irq_thread_fn+0x1c/0x78 irq_thread_fn from irq_thread+0x120/0x228 irq_thread from kthread+0xc8/0xe8 kthread from ret_from_fork+0x14/0x28 As a quick fix, switch to a threaded IRQ which provides a stable system. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()Joe Hattori2025-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_parent() obtains a reference of the returned OF node, call of_node_put() before returning NULL. This was found by an experimental verifier that I am developing, and no runtime test was able to be performed due to that lack of actual devices. Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: efifb: Change the return value type to voidShixiong Ou2025-01-091-3/+1
| | | | | | | | | | | | | | efifb_setup() doesn't need to return a value. Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: omapfb: Remove unused hdmi5_core_handle_irqsDr. David Alan Gilbert2024-12-222-18/+0
| | | | | | | | | | | | | | | | | | | | hdmi5_core_handle_irqs() has been unused since commit f5bab2229190 ("OMAPDSS: HDMI: Add OMAP5 HDMI support") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * video: hdmi: Remove unused hdmi_infoframe_checkDr. David Alan Gilbert2024-12-221-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | hdmi_infoframe_check() has been unused since it was added in commit c5e69ab35c0d ("video/hdmi: Constify infoframe passed to the pack functions") Remove it. Note that the individual check functions for each type are actually used, so they're staying. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: radeon: Use const 'struct bin_attribute' callbacksThomas Weißschuh2024-12-221-4/+4
| | | | | | | | | | | | | | | | The sysfs core now provides callback variants that explicitly take a const pointer. Make use of it to match the attribute definitions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: udlfb: Use const 'struct bin_attribute' callbackThomas Weißschuh2024-12-221-4/+4
| | | | | | | | | | | | | | | | The sysfs core now provides callback variants that explicitly take a const pointer. Make use of it to match the attribute definition. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Helge Deller <deller@gmx.de>
* | Merge tag 'drm-misc-fixes-2024-12-19' of ↵Dave Airlie2024-12-202-7/+14
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.13-rc4: - udma-buf fixes related to sealing. - dma-buf build warning fix when debugfs is not enabled. - Assorted drm/panel fixes. - Correct error return in drm_dp_tunnel_mgr_create. - Fix even more divide by zero in drm_mode_vrefresh. - Fix FBDEV dependencies in Kconfig. - Documentation fix for drm_sched_fini. - IVPU NULL pointer, memory leak and WARN fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d0763051-87b7-483e-89e0-a9f993383450@linux.intel.com
| * fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICEThomas Zimmermann2024-12-172-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter only controls backlight support within fbdev core code and data structures. Make fbdev drivers depend on BACKLIGHT_CLASS_DEVICE and let users select it explicitly. Fixes warnings about recursive dependencies, such as error: recursive dependency detected! symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT symbol FB_BACKLIGHT is selected by FB_SH_MOBILE_LCDC symbol FB_SH_MOBILE_LCDC depends on FB_DEVICE symbol FB_DEVICE depends on FB_CORE symbol FB_CORE is selected by DRM_GEM_DMA_HELPER symbol DRM_GEM_DMA_HELPER is selected by DRM_PANEL_ILITEK_ILI9341 symbol DRM_PANEL_ILITEK_ILI9341 depends on BACKLIGHT_CLASS_DEVICE BACKLIGHT_CLASS_DEVICE is user-selectable, so making drivers adapt to it is the correct approach in any case. For most drivers, backlight support is also configurable separately. v3: - Select BACKLIGHT_CLASS_DEVICE in PowerMac defconfigs (Christophe) - Fix PMAC_BACKLIGHT module dependency corner cases (Christophe) v2: - s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge) - Fix fbdev driver-dependency corner case (Arnd) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241216074450.8590-2-tzimmermann@suse.de
* | module: Convert symbol namespace to string literalPeter Zijlstra2024-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") and for the same reason, it is not desired for the namespace argument to be a macro expansion itself. Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; done Requested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc Acked-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Get rid of 'remove_new' relic from platform driver structLinus Torvalds2024-12-0112-12/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | The continual trickle of small conversion patches is grating on me, and is really not helping. Just get rid of the 'remove_new' member function, which is just an alias for the plain 'remove', and had a comment to that effect: /* * .remove_new() is a relic from a prototype conversion of .remove(). * New drivers are supposed to implement .remove(). Once all drivers are * converted to not use .remove_new any more, it will be dropped. */ This was just a tree-wide 'sed' script that replaced '.remove_new' with '.remove', with some care taken to turn a subsequent tab into two tabs to make things line up. I did do some minimal manual whitespace adjustment for places that used spaces to line things up. Then I just removed the old (sic) .remove_new member function, and this is the end result. No more unnecessary conversion noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'fbdev-for-6.13-rc1' of ↵Linus Torvalds2024-11-253-32/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: - omapfb: Remove unused code (Dr. David Alan Gilbert) - sh7760fb: Fix memory leak in error path of sh7760fb_alloc_mem() (Zhen Lei) * tag 'fbdev-for-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: omapfb: Remove some deadcode fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()
| * fbdev: omapfb: Remove some deadcodeDr. David Alan Gilbert2024-11-142-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | commit f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") took a copy of the omapdrm code into omapfb, however at that point a couple of functions were already unused at that point. Remove dispc_mgr_get_clock_div() and dispc_enable_fifomerge() from the omapfb copy. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Helge Deller <deller@gmx.de>
| * fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()Zhen Lei2024-11-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | When information such as info->screen_base is not ready, calling sh7760fb_free_mem() does not release memory correctly. Call dma_free_coherent() instead. Fixes: 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver") Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de>
* | Merge tag 'backlight-next-6.13' of ↵Linus Torvalds2024-11-2219-187/+145
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: - Improve handling of LCD power states and interactions with the fbdev subsystem - Introduce new LCD_POWER_ constants to decouple the LCD subsystem from fbdev - Update several drivers to use the new LCD_POWER_ constants - Clarify the semantics of the lcd_ops.controls_device callback - Remove unnecessary includes and dependencies - Remove unused notifier functionality - Simplify code with scoped for-each loops - Fix module autoloading for the ktz8866 driver - Update device tree bindings to yaml format - Minor cleanups and improvements in various drivers * tag 'backlight-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (33 commits) MAINTAINERS: Use Daniel Thompson's korg address for Backlight work dt-bindings: backlight: Convert zii,rave-sp-backlight.txt to yaml backlight: Remove notifier backlight: ktz8866: Fix module autoloading backlight: 88pm860x_bl: Simplify with scoped for each OF child loop backlight: lcd: Do not include <linux/fb.h> in lcd header backlight: lcd: Remove struct fb_videomode from set_mode callback backlight: lcd: Replace check_fb with controls_device HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev fbdev: omap: Use lcd power constants fbdev: imxfb: Use lcd power constants fbdev: imxfb: Replace check_fb in favor of struct fb_info.lcd_dev fbdev: clps711x-fb: Use lcd power constants fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev backlight: tdo24m: Use lcd power constants backlight: platform_lcd: Use lcd power constants backlight: platform_lcd: Remove match_fb from struct plat_lcd_data backlight: platform_lcd: Remove include statement for <linux/backlight.h> backlight: otm3225a: Use lcd power constants backlight: ltv350qv: Use lcd power constants ...
| * | backlight: Remove notifierDr. David Alan Gilbert2024-10-091-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backlight_register_notifier and backlight_unregister_notifier have been unused since commit 6cb634d0dc85 ("ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers") With those not being called, it means that the backlight_notifier list is always empty. Remove the functions, the list itself and the enum used in the notifications. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20240919232758.639925-1-linux@treblig.org Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: ktz8866: Fix module autoloadingLiao Chen2024-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen <liaochen4@huawei.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Jianhua Lu <lujianhua000@gmail.com> Link: https://lore.kernel.org/r/20240820121628.42321-1-liaochen4@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: 88pm860x_bl: Simplify with scoped for each OF child loopJinjie Ruan2024-10-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use scoped for_each_child_of_node_scoped() when iterating over device nodes to make code a bit simpler. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240822062546.3490076-1-ruanjinjie@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lcd: Remove struct fb_videomode from set_mode callbackThomas Zimmermann2024-09-303-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementations of struct lcd_ops.set_mode only require the resolution from struct fb_videomode. Pass the xres and yres fields, but remove the dependency on the fbdev data structure. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-28-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lcd: Replace check_fb with controls_deviceThomas Zimmermann2024-09-302-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename check_fb in struct lcd_ops to controls_device. The callback is now independent from fbdev's struct fb_info and tests if an lcd device controls a hardware display device. The new naming and semantics follow similar functionality for backlight devices. v2: - fix typos in commit description (Daniel) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-27-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | fbdev: omap: Use lcd power constantsThomas Zimmermann2024-09-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-25-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | fbdev: imxfb: Use lcd power constantsThomas Zimmermann2024-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-24-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | fbdev: imxfb: Replace check_fb in favor of struct fb_info.lcd_devThomas Zimmermann2024-09-301-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in imxfb_lcd_ops obsolete. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-23-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | fbdev: clps711x-fb: Use lcd power constantsThomas Zimmermann2024-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-22-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_devThomas Zimmermann2024-09-301-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in clps711x_lcd_ops obsolete. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-21-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: tdo24m: Use lcd power constantsThomas Zimmermann2024-09-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-20-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: platform_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-19-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: platform_lcd: Remove match_fb from struct plat_lcd_dataThomas Zimmermann2024-09-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The match_fb callback in struct plat_lcd_data is unused. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-18-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: platform_lcd: Remove include statement for <linux/backlight.h>Thomas Zimmermann2024-09-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lcd driver does not depend on backlight interfaces. Remove the include statement. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-17-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: otm3225a: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-16-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: ltv350qv: Use lcd power constantsThomas Zimmermann2024-09-301-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-15-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lms501kf03: Use lcd power constantsThomas Zimmermann2024-09-301-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-14-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lms501kf03: Remove unnecessary include of <linux/backlight.h>Thomas Zimmermann2024-09-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This lcd driver is independent from the backlight code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-13-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lms283gf05: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-12-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: l4f00242t03: Use lcd power constantsThomas Zimmermann2024-09-301-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-11-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: jornada720_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-10-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: jornada720_lcd: Include <linux/io.h> for IOMEM() macroThomas Zimmermann2024-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids the proxy include via <linux/fb.h>. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-9-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: ili9320: Use lcd power constantsThomas Zimmermann2024-09-301-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-8-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: ili922x: Use lcd power constantsThomas Zimmermann2024-09-301-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-7-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: hx8357: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-6-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: corgi_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-5-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lcd: Add LCD_POWER_ constants for power statesThomas Zimmermann2024-09-301-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicate FB_BLANK_ constants as LCD_POWER_ constants in the lcd header file. Allows lcd drivers to avoid including the fbdev header file and removes a compile-time dependency between the two subsystems. The new LCD_POWER_ constants have the same values as their FB_BLANK_ counterparts. Hence semantics does not change and the lcd drivers can be converted one by one. Each instance of FB_BLANK_UNBLANK becomes LCD_POWER_ON, each of FB_BLANK_POWERDOWN becomes LCD_POWER_OFF, FB_BLANK_NORMAL becomes LCD_POWER_REDUCED and FB_BLANK_VSYNC_SUSPEND becomes LCD_POWER_REDUCED_VSYNC_SUSPEND. Lcd code or drivers do not use FB_BLANK_HSYNC_SUSPEND, so no new constants for this is being added. The tokens LCD_POWER_REDUCED and LCD_POWER_REDUCED_VSYNC_SUSPEND are deprecated and drivers should replace them with LCD_POWER_ON and LCD_POWER_OFF. See also commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states"), which added similar constants for backlight drivers. v2: - fix typo in commit description Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-4-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lcd: Test against struct fb_info.lcd_devThomas Zimmermann2024-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add struct fb_info.lcd_dev for fbdev drivers to store a reference to their lcd device. Update the lcd's fb_notifier_callback() to test for this field. The lcd module can now detect if an lcd device belongs to an fbdev device. This works similar to the bl_dev for backlights and will allow for the removal of the check_fb callback from several fbdev driver's lcd devices. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-3-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
| * | backlight: lcd: Rearrange code in fb_notifier_callback()Thomas Zimmermann2024-09-301-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First acquire the ops_lock and do all tests while holding it. Rearranges the code in lcd's fb_notifier_callback() to resemble the callback in the backlight module. This will simplify later changes to these tests. v2: - avoid gotos by using guard(mutex) (Daniel) - fix typos in commit description (Daniel) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-2-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>