Jocelyn Falempe
5d45c01dea
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 <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-6-jfalempe@redhat.com
2024-08-12 10:15:45 +02:00
Jocelyn Falempe
d27a14060f
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 <daniel.vetter@ffwll.ch >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-4-jfalempe@redhat.com
2024-08-12 10:14:10 +02:00
Jocelyn Falempe
6d470f9b8c
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 <daniel.vetter@ffwll.ch >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-3-jfalempe@redhat.com
2024-08-12 10:14:09 +02:00
Jocelyn Falempe
cae39e60ab
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 <diego.viola@gmail.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240807134902.458669-2-jfalempe@redhat.com
2024-08-12 10:14:09 +02:00
Thomas Zimmermann
219b45d023
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240805130622.63458-6-tzimmermann@suse.de
2024-08-09 08:13:48 +02:00
Thomas Zimmermann
0f9ff361ad
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240805130622.63458-5-tzimmermann@suse.de
2024-08-09 08:13:47 +02:00
Thomas Zimmermann
9d09cac47d
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240805130622.63458-4-tzimmermann@suse.de
2024-08-09 08:13:47 +02:00
Thomas Zimmermann
dc06efbb79
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240805130622.63458-3-tzimmermann@suse.de
2024-08-09 08:13:46 +02:00
Thomas Zimmermann
f551072660
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240805130622.63458-2-tzimmermann@suse.de
2024-08-09 08:13:45 +02:00
José Expósito
17419a5c8c
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 <tzimmermann@suse.de >
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com >
Acked-by: Maíra Canal <mcanal@igalia.com >
Signed-off-by: José Expósito <jose.exposito89@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240716161725.41408-2-jose.exposito89@gmail.com
2024-08-08 10:04:13 +02:00
Kuninori Morimoto
f7f3ddb6e5
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 <kuninori.morimoto.gx@renesas.com >
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/87jzh3lnts.wl-kuninori.morimoto.gx@renesas.com
2024-08-07 10:17:28 +03:00
Vignesh Raman
16c9898ac5
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-7-vignesh.raman@collabora.com
2024-08-06 11:20:58 -03:00
Vignesh Raman
a0ac33cb9a
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-6-vignesh.raman@collabora.com
2024-08-06 11:20:54 -03:00
Vignesh Raman
d7683c4963
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-5-vignesh.raman@collabora.com
2024-08-06 11:20:50 -03:00
Vignesh Raman
7583099958
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-4-vignesh.raman@collabora.com
2024-08-06 11:20:46 -03:00
Vignesh Raman
0b8778af8b
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-3-vignesh.raman@collabora.com
2024-08-06 11:20:41 -03:00
Vignesh Raman
68914b7c4d
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 <helen.koike@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240730021545.912271-2-vignesh.raman@collabora.com
2024-08-06 11:19:11 -03:00
Dmitry Baryshkov
7b6cf6c750
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 <dmitry.baryshkov@linaro.org >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240701-lt9611uxc-next-bridge-v1-2-665bce5fdaaa@linaro.org
2024-08-06 15:21:49 +02:00
Dmitry Baryshkov
7c5537cee9
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 <dmitry.baryshkov@linaro.org >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240701-lt9611uxc-next-bridge-v1-1-665bce5fdaaa@linaro.org
2024-08-06 15:21:48 +02:00
José Expósito
a99aff2608
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 <jose.exposito89@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240804170551.33971-2-jose.exposito89@gmail.com
2024-08-05 20:02:40 +02:00
Terry Hsiao
21e97d3ca8
drm/panel-edp: Fix HKC MB116AN01 name
...
Rename HKC MB116AN01 from Unknown to MB116AN01
Signed-off-by: Terry Hsiao <terry_hsiao@compal.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240802070602.154201-1-terry_hsiao@compal.corp-partner.google.com
2024-08-02 08:35:24 -07:00
Hamza Mahfooz
717b432b6d
Revert "drm/amd: Add power_saving_policy drm property to eDP connectors"
...
This reverts commit 9d8c094dda .
It was merged without meeting userspace requirements.
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240802145946.48073-2-hamza.mahfooz@amd.com
2024-08-02 11:29:17 -04:00
Hamza Mahfooz
b6b242d019
Revert "drm: Introduce 'power saving policy' drm property"
...
This reverts commit 76299a557f .
It was merged without meeting userspace requirements.
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240802145946.48073-1-hamza.mahfooz@amd.com
2024-08-02 11:28:53 -04:00
Christoph Fritz
d97e71e449
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 <chf.fritz@googlemail.com >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/6a7293bd06942131161c5a7b7878c51cfbbb807e.camel@googlemail.com
2024-08-01 13:34:18 +02:00
Christian König
bb99c51bda
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 <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Sui Jingfeng <suijingfeng@loongson.cn >
Link: https://patchwork.freedesktop.org/patch/msgid/20240723121750.2086-3-christian.koenig@amd.com
2024-08-01 10:03:44 +02:00
Thomas Zimmermann
6c9e14ee9f
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 <tzimmermann@suse.de >
Fixes: 89c6ea2006 ("drm/mgag200: Add vblank support")
Fixes: d5070c9b29 ("drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jocelyn Falempe <jfalempe@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Dave Airlie <airlied@redhat.com >
Cc: dri-devel@lists.freedesktop.org
Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240731071004.519566-1-tzimmermann@suse.de
2024-08-01 08:33:24 +02:00
Thomas Zimmermann
2000ddac9b
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-6-tzimmermann@suse.de
2024-07-30 12:15:37 +02:00
Thomas Zimmermann
2281475168
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-5-tzimmermann@suse.de
2024-07-30 12:15:37 +02:00
Thomas Zimmermann
cbacb1b744
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 <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-4-tzimmermann@suse.de
2024-07-30 12:15:37 +02:00
Thomas Zimmermann
c91d75a3c6
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 <tzimmermann@suse.de >
Reported-by: Shixiong Ou <oushixiong@kylinos.cn >
Tested-by: Shixiong Ou <oushixiong@kylinos.cn >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-3-tzimmermann@suse.de
2024-07-30 12:15:37 +02:00
Shixiong Ou
250ac9ee60
drm: Add the missing symbol '.'
...
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240729065756.123788-1-oushixiong1025@163.com
2024-07-30 10:38:22 +02:00
Jani Nikula
a6ed988ecd
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: 961ae5f980 ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code")
Cc: Ben Skeggs <bskeggs@nvidia.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240729123624.868907-1-jani.nikula@intel.com
2024-07-29 15:04:16 +02:00
Thomas Zimmermann
0e8655b4e8
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 <tzimmermann@suse.de >
2024-07-29 09:35:54 +02:00
Easwar Hariharan
0c3f3a83c7
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 <tzimmermann@suse.de >
Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240711052734.1273652-3-eahariha@linux.microsoft.com
2024-07-29 09:12:07 +02:00
Ben Skeggs
61671d85de
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-38-bskeggs@nvidia.com
2024-07-27 03:05:51 +02:00
Ben Skeggs
723388bc0f
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-37-bskeggs@nvidia.com
2024-07-27 03:05:51 +02:00
Ben Skeggs
0df26c0d69
drm/nouveau: remove push pointer from nouveau_channel
...
The struct itself lives in nouveau_channel already, just use that.
Signed-off-by: Ben Skeggs <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-36-bskeggs@nvidia.com
2024-07-27 03:05:49 +02:00
Ben Skeggs
034142a303
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-35-bskeggs@nvidia.com
2024-07-27 03:05:48 +02:00
Ben Skeggs
3543e84e20
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-34-bskeggs@nvidia.com
2024-07-27 03:05:47 +02:00
Ben Skeggs
2eb58f22e2
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-33-bskeggs@nvidia.com
2024-07-27 03:05:46 +02:00
Ben Skeggs
5cca41ac70
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-32-bskeggs@nvidia.com
2024-07-27 03:05:43 +02:00
Ben Skeggs
3019023ec9
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-31-bskeggs@nvidia.com
2024-07-27 03:05:42 +02:00
Ben Skeggs
0fa0955acd
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-30-bskeggs@nvidia.com
2024-07-27 03:05:41 +02:00
Ben Skeggs
c6bf82d426
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-29-bskeggs@nvidia.com
2024-07-27 03:05:41 +02:00
Ben Skeggs
6901f1d647
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-28-bskeggs@nvidia.com
2024-07-27 03:05:38 +02:00
Ben Skeggs
8d7b2d3a7e
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-27-bskeggs@nvidia.com
2024-07-27 03:05:37 +02:00
Ben Skeggs
216c3c4424
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-26-bskeggs@nvidia.com
2024-07-27 03:05:36 +02:00
Ben Skeggs
cced63c3dd
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-25-bskeggs@nvidia.com
2024-07-27 03:05:35 +02:00
Ben Skeggs
fabc65d163
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 <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-24-bskeggs@nvidia.com
2024-07-27 03:05:35 +02:00
Ben Skeggs
246b228eb9
drm/nouveau/nvif: remove client fini
...
Does nothing. Remove it.
Signed-off-by: Ben Skeggs <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-23-bskeggs@nvidia.com
2024-07-27 03:05:34 +02:00