aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-07-05drm/drm_gem.c: Remove surplus else after returnSui Jingfeng1-2/+2
else is not generally useful after return Signed-off-by: Sui Jingfeng <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-07-04drm/gud: use vmalloc_array and vcallocJulia Lawall1-1/+1
Use vmalloc_array and vcalloc to protect against multiplication overflows. The changes were done using the following Coccinelle semantic patch: // <smpl> @initialize:ocaml@ @@ let rename alloc = match alloc with "vmalloc" -> "vmalloc_array" | "vzalloc" -> "vcalloc" | _ -> failwith "unknown" @@ size_t e1,e2; constant C1, C2; expression E1, E2, COUNT, x1, x2, x3; typedef u8; typedef __u8; type t = {u8,__u8,char,unsigned char}; identifier alloc = {vmalloc,vzalloc}; fresh identifier realloc = script:ocaml(alloc) { rename alloc }; @@ ( alloc(x1*x2*x3) | alloc(C1 * C2) | alloc((sizeof(t)) * (COUNT), ...) | - alloc((e1) * (e2)) + realloc(e1, e2) | - alloc((e1) * (COUNT)) + realloc(COUNT, e1) | - alloc((E1) * (E2)) + realloc(E1, E2) ) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-07-02drm: bridge: samsung-dsim: Drain command transfer FIFO before transferMarek Vasut1-1/+1
Wait until the command transfer FIFO is empty before loading in the next command. The previous behavior where the code waited until command transfer FIFO was not full suffered from transfer corruption, where the last command in the FIFO could be overwritten in case the FIFO indicates not full, but also does not have enough space to store another transfer yet. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Tested-by: Jagan Teki <[email protected]> # imx8mm-icore Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-29drm/edid: Add quirk for OSVR HDK 2.0Ralph Campbell1-0/+1
The OSVR virtual reality headset HDK 2.0 uses a different EDID vendor and device identifier than the HDK 1.1 - 1.4 headsets. Add the HDK 2.0 vendor and device identifier to the quirks table so that window managers do not try to display the desktop screen on the headset display. Closes: https://gitlab.freedesktop.org/drm/misc/-/issues/30 Signed-off-by: Ralph Campbell <[email protected]> Tested-by: Ralph Campbell <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-28drm/tests: Fix swapped drm_framebuffer tests parameter namesCarlos Eduardo Gallo Filho1-2/+2
Swap tests parameters names so they actually reflect what is being tested. Signed-off-by: Carlos Eduardo Gallo Filho <[email protected]> Reviewed-by: André Almeida <[email protected]> Reviewed-by: Maíra Canal <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-28drm/edid: make read-only const array staticColin Ian King1-1/+1
Don't populate the const array on the stack, instead make it static. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Merge config and chip detectionThomas Zimmermann1-51/+57
Detection of the configuration mode and the chipset model are linked to each other. One uses values from the other; namely the PCI device revision and the SCU revision. Merge this code into a single function. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Move widescreen and tx-chip detection into separate helpersThomas Zimmermann1-3/+15
Split ast_detect_chip() into three functions and call them one by one. The new functions detect the transmitter chip and widescreen support. This will allow for further refactoring. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Tested-by: Sui Jingfeng <[email protected]> # AST2400 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Detect AST 2510 modelThomas Zimmermann2-5/+11
Detect the 6th-generation AST 2510. Allows to simplify the code for widescreen support. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Detect AST 1400 modelThomas Zimmermann2-5/+11
Detect the 5th-generation AST 1400. Allows to simplify the code for widescreen support. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Detect AST 1300 modelThomas Zimmermann2-5/+12
Detect the 4th-generation AST 1300. Allows to simplify the code for widescreen support. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Distinguish among chip generationsThomas Zimmermann5-57/+89
ASpeed distinguishes among various generations of the AST graphics chipset with various models. [1] The most-recent model AST 2600 is of the 7th generation, the AST 2500 is of the 6th generation, and so on. The ast driver simply picks one of the models as representative for the whole generation. In several places, individual models of the same generation need to be handled differently, which then requires additional code for detecting the model. Introduce different generations of the Aspeed chipset. In the source code, refer to the generation instead of the representation model where possible. The few places that require per-model handling are now clearly marked. In the enum ast_chip, we arrange each model's value such that it encodes the generation. This allows for an easy test. The actual values are ordered, but not of interest to the driver. v2: * use __ast_gen_is_eq() (Jingfeng) Signed-off-by: Thomas Zimmermann <[email protected]> Link: https://web.archive.org/web/20141007093258/http://www.aspeedtech.com/products.php?fPath=20 # 1 Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Set up release action right after enabling MMIOThomas Zimmermann1-19/+19
Ast sets up a managed release of the MMIO access flags. Move this code next to the MMIO access code, so that it runs if other errors occur during the device initialization. Signed-off-by: Thomas Zimmermann <[email protected]> Tested-by: Sui Jingfeng <[email protected]> # AST2400 Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Enable and unlock device access early during initThomas Zimmermann4-39/+30
POST and memory management contains code to enable access to the device's memory spaces. This is too late. Consolidate this code at the beginning of the device initialization. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Set PCI config before accessing I/O registersThomas Zimmermann3-7/+21
Access to I/O registers is required to detect and set up the device. Enable the rsp PCI config bits before. While at it, convert the magic number to macro constants. Enabling the PCI config bits was done after trying to detect the device. It was probably too late at this point. v2: * use standard 16-bit PCI r/w access (Jingfeng) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Remove device POSTing and config from chip detectionThomas Zimmermann1-27/+25
There's way too much going on in ast_detect_chip(). Move the POST and config code from the top of the function into the caller. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Remove dead else branch in POST codeThomas Zimmermann1-9/+3
According to the chip detection in ast_detect_chip(), AST2300 and later always have a PCI revision of 0x20 or higher. Therefore the code in ast_set_def_ext_reg() can not use the else branch when selecing the EXT register values. Remove the dead branch and the related values. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Implement register helpers in ast_drv.hThomas Zimmermann2-38/+24
There are already a number of register I/O functions in ast_drv.h. For consistency, move the remaining functions there as well. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Remove vga2_clone fieldThomas Zimmermann2-2/+0
Remove the unused field vga2_clone from struct ast_device. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ast: Fix DRAM init on AST2200Thomas Zimmermann1-1/+1
Fix the test for the AST2200 in the DRAM initialization. The value in ast->chip has to be compared against an enum constant instead of a numerical value. This bug got introduced when the driver was first imported into the kernel. Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 312fec1405dd ("drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)") Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: <[email protected]> # v3.5+ Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27drm/ttm: Don't shadow the operation contextThomas Hellström1-2/+1
ttm_bo_swapout() shadows the ttm operation context which may cause major confusion in driver callbacks when swapping out !TTM_PL_SYSTEM memory. Fix this by reusing the operation context argument to ttm_bo_swapout(). Cc: "Christian König" <[email protected]> Cc: Roger He <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Thomas Hellström <[email protected]> Acked-by: Matthew Brost <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev: Make support for userspace interfaces configurableThomas Zimmermann5-4/+57
Add Kconfig option CONFIG_FB_DEVICE and make the virtual fbdev device optional. If the new option has not been selected, fbdev does not create files in devfs, sysfs or procfs. Most modern Linux systems run a DRM-based graphics stack that uses the kernel's framebuffer console, but has otherwise deprecated fbdev support. Yet fbdev userspace interfaces are still present. The option makes it possible to use the fbdev subsystem as console implementation without support for userspace. This closes potential entry points to manipulate kernel or I/O memory via framebuffers. It also prevents the execution of driver code via ioctl or sysfs, both of which might allow malicious software to exploit bugs in the fbdev code. A small number of fbdev drivers require struct fbinfo.dev to be initialized, usually for the support of sysfs interface. Make these drivers depend on FB_DEVICE. They can later be fixed if necessary. v3: * effect -> affect in Kconfig help (Daniel) v2: * set FB_DEVICE default to y (Geert) * comment on {get,put}_device() (Sam) * Kconfig fixes (Sam) * add TODO item about FB_DEVICE dependencies (Sam) Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Rework fb init codeThomas Zimmermann3-32/+22
Init the class "graphics" before the rest of fbdev. Later steps, such as the sysfs code, depend on the class. Also arrange the module's exit code in reverse order. Unexport the global variable fb_class, which is only shared internally within the fbdev core module. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Move file-I/O code into separate fileThomas Zimmermann4-473/+498
Move fbdev's file-I/O code into a separate file and contain it in init and cleanup helpers. No functional changes. v3: * add missing file fb_chrdev.c v2: * rename source file (Sam) * include <linux/compat.h> (Javier, kernel test robot) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Move procfs code to separate fileThomas Zimmermann4-43/+80
Move fbdev's procfs code into a separate file and contain it in init and cleanup helpers. For the cleanup, replace remove_proc_entry() with proc_remove(). It is equivalent in functionality, but looks more like an inverse of proc_create_seq(). v2: * document proc_remove() usage (Sam) * revert unrelated removal of for_each_registered_fb() Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Add fb_device_{create,destroy}()Thomas Zimmermann3-19/+52
Move the logic to create and destroy fbdev devices into the new helpers fb_device_create() and fb_device_destroy(). There was a call to fb_cleanup_device() in do_unregister_framebuffer() that was too late. The device had already been removed at this point. Move the call into fb_device_destroy(). Declare the helpers in the new internal header file fb_internal.h, as they are only used within the fbdev core module. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Move framebuffer and backlight helpers into separate filesThomas Zimmermann4-110/+115
Move framebuffer and backlight helpers into separate files. Leave fbsysfs.c to sysfs-related code. No functional changes. The framebuffer helpers are not in fbmem.c because they are under GPL-2.0-or-later copyright, while fbmem.c is GPL-2.0. v2: * include <linux/mutex.h> (Sam) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/core: Pass Linux device to pm_vt_switch_*() functionsThomas Zimmermann1-3/+3
Pass the Linux device to pm_vt_switch_*() instead of the virtual fbdev device. Prepares fbdev for making struct fb_info.dev optional. The type of device that is passed to the PM functions does not matter much. It is only a token within the internal list of known devices. The PM functions do not refer to any of the device's properties or its type. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Pavel Machek <[email protected]> Cc: [email protected] Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/tdfxfb: Set i2c adapter parent to hardware deviceThomas Zimmermann1-2/+2
Use the 3dfx hardware device from the Linux device hierarchy as parent device of the i2c adapter. Aligns the driver with the rest of the codebase and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/smscufx: Detect registered fb_info from refcountThomas Zimmermann1-2/+2
Detect registered instances of fb_info by reading the reference counter from struct fb_info.read. Avoids looking at the dev field and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Steve Glendinning <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/sm501fb: Output message with fb_err()Thomas Zimmermann1-1/+1
Fix case were dev_err() is being called with struct fb_info.dev. Use fb_err() instead. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/sh7760fb: Use hardware device with dev_() output during probeThomas Zimmermann1-3/+3
Call output helpers in the probe function with the hardware device. The virtual fbdev device has not been initialized at that point. Also prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/sh7760fb: Alloc DMA memory from hardware deviceThomas Zimmermann1-4/+4
Pass the hardware device to the DMA helpers dma_alloc_coherent() and dma_free_coherent(). The fbdev device that is currently being used is a software device and does not provide DMA memory. Also update the related dev_*() output statements similarly. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/sh7760fb: Output messages with fb_dbg()Thomas Zimmermann1-13/+13
Fix cases were output helpers are called with struct fb_info.dev. Use fb_dbg() instead. Prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/sh7760fb: Use fb_dbg() in sh7760fb_get_color_info()Thomas Zimmermann1-5/+5
Give struct fb_info to sh7760fb_get_color_info() and use it in call to fb_dbg(). Prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/rivafb: Use hardware device as backlight parentThomas Zimmermann1-1/+1
Use the hardware device in struct fb_info.device as parent of the backlight device. Aligns the driver with the rest of the codebase and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Antonino Daplas <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/rivafb: Reorder backlight and framebuffer init/cleanupThomas Zimmermann1-4/+4
The driver's backlight code requires the framebuffer to be registered. Therefore reorder the init and cleanup calls for both data structures. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Antonino Daplas <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/radeonfb: Use hardware device as backlight parentThomas Zimmermann1-1/+1
Use the hardware device in struct fb_info.device as parent of the backlight device. Aligns the driver with the rest of the codebase and prepares fbdev for making struct fb_info.dev optional. v2: * add Cc: tag (Dan) Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/radeonfb: Reorder backlight and framebuffer cleanupThomas Zimmermann1-2/+1
The driver's backlight code requires the framebuffer to be registered. Therefore reorder the cleanup calls for both data structures. The init calls are already in the correct order. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/pxa168fb: Do not assign to struct fb_info.devThomas Zimmermann1-1/+1
Do not assign the hardware device to struct fb_info.dev. The field references the fbdev software device, which is unrelated. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/nvidiafb: Use hardware device as backlight parentThomas Zimmermann1-1/+1
Use the hardware device in struct fb_info.device as parent of the backlight device. Aligns the driver with the rest of the codebase and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Antonino Daplas <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/nvidiafb: Reorder backlight and framebuffer init/cleanupThomas Zimmermann1-4/+4
The driver's backlight code requires the framebuffer to be registered. Therefore reorder the init and cleanup calls for both data structures. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Antonino Daplas <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/metronomefb: Use hardware device for dev_err()Thomas Zimmermann1-1/+1
Replace the use of the fbdev software device, stored in struct fb_info.dev, with the hardware device from struct fb_info.device in load_waveform(). The device is only used for printing errors with dev_err(). This change aligns load_waveform() with the rest of the driver and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/mb862xxfb: Output messages with fb_dbg()Thomas Zimmermann1-5/+4
Fix cases were output helpers are called with struct fb_info.dev. Use fb_dbg() instead. Prepares fbdev for making struct fb_info.dev optional. v2: * fix another reference to struct fb_info.dev (kernel test reobot) * remove fb_err() from commit message Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/fsl-diu-fb: Output messages with fb_*() helpersThomas Zimmermann1-13/+13
Fix cases were output helpers are called with struct fb_info.dev. Use fb_*() helpers instead. Prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Timur Tabi <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/ep93xx-fb: Do not assign to struct fb_info.devThomas Zimmermann1-1/+0
Do not assing the Linux device to struct fb_info.dev. The call to register_framebuffer() initializes the field to the fbdev device. Drivers should not override its value. Fixes a bug where the driver incorrectly decreases the hardware device's reference counter and leaks the fbdev device. v2: * add Fixes tag (Dan) Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 88017bda96a5 ("ep93xx video driver") Cc: <[email protected]> # v2.6.32+ Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/ep93xx-fb: Output messages with fb_info() and fb_err()Thomas Zimmermann1-6/+6
Fix cases were output helpers are called with struct fb_info.dev. Use fb_info() and fb_err() instead. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/ep93xx-fb: Alloc DMA memory from hardware deviceThomas Zimmermann1-4/+4
Pass the hardware device to the DMA helpers dma_alloc_wc(), dma_mmap_wc() and dma_free_coherent(). The fbdev device that is currently being used is a software device and does not provide DMA memory. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/broadsheetfb: Call device_remove_file() with hardware deviceThomas Zimmermann1-1/+1
Call device_remove_file() with the same device that has been used for device_create_file(), which is the hardware device stored in struct fb_info.device. Prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-06-27fbdev/aty128fb: Use hardware device as backlight parentThomas Zimmermann1-1/+1
Use the hardware device in struct fb_info.device as parent of the backlight device. Aligns the driver with the rest of the codebase and prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]