summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sitronix
AgeCommit message (Collapse)AuthorLines
2026-03-27Merge tag 'drm-misc-next-2026-03-26' of ↵Dave Airlie-67/+260
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v7.1: UAPI Changes: amdxdna: - support per-BO memory-usage queries docs: - Improve UAPI documentation panthor: - extend timestamp query with flags Core Changes: edid: - provide enum drm_output_color_format; mass-convert drivers gem-dma: - use drm_dev_dma_dev() for DMA mappings - set VM_DONTDUMP on mmap mipi-dbi: - drop simple-display; mass-convert drivers prime: - use drm_dev_dma_dev() for DMA mappings ttm: - improve handling of gfp_retry_mayfail Driver Changes: amdgpu: - use atomic_create_state for private_obj amdxdna: - refactor GEM implementation - fixes bridge: - provide clear-and-put helper for reliable cleanup - analogix_dp: Use DP helpers for link training - lontium-lt8713sx: Fix 64-bit division and Kconfig - samsung-dsim: Use clear-and-put imagination: - improve power-off sequence - support context-reset notification from firmware komeda: - support Arm China Linlon D6 plus DT bindings mediatek: - use drm_dev_dma_dev() for DMA mappings panel: - support Himax HX83121A plus DT bindings - support JuTouch JT070TM041 plus DT bindings - support Samsung S6E8FC0 plus DT bindings - himax-hx83102c: support Samsung S6E8FC0 plus DT bindings; support backlight - ili9806e: support Rocktech RK050HR345-CT106A plus DT bindings - simple: support Tianma TM050RDH03 plus DT bindings panthor: - support various sources for timestamp queries - fixes omapdrm: - use atomic_create_state for private_obj rcar-du: - fix suspend/resume wrt VSP interface - fix leak of device_link - clean up sun4i: - use drm_dev_dma_dev() for DMA mappings tegra: - use atomic_create_state for private_obj xe: - send 'none' recovery method for XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260326151812.GA76082@linux.fritz.box
2026-03-25drm/st7735r: Use regular atomic helpers; drop simple-display helpersThomas Zimmermann-9/+106
Replace simple-display helpers with regular atomic helpers. Store the pipeline elements in struct st7735r_device and initialize them as part of probing the device. Use mipi-dbi's existing helpers and initializer macros where possible. Effectively open-codes the modesetting code in the initializer helpers of mipi-dbi and simple-display. St7735r requires a custom helper for CRTC enablement, and non-freeing cleanup of the pipeline. v2: - fix connector initialization Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-15-tzimmermann@suse.de
2026-03-25drm/st7735r: Rename priv variable to st7735rThomas Zimmermann-10/+9
Rename the driver's device variable according to DRM conventions. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-14-tzimmermann@suse.de
2026-03-25drm/st7735r: Rename struct st7735r_priv to struct st7735r_deviceThomas Zimmermann-6/+10
Rename the driver's device struct according to DRM conventions. Also add a helper to upcast from struct drm_device. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-13-tzimmermann@suse.de
2026-03-25drm/st7586: Use regular atomic helpers; drop simple-display helpersThomas Zimmermann-35/+139
Replace simple-display helpers with regular atomic helpers. Store the pipeline elements in struct st7586_device and initialize them as part of probing the device. Use mipi-dbi's existing helpers and initializer macros where possible. Effectively open-codes the modesetting code in the initializer helpers of mipi-dbi and simple-display. St7586 requires custom helpers for various pipeline elements, and non-freeing cleanup of the pipeline. v3: - return early in st7586_plane_helper_atomic_update (David) v2: - fix connector initialization Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Tested-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-12-tzimmermann@suse.de
2026-03-25drm/mipi-dbi: Only modify planes on enabled CRTCsThomas Zimmermann-12/+1
Use drm_atomic_helper_commit_tail_rpm() as commit tail to update the plane after enabling the CRTC. Then remove the plane-update code from mipi_dbi_enable_flush() and inline the remaining backlight code where necessary. Mipi-dbi's current commit tail drm_atomic_helper_commit_tail() first updates the plane and then enables the CRTC. But the CRTC enablement includes power management that prevents the initial plane update from working. Hence, each mipi-dbi driver includes a plane update in their CRTC enablement; in the form of mipi_dbi_enable_flush() or custom code. Using drm_atomic_helper_commit_tail_rpm() enables the CRTC before any plane updates. Hence the additional plane update can be removed from mipi_dbi_enable_flush() and a number of drivers. This leaves backlight_enable() in the helper, which can now be inlined into affected drivers. Drivers now enable the CRTC plus an optional backlight and then automatically update the plane. In the case of disabling the display, drm_atomic_helper_commit_tail_rpm() only disables the CRTC without touching the plane at all. Mipi-dbi's mipi_dbi_pipe_disable() already contains the necessary logic. Removing the plane update from the CRTC enablement will also help with converting mipi-dbi from simple-pipe helpers to regular atomic helpers. v3: - st7586: remove unused variable v2: - ili9225: remove unused variables (David) - st7586: remove unused variables (David) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-2-tzimmermann@suse.de
2026-03-07drm/sitronix/st7586: fix bad pixel data due to byte swapDavid Lechner-9/+6
Correctly set dbi->write_memory_bpw for the ST7586 driver. This driver is for a monochrome display that has an unusual data format, so the default value set in mipi_dbi_spi_init() is not correct simply because this controller is non-standard. Previously, we were using dbi->swap_bytes to make the same sort of workaround, but it was removed in the same commit that added dbi->write_memory_bpw, so we need to use the latter now to have the correct behavior. This fixes every 3 columns of pixels being swapped on the display. There are 3 pixels per byte, so the byte swap caused this effect. Fixes: df3fb27a74a4 ("drm/mipi-dbi: Make bits per word configurable for pixel transfers") Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20260228-drm-mipi-dbi-fix-st7586-byte-swap-v1-1-e78f6c24cd28@baylibre.com
2026-02-21Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentLinus Torvalds-4/+4
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21treewide: Replace kmalloc with kmalloc_obj for non-scalar typesKees Cook-4/+4
This is the result of running the Coccinelle script from scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to avoid scalar types (which need careful case-by-case checking), and instead replace kmalloc-family calls that allocate struct or union object instances: Single allocations: kmalloc(sizeof(TYPE), ...) are replaced with: kmalloc_obj(TYPE, ...) Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...) are replaced with: kmalloc_objs(TYPE, COUNT, ...) Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...) are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...) (where TYPE may also be *VAR) The resulting allocations no longer return "void *", instead returning "TYPE *". Signed-off-by: Kees Cook <kees@kernel.org>
2025-12-15drm: Add driver for Sitronix ST7920 LCD displaysIker Pedrosa-0/+878
Add a new DRM/KMS driver for displays using the Sitronix ST7920 controller connected via the SPI bus. This provides a standard framebuffer interface for these common monochrome LCDs. Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20251215-st7920-v7-2-36771009ec01@gmail.com
2025-12-15drm/sitronix/st7571-spi: add support for SPI interfaceMarcus Folkesson-0/+89
Add support for ST7561/ST7571 connected to SPI bus. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-6-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-12-15drm/sitronix/st7571: split up the driver into a common and an i2c partMarcus Folkesson-917/+959
Split up the driver to make it possible to add support for hw interfaces other than I2C. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-5-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-12-15drm/sitronix/st7571-i2c: make probe independent of hw interfaceMarcus Folkesson-77/+113
Create an interface independent layer for the probe function. This is to make it possible to add support for other interfaces. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-4-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-12-15drm/sitronix/st7571-i2c: move common structures to st7571.hMarcus Folkesson-89/+110
Move all structures that will be common for all interfaces (SPI/I2C) to a separate header file. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-3-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-12-15drm/sitronix/st7571-i2c: add 'struct device' to st7571_deviceMarcus Folkesson-14/+16
Keep a copy of the device structure instead of referring to i2c_client. This is a preparation step to separate the generic part from all i2c stuff. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-2-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-12-15drm/sitronix/st7571-i2c: rename 'struct drm_device' in st7571_deviceMarcus Folkesson-30/+30
Rename st7571_device.dev to st7571_device.drm in preparation to introduce a 'struct device' member to this structure. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://patch.msgid.link/20251215-st7571-split-v3-1-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-10-31drm: include drm_print.h where neededJani Nikula-0/+2
There are a gazillion files that depend on drm_print.h being indirectly included via drm_buddy.h, drm_mm.h, or ttm/ttm_resource.h. In preparation for removing those includes, explicitly include drm_print.h where needed. Cc: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/5fe67395907be33eb5199ea6d540e29fddee71c8.1761734313.git.jani.nikula@intel.com
2025-10-22drm/sitronix/st7571-i2c: remove unneeded semicolonMarcus Folkesson-1/+1
Fix style issue reported by Kernel test robot. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202510221125.Cg0sM4xJ-lkp@intel.com/ Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20251022-st7571-semicolon-v1-1-83d322618ff4@gmail.com
2025-10-03drm/sitronix/st7571-i2c: reset position before clearing displayMarcus Folkesson-0/+1
We cannot know where the write pointer is, always reset position to (0,0) before clearing display. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20250913-st7571-reset-v1-1-ae5f58acdf8d@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-09-01drm/st7571-i2c: add support for 2bit grayscale for XRGB8888Marcus Folkesson-13/+13
Add support for 2bit grayscale and use it for XRGB8888 when grayscale is supported. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250721-st7571-format-v2-6-159f4134098c@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-09-01drm/st7571-i2c: add support for inverted pixel formatMarcus Folkesson-2/+5
Depending on which display that is connected to the controller, an "1" means either a black or a white pixel. The supported formats (R1/R2/XRGB8888) expects the pixels to map against (4bit): 00 => Black 01 => Dark Gray 10 => Light Gray 11 => White If this is not what the display map against, make it possible to invert the pixels. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250721-st7571-format-v2-4-159f4134098c@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-09-01drm/st7571-i2c: correct pixel data format descriptionMarcus Folkesson-4/+4
The comment describes the pixel data format as stated in the st7571 datasheet, which is not necessary the same as for the connected display. Instead, describe the expected pixel data format which is used for R1/R2/XRGB8888. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250721-st7571-format-v2-1-159f4134098c@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-09-01drm/sitronix/st7571-i2c: Make st7571_panel_data variables static constJavier Martinez Canillas-2/+2
The kernel test robot reported that sparse gives the following warnings: make C=2 M=drivers/gpu/drm/sitronix/ CC [M] st7571-i2c.o CHECK st7571-i2c.c st7571-i2c.c:1027:26: warning: symbol 'st7567_config' was not declared. Should it be static? st7571-i2c.c:1039:26: warning: symbol 'st7571_config' was not declared. Should it be static? MODPOST Module.symvers LD [M] st7571-i2c.ko Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202507180503.nfyD9uRv-lkp@intel.com Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250718152534.729770-1-javierm@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-07-16drm/sitronix/st7571-i2c: Add support for the ST7567 ControllerJavier Martinez Canillas-0/+75
The Sitronix ST7567 is a monochrome Dot Matrix LCD Controller that has SPI, I2C and parallel interfaces. The st7571-i2c driver only has support for I2C so displays using other transport interfaces are currently not supported. The DRM_FORMAT_R1 pixel format and data commands are the same than what is used by the ST7571 controller, so only is needed a different callback that implements the expected initialization sequence for the ST7567 chip. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250715110411.448343-6-javierm@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-07-16drm/sitronix/st7571-i2c: Add an indirection level to parse DTJavier Martinez Canillas-1/+3
Other Sitronix display controllers might need a different parsing DT logic, so lets add a .parse_dt callback to struct st7571_panel_data. Suggested-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250715110411.448343-4-javierm@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-07-16drm/sitronix/st7571-i2c: Log probe deferral cause for GPIO get failureJavier Martinez Canillas-1/+3
The driver already uses the dev_err_probe() helper (that only prints error messages for the -EPROBE_DEFER case) when fails to get any other resource. Also do the same when it fails to obtain the reset GPIO. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250715110411.448343-3-javierm@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-07-16drm/sitronix/st7571-i2c: Fix encoder callbacks function namesJavier Martinez Canillas-6/+6
It seems the driver took some inspiration from ssd130x and some of the functions (encoder callbacks) were not renamed to use a st7571_ prefix. Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20250715110411.448343-2-javierm@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-06-18Merge tag 'drm-misc-next-2025-06-12' of ↵Dave Airlie-10/+0
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.17: UAPI Changes: Cross-subsystem Changes: Core Changes: - atomic-helpers: Tune the enable / disable sequence - bridge: Add destroy hook - color management: Add helpers for hardware gamma LUT handling - HDMI: Add CEC handling, YUV420 output support - sched: tracing improvements Driver Changes: - hyperv: Move out of simple-kms, drm_panic support - i915: drm_panel_follower support - imx: Add IMX8qxq Display Controller Support - lima: Add Rockchip RK3528 GPU Support - nouveau: fence handling cleanup - panfrost: Add BO labeling, 64-bit registers access - qaic: Add RAS Support - rz-du: Add RZ/V2H(P) Support, MIPI-DSI DCS Support - sun4i: Add H616 Support - tidss: Add TI AM62L Support - vkms: YUV and R* formats support - bridges: - Switched to reference counted drm_bridge allocations - panels: - Switched to reference counted drm_panel allocations - Add support for fwnode-based panel lookup - himax-hx8394: Support for Huiling hl055fhv028c - ilitek-ili9881c: Support for 7" Raspberry Pi 720x1280 - panel-edp: Support for KDC KD116N3730A05, N160JCE-ELL CMN, - panel-simple: Support for AUO P238HAN01 - st7701: Support for Winstar wf40eswaa6mnn0 - visionox-rm69299: Support for rm69299-shift - New panels: Renesas R61307, Renesas R69328 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://lore.kernel.org/r/20250612-coucal-of-impossible-cleaning-a5eecf@houat
2025-06-11drm/sitronix: st7571-i2c: Select VIDEOMODE_HELPERSNathan Chancellor-0/+1
This driver requires of_get_display_timing() from CONFIG_VIDEOMODE_HELPERS but does not select it. If no other driver selects it, there will be a failure from the linker if the driver is built in or modpost if it is a module. ERROR: modpost: "of_get_display_timing" [drivers/gpu/drm/sitronix/st7571-i2c.ko] undefined! Select CONFIG_VIDEOMODE_HELPERS to resolve the build failure. Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20250610-drm-st7571-i2c-select-videomode-helpers-v1-1-d30b50ff6e64@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-05-27drm/sitronix: Remove broken backwards-compatibility layerGeert Uytterhoeven-10/+0
When moving the Sitronix DRM drivers and renaming their Kconfig symbols, the old symbols were kept, aiming to provide a seamless migration path when running "make olddefconfig" or "make oldconfig". However, the old compatibility symbols are not visible. Hence unless they are selected by another symbol (which they are not), they can never be enabled, and no backwards compatibility is provided. Drop the broken mechanism and the old symbols. Fixes: 9b8f32002cddf792 ("drm/sitronix: move tiny Sitronix drivers to their own subdir") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20395b14effe5e2e05a4f0856fdcda51c410329d.1747751592.git.geert+renesas@glider.be Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2025-05-12drm/sitronix: move tiny Sitronix drivers to their own subdirMarcus Folkesson-0/+1738
We start to have support many Sitronix displays in the tiny directory, and we expect more to come. Move them to their own subdirectory. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Suggested-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250512-sitronix-v3-1-bbf6cc413698@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>