aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-21drm/ssd130x: Call drm_atomic_helper_shutdown() at remove timeDouglas Anderson1-0/+1
Based on grepping through the source code, this driver appears to be missing a call to drm_atomic_helper_shutdown() at remove time. Let's add it. The fact that we should call drm_atomic_helper_shutdown() in the case of OS driver remove comes straight out of the kernel doc "driver instance overview" in drm_drv.c. Suggested-by: Maxime Ripard <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.4.I4752a39ad9f8fd08b32c2b78a8a3e40491bfb5eb@changeid
2023-09-21drm/vc4: Call drm_atomic_helper_shutdown() at shutdown timeDouglas Anderson1-13/+23
Based on grepping through the source code these drivers appear to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c. Suggested-by: Maxime Ripard <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.3.I10dbe099fb1059d304ba847d19fc45054f7ffe9f@changeid
2023-09-21drm: Call drm_atomic_helper_shutdown() at shutdown time for misc driversDouglas Anderson19-0/+125
Based on grepping through the source code these drivers appear to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c. All of the drivers in this patch were fairly straightforward to fix since they already had a call to drm_atomic_helper_shutdown() at remove/unbind time but were just lacking one at system shutdown. The only hitch is that some of these drivers use the component model to register/unregister their DRM devices. The shutdown callback is part of the original device. The typical solution here, based on how other DRM drivers do this, is to keep track of whether the device is bound based on drvdata. In most cases the drvdata is the drm_device, so we can just make sure it is NULL when the device is not bound. In some drivers, this required minor code changes. To make things simpler, drm_atomic_helper_shutdown() has been modified to consider a NULL drm_device as a noop in the patch ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop"). Suggested-by: Maxime Ripard <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Acked-by: Maxime Ripard <[email protected]> Tested-by: Jernej Skrabec <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid
2023-09-21drm/armada: Call drm_atomic_helper_shutdown() at shutdown timeDouglas Anderson1-0/+8
Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c. This driver was fairly easy to update. The drm_device is stored in the drvdata so we just have to make sure the drvdata is NULL whenever the device is not bound. To make things simpler, drm_atomic_helper_shutdown() has been modified to consider a NULL drm_device as a noop in the patch ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop"). Suggested-by: Maxime Ripard <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230901164111.RFT.1.I3d5598bd73a59b5ded71430736c93f67dc5dea61@changeid
2023-09-21MAINTAINERS: Update gma500 git repoMaxime Ripard1-1/+1
The GMA500 driver has been handled through drm-misc for a while but the git repo hasn't been updated. Make sure it points to the right place. Acked-by: Patrik Jakobsson <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: panel: Fix device link for DRM_BRIDGE_ATTACH_NO_CONNECTORAngeloGioacchino Del Regno1-8/+9
When external bridges are attached with DRM_BRIDGE_ATTACH_NO_CONNECTOR, the panel bridge may also get the same flag, but in the .attach() callback for the panel bridge a device link is added only when this flag is not present; To make things worse, the .detach() callback tries to delete the device link unconditionally and without checking if it was created in the first place, crashing the kernel with a NULL pointer kernel panic upon calling panel_bridge_detach(). Fix that by moving the device_link_add() call before checking if the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag is present. Fixes: 199cf07ebd2b ("drm/bridge: panel: Add a device link between drm device and panel device") Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Liu Ying <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm: Update file owner during useTvrtko Ursulin8-15/+71
With the typical model where the display server opens the file descriptor and then hands it over to the client(*), we were showing stale data in debugfs. Fix it by updating the drm_file->pid on ioctl access from a different process. The field is also made RCU protected to allow for lockless readers. Update side is protected with dev->filelist_mutex. Before: $ cat /sys/kernel/debug/dri/0/clients command pid dev master a uid magic Xorg 2344 0 y y 0 0 Xorg 2344 0 n y 0 2 Xorg 2344 0 n y 0 3 Xorg 2344 0 n y 0 4 After: $ cat /sys/kernel/debug/dri/0/clients command tgid dev master a uid magic Xorg 830 0 y y 0 0 xfce4-session 880 0 n y 0 1 xfwm4 943 0 n y 0 2 neverball 1095 0 n y 0 3 *) More detailed and historically accurate description of various handover implementation kindly provided by Emil Velikov: """ The traditional model, the server was the orchestrator managing the primary device node. From the fd, to the master status and authentication. But looking at the fd alone, this has varied across the years. IIRC in the DRI1 days, Xorg (libdrm really) would have a list of open fd(s) and reuse those whenever needed, DRI2 the client was responsible for open() themselves and with DRI3 the fd was passed to the client. Around the inception of DRI3 and systemd-logind, the latter became another possible orchestrator. Whereby Xorg and Wayland compositors could ask it for the fd. For various reasons (hysterical and genuine ones) Xorg has a fallback path going the open(), whereas Wayland compositors are moving to solely relying on logind... some never had fallback even. Over the past few years, more projects have emerged which provide functionality similar (be that on API level, Dbus, or otherwise) to systemd-logind. """ v2: * Fixed typo in commit text and added a fine historical explanation from Emil. Signed-off-by: Tvrtko Ursulin <[email protected]> Cc: "Christian König" <[email protected]> Cc: Daniel Vetter <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Tested-by: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2023-09-20drm/bridge: tc358768: Attempt to fix DSI horizontal timingsTomi Valkeinen1-28/+185
The DSI horizontal timing calculations done by the driver seem to often lead to underflows or overflows, depending on the videomode. There are two main things the current driver doesn't seem to get right: DSI HSW and HFP, and VSDly. However, even following Toshiba's documentation it seems we don't always get a working display. This patch attempts to fix the horizontal timings for DSI event mode, and on a system with a DSI->HDMI encoder, a lot of standard HDMI modes now seem to work. The work relies on Toshiba's documentation, but also quite a bit on empirical testing. This also adds timing related debug prints to make it easier to improve on this later. The DSI pulse mode has only been tested with a fixed-resolution panel, which limits the testing of different modes on DSI pulse mode. However, as the VSDly calculation also affects pulse mode, so this might cause a regression. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Marcel Ziswiler <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Fix tc358768_ns_to_cnt()Tomi Valkeinen1-1/+1
The tc358768_ns_to_cnt() is, most likely, supposed to do a div-round-up operation, but it misses subtracting one from the dividend. Fix this by just using DIV_ROUND_UP(). Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Clean up clock period codeTomi Valkeinen1-31/+29
The driver defines TC358768_PRECISION as 1000, and uses "nsk" to refer to clock periods. The original author does not remember where all this came from. Effectively the driver is using picoseconds as the unit for clock periods, yet referring to them by "nsk". Clean this up by just saying the periods are in picoseconds. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Rename dsibclk to hsbyteclkTomi Valkeinen1-24/+24
The Toshiba documentation talks about HSByteClk when referring to the DSI HS byte clock, whereas the driver uses 'dsibclk' name. Also, in a few places the driver calculates the byte clock from the DSI clock, even if the byte clock is already available in a variable. To align the driver with the documentation, change the 'dsibclk' variable to 'hsbyteclk'. This also make it easier to visually separate 'dsibclk' and 'dsiclk' variables. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Use dev for dbg prints, not priv->devTomi Valkeinen1-20/+21
Simplify the code by capturing the priv->dev value to dev variable, and use it. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Print logical values, not raw register valuesTomi Valkeinen1-9/+12
The driver debug prints DSI related timings as raw register values in hex. It is much more useful to see the "logical" value of the timing, not the register value. Change the prints to print the values separately, in case a single register contains multiple values, and use %u to have it in a more human consumable form. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Use struct videomodeTomi Valkeinen1-21/+24
The TC358768 documentation uses HFP, HBP, etc. values to deal with the video mode, while the driver currently uses the DRM display mode (htotal, hsync_start, etc). Change the driver to convert the DRM display mode to struct videomode, which then allows us to use the same units the documentation uses. This makes it much easier to work on the code when using the TC358768 documentation as a reference. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Cleanup PLL calculationsTomi Valkeinen1-7/+7
As is quite common, some of TC358768's PLL register fields are to be programmed with (value - 1). Specifically, the FBD and PRD, multiplier and divider, are such fields. However, what the driver currently does is that it considers that the formula used for PLL rate calculation is: RefClk * [(FBD + 1)/ (PRD + 1)] * [1 / (2^FRS)] where FBD and PRD are values directly from the registers, while a more sensible way to look at it is: RefClk * FBD / PRD * (1 / (2^FRS)) and when the FBD and PRD values are written to the registers, they will be subtracted by one. Change the driver accordingly, as it simplifies the PLL code. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Fix bit updatesTomi Valkeinen1-6/+7
The driver has a few places where it does: if (thing_is_enabled_in_config) update_thing_bit_in_hw() This means that if the thing is _not_ enabled, the bit never gets cleared. This affects the h/vsyncs and continuous DSI clock bits. Fix the driver to always update the bit. Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Default to positive h/v syncsTomi Valkeinen1-0/+18
As the TC358768 is a DPI to DSI bridge, the DSI side does not need to define h/v sync polarities. This means that sometimes we have a mode without defined sync polarities, which does not work on the DPI side. Add a mode_fixup hook to default to positive sync polarities. Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge: tc358768: Fix use of uninitialized variableTomi Valkeinen1-0/+4
smatch reports: drivers/gpu/drm/bridge/tc358768.c:223 tc358768_update_bits() error: uninitialized symbol 'orig'. Fix this by bailing out from tc358768_update_bits() if the tc358768_read() produces an error. Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/tegra: rgb: Parameterize V- and H-sync polaritiesThierry Reding1-3/+13
The polarities of the V- and H-sync signals are encoded as flags in the display mode, so use the existing information to setup the signals for the RGB interface. Signed-off-by: Thierry Reding <[email protected]> Cc: Thierry Reding <[email protected]> [[email protected]: default to positive sync] Reviewed-by: Peter Ujfalusi <[email protected]> Tested-by: Maxim Schwalm <[email protected]> # Asus TF700T Tested-by: Marcel Ziswiler <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-20drm/bridge/analogix/anx78xx: Add missing definitionAlicja Michalska1-0/+2
Analogix ANX78XX driver is missing definitions for anx7816. It uses the same I2C register set as anx7818. Signed-off-by: Alicja Michalska <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ZPvagaXnQ/TlNEkJ@tora
2023-09-20dt-bindings: display: anx7814: Add definition for anx7816Alicja Michalska1-0/+1
As requested by Robert Foss <[email protected]>, this patch adds definition for anx7816. It supplements the patch submitted to dri-devel. Signed-off-by: Alicja Michalska <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ZQjFabKW7QvrvsnG@tora
2023-09-19drm/nouveau/kms/nv50-: disable dcb parsingBen Skeggs3-8/+10
- nvkm should provide all this info now - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: create outputs based on nvkm infoBen Skeggs9-50/+223
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: create connectors based on nvkm infoBen Skeggs8-72/+139
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: name aux channels after their connectorBen Skeggs1-16/+9
- removes use of VBIOS data for naming - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: create heads after outps/connsBen Skeggs1-32/+32
- output info will be used later to determine MST support Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: create heads based on nvkm head maskBen Skeggs1-15/+3
No need to go poking HW directly, and probably shouldn't on GSP-RM. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp/nv50-: skip DCB_OUTPUT_TVBen Skeggs1-1/+1
We've never supported it. Signed-off-by: Ben Skeggs <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: move outp init/fini paths to chipset codeBen Skeggs6-56/+22
- pre-nv5x doesn't use any of this - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: move outp/conn construction to chipset codeBen Skeggs2-118/+121
- pre-nv5x doesn't use any of this, has its own version DRM-side - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add dp mst id get/put methodsBen Skeggs9-4/+137
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add dp sst config methodBen Skeggs5-0/+54
This is presently unused on HW, we read a bunch of regs and calculate the watermark during the second supervisor interrupt. I don't want to change this yet as I need to re-remember how older HW works exactly, but RM wants this info via RPC. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: move link training out of supervisorBen Skeggs9-146/+218
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add dp train methodBen Skeggs9-176/+143
- passes DPCD information from DRM to NVKM - removes NVKM's own sink caps handling - link still trained from supervisor, more patches to come Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: fixup sink D3 before tearing down linkBen Skeggs3-10/+19
- fixes bug preventing this on SST - implement for MST Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: flush mst disables togetherBen Skeggs2-11/+1
- fixes some issues tearing down modes on tiled displays Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: split DP disable+enable into two modesetsBen Skeggs1-1/+2
Link training can finally be moved out of the supervisor sequence, but first we need to split DP modesets into separate disable and enable sequences to be able to perform link training between them instead. - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add dp rates methodBen Skeggs8-99/+189
- moves building of link rates table from NVKM to DRM - preparing to move link training out of supervisor Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add dp aux xfer methodBen Skeggs9-31/+94
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: move dp aux pwr method to HALBen Skeggs3-3/+16
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add hdmi audio hal functionBen Skeggs2-1/+10
This just adds a hook for RM to use, HW paths remain untouched, but should probably be cleaned up to use this too at some point. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add output lvds config methodBen Skeggs5-22/+28
- was previously part of acquire() Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add output backlight control methodsBen Skeggs22-81/+233
- preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: remove SOR routing updates from supervisorBen Skeggs3-3/+0
- these shouldn't be necessary now, and are done in acquire()/release() - preparation for GSP-RM, where we don't control the supervisor Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: release outputs post-modesetBen Skeggs3-10/+11
Prior to this commit, KMS would call release() prior to modeset, and the second supervisor interrupt would update SOR routing if needed. Now, KMS will call release() post-modeset and update routing immediately. - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: move hdmi disable out of release()Ben Skeggs3-9/+20
- release() is being moved post-modeset, preserve hdmi behaviour for now Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/disp: add output hdmi config methodBen Skeggs7-60/+74
- was previously part of acquire() - preparation for GSP-RM Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: move audio enable post-modesetBen Skeggs2-4/+34
- adds tracking for post-UPDATE modeset operations, similar to mst[mo]'s - audio won't work on RM without this - we should probably have been doing this anyway Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: keep output state around until modeset completeBen Skeggs1-4/+6
- we'll want this info post-UPDATE for later patches Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-09-19drm/nouveau/kms/nv50-: remove nv_encoder.audio.connectorBen Skeggs2-4/+1
- use nv_encoder.conn instead, outp->conn never changes Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]