]> Git Repo - linux.git/log
linux.git
7 months agodrm: Add missing documentation for struct drm_plane_size_hint
Mohammed Anees [Sun, 11 Aug 2024 10:16:51 +0000 (06:16 -0400)]
drm: Add missing documentation for struct drm_plane_size_hint

This patch takes care of the following warnings during documentation
compiling:

./include/uapi/drm/drm_mode.h:869: warning: Function parameter or struct member 'width' not described in 'drm_plane_size_hint'
./include/uapi/drm/drm_mode.h:869: warning: Function parameter or struct member 'height' not described in 'drm_plane_size_hint'

Signed-off-by: Mohammed Anees <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panic: Add panic description
Jocelyn Falempe [Wed, 7 Aug 2024 13:36:14 +0000 (15:36 +0200)]
drm/panic: Add panic description

Now that kmsg dump callback has the description parameter, use it in
the user panic screen.
This is the string passed to panic(), like "VFS: Unable to mount root
fs on xxx" or "Attempted to kill init! exitcode=0xxxx".
It gives a hint on why the panic occurred, without being too cryptic.

Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panic: Move copyright notice to the top
Jocelyn Falempe [Wed, 7 Aug 2024 13:36:13 +0000 (15:36 +0200)]
drm/panic: Move copyright notice to the top

Move the copyright notice to the top of drm_panic.h, and add the
missing Red Hat copyright notice.

Suggested-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panic: Move drm_panic_register prototype to drm_crtc_internal.h
Jocelyn Falempe [Wed, 7 Aug 2024 13:36:12 +0000 (15:36 +0200)]
drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h

drm_panic_[un]register() are only used by the core drm, and are not
intended to be called by other drm drivers, so move their prototypes
to drm_crtc_internal.h.

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panic: Remove useless export symbols
Jocelyn Falempe [Wed, 7 Aug 2024 13:36:11 +0000 (15:36 +0200)]
drm/panic: Remove useless export symbols

drm_panic_[un]register() are called only from the core drm, so there
is no need to export them.

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panic: Remove space before "!" in panic message
Jocelyn Falempe [Wed, 7 Aug 2024 13:36:10 +0000 (15:36 +0200)]
drm/panic: Remove space before "!" in panic message

There is no space between the last word, and the punctuation mark in
English.

Suggested-by: Diego Viola <[email protected]>
Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: Remove BMC output
Thomas Zimmermann [Mon, 5 Aug 2024 13:06:01 +0000 (15:06 +0200)]
drm/mgag200: Remove BMC output

Mgag200's BMC connector tracks the status of an underlying physical
connector and updates the BMC status accordingly. This functionality
works around GNOME's settings app, which cannot handle multiple
outputs on the same CRTC.

The workaround is now obsolete as the VGA-BMC connector handles BMC
support internally. Hence, remove the driver's code and the BMC output
entirely.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: vga-bmc: Control BMC scanout from encoder
Thomas Zimmermann [Mon, 5 Aug 2024 13:06:00 +0000 (15:06 +0200)]
drm/mgag200: vga-bmc: Control BMC scanout from encoder

Move calls to stop and start BMC scanout from CRTC helpers to the
VGA-BMC encoder's atomic_disable and atomic_enable. Makes the BMC
scanout transparent to the CRTC.

DRM's atomic helpers call an encoder's atomic_disable and atomic_enable
helpers for all enabled encoders. The BMC stops scanning out the VGA
signal if modeset disables the VGA encoder, and starts scanning out
if the modeset enables the VGA encoder.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: vga-bmc: Control CRTC VIDRST flag from encoder
Thomas Zimmermann [Mon, 5 Aug 2024 13:05:59 +0000 (15:05 +0200)]
drm/mgag200: vga-bmc: Control CRTC VIDRST flag from encoder

Control the VIDRST pin from the VGA-BMC encoder's atomic_check and
remove the respective code from CRTC. Makes the VIDRST functionality
fully composable.

The VIDRST pin allows an external clock source to control the SYNC
signals of the Matrox chip. The functionality is part of the CRTC,
but depends on the presence of the clock source. This is the case for
some BMCs, so control the pin from the VGA-BMC output.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: vga-bmc: Transparently handle BMC
Thomas Zimmermann [Mon, 5 Aug 2024 13:05:58 +0000 (15:05 +0200)]
drm/mgag200: vga-bmc: Transparently handle BMC

The VGA-BMC connector selects the VGA output if a display has been
attached to the physical connector. Otherwise it selects the BMC
output. In any case, the connector status is set to 'detected', so
that the userspace compositor displays to it.

Depending on the setting, the connector's display modes either come
from the VGA monitor's EDID or from an internal list of BMC-compatible
modes.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: Add VGA-BMC output
Thomas Zimmermann [Mon, 5 Aug 2024 13:05:57 +0000 (15:05 +0200)]
drm/mgag200: Add VGA-BMC output

Duplicate VGA output to VGA-BMC output and update all code for Matrox
server chips. The new output represents a VGA output that has a BMC
attached to it. No functional changes so far.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/vkms: Fix cpu_to_le16()/le16_to_cpu() warnings
José Expósito [Tue, 16 Jul 2024 16:17:26 +0000 (18:17 +0200)]
drm/vkms: Fix cpu_to_le16()/le16_to_cpu() warnings

Building with Sparse enabled prints this warning for cpu_to_le16()
calls:

    warning: incorrect type in assignment (different base types)
        expected unsigned short [usertype]
        got restricted __le16 [usertype]

And this warning for le16_to_cpu() calls:

    warning: cast to restricted __le16

Declare the target buffer as __le16 to fix both warnings.

Reviewed-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Louis Chauvet <[email protected]>
Acked-by: Maíra Canal <[email protected]>
Signed-off-by: José Expósito <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agogpu: drm: use for_each_endpoint_of_node()
Kuninori Morimoto [Tue, 30 Jul 2024 00:34:40 +0000 (00:34 +0000)]
gpu: drm: use for_each_endpoint_of_node()

We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.

Signed-off-by: Kuninori Morimoto <[email protected]>
Acked-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: rockchip: add tests for rockchip display driver
Vignesh Raman [Tue, 30 Jul 2024 02:15:41 +0000 (07:45 +0530)]
drm/ci: rockchip: add tests for rockchip display driver

For rockchip rk3288 and rk3399, the display driver is rockchip
and gpu driver is panfrost. Currently, in drm-ci for rockchip
rk3288 and rk3399, only the gpu driver is tested. Refactor
the existing rockchip jobs to test both display and gpu driver
and update xfails.

Since the correct driver name is passed from the job to test gpu
and display driver, remove the check to set IGT_FORCE_DRIVER
based on driver name for rockchip jobs.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: meson: add tests for meson display driver
Vignesh Raman [Tue, 30 Jul 2024 02:15:40 +0000 (07:45 +0530)]
drm/ci: meson: add tests for meson display driver

For Amlogic Meson G12B (A311D) SOC the display driver is meson and
gpu driver is panfrost. Currently, in drm-ci for Meson G12B (A311D),
only the gpu driver is tested. Refactor the existing meson jobs
and add support in drm-ci to test both display and gpu driver for
Amlogic Meson G12B (A311D) and update xfails.

Since the correct driver name is passed from the job to test gpu
and display driver, remove the check to set IGT_FORCE_DRIVER
based on driver name for meson jobs.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: mediatek: add tests for powervr gpu driver
Vignesh Raman [Tue, 30 Jul 2024 02:15:39 +0000 (07:45 +0530)]
drm/ci: mediatek: add tests for powervr gpu driver

For mediatek mt8173, the display driver is mediatek, while the
gpu driver is powervr. Currently, in drm-ci for mt8173, only the
display driver is tested. Add support in drm-ci to test powervr
driver for mt8173. Powervr driver was merged in linux kernel,
but there's no mediatek support yet. So disable the powervr:mt8173
job which uses powervr driver.

Also update the MAINTAINERS file to include xfails for powervr driver.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: mediatek: add tests for mediatek display driver
Vignesh Raman [Tue, 30 Jul 2024 02:15:38 +0000 (07:45 +0530)]
drm/ci: mediatek: add tests for mediatek display driver

For mediatek mt8183, the display driver is mediatek, while the
gpu driver is panfrost. Currently, in drm-ci for mt8183, only
the gpu driver is tested. Refactor the existing mediatek jobs
and add support in drm-ci to test both display and gpu driver
for mt8183 and update xfails.

Since the correct driver name is passed from the job to test gpu
and display driver, remove the check to set IGT_FORCE_DRIVER
based on driver name for mediatek jobs.

Update the MAINTAINERS file to include xfails for panfrost driver.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: skip tools_test on non-intel platforms
Vignesh Raman [Tue, 30 Jul 2024 02:15:37 +0000 (07:45 +0530)]
drm/ci: skip tools_test on non-intel platforms

tools_test is a wrapper for running tools/intel_reg
and tools/intel_l3_parity. So skip these tests on
non-intel platforms and update expectaion files.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: arm64.config: Enable CONFIG_DRM_ANALOGIX_ANX7625
Vignesh Raman [Tue, 30 Jul 2024 02:15:36 +0000 (07:45 +0530)]
drm/ci: arm64.config: Enable CONFIG_DRM_ANALOGIX_ANX7625

Enable CONFIG_DRM_ANALOGIX_ANX7625 in the arm64 defconfig to get
display driver probed on the mt8183-kukui-jacuzzi-juniper machine.

arch/arm64/configs/defconfig has CONFIG_DRM_ANALOGIX_ANX7625=m,
but drm-ci don't have initrd with modules, so add
CONFIG_DRM_ANALOGIX_ANX7625=y in CI arm64 config.

Acked-by: Helen Koike <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/bridge: lt9611uxc: drop support for !DRM_BRIDGE_ATTACH_NO_CONNECTOR
Dmitry Baryshkov [Mon, 1 Jul 2024 18:19:53 +0000 (21:19 +0300)]
drm/bridge: lt9611uxc: drop support for !DRM_BRIDGE_ATTACH_NO_CONNECTOR

Having no in-kernel devices that use !DRM_BRIDGE_ATTACH_NO_CONNECTOR
mode for the Lontium LT9611UXC bridge, drop the in-bridge implementation
of the drm_connector.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/bridge: lt9611uxc: properly attach to a next bridge
Dmitry Baryshkov [Mon, 1 Jul 2024 18:19:52 +0000 (21:19 +0300)]
drm/bridge: lt9611uxc: properly attach to a next bridge

If there is a next bridge in the OF graph don't let it be ignored.
Attach the next bridge to the chain.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/connector: Document destroy hook in drmm init functions
José Expósito [Sun, 4 Aug 2024 17:05:52 +0000 (19:05 +0200)]
drm/connector: Document destroy hook in drmm init functions

Document that the drm_connector_funcs.destroy hook must be NULL in
drmm_connector_init() and drmm_connector_hdmi_init().

Signed-off-by: José Expósito <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panel-edp: Fix HKC MB116AN01 name
Terry Hsiao [Fri, 2 Aug 2024 07:06:02 +0000 (15:06 +0800)]
drm/panel-edp: Fix HKC MB116AN01 name

Rename HKC MB116AN01 from Unknown to MB116AN01

Signed-off-by: Terry Hsiao <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240802070602.154201-1-terry_hsiao@compal.corp-partner.google.com
7 months agoRevert "drm/amd: Add power_saving_policy drm property to eDP connectors"
Hamza Mahfooz [Fri, 2 Aug 2024 14:59:46 +0000 (10:59 -0400)]
Revert "drm/amd: Add power_saving_policy drm property to eDP connectors"

This reverts commit 9d8c094ddab05db88d183ba82e23be807848cad8.

It was merged without meeting userspace requirements.

Signed-off-by: Hamza Mahfooz <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agoRevert "drm: Introduce 'power saving policy' drm property"
Hamza Mahfooz [Fri, 2 Aug 2024 14:59:45 +0000 (10:59 -0400)]
Revert "drm: Introduce 'power saving policy' drm property"

This reverts commit 76299a557f36d624ca32500173ad7856e1ad93c0.

It was merged without meeting userspace requirements.

Signed-off-by: Hamza Mahfooz <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/bridge: synopsys: dw-mipi-dsi: enable EoTp by default
Christoph Fritz [Fri, 5 Jul 2024 09:38:44 +0000 (11:38 +0200)]
drm/bridge: synopsys: dw-mipi-dsi: enable EoTp by default

Enable the transmission of an EoTp (end of transmission packet) by
default. EoTp should be enabled anyway because it is a Linux necessity
that can be disabled by a dsi mod_flag if needed.

EoTp signals the end of an HS transmission, this adds overall robustness
at protocol level at the expense of an increased overhead.

Signed-off-by: Christoph Fritz <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/loongson: use GEM references instead of TTMs
Christian König [Thu, 11 Jul 2024 13:09:23 +0000 (15:09 +0200)]
drm/loongson: use GEM references instead of TTMs

Instead of a TTM reference grab a GEM reference whenever necessary.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Cc: Sui Jingfeng <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/mgag200: Fix VBLANK interrupt handling
Thomas Zimmermann [Wed, 31 Jul 2024 07:09:40 +0000 (09:09 +0200)]
drm/mgag200: Fix VBLANK interrupt handling

Fix support for VBLANK interrupts on G200ER, G200EV and G200SE, which
use a slightly different implementation than the others. The original
commits forgot to update the custom helpers when adding interrupt
handling for VBLANK events.

Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 89c6ea2006e2 ("drm/mgag200: Add vblank support")
Fixes: d5070c9b2944 ("drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp")
Cc: Thomas Zimmermann <[email protected]>
Cc: Jocelyn Falempe <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: [email protected]
Acked-by: Sui Jingfeng <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/dp: Describe target_rr_divider in struct drm_dp_as_sdp
Mitul Golani [Mon, 15 Jul 2024 16:25:13 +0000 (21:55 +0530)]
drm/dp: Describe target_rr_divider in struct drm_dp_as_sdp

Describe newly added parameter target_rr_divider in struct
drm_dp_as_sdp.

-v2:
Remove extra line from commit message.(Lucas)

-v3:
Rebase.

Fixes: a20c6d954d75 ("drm/dp: Add refresh rate divider to struct representing AS SDP")
Cc: Mitul Golani <[email protected]>
Cc: Arun R Murthy <[email protected]>
Cc: Suraj Kandpal <[email protected]>
Cc: Ankit Nautiyal <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Mitul Golani <[email protected]>
Reviewed-by: Ankit Nautiyal <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Signed-off-by: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ast: astdp: Clean up EDID reading
Thomas Zimmermann [Wed, 17 Jul 2024 14:24:20 +0000 (16:24 +0200)]
drm/ast: astdp: Clean up EDID reading

Simplify ast_astdp_read_edid(). Rename register constants. Drop
unnecessary error handling. On success, the helper returns 0; an
error code otherwise.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ast: astdp: Perform link training during atomic_enable
Thomas Zimmermann [Wed, 17 Jul 2024 14:24:19 +0000 (16:24 +0200)]
drm/ast: astdp: Perform link training during atomic_enable

The place for link training is in the encoder's atomic_enable
helper. Remove all related tests from other helper ASTDP functions;
especially ast_astdp_is_connected(), which tests HPD status.

DP link training is controlled by the firmware. A status flag reports
success or failure. The process can be fragile on Aspeed hardware. Moving
the test from connector detection to the atomic_enable allows for several
retries and a longer timeout.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ast: astdp: Only test HDP state in ast_astdp_is_connected()
Thomas Zimmermann [Wed, 17 Jul 2024 14:24:18 +0000 (16:24 +0200)]
drm/ast: astdp: Only test HDP state in ast_astdp_is_connected()

The overall control flow of the driver ensures that it never reads
EDID or sets display state on unconnected outputs. Therefore remove
all tests for Hot Plug Detection from these helpers. Also rename
the register constants.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ast: astdp: Test firmware status once during probing
Thomas Zimmermann [Wed, 17 Jul 2024 14:24:17 +0000 (16:24 +0200)]
drm/ast: astdp: Test firmware status once during probing

Test for running ASTDP firmware during probe. Do not bother testing
this later. We cannot do much anyway if the firmware fails. Do not
initialize the ASTDP conenctor if the test fails during device probing.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reported-by: Shixiong Ou <[email protected]>
Tested-by: Shixiong Ou <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agoMAINTAINERS: Add selftests to DMA-BUF HEAPS FRAMEWORK entry
Zenghui Yu [Mon, 29 Jul 2024 08:12:02 +0000 (16:12 +0800)]
MAINTAINERS: Add selftests to DMA-BUF HEAPS FRAMEWORK entry

Include dmabuf-heaps selftests in the correct entry so that updates to it
can be sent to the right place.

Signed-off-by: Zenghui Yu <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm: Add the missing symbol '.'
Shixiong Ou [Mon, 29 Jul 2024 06:57:56 +0000 (14:57 +0800)]
drm: Add the missing symbol '.'

Signed-off-by: Shixiong Ou <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove unused variable ret
Jani Nikula [Mon, 29 Jul 2024 12:36:24 +0000 (15:36 +0300)]
drm/nouveau: remove unused variable ret

Fix build with CONFIG_NOUVEAU_PLATFORM_DRIVER enabled:

../drivers/gpu/drm/nouveau/nouveau_platform.c: In function ‘nouveau_platform_probe’:
../drivers/gpu/drm/nouveau/nouveau_platform.c:29:13: error: unused variable ‘ret’ [-Werror=unused-variable]
   29 |         int ret;
      |             ^~~

Fixes: 961ae5f9807b ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code")
Cc: Ben Skeggs <[email protected]>
Cc: Danilo Krummrich <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agoMerge drm/drm-next into drm-misc-next
Thomas Zimmermann [Mon, 29 Jul 2024 07:35:54 +0000 (09:35 +0200)]
Merge drm/drm-next into drm-misc-next

Backmerging to get a late RC of v6.10 before moving into v6.11.

Signed-off-by: Thomas Zimmermann <[email protected]>
7 months agodrm/gma500: Make I2C terminology more inclusive
Easwar Hariharan [Thu, 11 Jul 2024 05:27:30 +0000 (05:27 +0000)]
drm/gma500: Make I2C terminology more inclusive

I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave"
with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/,
fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that
the approved verbiage exists in the specification.

Acked-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Easwar Hariharan <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/kms: remove push pointer from nv50_dmac
Ben Skeggs [Fri, 26 Jul 2024 04:38:28 +0000 (14:38 +1000)]
drm/nouveau/kms: remove push pointer from nv50_dmac

The struct itself lives in nv50_dmac already, just use that.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/kms: remove a few unused struct members and fn decls
Ben Skeggs [Fri, 26 Jul 2024 04:38:27 +0000 (14:38 +1000)]
drm/nouveau/kms: remove a few unused struct members and fn decls

Left-overs from the past that are completely unused now.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove push pointer from nouveau_channel
Ben Skeggs [Fri, 26 Jul 2024 04:38:26 +0000 (14:38 +1000)]
drm/nouveau: remove push pointer from nouveau_channel

The struct itself lives in nouveau_channel already, just use that.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove master
Ben Skeggs [Fri, 26 Jul 2024 04:38:25 +0000 (14:38 +1000)]
drm/nouveau: remove master

The only remaining nouveau_drm.master struct member that's being used is
the mutex that protects its object tree.  Move that into nouveau_drm and
remove nouveau_drm.master entirely.

A pending series to remove the "ioctl" layer between DRM and NVKM also
removes the need for object handle lookups, and hence this mutex, but
it's still required for the moment.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove chan->drm
Ben Skeggs [Fri, 26 Jul 2024 04:38:24 +0000 (14:38 +1000)]
drm/nouveau: remove chan->drm

The nouveau_cli that owns the channel is now stored in nouveau_chan, and
it has a pointer to the drm device already.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove nouveau_chan.device
Ben Skeggs [Fri, 26 Jul 2024 04:38:23 +0000 (14:38 +1000)]
drm/nouveau: remove nouveau_chan.device

nouveau_chan.device is always the same as nouveau_chan.cli.device,
so there's no need to store it separately.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: pass cli to nouveau_channel_new() instead of drm+device
Ben Skeggs [Fri, 26 Jul 2024 04:38:22 +0000 (14:38 +1000)]
drm/nouveau: pass cli to nouveau_channel_new() instead of drm+device

Both of these are stored in nouveau_cli already, and also allows the
removal of some void casts.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp
Ben Skeggs [Fri, 26 Jul 2024 04:38:21 +0000 (14:38 +1000)]
drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp

Both of these are stored in nouveau_drm already.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: pass drm to nouveau_mem_new(), instead of cli
Ben Skeggs [Fri, 26 Jul 2024 04:38:20 +0000 (14:38 +1000)]
drm/nouveau: pass drm to nouveau_mem_new(), instead of cli

The nouveau_cli pointer is only ever used to eventually access
nouveau_drm, so just store it directly.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: add nvif_mmu to nouveau_drm
Ben Skeggs [Fri, 26 Jul 2024 04:38:19 +0000 (14:38 +1000)]
drm/nouveau: add nvif_mmu to nouveau_drm

This allocates a new nvif_mmu in nouveau_drm, and uses it for TTM
backend memory allocations instead of nouveau_drm.master.mmu,
which is removed by a later commit that removes nouveau_drm.master
entirely.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: move nvxx_* definitions to nouveau_drv.h
Ben Skeggs [Fri, 26 Jul 2024 04:38:18 +0000 (14:38 +1000)]
drm/nouveau: move nvxx_* definitions to nouveau_drv.h

These are some dodgy "convenience" macros for the DRM driver to peek
into NVKM state.  They're still used in a few places, but don't belong
in nvif/device.h in any case.

Move them to nouveau_drv.h, and modify callers to pass a nouveau_drm
instead of an nvif_device.

v2:
- use drm->nvkm pointer for nvxx_*() macros, removing some void*
v3:
- add some explanation of the nvxx_*() macros

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove disp chan rd/wr
Ben Skeggs [Fri, 26 Jul 2024 04:38:17 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove disp chan rd/wr

There's no good reason the ioremap() that results from nvif_object_map()
should fail, so add a check that the map succeeded, and remove the rd/wr
methods from display channel objects.

As this was the last user of rd/wr methods, the nvif plumbing is removed
at the same time.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove device rd/wr
Ben Skeggs [Fri, 26 Jul 2024 04:38:16 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove device rd/wr

The previous commit ensures the device is always mapped, so these
are unneeded.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: always map device
Ben Skeggs [Fri, 26 Jul 2024 04:38:15 +0000 (14:38 +1000)]
drm/nouveau: always map device

The next commit removes the nvif rd/wr methods from nvif_device, which
were probably a bad idea, and mostly intended as a fallback if ioremap()
failed (or wasn't available, as was the case in some tools I once used).

The nv04 KMS driver already mapped the device, because it's mostly been
kept alive on life-support for many years and still directly bashes PRI
a lot for modesetting.

Post-nv50, I tried pretty hard to keep PRI accesses out of the DRM code,
but there's still a few random places where we do, and those were using
the rd/wr paths prior to this commit.

This allocates and maps a new nvif_device (which will replace the usage
of nouveau_drm.master.device later on), and replicates this pointer to
all other possible users.

This will be cleaned up by the end of another patch series, after it's
been made safe to do so.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove device args
Ben Skeggs [Fri, 26 Jul 2024 04:38:14 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove device args

These were once used by used by userspace tools (with nvkm built as a
library), to access multiple GPUs from a single nvif_client.

The DRM code just uses the driver's default device, so remove the
arguments.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove client fini
Ben Skeggs [Fri, 26 Jul 2024 04:38:13 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove client fini

Does nothing.  Remove it.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove client devlist
Ben Skeggs [Fri, 26 Jul 2024 04:38:12 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove client devlist

This was once used by userspace tools (with nvkm built as a library),
but is now unused.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove client version
Ben Skeggs [Fri, 26 Jul 2024 04:38:11 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove client version

This is not, and has never, been used for anything.  Remove it.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove client device arg
Ben Skeggs [Fri, 26 Jul 2024 04:38:10 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove client device arg

This was once used by userspace tools (with nvkm built as a library), as
a way to select a "default device".

The DRM code doesn't need this at all as clients only have access to a
single device already, so inherit the value from its parent.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove driver keep/fini
Ben Skeggs [Fri, 26 Jul 2024 04:38:09 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove driver keep/fini

These are remnants of code long gone.  Remove them.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove nvxx_client()
Ben Skeggs [Fri, 26 Jul 2024 04:38:08 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove nvxx_client()

Make use of nouveau_cli.name instead of nvkm_client.name.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove nvxx_object()
Ben Skeggs [Fri, 26 Jul 2024 04:38:07 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove nvxx_object()

This hasn't been used in a while.

Moves io accessors from nvkm/core/os.h to nvif/os.h at the same time to
fix a compile issue that results from <nvkm/core/object.h> no longer
being included.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove route/token
Ben Skeggs [Fri, 26 Jul 2024 04:38:06 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove route/token

These were a cludge used to prevent userspace's nvif ioctl from
accessing objects created by the kernel for the same client.

That interface was removed in a previous patch, so these are no
longer useful for anything.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvif: remove support for userspace backends
Ben Skeggs [Fri, 26 Jul 2024 04:38:05 +0000 (14:38 +1000)]
drm/nouveau/nvif: remove support for userspace backends

The tools that used libnvkm no longer exist.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvkm: remove nvkm_client_search()
Ben Skeggs [Fri, 26 Jul 2024 04:38:04 +0000 (14:38 +1000)]
drm/nouveau/nvkm: remove nvkm_client_search()

Has been unused for a while now.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvkm: remove perfmon
Ben Skeggs [Fri, 26 Jul 2024 04:38:03 +0000 (14:38 +1000)]
drm/nouveau/nvkm: remove perfmon

This has never really been used for anything, in part due to never
having reclocking stable enough in general to attempt to implement
dynamic clock changes based on load, etc.

To avoid having to rework its interfaces, remove it entirely.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args
Ben Skeggs [Fri, 26 Jul 2024 04:38:02 +0000 (14:38 +1000)]
drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args

All callers now pass "detect=true, mmio=true, subdev_mask=~0ULL",
so remove the function arguments, and associated code.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove abi16->handles
Ben Skeggs [Fri, 26 Jul 2024 04:38:01 +0000 (14:38 +1000)]
drm/nouveau: remove abi16->handles

Hasn't been needed since 2015...

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: remove abi16->device
Ben Skeggs [Fri, 26 Jul 2024 04:38:00 +0000 (14:38 +1000)]
drm/nouveau: remove abi16->device

The previous commit removes the last remnants of userspace's own nvif
instance, so this isn't needed anymore to hide the abi16 objects from
userspace and we can use nouveau_cli.device instead.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: handle limited nvif ioctl in abi16
Ben Skeggs [Fri, 26 Jul 2024 04:37:59 +0000 (14:37 +1000)]
drm/nouveau: handle limited nvif ioctl in abi16

nouveau_usif.c was already stripped right back a couple of years ago,
limiting what userspace could do with it.

A follow-on series removes the nvkm side of these interfaces entirely,
in order to make it less of a nightmare to add/change internal APIs in
the future.

Unfortunately.  Userspace uses some of this.

Fortunately, userspace only ever ended up using a fraction of the APIs,
so those are reimplemened here in a more direct manner, and return
-EINVAL to userspace for everything else.

v2:
- simplified struct nouveau_abi16_obj
- added a couple of comments
v3:
- comment harder

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: add nouveau_cli to nouveau_abi16
Ben Skeggs [Fri, 26 Jul 2024 04:37:58 +0000 (14:37 +1000)]
drm/nouveau: add nouveau_cli to nouveau_abi16

Store a pointer to struct nouveau_cli in struct nouveau_abi16 to
avoid some dubious void casts.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: move allocation of root client out of nouveau_cli_init()
Ben Skeggs [Fri, 26 Jul 2024 04:37:57 +0000 (14:37 +1000)]
drm/nouveau: move allocation of root client out of nouveau_cli_init()

drm->master isn't really a nouveau_cli, and is mostly just used to get
at an nvif_mmu object to implement a hack around issues with the ioctl
interface to nvkm.

Later patches in this series allocate nvif_device/mmu objects in
nouveau_drm directly, removing the need for master.

A pending series to remove the "ioctl" layer between DRM and NVKM
removes the need for the above-mentioned hack entirely.

The only other member of drm->master that's needed is the nvif_client,
and is a dependency of device/mmu.  So the first step is to move its
allocation out of code handling nouveau_cli init.

v2:
- modified slightly due to the addition of tegra/pci cleanup patches
v3:
- move nvif init below drm_dev_alloc() to avoid changing nouveau_name()

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: store nvkm_device pointer in nouveau_drm
Ben Skeggs [Fri, 26 Jul 2024 04:37:56 +0000 (14:37 +1000)]
drm/nouveau: store nvkm_device pointer in nouveau_drm

There's various different places in the drm code that get at the
nvkm_device via various creative (and not very type-safe) means.

One of those being via nvif_device.object.priv.

Another patch series is going to entirely remove the ioctl-like
interfaces beween the drm code and nvkm, and that field will no
longer exist.

This provides a safer replacement for accessing the nvkm_device,
and will used more in upcoming patches to cleanup other cases.

v2:
- fixup printk macros to not oops if used before client ctor

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: create pci device once
Ben Skeggs [Fri, 26 Jul 2024 04:37:55 +0000 (14:37 +1000)]
drm/nouveau: create pci device once

HW isn't touched anymore (aside from detection) until the first
nvif_device has been allocated, so we no longer need a separate
probe-only step before kicking efifb (etc) off the HW.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: replace drm_device* with nouveau_drm* as dev drvdata
Ben Skeggs [Fri, 26 Jul 2024 04:37:54 +0000 (14:37 +1000)]
drm/nouveau: replace drm_device* with nouveau_drm* as dev drvdata

We almost always want to cast the pointer from dev_get_drvdata() to
'struct nouveau_drm *', so just directly store that pointer instead,
simplifying callers, and fixing some clumsy naming of dev/drm_dev
variables at the same time.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code
Ben Skeggs [Fri, 26 Jul 2024 04:37:53 +0000 (14:37 +1000)]
drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code

Unify some more of the PCI/Tegra DRM driver init, both as a general
cleanup, and because a subsequent commit changes the pointer stored
via dev_set_drvdata(), and this allows the change to be made in one
place.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/nouveau: move nouveau_drm_device_fini() above init()
Ben Skeggs [Fri, 26 Jul 2024 04:37:52 +0000 (14:37 +1000)]
drm/nouveau: move nouveau_drm_device_fini() above init()

The next commit wants to be able to call fini() from an init() failure
path to remove the need to duplicate a bunch of cleanup.

Moving fini() above init() avoids the need for a forward-declaration.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/vblank: add dynamic per-crtc vblank configuration support
Hamza Mahfooz [Thu, 25 Jul 2024 20:51:08 +0000 (16:51 -0400)]
drm/vblank: add dynamic per-crtc vblank configuration support

We would like to be able to enable vblank_disable_immediate
unconditionally, however there are a handful of cases where a small off
delay is necessary (e.g. with PSR enabled). So, we would like to be able
to adjust the vblank off delay and disable imminent values dynamically
for a given CRTC. Since, it will allow drivers to apply static screen
optimizations more quickly and consequently allow users to benefit more
so from the power savings afforded by the aforementioned optimizations,
while avoiding issues in cases where an off delay is still warranted.
In particular, the PSR case requires a small off delay of 2 frames,
otherwise display firmware isn't able to keep up with all of the
requests made to amdgpu. So, introduce drm_crtc_vblank_on_config() which
is like drm_crtc_vblank_on(), but it allows drivers to specify the
vblank CRTC configuration before enabling vblanking support for a given
CRTC.

Signed-off-by: Hamza Mahfooz <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/panel-edp: Add CSW MNB601LS1-4
Haikun Zhou [Thu, 25 Jul 2024 11:52:29 +0000 (19:52 +0800)]
drm/panel-edp: Add CSW MNB601LS1-4

Add support for the CSW MNB601LS1-4, pleace the EDID here for
subsequent reference.
00 ff ff ff ff ff ff 00 0e 77 04 11 00 00 00 00
00 22 01 04 a5 1a 0e 78 03 a1 35 9b 5e 58 91 25
1c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 09 1e 56 dc 50 00 28 30 30 20
36 00 00 90 10 00 00 1a 00 00 00 fd 00 28 3c 30
30 08 01 0a 20 20 20 20 20 20 00 00 00 fe 00 43
53 4f 54 20 54 39 0a 20 20 20 20 20 00 00 00 fe
00 4d 4e 42 36 30 31 4c 53 31 2d 34 0a 20 00 20

Signed-off-by: Haikun Zhou <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240725115229.3416028-1-zhouhaikun5@huaqin.corp-partner.google.com
7 months agoaccel/qaic: Remove the description of DRM_IOCTL_QAIC_PART_DEV
Zenghui Yu [Tue, 16 Jul 2024 07:30:36 +0000 (15:30 +0800)]
accel/qaic: Remove the description of DRM_IOCTL_QAIC_PART_DEV

The partition device ioctl was removed during the development of the
initial version of qaic driver. Remove its description from the
documentation to avoid confusing readers.

Signed-off-by: Zenghui Yu <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jeffrey Hugo <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/ci: update link to Gitlab server
Deborah Brouwer [Wed, 17 Jul 2024 23:52:21 +0000 (16:52 -0700)]
drm/ci: update link to Gitlab server

Before building an image, the build script looks to see if there are fixes
to apply from an upstream repository. The link for the upstream repository
git://anongit.freedesktop.org/drm/drm became obsolete with the move to
Gitlab server in March 2024. Until recently, this obsolete link was
harmless because anongit would at least respond that there were no such
fixes available. In the last few days anongit has stopped responding to
requests causing the build script to hang indefinitely.

Update the link from anongit to the Gitlab server to prevent the build
script from hanging indefinitely.

Signed-off-by: Deborah Brouwer <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agoMerge tag 'amd-drm-fixes-6.11-2024-07-25' of https://gitlab.freedesktop.org/agd5f...
Dave Airlie [Thu, 25 Jul 2024 23:51:59 +0000 (09:51 +1000)]
Merge tag 'amd-drm-fixes-6.11-2024-07-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-next

amd-drm-fixes-6.11-2024-07-25:

amdgpu:
- SDMA 5.2 workaround
- GFX12 fixes
- Uninitialized variable fix
- VCN/JPEG 4.0.3 fixes
- Misc display fixes
- RAS fixes
- VCN4/5 harvest fix
- GPU reset fix

Signed-off-by: Dave Airlie <[email protected]>
From: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agoMerge tag 'drm-misc-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm...
Dave Airlie [Thu, 25 Jul 2024 23:51:10 +0000 (09:51 +1000)]
Merge tag 'drm-misc-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

A single fix for a panel compatible

Signed-off-by: Dave Airlie <[email protected]>
From: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240725-frisky-wren-of-tact-f5f504@houat
7 months agoMerge tag 'drm-intel-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm...
Dave Airlie [Thu, 25 Jul 2024 20:41:02 +0000 (06:41 +1000)]
Merge tag 'drm-intel-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

- Do not consider preemption during execlists_dequeue for gen8 [gt] (Nitin Gote)
- Allow NULL memory region (Jonathan Cavitt)

Signed-off-by: Dave Airlie <[email protected]>
From: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/ZqICQzyzm/6hDWy4@linux
7 months agodrm/panel: nt36672e: Break some CMDS into helper functions
Cong Yang [Wed, 10 Jul 2024 08:47:14 +0000 (16:47 +0800)]
drm/panel: nt36672e: Break some CMDS into helper functions

Break select page cmds and reload cmds into helper functions.

Signed-off-by: Cong Yang <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/20240710084715.1119935-4-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240710084715.1119935-4-yangcong5@huaqin.corp-partner.google.com
7 months agodrm/panel: nt35521: Break some CMDS into helper functions
Cong Yang [Wed, 10 Jul 2024 08:47:13 +0000 (16:47 +0800)]
drm/panel: nt35521: Break some CMDS into helper functions

Break select page cmds into helper functions.

Signed-off-by: Cong Yang <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/20240710084715.1119935-3-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240710084715.1119935-3-yangcong5@huaqin.corp-partner.google.com
7 months agodrm/panel: boe-tv101wum-nl6: Break some CMDS into helper functions
Cong Yang [Wed, 10 Jul 2024 08:47:12 +0000 (16:47 +0800)]
drm/panel: boe-tv101wum-nl6: Break some CMDS into helper functions

hj110iz-01a and tv110c9m-ll3 both nt36523 controller, and they have
some common cmds, so let's break them into helper functions.

Signed-off-by: Cong Yang <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/20240710084715.1119935-2-yangcong5@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240710084715.1119935-2-yangcong5@huaqin.corp-partner.google.com
7 months agodrm/test: use kunit action wrapper macro in the gem shmem test suite
Marco Pagani [Tue, 23 Jul 2024 19:10:35 +0000 (21:10 +0200)]
drm/test: use kunit action wrapper macro in the gem shmem test suite

Replace deferred action function wrappers with equivalent ones defined
using the macro introduced by commit 56778b49c9a2 ("kunit: Add a macro to
wrap a deferred action function")

Signed-off-by: Marco Pagani <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/scheduler: remove full_recover from drm_sched_start
Christian König [Fri, 19 Jul 2024 15:24:14 +0000 (17:24 +0200)]
drm/scheduler: remove full_recover from drm_sched_start

This was basically just another one of amdgpus hacks. The parameter
allowed to restart the scheduler without turning fence signaling on
again.

That this is absolutely not a good idea should be obvious by now since
the fences will then just sit there and never signal.

While at it cleanup the code a bit.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/bridge: it6505: Disable IRQ when powered off
Pin-yen Lin [Fri, 19 Jul 2024 11:05:36 +0000 (19:05 +0800)]
drm/bridge: it6505: Disable IRQ when powered off

When the bridge is powered off, disable the IRQ until the next power on
to workaround an interrupt storm on some badly-designed hardware.

Signed-off-by: Pin-yen Lin <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
7 months agodrm/amdgpu: reset vm state machine after gpu reset(vram lost)
ZhenGuo Yin [Fri, 19 Jul 2024 08:10:40 +0000 (16:10 +0800)]
drm/amdgpu: reset vm state machine after gpu reset(vram lost)

[Why]
Page table of compute VM in the VRAM will lost after gpu reset.
VRAM won't be restored since compute VM has no shadows.

[How]
Use higher 32-bit of vm->generation to record a vram_lost_counter.
Reset the VM state machine when vm->genertaion is not equal to
the new generation token.

v2: Check vm->generation instead of calling drm_sched_entity_error
in amdgpu_vm_validate.
v3: Use new generation token instead of vram_lost_counter for check.

Signed-off-by: ZhenGuo Yin <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
(cherry picked from commit 47c0388b0589cb481c294dcb857d25a214c46eb3)

7 months agodrm/amdgpu: add missed harvest check for VCN IP v4/v5
Tim Huang [Tue, 23 Jul 2024 08:54:34 +0000 (16:54 +0800)]
drm/amdgpu: add missed harvest check for VCN IP v4/v5

To prevent below probe failure, add a check for models with VCN
IP v4.0.6 where VCN1 may be harvested.

v2:
Apply the same check to VCN IP v4.0 and v5.0.

[   54.070117] RIP: 0010:vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu]
[   54.071055] Code: 80 fb ff 8d 82 00 80 fe ff 81 fe 00 06 00 00 0f 43
c2 49 69 d5 38 0d 00 00 48 8d 71 04 c1 e8 02 4c 01 f2 48 89 b2 50 f6 02
00 <89> 01 48 8b 82 50 f6 02 00 48 8d 48 04 48 89 8a 50 f6 02 00 c7 00
[   54.072408] RSP: 0018:ffffb17985f736f8 EFLAGS: 00010286
[   54.072793] RAX: 00000000000000d6 RBX: ffff99a82f680000 RCX:
0000000000000000
[   54.073315] RDX: ffff99a82f680000 RSI: 0000000000000004 RDI:
ffff99a82f680000
[   54.073835] RBP: ffffb17985f73730 R08: 0000000000000001 R09:
0000000000000000
[   54.074353] R10: 0000000000000008 R11: ffffb17983c05000 R12:
0000000000000000
[   54.074879] R13: 0000000000000000 R14: ffff99a82f680000 R15:
0000000000000001
[   54.075400] FS:  00007f8d9c79a000(0000) GS:ffff99ab2f140000(0000)
knlGS:0000000000000000
[   54.075988] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   54.076408] CR2: 0000000000000000 CR3: 0000000140c3a000 CR4:
0000000000750ef0
[   54.076927] PKRU: 55555554
[   54.077132] Call Trace:
[   54.077319]  <TASK>
[   54.077484]  ? show_regs+0x69/0x80
[   54.077747]  ? __die+0x28/0x70
[   54.077979]  ? page_fault_oops+0x180/0x4b0
[   54.078286]  ? do_user_addr_fault+0x2d2/0x680
[   54.078610]  ? exc_page_fault+0x84/0x190
[   54.078910]  ? asm_exc_page_fault+0x2b/0x30
[   54.079224]  ? vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu]
[   54.079941]  ? vcn_v4_0_5_start_dpg_mode+0xe6/0x36b0 [amdgpu]
[   54.080617]  vcn_v4_0_5_set_powergating_state+0x82/0x19b0 [amdgpu]
[   54.081316]  amdgpu_device_ip_set_powergating_state+0x64/0xc0
[amdgpu]
[   54.082057]  amdgpu_vcn_ring_begin_use+0x6f/0x1d0 [amdgpu]
[   54.082727]  amdgpu_ring_alloc+0x44/0x70 [amdgpu]
[   54.083351]  amdgpu_vcn_dec_sw_ring_test_ring+0x40/0x110 [amdgpu]
[   54.084054]  amdgpu_ring_test_helper+0x22/0x90 [amdgpu]
[   54.084698]  vcn_v4_0_5_hw_init+0x87/0xc0 [amdgpu]
[   54.085307]  amdgpu_device_init+0x1f96/0x2780 [amdgpu]
[   54.085951]  amdgpu_driver_load_kms+0x1e/0xc0 [amdgpu]
[   54.086591]  amdgpu_pci_probe+0x19f/0x550 [amdgpu]
[   54.087215]  local_pci_probe+0x48/0xa0
[   54.087509]  pci_device_probe+0xc9/0x250
[   54.087812]  really_probe+0x1a4/0x3f0
[   54.088101]  __driver_probe_device+0x7d/0x170
[   54.088443]  driver_probe_device+0x24/0xa0
[   54.088765]  __driver_attach+0xdd/0x1d0
[   54.089068]  ? __pfx___driver_attach+0x10/0x10
[   54.089417]  bus_for_each_dev+0x8e/0xe0
[   54.089718]  driver_attach+0x22/0x30
[   54.090000]  bus_add_driver+0x120/0x220
[   54.090303]  driver_register+0x62/0x120
[   54.090606]  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu]
[   54.091255]  __pci_register_driver+0x62/0x70
[   54.091593]  amdgpu_init+0x67/0xff0 [amdgpu]
[   54.092190]  do_one_initcall+0x5f/0x330
[   54.092495]  do_init_module+0x68/0x240
[   54.092794]  load_module+0x201c/0x2110
[   54.093093]  init_module_from_file+0x97/0xd0
[   54.093428]  ? init_module_from_file+0x97/0xd0
[   54.093777]  idempotent_init_module+0x11c/0x2a0
[   54.094134]  __x64_sys_finit_module+0x64/0xc0
[   54.094476]  do_syscall_64+0x58/0x120
[   54.094767]  entry_SYSCALL_64_after_hwframe+0x6e/0x76

Signed-off-by: Tim Huang <[email protected]>
Reviewed-by: Saleemkhan Jamadar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
(cherry picked from commit 0b071245ddd98539d4f7493bdd188417fcf2d629)

7 months agodrm/amdgpu: Fix eeprom max record count
Stanley.Yang [Thu, 18 Jul 2024 02:58:04 +0000 (10:58 +0800)]
drm/amdgpu: Fix eeprom max record count

The eeprom table is empty before initializing,
set eeprom table version first before initializing.

Changed from V1:
Reuse amdgpu_ras_set_eeprom_table_version function

Signed-off-by: Stanley.Yang <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 015b8a2fdf39a4c288ff24e7b715b8d9198e56dc)

7 months agodrm/amdgpu: fix ras UE error injection failure issue
YiPeng Chai [Fri, 19 Jul 2024 12:43:04 +0000 (20:43 +0800)]
drm/amdgpu: fix ras UE error injection failure issue

The ras command shared memory is allocated from
VRAM and the response status of the command
buffer will not be zero due to gpu being in
fatal error state after ras UE error injection.

Signed-off-by: YiPeng Chai <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 8284951a6e79c6806c675e5f68a4cd425dd56bc4)

7 months agodrm/amd/display: Remove ASSERT if significance is zero in math_ceil2
Rodrigo Siqueira [Thu, 4 Jul 2024 17:54:34 +0000 (11:54 -0600)]
drm/amd/display: Remove ASSERT if significance is zero in math_ceil2

In the DML math_ceil2 function, there is one ASSERT if the significance
is equal to zero. However, significance might be equal to zero
sometimes, and this is not an issue for a ceil function, but the current
ASSERT will trigger warnings in those cases. This commit removes the
ASSERT if the significance is equal to zero to avoid unnecessary noise.

Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Reviewed-by: Chaitanya Dhere <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 332315885d3ccc6d8fe99700f3c2e4c24aa65ab7)

7 months agodrm/amd/display: Check for NULL pointer
Sung Joon Kim [Mon, 8 Jul 2024 23:29:49 +0000 (19:29 -0400)]
drm/amd/display: Check for NULL pointer

[why & how]
Need to make sure plane_state is initialized
before accessing its members.

Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Reviewed-by: Xi (Alex) Liu <[email protected]>
Signed-off-by: Sung Joon Kim <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 295d91cbc700651782a60572f83c24861607b648)

7 months agodrm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF
Jane Jian [Mon, 15 Jul 2024 10:48:31 +0000 (18:48 +0800)]
drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF

For VCN/JPEG 4.0.3, use only the local addressing scheme.

- Mask bit higher than AID0 range

v2
remain the case for mmhub use master XCC

Signed-off-by: Jane Jian <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit caaf576292f8ccef5cdc0ac16e77b87dbf6e17ab)

7 months agodrm/amdgpu: Add empty HDP flush function to VCN v4.0.3
Lijo Lazar [Mon, 11 Dec 2023 05:48:42 +0000 (11:18 +0530)]
drm/amdgpu: Add empty HDP flush function to VCN v4.0.3

VCN 4.0.3 does not HDP flush with RRMT enabled. Instead, mmsch
will do the HDP flush.

This change is necessary for VCN v4.0.3, no need for backward compatibility

Signed-off-by: Lijo Lazar <[email protected]>
Signed-off-by: Jane Jian <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 49cfaebe48e97500a68d5322a8194736b0a2c3cf)

7 months agodrm/amdgpu: Add empty HDP flush function to JPEG v4.0.3
Lijo Lazar [Mon, 11 Dec 2023 05:15:38 +0000 (10:45 +0530)]
drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead,
mmsch fw will do the flush.

This change is necessary for JPEG v4.0.3, no need for backward compatibility

Signed-off-by: Lijo Lazar <[email protected]>
Signed-off-by: Jane Jian <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 585e3fdb36f59c5cfed0ae06c852dc1df22b1d60)

7 months agodrm/amd/amdgpu: Fix uninitialized variable warnings
Ma Ke [Thu, 18 Jul 2024 14:17:35 +0000 (22:17 +0800)]
drm/amd/amdgpu: Fix uninitialized variable warnings

Return 0 to avoid returning an uninitialized variable r.

Cc: [email protected]
Fixes: 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10")
Signed-off-by: Ma Ke <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 6472de66c0aa18d50a4b5ca85f8272e88a737676)

7 months agodrm/amdgpu: Fix atomics on GFX12
David Belanger [Mon, 10 Jun 2024 20:38:55 +0000 (16:38 -0400)]
drm/amdgpu: Fix atomics on GFX12

If PCIe supports atomics, configure register to prevent DF from
breaking atomics in separate load/store operations.

Signed-off-by: David Belanger <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 666f14cab21b17ccc1bdfe1e82458aa429b3b7e0)

7 months agodrm/amdgpu/sdma5.2: Update wptr registers as well as doorbell
Alex Deucher [Tue, 9 Jul 2024 21:54:11 +0000 (17:54 -0400)]
drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell

We seem to have a case where SDMA will sometimes miss a doorbell
if GFX is entering the powergating state when the doorbell comes in.
To workaround this, we can update the wptr via MMIO, however,
this is only safe because we disallow gfxoff in begin_ring() for
SDMA 5.2 and then allow it again in end_ring().

Enable this workaround while we are root causing the issue with
the HW team.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/3440
Tested-by: Friedrich Vock <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
(cherry picked from commit f2ac52634963fc38e4935e11077b6f7854e5d700)

This page took 0.110629 seconds and 4 git commands to generate.