Marek Vasut
685e8dae19
drm/rcar-du: dsi: Implement DSI command support
...
Implement support for DSI command transfer. Transmission of both Short
Packet and Long Packet is implemented, so is command transmission to
request response from peripheral device and transmission of non-read
command with BTA.
The AXI memory access mode is currently not implemented, each transfer
is performed purely using controller register interface. Short Packet
transfer can transfer up to 2 Bytes of data, Long Packet transfer can
transfer up to 16 Bytes of data.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org >
Link: https://lore.kernel.org/r/20250831190507.327848-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
2025-09-08 09:45:01 +03:00
Geert Uytterhoeven
b5ddb9ab3d
drm: rcar-du: lvds: Convert to RUNTIME_PM_OPS()
...
Convert the Renesas R-Car Display Unit LVDS driver from
SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS(), and pm_ptr(). This reduces
kernel size in case CONFIG_PM is disabled. While DRM_RCAR_LVDS depends
on PM, the code may still serve as an example for new drivers.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Link: https://lore.kernel.org/r/2264ff4f21a7e17384822e0efba176cf78ae184d.1756999823.git.geert+renesas@glider.be
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
2025-09-08 09:17:52 +03:00
Louis Chauvet
9cd6b43a0f
drm/vkms: Add P01* formats
...
The formats NV 12/16/24/21/61/42 were already supported.
Add support for:
- P010
- P012
- P016
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-8-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:26 +02:00
Louis Chauvet
9e6600e9d3
drm/vkms: Create helper macro for YUV formats
...
The callback functions for line conversion are almost identical for
semi-planar formats. The generic READ_LINE_YUV_SEMIPLANAR macro
generate all the required boilerplate to process a line from a
semi-planar format.
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-7-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:26 +02:00
Louis Chauvet
7766ae8de4
drm/vkms: Change YUV helpers to support u16 inputs for conversion
...
Some YUV format uses 16 bit values, so change the helper function for
conversion to support those new formats.
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-6-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:25 +02:00
Louis Chauvet
50c58f4f05
drm/vkms: Add support for RGB888 formats
...
Add the support for:
- RGB888
- BGR888
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-5-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:25 +02:00
Louis Chauvet
39d80cee42
drm/vkms: Add support for RGB565 formats
...
The format RGB565 was already supported. Add the support for:
- BGR565
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-4-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:25 +02:00
Louis Chauvet
bac5c590d4
drm/vkms: Add support for ARGB16161616 formats
...
The formats XRGB16161616 and ARGB16161616 were already supported.
Add the support for:
- ABGR16161616
- XBGR16161616
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-3-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:24 +02:00
Louis Chauvet
985769b8b5
drm/vkms: Add support for ARGB8888 formats
...
The formats XRGB8888 and ARGB8888 were already supported. Add the
support for:
- XBGR8888
- ABGR8888
- RGBA8888
- BGRA8888
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-2-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:24 +02:00
Louis Chauvet
544f161a88
drm/vkms: Create helpers macro to avoid code duplication in format callbacks
...
The callback functions for line conversion are almost identical for
some format. The generic READ_LINE macro generate all the required
boilerplate to process a line.
Two overrides of this macro have been added to avoid duplication of
the same arguments every time.
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-1-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:57:16 +02:00
José Expósito
0d2902dfa3
drm/vkms: Assert if vkms_config_create_*() fails
...
Check that the value returned by the vkms_config_create_*() functions is
valid. Otherwise, assert and finish the KUnit test.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/dri-devel/aJTL6IFEBaI8gqtH@stanley.mountain/
Signed-off-by: José Expósito <jose.exposito89@gmail.com >
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com >
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org >
Link: https://lore.kernel.org/r/20250811101529.150716-1-jose.exposito89@gmail.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-09-05 19:05:37 +02:00
Luca Ceresoli
9e05c8dc4e
drm/display: bridge-connector: remove unused variable assignment
...
The 'bridge' pointer started being assigned and used within this 'if' scope
in commit 0beba3f9d3 ("drm/bridge: connector: add support for HDMI codec
framework").
After that, commit 5d04b41889 ("drm/bridge: split HDMI Audio from
DRM_BRIDGE_OP_HDMI") removed the code dereferencing it from the same 'if'
scope, but did not remove the assignment.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-2-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-05 15:42:21 +02:00
LiangCheng Wang
c9e70639f5
drm: tiny: Add support for Mayqueen Pixpaper e-ink panel
...
Introduce a DRM driver for the Mayqueen Pixpaper e-ink display panel,
which is controlled via SPI. The driver supports a 122x250 resolution
display with XRGB8888 format.
Also, add a MAINTAINERS entry for the Pixpaper driver.
Signed-off-by: LiangCheng Wang <zaq14760@gmail.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250902-drm-v5-3-d77c678c4ae3@gmail.com
2025-09-05 14:53:07 +02:00
LiangCheng Wang
d309c5fdf4
dt-bindings: display: Add Mayqueen Pixpaper e-ink panel
...
The binding is for the Mayqueen Pixpaper e-ink display panel,
controlled via an SPI interface.
Signed-off-by: LiangCheng Wang <zaq14760@gmail.com >
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250902-drm-v5-2-d77c678c4ae3@gmail.com
2025-09-05 14:53:06 +02:00
Wig Cheng
09b26dce32
dt-bindings: vendor-prefixes: Add Mayqueen name
...
Mayqueen is a Taiwan-based company primarily focused on the development
of arm64 development boards and e-paper displays.
Signed-off-by: Wig Cheng <onlywig@gmail.com >
Acked-by: Rob Herring (Arm) <robh@kernel.org >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250902-drm-v5-1-d77c678c4ae3@gmail.com
2025-09-05 14:53:06 +02:00
Chen Ni
87b0a0f6bc
drm/ast: ast_2100: Remove unneeded semicolon
...
Remove unnecessary semicolons reported by Coccinelle/coccicheck and the
semantic patch at scripts/coccinelle/misc/semicolon.cocci.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250905073712.3791260-1-nichen@iscas.ac.cn
2025-09-05 14:53:06 +02:00
Raphael Gallais-Pou
f4c45db8a1
dt-bindings: panel: lvds: Append edt,etml0700z8dha in panel-lvds
...
List EDT ETML0700Z8DHA in the LVDS panel enumeration.
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20250829-drm-misc-next-v1-1-fedb48cf50dd@foss.st.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com >
2025-09-05 13:39:38 +02:00
Liao Yuanhong
7a9b19cca0
drm/sti: Remove redundant ternary operators
...
For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com >
Acked-by: Raphaël Gallais-Pou <rgallaispou@gmail.com >
Link: https://lore.kernel.org/r/20250904112738.350652-1-liaoyuanhong@vivo.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com >
2025-09-05 13:17:21 +02:00
Liu Ying
2c907d852c
drm/panel: lvds: Remove unused members from main structure
...
Since commit 03fa454bb6 ("drm/panel: lvds: Simplify mode parsing"),
the width and height members of struct panel_lvds are no longer used.
Remove them. No functional change.
Signed-off-by: Liu Ying <victor.liu@nxp.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com >
Link: https://lore.kernel.org/r/20250829-panel-lvds-remove-width-height-v1-1-acecf0c84dc4@nxp.com
2025-09-05 16:55:45 +08:00
Min Ma
4c67b73907
MAINTAINERS: Update Min Ma's email for AMD XDNA driver
...
I recently left AMD and would like to continue participating in
the review and maintenance of the XDNA driver using my personal
email address.
Signed-off-by: Min Ma <mamin506@gmail.com >
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com >
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com >
Link: https://lore.kernel.org/r/20250831001228.592-1-mamin506@gmail.com
2025-09-04 15:57:33 -07:00
Nathan Chancellor
28fa7f5243
drm/bridge: cdns-dsi: Select VIDEOMODE_HELPERS
...
When no other driver selects CONFIG_VIDEOMODE_HELPERS but
CONFIG_DRM_CDNS_DSI is enabled, there is a linker or modpost error:
ERROR: modpost: "drm_display_mode_to_videomode" [drivers/gpu/drm/bridge/cadence/cdns-dsi.ko] undefined!
Select VIDEOMODE_HELPERS to ensure that this helper function is
available to the driver.
Fixes: ce4bc5ca7c ("drm/bridge: cdns-dsi: Use video mode and clean up cdns_dsi_mode2cfg()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/20250821-cdns-videohelpers-v1-1-853e021908cf@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-09-04 23:25:58 +03:00
Lizhi Hou
2f509fe6a4
accel/amdxdna: Add ioctl DRM_IOCTL_AMDXDNA_GET_ARRAY
...
Add interface for applications to get information array. The application
provides a buffer pointer along with information type, maximum number of
entries and maximum size of each entry. The buffer may also contain match
conditions based on the information type. After the ioctl completes, the
actual number of entries and entry size are returned. (see [1], used by
driver runtime library)
[1] https://github.com/amd/xdna-driver/blob/main/src/shim/host/platform_host.cpp#L337
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org >
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com >
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com >
Link: https://lore.kernel.org/r/20250903053402.2103196-1-lizhi.hou@amd.com
2025-09-04 08:26:43 -07:00
Thomas Zimmermann
03e7ae93c6
drm/ast: Put AST_DRAM_ constants into enum ast_dram_layout
...
The AST_DRAM_ constants belong together, so put them in an enum
type. Rename type and variables to 'drm_layout', as there's already
another DRAM type in the ast driver (AST_DDR2, AST_DDR3).
v2:
- avoid compiler warning with switch default (Dan)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-7-tzimmermann@suse.de
2025-09-04 12:29:44 +02:00
Thomas Zimmermann
6d580cf809
drm/ast: Move DRAM info next to its only user
...
The only place in the ast driver that uses the DRAM type is the
P2A DRAM initialization for Gen2 and Gen3 of the chip. Condense
the code in ast_get_dram_info() to exactly this use case and move
it into the Gen's custom source file. Remove the field dram_type
from struct ast_device.
The AST_DRAM_ constants are also used in Gen4 POST helpers, but
independently from the dram_type field. No changes there.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-6-tzimmermann@suse.de
2025-09-04 12:29:41 +02:00
Thomas Zimmermann
db216056a6
drm/ast: Remove unused SCU-MPLL and SCU-STRAP values
...
The ast driver used SCU-MPLL and SCU-STRAP to compute the memory
clock. Remove the now unused values.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-5-tzimmermann@suse.de
2025-09-04 12:29:41 +02:00
Thomas Zimmermann
e91153028d
drm/ast: Remove unused mclk field
...
The memory clock is not necessary for the driver. In default for
AST2600 is event incorrect; should be 800 MHz. Remove it.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-4-tzimmermann@suse.de
2025-09-04 12:29:40 +02:00
Thomas Zimmermann
dc2a40f44e
drm/ast: Remove unused dram_bus_width field
...
The DRAM bus width is not necessary for the driver. Remove it.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-3-tzimmermann@suse.de
2025-09-04 12:29:39 +02:00
Thomas Zimmermann
a5db45bfe9
drm/ast: Do not print DRAM info
...
Most of the information in the DRAM status output is irrelevant; some
is even wrong. Only the DRAM type is used on some older models. Drop
the output entirely.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://lore.kernel.org/r/20250826065032.344412-2-tzimmermann@suse.de
2025-09-04 12:29:39 +02:00
Colin Ian King
2a1eea8fd6
drm/sysfb: Remove double assignment to pointer crtc_state
...
The declaration of pointer crtc_state includes an assignment to
crtc_state. The double assignment of crtc_state is redundant and
can be removed.
Fixes: 061963cd9e ("drm/sysfb: Blit to CRTC destination format")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250903083106.2703580-1-colin.i.king@gmail.com
2025-09-04 09:26:39 +02:00
Eric Biggers
e339a73737
drm/bridge: it6505: Use SHA-1 library instead of crypto_shash
...
Instead of using the "sha1" crypto_shash, simply call the sha1() library
function. This is simpler and faster.
Signed-off-by: Eric Biggers <ebiggers@kernel.org >
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org >
Link: https://patch.msgid.link/20250821175613.14717-1-ebiggers@kernel.org
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org >
2025-09-04 11:27:45 +08:00
Antheas Kapenekakis
a3ae3384be
drm: panel-backlight-quirks: Log applied panel brightness quirks
...
Currently, when a panel brightness quirk is applied, there is no log
indicating that a quirk was applied. Unwrap the drm device on its own
and use drm_info() to log when a quirk is applied.
Suggested-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-7-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
(Correct a missing -1 in the message math)
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:23:04 -05:00
Antheas Kapenekakis
bf0365b005
drm: panel-backlight-quirks: Add Steam Deck brightness quirk
...
On the SteamOS kernel, Valve universally makes minimum brightness 0
for all devices. SteamOS is (was?) meant for the Steam Deck, so
enabling it universally is reasonable. However, it causes issues in
certain devices. Therefore, introduce it just for the Steam Deck here.
SteamOS kernel does not have a public mirror, but this replaces commit
806dd74bb225 ("amd/drm: override backlight min value from 12 -> 0")
in the latest, as of this writing, SteamOS kernel (6.11.11-valve24).
See unofficial mirror reconstructed from sources below.
Link: https://gitlab.com/evlaV/linux-integration/-/commit/806dd74bb225
Reviewed-by: Robert Beckett <bob.beckett@collabora.com >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-6-lkml@antheas.dev
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:23:03 -05:00
Antheas Kapenekakis
aef10b1138
drm: panel-backlight-quirks: Add brightness mask quirk
...
Certain OLED devices malfunction on specific brightness levels.
Specifically, when DP_SOURCE_BACKLIGHT_LEVEL is written to with
the first byte being 0x00 and sometimes 0x01, the panel forcibly
turns off until the device sleeps again.
Below are some examples. This was found by iterating over brighness
ranges while printing DP_SOURCE_BACKLIGHT_LEVEL. It was found that
the screen would malfunction on specific values, and some of them
were collected.
Therefore, introduce a quirk where the minor byte of brightness is
OR'd with 0x03 to avoid the range of invalid values.
This quirk was tested by removing the workarounds and iterating
from 0 to 50_000 value ranges with a cadence of 0.2s/it. The
range of the panel is 1000...400_000, so the values were slightly
interpolated during testing. The custom brightness curve added on
6.15 was disabled.
86016: 10101000000000000
86272: 10101000100000000
87808: 10101011100000000
251648: 111101011100000000
251649: 111101011100000001
86144: 10101000010000000
87809: 10101011100000001
251650: 111101011100000010
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3803
Tested-by: Philip Müller <philm@manjaro.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-5-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:23:01 -05:00
Antheas Kapenekakis
f7033fab81
drm: panel-backlight-quirks: Add secondary DMI match
...
Using a single DMI match only allows matching per manufacturer.
Introduce a second optional match to allow matching make/model.
In addition, make DMI optional to allow matching only by EDID.
Tested-by: Philip Müller <philm@manjaro.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-4-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:22:56 -05:00
Antheas Kapenekakis
6eee1ef9e5
drm: panel-backlight-quirks: Convert brightness quirk to generic structure
...
Currently, the brightness quirk is limited to minimum brightness only.
Refactor it to a structure, so that more quirks can be added in the
future. Reserve 0 value for "no quirk", and use u16 to allow minimum
brightness up to 255.
Tested-by: Philip Müller <philm@manjaro.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-3-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:22:52 -05:00
Antheas Kapenekakis
9931e4be11
drm: panel-backlight-quirks: Make EDID match optional
...
Currently, having a valid panel_id match is required to use the quirk
system. For certain devices, we know that all SKUs need a certain quirk.
Therefore, allow not specifying ident by only checking for a match
if panel_id is non-zero.
Tested-by: Philip Müller <philm@manjaro.org >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev >
Link: https://lore.kernel.org/r/20250829145541.512671-2-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org >
2025-09-03 10:22:47 -05:00
Chia-I Wu
5afa9d2a9b
drm/panthor: check bo offset alignment in vm bind
...
Fail early from panthor_vm_bind_prepare_op_ctx instead of late from
ops->map_pages.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Signed-off-by: Steven Price <steven.price@arm.com >
Link: https://lore.kernel.org/r/20250828200116.3532255-1-olvaffe@gmail.com
2025-09-03 12:29:54 +01:00
Nathan Chancellor
33a7776f9b
drm/tidss: dispc: Explicitly include bitfield.h
...
After a recent series to use FIELD_PREP and FIELD_MODIFY in
tidss_dispc.c, there are many errors when bitfield.h is not implicitly
included, such as when building allmodconfig for ARCH=hexagon:
drivers/gpu/drm/tidss/tidss_dispc.c:1116:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1116 | VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, v,
| ^
drivers/gpu/drm/tidss/tidss_dispc.c:631:3: note: expanded from macro 'VP_REG_FLD_MOD'
631 | FIELD_MODIFY((mask), &_reg, (val)); \
| ^
drivers/gpu/drm/tidss/tidss_dispc.c:1140:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1140 | FIELD_MODIFY(DISPC_VP_DSS_OLDI_CFG_MAP_MASK, &oldi_cfg,
| ^
drivers/gpu/drm/tidss/tidss_dispc.c:1203:10: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1203 | FIELD_PREP(DISPC_VP_TIMING_H_SYNC_PULSE_MASK, hsw - 1) |
| ^
...
Explicitly include bitfield.h to resolve the errors.
Fixes: 9accc8b10d ("drm/tidss: dispc: Get rid of FLD_VAL")
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250902-drm-tidss-fix-missing-bitfield-h-v1-1-aaad4a285f98@kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
2025-09-03 12:16:04 +03:00
Luca Ceresoli
306734a1c7
drm/display: bridge_connector: use drm_bridge_is_last()
...
Simplify code to know whether a bridge is the last in the chain by using
drm_bridge_is_last().
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-6-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
e4cedfd4f0
drm/bridge: add drm_bridge_is_last()
...
Some code needing to know whether a bridge is the last in a chain currently
call drm_bridge_get_next_bridge(). However drm_bridge_get_next_bridge()
will soon increment the refcount of the returned bridge, which would make
such code more annoying to write.
In preparation for drm_bridge_get_next_bridge() to increment the refcount,
as well as to simplify such code, introduce a simple bool function to tell
whether a bridge is the last in the chain.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-5-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
c3183f71c3
drm/omapdrm: use drm_bridge_chain_get_last_bridge()
...
Use drm_bridge_chain_get_last_bridge() instead of open coding a loop with
two invocations of drm_bridge_get_next_bridge() per iteration.
Besides being cleaner and more efficient, this change is necessary in
preparation for drm_bridge_get_next_bridge() to get a reference to the
returned bridge.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-4-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
5849eff7f0
drm/bridge: imx93-mipi-dsi: use drm_bridge_chain_get_last_bridge()
...
Use drm_bridge_chain_get_last_bridge() instead of open coding a loop with
two invocations of drm_bridge_get_next_bridge() per iteration.
Besides being cleaner and more efficient, this change is necessary in
preparation for drm_bridge_get_next_bridge() to get a reference to the
returned bridge.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Liu Ying <victor.liu@nxp.com >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-3-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
d77ad5178e
drm/bridge: add drm_bridge_chain_get_last_bridge()
...
Add an equivalent of drm_bridge_chain_get_first_bridge() to get the last
bridge.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-2-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
cb86408b1f
list: add list_last_entry_or_null()
...
Add an equivalent of list_first_entry_or_null() to obtain the last element
of a list.
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-1-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:38:29 +02:00
Luca Ceresoli
2a06126d16
drm/debugfs: bridges_show: show refcount
...
Now that bridges are refcounted, exposing the refcount in debugfs can be
useful.
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://lore.kernel.org/r/20250819-drm-bridge-debugfs-removed-v7-1-970702579978@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
2025-09-02 11:18:55 +02:00
Pierre-Eric Pelloux-Prayer
b2b8af21fe
drm/sched: Fix racy access to drm_sched_entity.dependency
...
The drm_sched_job_unschedulable trace point can access
entity->dependency after it was cleared by the callback
installed in drm_sched_entity_add_dependency_cb, causing:
BUG: kernel NULL pointer dereference, address: 0000000000000020
[...]
Workqueue: comp_1.1.0 drm_sched_run_job_work [gpu_sched]
RIP: 0010:trace_event_raw_event_drm_sched_job_unschedulable+0x70/0xd0 [gpu_sched]
To fix this we either need to keep a reference to the fence before
setting up the callbacks, or move the trace_drm_sched_job_unschedulable
calls into drm_sched_entity_add_dependency_cb where they can be
done earlier.
Fixes: 76d97c870f ("drm/sched: Trace dependencies for GPU jobs")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://lore.kernel.org/r/20250901124032.1955-1-pierre-eric.pelloux-prayer@amd.com
2025-09-02 09:25:51 +02:00
Liao Yuanhong
a69997be44
drm/ssd130x: Remove the use of dev_err_probe()
...
Logging messages that show some type of "out of memory" error are generally
unnecessary as there is a generic message and a stack dump done by the
memory subsystem. These messages generally increase kernel size without
much added value[1].
The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value
instead.
[1]: https://lore.kernel.org/lkml/1402419340.30479.18.camel@joe-AO725/
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://lore.kernel.org/r/20250820131416.500048-1-liaoyuanhong@vivo.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 16:09:19 +02:00
Marcus Folkesson
100d457c0f
drm/st7571-i2c: add support for 2bit grayscale for XRGB8888
...
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-01 15:35:29 +02:00
Marcus Folkesson
8bde81ec68
drm/format-helper: introduce drm_fb_xrgb8888_to_gray2()
...
Convert XRGB8888 to 2bit grayscale.
It uses drm_fb_xrgb8888_to_gray8() to convert the pixels to gray8 as an
intermediate step before converting to gray2.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://lore.kernel.org/r/20250721-st7571-format-v2-5-159f4134098c@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
2025-09-01 15:35:07 +02:00
Marcus Folkesson
e61c35157d
drm/st7571-i2c: add support for inverted pixel format
...
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-01 15:26:44 +02:00