]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
5 months agodrm/i915/lttpr: Enable Extended Wake Timeout
Suraj Kandpal [Wed, 22 Jan 2025 05:33:58 +0000 (11:03 +0530)]
drm/i915/lttpr: Enable Extended Wake Timeout

Usually retimers take around 30 to 40ms to exit all devices from
sleep state. Extended wake timeout mechanism helps to give
that additional time.

--v2
-Grant the requested time only if greater than 1ms [Arun/Jani]
-Reframe commit message [Arun]

--v3
-Move the function to drm_core [Dmitry/Jani]

Spec: DP v2.1 Section 3.6.12.3
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-4-suraj.kandpal@intel.com
5 months agodrm/display/dp: Define function to setup Extended wake time
Suraj Kandpal [Wed, 22 Jan 2025 05:33:57 +0000 (11:03 +0530)]
drm/display/dp: Define function to setup Extended wake time

Extended wake timeout request helps to give additional
time by reading the DPCD register through which sink requests the
minimal amount of time required to wake the sink up.
Source  device shall keep retying the AUX tansaction till the
extended timeout that is being granted for LTTPRs from the
sink device.

--v2
-Add documentation [Dmitry]

Spec: DP v2.1 Section 3.6.12.3
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-3-suraj.kandpal@intel.com
5 months agodrm/dp: Add the DPCD register required for Extended wake timeout
Suraj Kandpal [Wed, 22 Jan 2025 05:33:56 +0000 (11:03 +0530)]
drm/dp: Add the DPCD register required for Extended wake timeout

Add DPCD registers required to configure Extended Wake Timeout
for LTTPR.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-2-suraj.kandpal@intel.com
5 months agodrm/ast: Only look up VBIOS mode on full modesets
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:16 +0000 (10:21 +0100)]
drm/ast: Only look up VBIOS mode on full modesets

Only look up the VBIOS mode during atomic_check if the display mode
changes. For page flips, the previous settings still apply. Avoids the
runtime overhead of looking up the VBIOS mode on each page flip.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-17-tzimmermann@suse.de
5 months agodrm/ast: Remove struct ast_vbios_mode_info
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:15 +0000 (10:21 +0100)]
drm/ast: Remove struct ast_vbios_mode_info

The type struct ast_vbios_mode_info used to store information about
the color format and display mode. It has outlived its purpose. Inline
its fields into struct ast_crtc_state and replace all instances.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-16-tzimmermann@suse.de
5 months agodrm/ast: astdp: Look up mode index from table
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:14 +0000 (10:21 +0100)]
drm/ast: astdp: Look up mode index from table

Replace the large switch statement with a look-up table when selecting
the mode index. Makes the code easier to read. The table is sorted by
resolutions; if run-time overhead from traversal becomes significant,
binary search would be a possible optimization.

The mode index requires a refresh-rate index to be added or subtracted,
which still requires a minimal switch. In the original code, some of
the indices did not contain this computation. Those cases would have been
equivalent to adding 0, so they are now all subsumed in the switch's
default branch.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Suggested-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
v3:
- explain the semantics of the new switch statement (Jocelyn)
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-15-tzimmermann@suse.de
5 months agodrm/ast: astdp: Rework display-mode setting
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:13 +0000 (10:21 +0100)]
drm/ast: astdp: Rework display-mode setting

ASTDP requires a mode index, depending on the resolution. Move the
look-up code from ast_dp_set_mode() into a separate helper. Inline
the rest of the function into its only caller. Rename the variable
names and register constants to match the programming manual.

As before, the mode-index lookup still happens during the update's
atomic commit. Right now, there's no way of doing it during the atomic
check. The lookup requires the VBIOS mode, which is not available at
the atomic check's invocation. At least warn now if the mode index
could not be found.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-14-tzimmermann@suse.de
5 months agodrm/ast: Inline ast_get_vbios_mode_info()
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:12 +0000 (10:21 +0100)]
drm/ast: Inline ast_get_vbios_mode_info()

The helper ast_get_vbios_mode_info() retrieves hardware-specific format
and display-mode information. Inline the function into its only caller.

While at it, also replace a use of struct drm_format_info.cpp with the
correct DRM 4CC codes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-13-tzimmermann@suse.de
5 months agodrm/ast: Validate DRM display modes against VBIOS modes
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:11 +0000 (10:21 +0100)]
drm/ast: Validate DRM display modes against VBIOS modes

Test DRM display modes against the list of modes supported by the
VBIOS. The helper will respect the supported-modes flags in struct
ast_device. Hence only DRM display modes supported by the VBIOS
will be reported; without the current duplication of this information.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-12-tzimmermann@suse.de
5 months agodrm/ast: Add helpers for VBIOS mode lookup
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:10 +0000 (10:21 +0100)]
drm/ast: Add helpers for VBIOS mode lookup

Mode lines are independent from hardware Gen or TX chip, so hide all
VBIOS mode tables in ast_vbios.c.

Move the look-up code for VBIOS modes from ast_vbios_get_mode_info()
to ast_vbios_find_mode(). The new look-up function respects the
supported-mode flags in struct ast_device. For example, if a device
does not have struct ast_device.support_fullhd set, the helper does
not return a valid mode for 1920x1080. Taking the supported-mode flags
into account allows for making the VBIOS tables the single reference
for validating and setting display modes against hardware capabilities.

v2:
- replace mode switch with look-up table (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-11-tzimmermann@suse.de
5 months agodrm/ast: Add empty initializer for VBIOS modes
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:09 +0000 (10:21 +0100)]
drm/ast: Add empty initializer for VBIOS modes

VBIOS mode tables are terminated by an entry with a refresh rate of
0xff. The code is hard to read and fragile to use. Therefore create
an empty entry with AST_VBIOS_MODE_INVALID to terminate each mode list.

Stop at the invalid entry when searching for modes in the tables.
Instead of testing for refresh == 0xff, test with a helper function if
the mode's size and refresh have meaningful values.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-10-tzimmermann@suse.de
5 months agodrm/ast: Find VBIOS mode from regular display size
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:08 +0000 (10:21 +0100)]
drm/ast: Find VBIOS mode from regular display size

The ast driver looks up supplied display modes from an internal list of
display modes supported by the VBIOS.

Do not use the crtc_-prefixed display values from struct drm_display_mode
for looking up the VBIOS mode. The fields contain raw values that the
driver programs to hardware. They are affected by display settings like
double-scan or interlace.

Instead use the regular vdisplay and hdisplay fields for lookup. As the
programmed values can now differ from the values used for lookup, set
struct drm_display_mode.crtc_vdisplay and .crtc_hdisplay from the VBIOS
mode.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-9-tzimmermann@suse.de
5 months agodrm/ast: Always validate H/V sync flags
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:07 +0000 (10:21 +0100)]
drm/ast: Always validate H/V sync flags

The ast driver matches DRM display modes against an internal list of
modes supported by the VBIOS. Matching H/V sync flags between modes is
preferred, but optional. If sync flags are not matching, the driver
would program the VBIOS settings to hardware and let the display handle
the difference.

DRM modes are generated from attached displays or standard mode lines.
Therefore differences to the VBIOS modes are not just cosmetical, but
signal possible incompatibility with the display hardware.

Hence make matching H/V sync flags mandatory. If the VBIOS does not
support a certain mode, we should report it as unsupported. Note that
the VBIOS mode tables all appear to refer to standard modes.

(If sync flags really make no difference to the VBIOS, the ast driver
shouldn't match them in the first place.)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-8-tzimmermann@suse.de
5 months agodrm/ast: Add support_wuxga flag to struct ast_device
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:06 +0000 (10:21 +0100)]
drm/ast: Add support_wuxga flag to struct ast_device

Detect support for 1920x1200 (WUXGA) in ast_detect_widescreen(). The
flag is cleared by default. The test logic has been taken from existing
code in ast_crtc_helper_mode_valid(). The code in that function is being
replaced by the new flag.

v2:
- move shared detection code into helper (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-7-tzimmermann@suse.de
5 months agodrm/ast: Add support_fullhd flag to struct ast_device
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:05 +0000 (10:21 +0100)]
drm/ast: Add support_fullhd flag to struct ast_device

Detect support for 1920x1080 (FullHD) in ast_detect_widescreen(). The
flag is cleared by default. The test logic has been taken from existing
code in ast_crtc_helper_mode_valid(). The code in that function is being
replaced by the new flag.

For Gen3, a new branch duplicates the Gen2 logic and adds a test for
AST2200. Gen2 adds a test for AST2100.

v2:
- use fullhd flag for setting max width/height

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-6-tzimmermann@suse.de
5 months agodrm/ast: Reorganize widescreen test around hardware Gens
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:04 +0000 (10:21 +0100)]
drm/ast: Reorganize widescreen test around hardware Gens

Testing for support of widescreen modes mixes up various hardware
Gens. First branch by hardware Gen, then do specific tests for each
Gen. By default, widesscreen support is disabled.

Later patches will add more specific tests for each Gen.

v2:
- move shared detection code into helper (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-5-tzimmermann@suse.de
5 months agodrm/ast: Rename support_wide_screen to support_wsxga_p
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:03 +0000 (10:21 +0100)]
drm/ast: Rename support_wide_screen to support_wsxga_p

The flag support_wide_screen in struct ast_device selects devices that
support resolutions of at least 1680x1050 (WSXGA+). Name it accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-4-tzimmermann@suse.de
5 months agodrm/ast: Align naming in widescreen detection code to manual
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:02 +0000 (10:21 +0100)]
drm/ast: Align naming in widescreen detection code to manual

Rename variables and register constants to align with the programming
manual. Add new constants where necessary.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-3-tzimmermann@suse.de
5 months agodrm/ast: Remove 1152x864 from list of widescreen resolutions
Thomas Zimmermann [Fri, 31 Jan 2025 09:21:01 +0000 (10:21 +0100)]
drm/ast: Remove 1152x864 from list of widescreen resolutions

The resolution 1152x864 has a ratio of 4:3 and is already handled
as such. Remove it from the list of widescreen resolutions.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-2-tzimmermann@suse.de
5 months agoaccel/ivpu: Move recovery work to system_unbound_wq
Karol Wachowski [Wed, 29 Jan 2025 12:56:36 +0000 (13:56 +0100)]
accel/ivpu: Move recovery work to system_unbound_wq

Recovery work doesn't need to be bound to any specific CPU, so move it
to unbound workqueue to improve execution time and system latency.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-7-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/ivpu: Enable recovery and adjust timeouts for fpga
Tomasz Rusinowicz [Wed, 29 Jan 2025 12:56:35 +0000 (13:56 +0100)]
accel/ivpu: Enable recovery and adjust timeouts for fpga

Recovery now works on fpga. JSM state dump timeout needs to
be really long for the new fpga model releases.

Enable punit on fpga.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-6-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/ivpu: Turn on HWS by default on all platforms
Karol Wachowski [Wed, 29 Jan 2025 12:56:34 +0000 (13:56 +0100)]
accel/ivpu: Turn on HWS by default on all platforms

Hardware scheduling (HWS) is supposed to be supported on all existing
platform with recent FW including pre-silicon ones. Turn on HWS by
default.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-5-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/ivpu: Fix missing MMU events if file_priv is unbound
Karol Wachowski [Wed, 29 Jan 2025 12:56:33 +0000 (13:56 +0100)]
accel/ivpu: Fix missing MMU events if file_priv is unbound

Move the ivpu_mmu_discard_events() function to the common portion of
the abort work function. This ensures it is called only once, even if
there are no faulty contexts in context_xa, to guarantee that MMU events
are discarded and new events are not missed.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-4-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/ivpu: Update last_busy in IRQ handler
Jacek Lawrynowicz [Wed, 29 Jan 2025 12:56:32 +0000 (13:56 +0100)]
accel/ivpu: Update last_busy in IRQ handler

Call pm_runtime_mark_last_busy() in top half of IRQ handler to prevent
device from being runtime suspended before bottom half is executed on
a workqueue.

Reviewed-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-3-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/ivpu: Add support for hardware fault injection
Jacek Lawrynowicz [Wed, 29 Jan 2025 12:56:31 +0000 (13:56 +0100)]
accel/ivpu: Add support for hardware fault injection

Introduces the capability to simulate hardware faults for testing
purposes. The new `fail_hw` fault can be injected in
`ivpu_hw_reg_poll_fld()`, which is used in various parts of the driver
to wait for the hardware to reach a specific state. This allows to test
failures during NPU boot and shutdown, IPC message handling and more.

Fault injection can be enabled using debugfs or a module parameter.

Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-2-jacek.lawrynowicz@linux.intel.com
5 months agoaccel/qaic: Add AIC200 support
Jeffrey Hugo [Fri, 17 Jan 2025 17:09:43 +0000 (10:09 -0700)]
accel/qaic: Add AIC200 support

Add basic support for the new AIC200 product. The PCIe Device ID is
0xa110. With this, we can turn on the lights for AIC200 by leveraging
much of the existing driver.

Co-developed-by: Youssef Samir <quic_yabdulra@quicinc.com>
Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-8-quic_jhugo@quicinc.com
5 months agoaccel/qaic: Add config structs for supported cards
Jeffrey Hugo [Fri, 17 Jan 2025 17:09:42 +0000 (10:09 -0700)]
accel/qaic: Add config structs for supported cards

As the number of cards supported by the driver grows, their
configurations will differ. The driver needs to become more dynamic
to support these configurations. Currently, each card may differ in
the exposed BARs, the regions they map to, and the family.

Create config structs for each card, and let the driver configure the
qaic_device struct based on the configurations passed to the driver.

Co-developed-by: Youssef Samir <quic_yabdulra@quicinc.com>
Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-7-quic_jhugo@quicinc.com
5 months agoaccel/qaic: Mask out SR-IOV PCI resources
Youssef Samir [Fri, 17 Jan 2025 17:09:41 +0000 (10:09 -0700)]
accel/qaic: Mask out SR-IOV PCI resources

During the initialization of the qaic device, pci_select_bars() is
used to fetch a bitmask of the BARs exposed by the device. On devices
that have Virtual Functions capabilities, the bitmask includes SR-IOV
BARs.

Use a mask to filter out SR-IOV BARs if they exist.

Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-6-quic_jhugo@quicinc.com
5 months agoaccel/qaic: Add support for MSI-X
Youssef Samir [Fri, 17 Jan 2025 17:09:40 +0000 (10:09 -0700)]
accel/qaic: Add support for MSI-X

AIC200 device will support MSI-X while AIC100 devices will keep using
MSI. pci_alloc_irq_vectors() will try to allocate MSI-X vectors if it
is supported by the target device, otherwise, it will fallback to MSI.

Add support for MSI-X vectors allocation for AIC200 devices.

Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-5-quic_jhugo@quicinc.com
5 months agoaccel/qaic: Allocate an exact number of MSIs
Youssef Samir [Fri, 17 Jan 2025 17:09:39 +0000 (10:09 -0700)]
accel/qaic: Allocate an exact number of MSIs

Devices use 1 MSI vector for the MHI controller and as many vectors as
the DMA bridge channels on the device. During the probing of the
device, the driver allocates 32 MSI vectors, which is usually more
than what is needed for AIC100 devices, which is wasting resources.

Allocate only the needed number of MSI vectors per device.

Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Troy Hanson <quic_thanson@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-4-quic_jhugo@quicinc.com
5 months agobus: mhi: host: Add a policy to enable image transfer via BHIe in PBL
Matthew Leung [Fri, 17 Jan 2025 17:09:38 +0000 (10:09 -0700)]
bus: mhi: host: Add a policy to enable image transfer via BHIe in PBL

Currently, MHI host only performs firmware transfer via BHI in PBL and
BHIe from SBL. To support BHIe transfer directly from PBL, a policy
needs to be added.

With this policy, BHIe will be used to transfer firmware in PBL if the
MHI controller has BHIe regs, sets seg_len, and does not set
fbc_download. The intention is to transfer firmware using BHIe in PBL
without further BHIe transfers in SBL.

Signed-off-by: Matthew Leung <quic_mattleun@quicinc.com>
Reviewed-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-3-quic_jhugo@quicinc.com
5 months agobus: mhi: host: Refactor BHI/BHIe based firmware loading
Matthew Leung [Fri, 17 Jan 2025 17:09:37 +0000 (10:09 -0700)]
bus: mhi: host: Refactor BHI/BHIe based firmware loading

Refactor the firmware loading code to have distinct helper functions for
BHI and BHIe operations. This lays the foundation for separating the
firmware loading protocol from the firmware being loaded and the EE it
is loaded in.

Signed-off-by: Matthew Leung <quic_mattleun@quicinc.com>
Reviewed-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117170943.2643280-2-quic_jhugo@quicinc.com
5 months agodrm/ast: Fix ast_dp connection status
Jocelyn Falempe [Fri, 24 Jan 2025 14:11:31 +0000 (15:11 +0100)]
drm/ast: Fix ast_dp connection status

ast_dp_is_connected() used to also check for link training success
to report the DP connector as connected. Without this check, the
physical_status is always connected. So if no monitor is present, it
will fail to read the EDID and set the default resolution to 640x480
instead of 1024x768.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Fixes: 2281475168d2 ("drm/ast: astdp: Perform link training during atomic_enable")
Reported-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Tested-by: Jose Lopez <jose.lopez@hpe.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.12+
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124141142.2434138-1-jfalempe@redhat.com
5 months agodt-bindings: display: renesas,du: add top-level constraints
Krzysztof Kozlowski [Tue, 28 Jan 2025 09:47:19 +0000 (10:47 +0100)]
dt-bindings: display: renesas,du: add top-level constraints

Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for clocks, clock-names, interrupts, resets, reset-names, renesas,cmms
and renesas,vsps.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250128094719.63776-2-krzysztof.kozlowski@linaro.org
5 months agodt-bindings: display: renesas,du: narrow interrupts and resets per variants
Krzysztof Kozlowski [Tue, 28 Jan 2025 09:47:18 +0000 (10:47 +0100)]
dt-bindings: display: renesas,du: narrow interrupts and resets per variants

Each variable-length property like interrupts or resets must have fixed
constraints on number of items for given variant in binding.  The
clauses in "if:then:" block should define both limits: upper and lower.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250128094719.63776-1-krzysztof.kozlowski@linaro.org
5 months agoMAINTAINERS: Update drm/rcar-du maintainers
Tomi Valkeinen [Tue, 28 Jan 2025 12:14:43 +0000 (14:14 +0200)]
MAINTAINERS: Update drm/rcar-du maintainers

Update drm/rcar-du maintainer entries:

* Add myself as drm/rcar-du maintainer.
* Update Laurent's email to include +renesas.
* Switch Kieran from a maintainer to reviewer.
* Change rcar-du to be under drm-misc umbrella.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250128-rcar-du-maintainers-v2-1-4a3860a3e1ef@ideasonboard.com
5 months agoMAINTAINERS: Remove Noralf Trønnes as driver maintainer
Noralf Trønnes [Thu, 23 Jan 2025 16:34:25 +0000 (17:34 +0100)]
MAINTAINERS: Remove Noralf Trønnes as driver maintainer

Remove myself as maintainer for gud, mi0283qt, panel-mipi-dbi and repaper.
My fatigue illness has finally closed the door on doing development of
even moderate complexity so it's sad to let this go.

Acked-by: Thomas Zimmremann <tzimmermann@suse.de>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20250123-remove-myself-as-maintainer-v1-1-cc3ab7cd98ae@tronnes.org
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
5 months agodrm: bridge: adv7511: remove s32 format from i2s capabilities
Olivier Moysan [Wed, 8 Jan 2025 17:03:56 +0000 (18:03 +0100)]
drm: bridge: adv7511: remove s32 format from i2s capabilities

The ADV7511 chip allows 24 bits samples max in I2S mode, excepted for
direct AES3 mode (SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE format).
However the HDMI codec exposes S32_LE format as supported.
Adapt ADV7511 HDMI I2S format list to expose formats actually supported.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250108170356.413063-4-olivier.moysan@foss.st.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
5 months agoASoC: hdmi-codec: allow to refine formats actually supported
Olivier Moysan [Wed, 8 Jan 2025 17:03:55 +0000 (18:03 +0100)]
ASoC: hdmi-codec: allow to refine formats actually supported

Currently the hdmi-codec driver registers all the formats that are
allowed on the I2S bus. Add i2s_formats field to codec data, to allow
the hdmi codec client to refine the list of the audio I2S formats
actually supported.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250108170356.413063-3-olivier.moysan@foss.st.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
5 months agodrm: bridge: adv7511: fill stream capabilities
Olivier Moysan [Wed, 8 Jan 2025 17:03:54 +0000 (18:03 +0100)]
drm: bridge: adv7511: fill stream capabilities

Set no_i2s_capture and no_spdif_capture flags in hdmi_codec_pdata structure
to report that the ADV7511 HDMI bridge does not support i2s or spdif audio
capture.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250108170356.413063-2-olivier.moysan@foss.st.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
5 months agodrm/nouveau: consume the return of large GSP message
Zhi Wang [Fri, 24 Jan 2025 18:29:58 +0000 (10:29 -0800)]
drm/nouveau: consume the return of large GSP message

As the GSP message recv path is able to handle the return of large GSP
message, consume the return of large GSP message in the sending path.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-16-zhiw@nvidia.com
5 months agodrm/nouveau: support handling the return of large GSP message
Zhi Wang [Fri, 24 Jan 2025 18:29:57 +0000 (10:29 -0800)]
drm/nouveau: support handling the return of large GSP message

The max GSP message element size is 16 pages (including the headers). To
send a message larger than 16 pages, nvkm should split it into multiple
and send them accordingly. The first element has the expected function
number, while the rest are sent with function number as
NV_VGPU_MSG_FUNCTION_CONTINUATION_RECORD. GSP consumes the elements from
the cmdq and always writes the result back to the msgq. The result is also
formed as split elements.

However, nvkm is able to split the large GSP message and send them, but
totally not aware of handling the return of the large GSP message, which
are the split elements in the msgq. Thus, it keeps dumping the unknown RPC
messages from msgq, which is actually CONTINUATION_RECORD message,
discard them unexpectedly. Thus, the caller will not be able to consume
the result from GSP.

Introduce the handling of the return of large GSP message on the msgq path.
Slightly re-factor the low-level part of msg receiving routines. Merge the
split elements back into a large element before handling it to the upper
level. Thus, the upper-level of GSP RPC APIs don't need to be heavily
changed.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-15-zhiw@nvidia.com
5 months agodrm/nouveau: factor out r535_gsp_msgq_recv_one_elem()
Zhi Wang [Fri, 24 Jan 2025 18:29:56 +0000 (10:29 -0800)]
drm/nouveau: factor out r535_gsp_msgq_recv_one_elem()

Prepare for supporting receive the large GSP RPC message.

Factor out r535_gsp_msgq_recv_one_elem(). Fold its params into a data
structure of params. Move the allocation of the GSP RPC message to its
caller. Refine the variable names in the re-factor.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-14-zhiw@nvidia.com
5 months agodrm/nouveau: factor out r535_gsp_msgq_peek()
Zhi Wang [Fri, 24 Jan 2025 18:29:55 +0000 (10:29 -0800)]
drm/nouveau: factor out r535_gsp_msgq_peek()

To receive a GSP message queue element from the GSP status queue, the
driver needs to make sure there are available elements in the queue.

The previous r535_gsp_msgq_wait() consists of three functions, which is
a little too complicated for a single function:
- wait for an available element.
- peek the message element header in the queue.
- recevice the element from the queue.

Factor out r535_gsp_msgq_peek() and divide the functions in
r535_gsp_msgq_wait() into three functions.

No functional change is intended.

Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-13-zhiw@nvidia.com
5 months agodrm/nouveau: rename the variable "cmd" to "msg" in r535_gsp_cmdq_{get, push}()
Zhi Wang [Fri, 24 Jan 2025 18:29:54 +0000 (10:29 -0800)]
drm/nouveau: rename the variable "cmd" to "msg" in r535_gsp_cmdq_{get, push}()

Refine the name to align with the terms in the kernel doc.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-12-zhiw@nvidia.com
5 months agodrm/nouveau: refine the variable names in r535_gsp_msg_recv()
Zhi Wang [Fri, 24 Jan 2025 18:29:53 +0000 (10:29 -0800)]
drm/nouveau: refine the variable names in r535_gsp_msg_recv()

The variable "msg" in r535_gsp_msg_recv() actually means the GSP RPC.

Refine the names to align with the terms in the kernel doc.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-11-zhiw@nvidia.com
5 months agodrm/nouveau: refine the variable names in r535_gsp_rpc_push()
Zhi Wang [Fri, 24 Jan 2025 18:29:52 +0000 (10:29 -0800)]
drm/nouveau: refine the variable names in r535_gsp_rpc_push()

The variable names in r535_gsp_rpc_push() are quite confusing and some
of them are not representing what they really are.

Update the names and explanations in the decoder section of the
kernel doc. Refine the names to align with the terms in the kernel doc.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-10-zhiw@nvidia.com
5 months agodrm/nouveau: remove the magic number in r535_gsp_rpc_push()
Zhi Wang [Fri, 24 Jan 2025 18:29:51 +0000 (10:29 -0800)]
drm/nouveau: remove the magic number in r535_gsp_rpc_push()

There has been a GSP_MSG_MAX_SIZE which represents the max size of a GSP
message element header. Use it instead of a magic number.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-9-zhiw@nvidia.com
5 months agodrm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE
Zhi Wang [Fri, 24 Jan 2025 18:29:50 +0000 (10:29 -0800)]
drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE

The macro GSP_MSG_MAX_SIZE refers to another macro that doesn't exist.
It represents the max GSP message element size.

Fix the broken marco so it can be used to replace some magic numbers in
the code.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-8-zhiw@nvidia.com
5 months agodrm/nouveau: rename "argc" to what it represents in GSP RPC routines
Zhi Wang [Fri, 24 Jan 2025 18:29:49 +0000 (10:29 -0800)]
drm/nouveau: rename "argc" to what it represents in GSP RPC routines

The name "argc" has different meanings in different functions.

To improve the readability, it's better to refine it to a name that
reflects what it represents.

Rename "argc" to what it represents. Add terms in the decoder section to
explain their meaning.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
[ Fix indentation. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-7-zhiw@nvidia.com
5 months agodrm/nouveau: rename "argv" to what it represents in *rm_{alloc, ctrl}_*()
Zhi Wang [Fri, 24 Jan 2025 18:29:48 +0000 (10:29 -0800)]
drm/nouveau: rename "argv" to what it represents in *rm_{alloc, ctrl}_*()

The name "argv" has different meanings in different functions.

To improve the readability, it's better to refine it to a name that
reflects what it represents.

Rename "argv" to what it represents. Wrap the long container_of() into
to_payload_header() to denote a clear meaning and make checkpatch.pl
happy.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-6-zhiw@nvidia.com
5 months agodrm/nouveau: remove unused param repc in *rm_alloc_push()
Zhi Wang [Fri, 24 Jan 2025 18:29:47 +0000 (10:29 -0800)]
drm/nouveau: remove unused param repc in *rm_alloc_push()

The user of *rm_alloc_push() always pass 0 in repc.

Remove unused param repc since no user actually uses it.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-5-zhiw@nvidia.com
5 months agodrm/nouveau: rename "argv" to what it represents on the GSP message send path
Zhi Wang [Fri, 24 Jan 2025 18:29:46 +0000 (10:29 -0800)]
drm/nouveau: rename "argv" to what it represents on the GSP message send path

The name "argv" has different meanings in different functions.

To improve the readability, it's better to refine it to a name that
reflects what it represents.

Rename "repc" to what it represents in the GSP message send path.
Wrap the long container_of() into to_gsp_hdr() to make checkpatch.pl
happy.

No functional change is intended.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-4-zhiw@nvidia.com
5 months agodrm/nouveau: rename "repc" to "gsp_rpc_len" on the GSP message recv path
Zhi Wang [Fri, 24 Jan 2025 18:29:45 +0000 (10:29 -0800)]
drm/nouveau: rename "repc" to "gsp_rpc_len" on the GSP message recv path

The name "repc" has different meanings in different contexts.

To improve the readability, it's better to refine it to a name that
reflects what it actually represents.

Rename "repc" to "gsp_rpc_len" in the GSP message recv path. Add an
section in the doc to explain the terms.

No functional change is intended.

Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-3-zhiw@nvidia.com
5 months agodrm/nouveau: add a kernel doc to introduce the GSP RPC
Zhi Wang [Fri, 24 Jan 2025 18:29:44 +0000 (10:29 -0800)]
drm/nouveau: add a kernel doc to introduce the GSP RPC

In order to explain the name clean-ups in GSP RPC routines, a kernel
doc to explain the memory layout and terms is required.

Add a kernel doc to introduce the GSP RPC.

Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
[ Fix bullet list indentation; add SPDX-License-Identifier. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-2-zhiw@nvidia.com
5 months agodrm/dp_mst: Add helper to get port number at specific LCT from RAD
Wayne Lin [Mon, 13 Jan 2025 09:11:00 +0000 (17:11 +0800)]
drm/dp_mst: Add helper to get port number at specific LCT from RAD

Add a helper drm_dp_mst_get_ufp_num_at_lct_from_rad() to extract the up
facing port number at specific link count from the RAD. Use the added
helper in drm_dp_mst_rad_to_str() & drm_dp_get_mst_branch_device() to
unify the implementation.

V2:
- Adjust the code format (Lyude)

V3:
- Adjust parameter "rad" of drm_dp_mst_get_ufp_num_at_lct_from_rad() to
be constant (Kernel test robot)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
[fixed commit message typo]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113091100.3314533-3-Wayne.Lin@amd.com
5 months agodrm/dp_mst: Fix drm RAD print
Wayne Lin [Mon, 13 Jan 2025 09:10:59 +0000 (17:10 +0800)]
drm/dp_mst: Fix drm RAD print

[Why]
The RAD of sideband message printed today is incorrect.
For RAD stored within MST branch
- If MST branch LCT is 1, it's RAD array is untouched and remained as 0.
- If MST branch LCT is larger than 1, use nibble to store the up facing
  port number in cascaded sequence as illustrated below:

  u8 RAD[0] = (LCT_2_UFP << 4) | LCT_3_UFP
     RAD[1] = (LCT_4_UFP << 4) | LCT_5_UFP
     ...

In drm_dp_mst_rad_to_str(), it wrongly to use BIT_MASK(4) to fetch the port
number of one nibble.

[How]
Adjust the code by:
- RAD array items are valuable only for LCT >= 1.
- Use 0xF as the mask to replace BIT_MASK(4)

V2:
- Document how RAD is constructed (Imre)

V3:
- Adjust the comment for rad[] so kdoc formats it properly (Lyude)

Fixes: 2f015ec6eab6 ("drm/dp_mst: Add sideband down request tracing + selftests")
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113091100.3314533-2-Wayne.Lin@amd.com
5 months agodrm/panel: samsung-s6e88a0-ams452ef01: transition to mipi_dsi wrapped functions
Tejas Vipin [Wed, 22 Jan 2025 03:11:10 +0000 (08:41 +0530)]
drm/panel: samsung-s6e88a0-ams452ef01: transition to mipi_dsi wrapped functions

Changes the samsung-s6e88a0-ams452ef01 panel to use multi style functions
for improved error handling.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250122031110.286079-1-tejasvipin76@gmail.com
5 months agodrm/virtio: Support partial maps of GEM objects
Sasha Finkelstein [Thu, 9 Jan 2025 21:45:46 +0000 (22:45 +0100)]
drm/virtio: Support partial maps of GEM objects

Those are useful to implement coherent cross-vm mmap.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250109-virtgpu-gem-partial-map-v1-1-a914b48776bd@gmail.com
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
[dmitry.osipenko@collabora.com: Corrected vm_size check to account vm_pgoff]

5 months agodrm: add modifiers for MediaTek tiled formats
Eric R. Smith [Thu, 19 Dec 2024 17:49:28 +0000 (13:49 -0400)]
drm: add modifiers for MediaTek tiled formats

MediaTek (MTK) uses some unique tiled memory formats
for video decoding. Add these to the uapi drm_fourcc.h
so that we can use them in Mesa, GStreamer, and other
tools/libraries.

v2:
- Classify the modifier bits into categories and provide
  room for expansion (Daniel S.)

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241219174929.126205-1-eric.smith@collabora.com
Signed-off-by: Daniel Stone <daniels@collabora.com>
5 months agodrm/tidss: Fix typos
Andrew Kreimer [Thu, 12 Sep 2024 12:57:24 +0000 (15:57 +0300)]
drm/tidss: Fix typos

Fix typos in comments.

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240912125735.45114-1-algonell@gmail.com
5 months agodrm/omap: Remove hdmi5_core_handle_irqs()
Dr. David Alan Gilbert [Wed, 18 Dec 2024 02:01:24 +0000 (02:01 +0000)]
drm/omap: Remove hdmi5_core_handle_irqs()

hdmi5_core_handle_irqs() is a function that was copied from omapdss by
commit f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")

but it wasn't used in the original anyway.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241218020124.278925-1-linux@treblig.org
5 months agodrm/omap/dss: Use syscon_regmap_lookup_by_phandle_args
Krzysztof Kozlowski [Tue, 14 Jan 2025 14:58:40 +0000 (15:58 +0100)]
drm/omap/dss: Use syscon_regmap_lookup_by_phandle_args

Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument.  Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.

There is also no real benefit in printing errors on missing syscon
argument, because this is done just too late: runtime check on
static/build-time data.  Dtschema and Devicetree bindings offer the
static/build-time check for this already.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114145840.505459-2-krzysztof.kozlowski@linaro.org
5 months agodrm/omap/dss: Use of_property_present() to test existence of DT property
Krzysztof Kozlowski [Tue, 14 Jan 2025 14:58:39 +0000 (15:58 +0100)]
drm/omap/dss: Use of_property_present() to test existence of DT property

of_property_read_bool() should be used only on boolean properties.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114145840.505459-1-krzysztof.kozlowski@linaro.org
5 months agodrm/panel-edp: Add STA 116QHD024002
Langyan Ye [Thu, 23 Jan 2025 11:20:55 +0000 (19:20 +0800)]
drm/panel-edp: Add STA 116QHD024002

Add support for the STA 116QHD024002, pleace the EDID here for
subsequent reference.

00 ff ff ff ff ff ff 00 4e 81 09 00 00 00 00 00
26 21 01 04 a5 1a 0e 78 02 1e b5 9a 5f 57 94 26
0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 8e 1c 56 a0 50 00 1e 30 28 20
55 00 00 90 10 00 00 18 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fe 00 20
20 20 20 20 20 0a 20 20 20 20 20 20 00 00 00 fe
00 31 31 36 51 48 44 30 32 34 30 30 32 0a 00 3b

Signed-off-by: Langyan Ye <yelangyan@huaqin.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/20250123112055.1521471-1-yelangyan@huaqin.corp-partner.google.com
5 months agodrm/atomic-helper: document drm_atomic_helper_check() restrictions
Dmitry Baryshkov [Sun, 22 Dec 2024 05:00:41 +0000 (07:00 +0200)]
drm/atomic-helper: document drm_atomic_helper_check() restrictions

The drm_atomic_helper_check() calls drm_atomic_helper_check_modeset()
insternally. Document that corresponding restrictions also apply to the
drivers that call the former function (as it's easy to miss the
documentation for the latter function).

Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241222-drm-dirty-modeset-v1-1-0e76a53eceb9@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
5 months agodrm/bridge: adv7511: Switch to atomic operations
Jesse Van Gavere [Mon, 6 Jan 2025 12:10:54 +0000 (13:10 +0100)]
drm/bridge: adv7511: Switch to atomic operations

Use the atomic version of enable/disable.

To support bridges where bus format negotiation is needed such as TIDSS we
need to implement atomic_get_input_bus_fmts, prepare the driver for this by
switching the existing operations to it's atomic variants.

Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250106121054.96739-1-jesseevg@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
5 months agodrm/ast: Only warn about unsupported TX chips on Gen4 and later
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:13 +0000 (11:29 +0100)]
drm/ast: Only warn about unsupported TX chips on Gen4 and later

Only Gen4 and later read the installed TX chip from the SoC. So only
warn on those generations about unsupported chips.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-9-tzimmermann@suse.de
5 months agodrm/ast: Merge TX-chip detection code for Gen4 and later
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:12 +0000 (11:29 +0100)]
drm/ast: Merge TX-chip detection code for Gen4 and later

Gens 4 to 6 and Gen7 use the same pattern for detecting the installed
TX chips. Merge the code into a single branch.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-8-tzimmermann@suse.de
5 months agodrm/ast: Align Gen1 DVO detection to register manual
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:11 +0000 (11:29 +0100)]
drm/ast: Align Gen1 DVO detection to register manual

Align variable names and register constants for TX-chip detection
to the names in the register manual.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-7-tzimmermann@suse.de
5 months agodrm/ast: Hide Gens 1 to 3 TX detection in branch
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:10 +0000 (11:29 +0100)]
drm/ast: Hide Gens 1 to 3 TX detection in branch

Gen7 only supports ASTDP. Gens 4 to 6 support various TX chips,
except ASTDP. These boards detect the TX chips by reading the SoC
scratch register as VGACRD1.

Gens 1 to 3 only support SIL164. These boards read the DVO bit from
VGACRA3. Hence move this test behind a branch, so that it does not
run on later generations.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-6-tzimmermann@suse.de
5 months agodrm/ast: Initialize ASTDP in ast_post_gpu()
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:09 +0000 (11:29 +0100)]
drm/ast: Initialize ASTDP in ast_post_gpu()

Remove the call to ast_dp_launch() from ast_detect_tx_chip() and
perform it unconditionally in ast_post_gpu().

Also add error handling: the detection code apparently used
ast_dp_launch() to test for a working ASTDP, falling back to VGA on
errors. As the VBIOS reports ASTDP, silently ignoring errors is
questionable behavior. With the refactoring, failing to initialize
the ASTDP will also fail probing the driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-5-tzimmermann@suse.de
5 months agodrm/ast: Refactor ast_post_gpu() by Gen
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:08 +0000 (11:29 +0100)]
drm/ast: Refactor ast_post_gpu() by Gen

Reorganize ast_post_gpu() so that it first branches by Gen and then
by config mode and TX chip. This will later make it possible to split
up the function by Gen.

The helper ast_init_3rdtx() only handles Gen4 and Gen5, so leave it
out from the other Gens.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-4-tzimmermann@suse.de
5 months agodrm/ast: Detect DRAM before TX-chip
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:07 +0000 (11:29 +0100)]
drm/ast: Detect DRAM before TX-chip

Move DRAM detection before TX-chip detection. Both steps are independent
from each other. Detection of the TX-chip is now next to posting those
chips, which can be done in a single step.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-3-tzimmermann@suse.de
5 months agodrm/ast: Detect wide-screen support before creating modeset pipeline
Thomas Zimmermann [Fri, 17 Jan 2025 10:29:06 +0000 (11:29 +0100)]
drm/ast: Detect wide-screen support before creating modeset pipeline

Wide-screen support is relevant for mode validation. Do not detect it
before setting up the mode-setting pipeline. Gets the function call out
of the way of other initialization code.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-2-tzimmermann@suse.de
5 months agodrm/vkms: Switch to dynamic allocation for CRTC
Louis Chauvet [Fri, 17 Jan 2025 09:04:29 +0000 (10:04 +0100)]
drm/vkms: Switch to dynamic allocation for CRTC

A specific allocation for the CRTC is not strictly necessary at this
point, but in order to implement dynamic configuration of VKMS (configFS),
it will be easier to have one allocation per CRTC.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117-b4-vkms-allocated-v4-3-8ec8fd21aaf6@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to dynamic allocation for encoder
Louis Chauvet [Fri, 17 Jan 2025 09:04:28 +0000 (10:04 +0100)]
drm/vkms: Switch to dynamic allocation for encoder

A specific allocation for the encoder is not strictly necessary  at this
point, but in order to implement dynamic configuration of VKMS (configFS),
it will be easier to have one allocation per encoder.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117-b4-vkms-allocated-v4-2-8ec8fd21aaf6@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to dynamic allocation for connector
Louis Chauvet [Fri, 17 Jan 2025 09:04:27 +0000 (10:04 +0100)]
drm/vkms: Switch to dynamic allocation for connector

A specific allocation for the connector is not strictly necessary
at this point, but in order to implement dynamic configuration of
VKMS (configFS), it will be easier to have one allocation per
connector.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117-b4-vkms-allocated-v4-1-8ec8fd21aaf6@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to managed for writeback connector
Louis Chauvet [Thu, 16 Jan 2025 17:47:20 +0000 (18:47 +0100)]
drm/vkms: Switch to managed for writeback connector

The current VKMS driver uses non-managed function to create
writeback connectors. It is not an issue yet, but in order
to support multiple devices easily, convert this code to
use drm and device managed helpers.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-8-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm: writeback: Create drmm variants for drm_writeback_connector initialization
Louis Chauvet [Thu, 16 Jan 2025 17:47:19 +0000 (18:47 +0100)]
drm: writeback: Create drmm variants for drm_writeback_connector initialization

To allows driver to only use drmm objects, add helper to create
drm_writeback_connectors with automated lifetime management.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-7-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm: writeback: Add missing cleanup in case of initialization failure
Louis Chauvet [Thu, 16 Jan 2025 17:47:18 +0000 (18:47 +0100)]
drm: writeback: Add missing cleanup in case of initialization failure

The current implementation of drm_writeback_connector initialization does
not properly clean up all resources in case of failure (allocated
properties and possible_encoders). Add this cleaning in case of failure.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-6-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm: writeback: Create an helper for drm_writeback_connector initialization
Louis Chauvet [Thu, 16 Jan 2025 17:47:17 +0000 (18:47 +0100)]
drm: writeback: Create an helper for drm_writeback_connector initialization

As the old drm and the new drmm variants of drm_writeback_connector
requires almost the same initialization, create an internal helper to do
most of the initialization work.

Currently there is no cleanup function for writeback connectors. To allows
implementation of drmm variant of writeback connector, create a cleanup
function that can be used to properly remove all the writeback-specific
properties and allocations.

This also introduce an helper to cleanup only the drm_writeback_connector
properties, so it can be used during initialization to cleanup in case of
failure.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-5-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to managed for crtc
Louis Chauvet [Thu, 16 Jan 2025 17:47:16 +0000 (18:47 +0100)]
drm/vkms: Switch to managed for crtc

The current VKMS driver uses managed function to create crtc, but
don't use it to properly clean the crtc workqueue. It is not an
issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-4-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/managed: Add DRM-managed alloc_ordered_workqueue
Louis Chauvet [Thu, 16 Jan 2025 17:47:15 +0000 (18:47 +0100)]
drm/managed: Add DRM-managed alloc_ordered_workqueue

Add drmm_alloc_ordered_workqueue(), a helper that provides managed ordered
workqueue cleanup. The workqueue will be destroyed with the final
reference of the DRM device.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-3-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to managed for encoder
Louis Chauvet [Thu, 16 Jan 2025 17:47:14 +0000 (18:47 +0100)]
drm/vkms: Switch to managed for encoder

The current VKMS driver uses non-managed function to create encoders. It
is not an issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-2-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/vkms: Switch to managed for connector
Louis Chauvet [Thu, 16 Jan 2025 17:47:13 +0000 (18:47 +0100)]
drm/vkms: Switch to managed for connector

The current VKMS driver uses non-managed function to create connectors. It
is not an issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116-google-vkms-managed-v9-1-3e4ae1bd05a0@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
5 months agodrm/imagination: Use the drm_sched_job_has_dependency helper
Tvrtko Ursulin [Mon, 13 Jan 2025 10:33:41 +0000 (10:33 +0000)]
drm/imagination: Use the drm_sched_job_has_dependency helper

Instead of manually peeking into the DRM scheduler implementation details
lets use the previously added helper.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Cc: Frank Binns <frank.binns@imgtec.com>
Cc: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113103341.43914-2-tvrtko.ursulin@igalia.com
5 months agodrm/sched: Add helper to check job dependencies
Tvrtko Ursulin [Mon, 13 Jan 2025 10:33:40 +0000 (10:33 +0000)]
drm/sched: Add helper to check job dependencies

Lets isolate scheduler internals from drivers such as pvr which currently
walks the dependency array to look for fences.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113103341.43914-1-tvrtko.ursulin@igalia.com
5 months agodrm/vc4: Remove BOs seqnos
Maíra Canal [Fri, 20 Dec 2024 13:37:09 +0000 (10:37 -0300)]
drm/vc4: Remove BOs seqnos

`bo->seqno`, `bo->write_seqno`, and `exec->bin_dep_seqno` are leftovers
from a time when VC4 didn't support DMA Reservation Objects. Before DMA
Resv was introduced, tracking the correspondence between BOs and jobs
through the job's seqno made sense.

However, this is no longer needed, as VC4 now supports DMA Reservation
Objects and attaches the "job done" fence to the BOs. Therefore, remove
the BOs seqnos in favor of using DMA Resv Objects.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220134204.634577-4-mcanal@igalia.com
5 months agodrm/vc4: Use DMA Resv to implement VC4 wait BO IOCTL
Maíra Canal [Fri, 20 Dec 2024 13:37:08 +0000 (10:37 -0300)]
drm/vc4: Use DMA Resv to implement VC4 wait BO IOCTL

Since the BOs used by VC4 have DMA Reservation Objects attached to
them, waiting for seqnos to check BO availability is unnecessary.
Instead, `drm_gem_dma_resv_wait()` can be used.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220134204.634577-3-mcanal@igalia.com
5 months agodrm/vc4: Use DRM Execution Contexts
Maíra Canal [Fri, 20 Dec 2024 13:37:07 +0000 (10:37 -0300)]
drm/vc4: Use DRM Execution Contexts

VC4 has internal copies of `drm_gem_lock_reservations()` and
`drm_gem_unlock_reservations()` within the driver. Ideally, these
hard-coded functions should be replaced with the generic functions
provided by DRM common code. However, instead of using the DRM GEM
functions to (un)lock reservations, transition to the new DRM Execution
Contexts API.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220134204.634577-2-mcanal@igalia.com
5 months agodrm/virtio: Don't return error if virtio-gpu PCI dev is not found
Vivek Kasireddy [Tue, 14 Jan 2025 07:57:59 +0000 (23:57 -0800)]
drm/virtio: Don't return error if virtio-gpu PCI dev is not found

While fixing a shared VGA resource ownership issue, commit 5dd8b536bbda
("drm/virtio: Lock the VGA resources during initialization") wrongly
assumed that there is always a PCI device associated with virtio-gpu
and it would return error if this device is not found during init.

This is incorrect, as virtio-gpu can be operated in MMIO mode (M68K)
where a PCI device would probably not be created for it. Therefore,
fix this issue by not erroring out if the associated PCI device is
not found during initialization.

Fixes: 5dd8b536bbda ("drm/virtio: Lock the VGA resources during initialization")
Suggested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114075759.2616551-1-vivek.kasireddy@intel.com
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114075759.2616551-1-vivek.kasireddy@intel.com
6 months agodrm/panel-edp: Add BOE NV140FHM-NZ panel entry
Andy Yan [Fri, 17 Jan 2025 01:00:29 +0000 (09:00 +0800)]
drm/panel-edp: Add BOE NV140FHM-NZ panel entry

Add an eDP panel entry for BOE NV140FHM-NZ.

No datasheet found for this panel, so the timing
is based on a similar NV140FHM-N41 datasheet that
I can find on internet[0].

edid:
00 ff ff ff ff ff ff 00 09 e5 09 0b 00 00 00 00
01 20 01 04 a5 1f 11 78 03 9b 75 99 5b 5d 8f 2a
23 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 c8 37 80 cc 70 38 28 40 6c 30
aa 00 35 ae 10 00 00 1a 00 00 00 fd 00 30 3c 43
43 8f 01 0a 20 20 20 20 20 20 00 00 00 fe 00 42
4f 45 20 48 46 0a 20 20 20 20 20 20 00 00 00 fe
00 4e 56 31 34 30 46 48 4d 2d 4e 34 5a 0a 00 35

[0]:http://www.tfinno.com/PIC/PIC/20215121628440.pdf

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117010039.1815430-1-andyshrk@163.com
6 months agoaccel/qaic: Change aic100_image_table definition
Youssef Samir [Fri, 13 Dec 2024 18:51:10 +0000 (11:51 -0700)]
accel/qaic: Change aic100_image_table definition

aic100_image_table is currently defined as a "const char *" array,
this can potentially lead to the accidental modification of the
pointers inside. Also, checkpatch.pl gives a warning about it.

Change the type to a "const char * const" array to make the pointers
immutable, preventing accidental modification of the images' paths.

Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241213185110.2469159-1-quic_jhugo@quicinc.com
6 months agoMAINTAINERS: Update intel_vpu maintainer list
Jacek Lawrynowicz [Tue, 14 Jan 2025 08:44:36 +0000 (09:44 +0100)]
MAINTAINERS: Update intel_vpu maintainer list

Slawek moved to another project and Maciej will be replacing him.

Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114084436.1326127-1-jacek.lawrynowicz@linux.intel.com
6 months agoMAINTAINERS: Add DRM GPU Scheduler reviewer
Philipp Stanner [Mon, 13 Jan 2025 12:18:51 +0000 (13:18 +0100)]
MAINTAINERS: Add DRM GPU Scheduler reviewer

Christian König is the original author of much of the scheduler's code
and, thus, well suited to do reviews.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113121851.31382-2-phasta@kernel.org
6 months agoMAINTAINERS: Update DRM GPU Scheduler section
Philipp Stanner [Mon, 13 Jan 2025 12:18:50 +0000 (13:18 +0100)]
MAINTAINERS: Update DRM GPU Scheduler section

Luben has not been active and has not responded to mails since summer
2024. Remove him from MAINTAINERS and add an entry in CREDITS.

Philipp has a new email address and an ACK to commit work time to the
scheduler. Thus, set the state to 'Supported'.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250113121851.31382-1-phasta@kernel.org
6 months agodrm/sched: Remove weak paused submission checks
Tvrtko Ursulin [Tue, 14 Jan 2025 10:59:42 +0000 (10:59 +0000)]
drm/sched: Remove weak paused submission checks

There is no need to check the boolean in the work item's prologues since
the boolean can be set at any later time anyway.

The helper which pauses submission sets it and synchronously cancels the
work and helpers which queue the work check for the flag so all should be
good.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114105942.64832-1-tvrtko.ursulin@igalia.com
6 months agodrm/ssd130x: ensure ssd132x pitch is correct
John Keeping [Wed, 15 Jan 2025 11:01:38 +0000 (11:01 +0000)]
drm/ssd130x: ensure ssd132x pitch is correct

The bounding rectangle is adjusted to ensure it aligns to
SSD132X_SEGMENT_WIDTH, which may adjust the pitch.  Calculate the pitch
after aligning the left and right edge.

Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250115110139.1672488-3-jkeeping@inmusicbrands.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
6 months agodrm/ssd130x: fix ssd132x encoding
John Keeping [Wed, 15 Jan 2025 11:01:37 +0000 (11:01 +0000)]
drm/ssd130x: fix ssd132x encoding

The ssd132x buffer is encoded one pixel per nibble, with two pixels in
each byte.  When encoding an 8-bit greyscale input, take the top 4-bits
as the value and ensure the two pixels are distinct and do not overwrite
each other.

Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250115110139.1672488-2-jkeeping@inmusicbrands.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>