]> Git Repo - linux.git/log
linux.git
8 months agodrm/xe: Simplify locking in new_vma
Matthew Brost [Tue, 18 Jun 2024 00:38:59 +0000 (17:38 -0700)]
drm/xe: Simplify locking in new_vma

Rather than acquiring and dropping the VM / BO dma-resv around
xe_vma_create and do the same thing upon adding preempt fences or an
error, hold these locks through the entire new_vma() function.

v2:
 - Rebase (CI)

Cc: Fei Yang <[email protected]>
Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jagmeet Randhawa <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe: Invert runnable_state / pending enable check and assert
Matthew Brost [Fri, 14 Jun 2024 06:13:43 +0000 (23:13 -0700)]
drm/xe: Invert runnable_state / pending enable check and assert

Rather than checking for pending enable and asserting runnable_state ==
1 in sched done handler, invert these. This is more robust code taking
action based on the G2H message and asserting KMD tracking state is
correct.

Suggested-by: John Harrison <[email protected]>
Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: John Harrison <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Custom HuC initialization if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:57 +0000 (23:45 +0200)]
drm/xe/vf: Custom HuC initialization if VF

The HuC firmware is loaded and initialized by the PF driver. Make
sure VF driver performs only limited data structure initialization.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Skip engine ring enabling if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:56 +0000 (23:45 +0200)]
drm/xe/vf: Skip engine ring enabling if VF

All engines will be correctly initialized by the PF driver.
Moreover, VF drivers can't access related engine registers.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't use register based TLB invalidation if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:55 +0000 (23:45 +0200)]
drm/xe/vf: Don't use register based TLB invalidation if VF

VF drivers can only use GuC-based TLB invalidation, as they don't
have access to the related registers. However, VFs shouldn't need
any explicit TLB invalidation before enabling CTB communication,
as there will be an implicit GGTT TLB invalidation issued by the
GuC itself as part of MMIO-based action handling.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't support gtidle if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:54 +0000 (23:45 +0200)]
drm/xe/vf: Don't support gtidle if VF

VF drivers can't access any of gtidle control registers as this
functionality is owned by the PF driver.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't initialize OA if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:53 +0000 (23:45 +0200)]
drm/xe/vf: Don't initialize OA if VF

We don't support Observation Architecture on the VF device.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Ashutosh Dixit <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't change hwe IRQ masks if using memory IRQs
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:52 +0000 (23:45 +0200)]
drm/xe/vf: Don't change hwe IRQ masks if using memory IRQs

We currently do not support changing the engine interrupt enable
mask on the per-engine basis when using memory based interrupts.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't apply tile workarounds if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:51 +0000 (23:45 +0200)]
drm/xe/vf: Don't apply tile workarounds if VF

The VF drivers can't apply any workarounds as they don't have
access to related registers. Since xe_wa_apply_tile_workarounds()
function is not using RTP yet, we have to add early return.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Matt Roper <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Don't run any save-restore RTP actions if VF
Michal Wajdeczko [Wed, 19 Jun 2024 21:45:50 +0000 (23:45 +0200)]
drm/xe/vf: Don't run any save-restore RTP actions if VF

There are no RTP save-restore actions applicable for VFs on
current platforms. If any future platform will require some,
we will need to update the RTP framework to support VF_READY
or VF_ONLY actions. In the meantime, just skip all actions if
we are running as VF driver.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Matt Roper <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/vf: Disable features that do not apply to VFs
Michal Wajdeczko [Thu, 20 Jun 2024 10:01:47 +0000 (12:01 +0200)]
drm/xe/vf: Disable features that do not apply to VFs

We already maintain several flags that control the availability
of features on a given device. Disable features, like PCODE or
GuC PC or GSC, that do not apply to a VF device.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Piotr Piórkowski <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/xelpgp: Extend Wa_14019877138 to graphics 12.74
Sai Teja Pottumuttu [Wed, 19 Jun 2024 06:56:14 +0000 (12:26 +0530)]
drm/xe/xelpgp: Extend Wa_14019877138 to graphics 12.74

Wa_14019877138 is also needed for xe_lpgp graphics 12.74

Signed-off-by: Sai Teja Pottumuttu <[email protected]>
Reviewed-by: Shekhar Chauhan <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/oa: Remove WARN_ON's for unsupported configurations
Ashutosh Dixit [Wed, 19 Jun 2024 22:56:17 +0000 (15:56 -0700)]
drm/xe/oa: Remove WARN_ON's for unsupported configurations

The OA ioctl's already have drm_dbg's which are sufficient to tell the user
that OA is not supported on unsupported configurations (execlist mode and
platform gen < 12). Having additional WARN_ON's for these during driver
probe create unnecessary noise. Just remove these WARN_ON's.

Suggested-by: Michal Wajdeczko <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Reviewed-by: Michal Wajdeczko <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/oa: Call xe_oa_emit_oa_config() with new config when updating config
José Roberto de Souza [Wed, 19 Jun 2024 19:28:54 +0000 (12:28 -0700)]
drm/xe/oa: Call xe_oa_emit_oa_config() with new config when updating config

When UMD ask config to be updated, xe_oa_config_locked() was calling
xe_oa_emit_oa_config() that would use stream->oa_config but that is
only changed to the next oa_config after xe_oa_emit_oa_config() finish.
So it was setting the same config for all DRM_XE_PERF_IOCTL_CONFIG
calls.

Cc: Ashutosh Dixit <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/oa: Fix potential NPD when OA is not initialized
Michal Wajdeczko [Wed, 19 Jun 2024 17:54:27 +0000 (19:54 +0200)]
drm/xe/oa: Fix potential NPD when OA is not initialized

If oa->xe can be NULL then we shall not use it as a valid pointer.

Fixes: cdf02fe1a94a ("drm/xe/oa/uapi: Add/remove OA config perf ops")
Fixes: b6fd51c62119 ("drm/xe/oa/uapi: Define and parse OA stream properties")
Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Ashutosh Dixit <[email protected]>
Cc: Umesh Nerlige Ramappa <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe/guc: Move ARAT interrupts enabling to the upload step
Michal Wajdeczko [Wed, 19 Jun 2024 16:34:13 +0000 (18:34 +0200)]
drm/xe/guc: Move ARAT interrupts enabling to the upload step

Even though ARAT interrupts are enabled by default, we still want
to keep the code that enables them. But instead doing that in the
CTB enabling step, move this code to the upload step, where we
already setup few other registers related to GuC.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Matthew Brost <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodma-buf/heaps: Correct the types of fd_flags and heap_flags
Barry Song [Thu, 6 Jun 2024 02:02:13 +0000 (14:02 +1200)]
dma-buf/heaps: Correct the types of fd_flags and heap_flags

dma_heap_allocation_data defines the UAPI as follows:

 struct dma_heap_allocation_data {
        __u64 len;
        __u32 fd;
        __u32 fd_flags;
        __u64 heap_flags;
 };

But dma heaps are casting both fd_flags and heap_flags into
unsigned long. This patch makes dma heaps - cma heap and
system heap have consistent types with UAPI.

Signed-off-by: Barry Song <[email protected]>
Acked-by: John Stultz <[email protected]>
Reviewed-by: Carlos Llamas <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/xe: Use ttm_uncached for BO with NEEDS_UC flag
Michal Wajdeczko [Tue, 18 Jun 2024 10:49:47 +0000 (12:49 +0200)]
drm/xe: Use ttm_uncached for BO with NEEDS_UC flag

We should honor requested uncached mode also at the TTM layer.
Otherwise, we risk losing updates to the memory based interrupts
source or status vectors, as those require uncached memory.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Thomas Hellström <[email protected]>
Cc: Matt Roper <[email protected]>
Acked-by: Thomas Hellström <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm/panfrost: Add support for Mali on the MT8188 SoC
AngeloGioacchino Del Regno [Tue, 11 Jun 2024 08:56:02 +0000 (10:56 +0200)]
drm/panfrost: Add support for Mali on the MT8188 SoC

MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new
compatible and platform data using the same supplies and the
same power domain lists as MT8183 (one regulator, three power
domains).

Reviewed-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodt-bindings: gpu: mali-bifrost: Add compatible for MT8188 SoC
AngeloGioacchino Del Regno [Tue, 11 Jun 2024 08:56:01 +0000 (10:56 +0200)]
dt-bindings: gpu: mali-bifrost: Add compatible for MT8188 SoC

Add a compatible for the MediaTek MT8188 SoC, with an integrated
ARM Mali G57 MC3 (Valhall-JM) GPU.

Acked-by: Conor Dooley <[email protected]>
Reviewed-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agodrm: bridge: simple-bridge: use devm_drm_bridge_add in probe
Marc Gonzalez [Tue, 18 Jun 2024 16:19:59 +0000 (18:19 +0200)]
drm: bridge: simple-bridge: use devm_drm_bridge_add in probe

simple_bridge_probe() calls drm_bridge_add()
Thus, drm_bridge_remove() must be called in the remove() callback.

If we call devm_drm_bridge_add() instead, then drm_bridge_remove()
will be called automatically at device release, and the remove()
callback is no longer required.

Signed-off-by: Marc Gonzalez <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
8 months agoMerge drm/drm-next into drm-intel-next
Jani Nikula [Wed, 19 Jun 2024 08:38:31 +0000 (11:38 +0300)]
Merge drm/drm-next into drm-intel-next

Sync to v6.10-rc3.

Signed-off-by: Jani Nikula <[email protected]>
9 months agointel_alpm: Fix wrong offset for PORT_ALPM_* registers
Jouni Högander [Tue, 18 Jun 2024 05:30:26 +0000 (08:30 +0300)]
intel_alpm: Fix wrong offset for PORT_ALPM_* registers

PORT_ALPM_* registers are using MMIO_TRANS2 macro. This is not correct as
they are port register. Use _PORT_MMIO instead.

Fixes: 4ee30a448255 ("drm/i915/alpm: Add ALPM register definitions")
Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoRevert "drm/i915/psr: Disable early transport by default"
Jouni Högander [Tue, 18 Jun 2024 05:30:25 +0000 (08:30 +0300)]
Revert "drm/i915/psr: Disable early transport by default"

This reverts commit f3c2031db7dfdf470a2d9bf3bd1efa6edfa72d8d.

We want to notice possible issues faced with PSR2 Region Early Transport as
early as possible -> let's revert patch disabling Region Early Transport by
default. Also eDP 1.5 Panel Replay requires Early Transport.

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Add new debug bit to disable Panel Replay
Jouni Högander [Tue, 18 Jun 2024 05:30:24 +0000 (08:30 +0300)]
drm/i915/psr: Add new debug bit to disable Panel Replay

Add new debug bit to be used with i915_edp_psr_debug debugfs
interface. This can be used to disable Panel Replay.

v2: ensure that fastset is performed when the bit changes

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Disable PSR/Panel Replay on sink side for PSR only
Jouni Högander [Tue, 18 Jun 2024 05:30:23 +0000 (08:30 +0300)]
drm/i915/psr: Disable PSR/Panel Replay on sink side for PSR only

Enabling/disabling Panel Replay on sink side has to be done before link
training. We can't disable it in sink side on PSR disable.

Fixes: 88ae6c65ecdb ("drm/i915/psr: Unify panel replay enable/disable sink")
Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Disable PSR2 SU Region ET if enable_psr module parameter is set
Jouni Högander [Tue, 18 Jun 2024 05:30:22 +0000 (08:30 +0300)]
drm/i915/psr: Disable PSR2 SU Region ET if enable_psr module parameter is set

Currently PSR2 SU Region Early Transport is enabled by default on Lunarlake
if panel supports it despite enable_psr module parameter value. This patch
makes it possible for user to limit used PSR mode and prevent SU Region
Early Transport by setting enable_psr as 2. With default (-1) PSR2 SU
Region Early Transport is allowed.

v2: fix/improve commit desciption

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Disable Panel Replay if PSR mode is set via module parameter
Jouni Högander [Tue, 18 Jun 2024 05:30:21 +0000 (08:30 +0300)]
drm/i915/psr: Disable Panel Replay if PSR mode is set via module parameter

If user is specifically limiting PSR mode to PSR1 or PSR2: disable Panel
Replay. With default value -1 all modes are allowed including Panel
Replay. Disabling PSR using value 0 disables Panel Replay as well.

Also own compute config helper is added for Panel Replay. This makes sense
because number of Panel Replay specific checks are increasing.

v2: Squash adding Panel Replay compute config helper

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/alpm: Fix port clock usage in AUX Less wake time calculation
Jouni Högander [Tue, 18 Jun 2024 05:30:20 +0000 (08:30 +0300)]
drm/i915/alpm: Fix port clock usage in AUX Less wake time calculation

Port clock is link rate in 10 kbit/s units. Take this into account when
calculating AUX Less wake time.

Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Wa 16021440873 is writing wrong register
Jouni Högander [Tue, 18 Jun 2024 05:30:19 +0000 (08:30 +0300)]
drm/i915/display: Wa 16021440873 is writing wrong register

Wa 16021440873 is writing wrong register. Instead of PIPE_SRCSZ_ERLY_TPT
write CURPOS_ERLY_TPT.

v2: use right offset as well

Fixes: 29cdef8539c3 ("drm/i915/display: Implement Wa_16021440873")
Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Mika Kahola <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Set SU area width as pipe src width
Jouni Högander [Tue, 18 Jun 2024 05:30:18 +0000 (08:30 +0300)]
drm/i915/psr: Set SU area width as pipe src width

Currently SU area width is set as MAX_INT. This is causing
problems. Instead set it as pipe src width.

Fixes: 86b26b6aeac7 ("drm/i915/psr: Carry su area in crtc_state")
Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Mika Kahola <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Enable Xe2+ overrun mode
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:09 +0000 (18:46 -0700)]
drm/xe/oa: Enable Xe2+ overrun mode

Enable Xe2+ overrun mode. For Xe2+, when overrun mode is enabled, there are
no partial reports at the end of buffer, making the OA buffer effectively a
non-power-of-2 size circular buffer whose size, circ_size, is a multiple of
the report size.

v2: Fix implementation of xe_oa_circ_diff/xe_oa_circ_incr (Umesh)

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Changes to OA_TAKEN
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:08 +0000 (18:46 -0700)]
drm/xe/oa: Changes to OA_TAKEN

Rename OA_TAKEN to xe_oa_circ_diff, since xe_oa_circ_diff better describes
what the macro actually does. Also convert to function and add xe_oa_stream
arg. These will be used in the following patch.

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Override GuC RC with OA on PVC
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:07 +0000 (18:46 -0700)]
drm/xe/oa: Override GuC RC with OA on PVC

On PVC, a w/a resets RCS/CCS before it goes into RC6. This breaks OA since
OA does not expect engine resets during its use. Fix it by disabling RC6.

v2: Convert to gt oriented error/warn messages (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Add MMIO trigger support
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:06 +0000 (18:46 -0700)]
drm/xe/oa: Add MMIO trigger support

Add MMIO trigger support and allow-list required registers for MMIO trigger
use case. Registers are whitelisted for the lifetime of the driver but MMIO
trigger is enabled only for the duration of the stream.

Bspec: 45925, 60340, 61228

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: OA buffer mmap
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:05 +0000 (18:46 -0700)]
drm/xe/oa/uapi: OA buffer mmap

Allow the OA buffer to be mmap'd to userspace. This is needed for the MMIO
trigger use case. Even otherwise, with whitelisted OA head/tail ptr
registers, userspace can receive/interpret OA data from the mmap'd buffer
without issuing read()'s on the OA stream fd.

v2: Remove unmap_mapping_range from xe_oa_release (Thomas H)
    Use vm_flags_mod (Umesh)

Acked-by: Rodrigo Vivi <[email protected]>
Suggested-by: Umesh Nerlige Ramappa <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Query OA unit properties
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:04 +0000 (18:46 -0700)]
drm/xe/oa/uapi: Query OA unit properties

Implement query for properties of OA units present on a device.

v2: Clean up reserved/pad fields (Umesh)
    Follow the same scheme as other query structs
v3: Skip reporting reserved engines attached to OA units
v4: Expose oa_buf_size via DRM_XE_PERF_IOCTL_INFO (Umesh)
v5: Don't expose capabilities as OR of properties (Umesh)
v6: Add extensions to query output structs: drm_xe_oa_unit,
    drm_xe_query_oa_units and drm_xe_oa_stream_info
v7: Change oa_units[] array to __u64 type

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Add OAC support
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:03 +0000 (18:46 -0700)]
drm/xe/oa: Add OAC support

Similar to OAR, allow userspace to execute MI_REPORT_PERF_COUNT on compute
engines of a specified exec queue.

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: Add OAR support
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:02 +0000 (18:46 -0700)]
drm/xe/oa: Add OAR support

Add OAR support to allow userspace to execute MI_REPORT_PERF_COUNT on
render engines. Configuration batches are used to program the OAR unit, as
well as modifying the render engine context image of a specified exec queue
(to have correct register values when that context switches in).

v2: Rename/refactor xe_oa_modify_self (Umesh)
v3: Move IS_MI_LRI_CMD() into xe_oa.c (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Read file_operation
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:01 +0000 (18:46 -0700)]
drm/xe/oa/uapi: Read file_operation

Implement the OA stream read file_operation. Both blocking and non-blocking
reads are supported. As part of read system call, the read copies OA perf
data from the OA buffer to the user buffer, after appending packet headers
for status and data packets.

v2: Drop OA report headers, implement DRM_XE_PERF_IOCTL_STATUS (Umesh)
v3: Introduce 'struct drm_xe_oa_stream_status'
v4: Define oa_status register bitfields (Umesh)
v5: Add extensions to 'struct drm_xe_oa_stream_status'
v6: Minor cleanup, eliminate report32 variable
v7: Use -EIO to signal to userspace to read OASTATUS using
    DRM_XE_PERF_IOCTL_STATUS, change previous sites returning -EIO to
    return -EINVAL
    Make drm_xe_oa_stream_status bits contiguous (Jose, Umesh)
    rmw oa_status bits (Umesh)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Expose OA stream fd
Ashutosh Dixit [Tue, 18 Jun 2024 01:46:00 +0000 (18:46 -0700)]
drm/xe/oa/uapi: Expose OA stream fd

The OA stream open perf op returns an fd with its own file_operations for
the newly initialized OA stream. These file_operations allow userspace to
enable or disable the stream, as well as apply a different metric
configuration for the OA stream. Userspace can also poll for data
availability. OA stream initialization is completed in this commit by
enabling the OA stream. When sampling is enabled this starts a hrtimer
which periodically checks for data availablility.

v2: Use stream properties for stream reconfiguration with
    DRM_XE_PERF_IOCTL_CONFIG
v3: Hold runtime_pm reference across oa buffer alloc/free
v4: Fix 32 bit build

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa: OA stream initialization (OAG)
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:59 +0000 (18:45 -0700)]
drm/xe/oa: OA stream initialization (OAG)

Implement majority of OA stream initialization (as part of OA stream open)
ioctl). OAG buffer is allocated for receiving perf counter samples from
HW. OAG unit is initialized and the selected OA metric configuration is
programmed into OAG unit HW using a command/batch buffer.

Acked-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Define and parse OA stream properties
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:58 +0000 (18:45 -0700)]
drm/xe/oa/uapi: Define and parse OA stream properties

Properties for OA streams are specified by user space, when the stream is
opened, as a chain of drm_xe_ext_set_property struct's. Parse and validate
these stream properties.

v2: Remove struct drm_xe_oa_open_param (Harish Chegondi)
    Drop DRM_XE_OA_PROPERTY_POLL_OA_PERIOD_US (Umesh)
    Eliminate comparison with xe_oa_max_sample_rate (Umesh)
    Drop 'struct drm_xe_oa_record_header' (Umesh)
v3: s/DRM_XE_OA_PROPERTY_OA_EXPONENT/ \
    DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT/ (Jose)
v4: Fix 32 bit build
v5: Add non-static function kernel doc (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Add/remove OA config perf ops
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:57 +0000 (18:45 -0700)]
drm/xe/oa/uapi: Add/remove OA config perf ops

Introduce add/remove config perf ops for OA. OA configurations consist of a
set of event/counter select register address/value pairs. The add_config
perf op validates and stores such configurations and also exposes them in
the metrics sysfs. These configurations will be programmed to OA unit HW
when an OA stream using a configuration is opened. The OA stream can also
switch to other stored configurations.

v2: Start config id's from 1 and other minor review comments (Umesh)
v3: Add 32 bit build
v4: Add kernel doc for non-static functions (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Initialize OA units
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:56 +0000 (18:45 -0700)]
drm/xe/oa/uapi: Initialize OA units

Initialize OA unit data struct's for each gt during device probe. Also
assign OA units for hardware engines.

v2: Remove XE_OA_UNIT_OAG/XE_OA_UNIT_OAM_SAMEDIA_0 enum (Umesh)
    Change mtl_oa_base to 0x13000 (Umesh)
v3: Switch to drmm_ functions and other cleanups (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/oa/uapi: Add OA data formats
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:55 +0000 (18:45 -0700)]
drm/xe/oa/uapi: Add OA data formats

Add and initialize supported OA data formats for various platforms
(including Xe2). User can request OA data in any supported format.

Bspec: 52198, 60942, 61101

v2: Start 'xe_oa_format_name' enum from 0 (Umesh)
    Fix error rewind with OA (Umesh)
v3: Use graphics versions rather than absolute platform names
v4: Add missing kernel doc for struct memebers and enum and other minor
    changes (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/perf/uapi: Add perf_stream_paranoid sysctl
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:54 +0000 (18:45 -0700)]
drm/xe/perf/uapi: Add perf_stream_paranoid sysctl

Normally only superuser/root can access perf counter data. However,
superuser can set perf_stream_paranoid sysctl to 0 to allow non-privileged
users to also access perf data. perf_stream_paranoid is introduced at the
perf layer to allow different perf stream types to share this access
mechanism.

v2: Add kernel doc for non-static functions (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/perf/uapi: "Perf" layer to support multiple perf counter stream types
Ashutosh Dixit [Tue, 18 Jun 2024 01:45:53 +0000 (18:45 -0700)]
drm/xe/perf/uapi: "Perf" layer to support multiple perf counter stream types

In Xe, the plan is to support multiple types of perf counter streams (OA is
only one type of these streams). Rather than introduce NxM ioctls for
these (N perf streams with M ioctl's per perf stream), we decide to
multiplex these (N different stream types and the M ops for each of these
stream types) through a single PERF ioctl. This multiplexing is the purpose
of the PERF layer.

In addition to PERF DRM ioctl's, another set of ioctl's on the PERF fd are
defined. These are expected to be common to different PERF stream types and
therefore defined at the PERF layer itself.

v2: Add param_size to 'struct drm_xe_perf_param' (Umesh)
v3: Rename 'enum drm_xe_perf_ops' to
    'enum drm_xe_perf_ioctls' (Guy Zadicario)
    Add DRM_ prefix to ioctl names to indicate uapi names
v4: Add 'enum drm_xe_perf_op' previously missed out (Guy Zadicario)
v5: Squash the ops and PERF layer patches into a single patch (Umesh)
    Remove param_size from struct 'drm_xe_perf_param' (Umesh)
v6: Add DRM_XE_PERF_IOCTL_STATUS
v7: Add DRM_XE_PERF_IOCTL_INFO
v8: Fix Copyright years, fix DRM_XE_PERF_TYPE_MAX, move '#include
    "xe_perf.h"' to xe_perf.c, add kernel doc (Michal)

Acked-by: Rodrigo Vivi <[email protected]>
Acked-by: Guy Zadicario <[email protected]>
Acked-by: José Roberto de Souza <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/xe2: Add proper check for media in Wa_14020756599
Lucas De Marchi [Tue, 18 Jun 2024 05:00:44 +0000 (22:00 -0700)]
drm/xe/xe2: Add proper check for media in Wa_14020756599

A temporary fixup was made in commit 24d0d98af1c3 ("drm/xe/xe2lpm: Fixup
Wa_14020756599") due to limitations in the RTP infra. Now that RTP has
support for OR condition that change can be removed. RTP now also
supports checking any GT, so use that instead of the more specific
xe_rtp_match_when_media2000() used in that commit.

Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/rtp: Add match on any GT
Lucas De Marchi [Tue, 18 Jun 2024 05:00:43 +0000 (22:00 -0700)]
drm/xe/rtp: Add match on any GT

One surprising factor of GRAPHICS_VERSION()/MEDIA_VERSION() matching for
people adding new WAs is that it implicitly checks that the
graphics/media IP under check is of that specific type and not that the
device contains a media/graphics IP of that version. Add a new
*_ANY_GT() variant that can be used in that case.

Signed-off-by: Lucas De Marchi <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/rtp: Allow to OR rules
Lucas De Marchi [Tue, 18 Jun 2024 05:00:42 +0000 (22:00 -0700)]
drm/xe/rtp: Allow to OR rules

Some workarounds started to depend on different set of conditions where
the action should be applied if any of them match. See e.g.
commit 24d0d98af1c3 ("drm/xe/xe2lpm: Fixup Wa_14020756599"). Add
XE_RTP_MATCH_OR that allows to implement a logical OR for the rules.
Normal precedence applies:

r1, r2, OR, r3

means

(r1 AND r2) OR r3

The check is shortcut as soon as a set of conditions match.

v2: Do not match on empty number of rules-other-than-OR evaluated

Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/rtp: Expand max rules/actions per entry
Lucas De Marchi [Tue, 18 Jun 2024 05:00:41 +0000 (22:00 -0700)]
drm/xe/rtp: Expand max rules/actions per entry

Having at most 4 rules per entry is already reaching the maximum.
Expand it to 6 to allow for more room. With the addition of OR
condition for rules, this will very soon not be sufficient.

Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/rtp: Allow to match 0 sr entries
Lucas De Marchi [Tue, 18 Jun 2024 05:00:40 +0000 (22:00 -0700)]
drm/xe/rtp: Allow to match 0 sr entries

If none of the rules match, there should be 0 entries in the sr xarray,
so none of them should have a register matching.

Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/panic: depends on !VT_CONSOLE
Jocelyn Falempe [Thu, 13 Jun 2024 15:40:16 +0000 (17:40 +0200)]
drm/panic: depends on !VT_CONSOLE

The race condition between fbcon and drm_panic can only occurs if
VT_CONSOLE is set. So update drm_panic dependency accordingly.
This will make it easier for Linux distributions to enable drm_panic
by disabling VT_CONSOLE, and keeping fbcon terminal.
The only drawback is that fbcon won't display the boot kmsg, so it
should rely on userspace to do that.
At least plymouth already handle this case with
https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/224

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/vf: Don't touch GuC irq registers if using memory irqs
Michal Wajdeczko [Mon, 17 Jun 2024 15:47:36 +0000 (17:47 +0200)]
drm/xe/vf: Don't touch GuC irq registers if using memory irqs

On platforms where VFs are using memory based interrupts, we
missed invalid access to no longer existing interrupt registers,
as we keep them marked with XE_REG_OPTION_VF. To fix that just
either setup memirq vectors in GuC or enable legacy interrupts.

Fixes: aef4eb7c7dec ("drm/xe/vf: Setup memory based interrupts in GuC")
Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Matt Roper <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm: Add DRM_MODE_TV_MODE_MONOCHROME
Nick Hollinghurst [Fri, 16 Feb 2024 18:48:55 +0000 (18:48 +0000)]
drm: Add DRM_MODE_TV_MODE_MONOCHROME

Add this as a value for enum_drm_connector_tv_mode, represented
by the string "Mono", to generate video with no colour encoding
or bursts. Define it to have no pedestal (since only NTSC-M calls
for a pedestal).

Change default mode creation to acommodate the new tv_mode value
which comprises both 525-line and 625-line formats.

Acked-by: Daniel Vetter <[email protected]>
Signed-off-by: Nick Hollinghurst <[email protected]>
Signed-off-by: Dave Stevenson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Allow const pointer when checking SR-IOV mode
Michal Wajdeczko [Mon, 17 Jun 2024 12:26:13 +0000 (14:26 +0200)]
drm/xe: Allow const pointer when checking SR-IOV mode

It seems that more and more parts of the driver code rely on
having only a const pointer to the xe_device. Allow to check
SR-IOV mode in that code as well.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/tidss: Add drm_panic support
Javier Martinez Canillas [Sat, 15 Jun 2024 08:53:18 +0000 (10:53 +0200)]
drm/tidss: Add drm_panic support

Add support for the drm_panic infrastructure, which allows to display
a user friendly message on the screen when a Linux kernel panic occurs.

Signed-off-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Reviewed-by: Aradhya Bhatia <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/exec_queue: Rename xe_exec_queue::compute to xe_exec_queue::lr
Francois Dugast [Thu, 13 Jun 2024 17:03:48 +0000 (19:03 +0200)]
drm/xe/exec_queue: Rename xe_exec_queue::compute to xe_exec_queue::lr

The properties of this struct are used in long running context so
make that clear by renaming it to lr, in alignment with the rest
of the code.

Cc: Matthew Brost <[email protected]>
Signed-off-by: Francois Dugast <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodrm/i915/display: Update calculation to avoid overflow
Mitul Golani [Fri, 14 Jun 2024 04:42:13 +0000 (10:12 +0530)]
drm/i915/display: Update calculation to avoid overflow

Update calculation to avoid overflow.

-v2:
Remove extra line between cc and signed-off.

Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal")
Cc: Mitul Golani <[email protected]>
Cc: Ankit Nautiyal <[email protected]>
Cc: Suraj Kandpal <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Mitul Golani <[email protected]>
Reviewed-by: Ankit Nautiyal <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodrm/nouveau: Constify struct nouveau_job_ops
Christophe JAILLET [Fri, 14 Jun 2024 16:08:30 +0000 (18:08 +0200)]
drm/nouveau: Constify struct nouveau_job_ops

"struct nouveau_job_ops" is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

In order to do it, "struct nouveau_job" and "struct nouveau_job_args" also
need to be adjusted to this new const qualifier.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
   5570     152       0    5722    165a drivers/gpu/drm/nouveau/nouveau_exec.o

After:
=====
   text    data     bss     dec     hex filename
   5630     112       0    5742    166e drivers/gpu/drm/nouveau/nouveau_exec.o

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/860e9753d7867aa46b003bb3d0497f1b04065b24.1718381285.git.christophe.jaillet@wanadoo.fr
9 months agonouveau: rip out busy fence waits
Dave Airlie [Wed, 17 Apr 2024 05:40:32 +0000 (15:40 +1000)]
nouveau: rip out busy fence waits

I'm pretty sure this optimisation is actually not a great idea,
and is racy with other things waiting for fences.

Just nuke it, there should be no need to do fence waits in a
busy CPU loop.

Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Ben Skeggs <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/ci: add tests on vkms
Vignesh Raman [Fri, 14 Jun 2024 16:18:35 +0000 (21:48 +0530)]
drm/ci: add tests on vkms

Add job that runs igt on top of vkms.

Acked-by: Maíra Canal <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Acked-by: Jessica Zhang <[email protected]>
Tested-by: Jessica Zhang <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: update handling of FBC when VT-d active workaround
Vinod Govindapillai [Tue, 28 May 2024 11:48:26 +0000 (14:48 +0300)]
drm/i915/display: update handling of FBC when VT-d active workaround

Move the handling of the disabling FBC when VT-d is active wa
as part of the intel_fbc_check_plane(). As the hw is still there,
intel_fbc_sanitize should be able to handle the state properly.

v2: update the patch description (Jani Nikula)

v3: fix the return value in wa handling (Jani Nikula)

Bspec: 21664
Suggested-by: Ville Syrjälä <[email protected]>
Signed-off-by: Vinod Govindapillai <[email protected]>
Reviewed-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: move comments about FSB straps to proper place
Jani Nikula [Fri, 14 Jun 2024 09:22:39 +0000 (12:22 +0300)]
drm/i915: move comments about FSB straps to proper place

Move the comment about FSB straps to where the relevant register is
read.

Suggested-by: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/8a5b6cd3db80259c30263861f1a9ff04fea2e7f0.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/cdclk: use i9xx_fsb_freq() for rawclk_freq initialization
Jani Nikula [Fri, 14 Jun 2024 09:22:38 +0000 (12:22 +0300)]
drm/i915/cdclk: use i9xx_fsb_freq() for rawclk_freq initialization

Instead of duplicating the CLKCFG parsing, reuse i9xx_fsb_freq() to
figure out rawclk_freq where applicable.

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/21511f155f1f446e066117bc6ed3165618d7afd6.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: use i9xx_fsb_freq() for GT clock frequency
Jani Nikula [Fri, 14 Jun 2024 09:22:37 +0000 (12:22 +0300)]
drm/i915: use i9xx_fsb_freq() for GT clock frequency

Reuse i9xx_fsb_freq() for GT clock frequency initialization instead of
depending on rawclk_freq.

Note: If the init order was changed, we could use i915->fsb_freq
directly. However, GT clock initialization is done in
i915_driver_mmio_probe(), but intel_dram_detect() later in
i915_driver_hw_probe(), with a dependency on intel_pcode_init().

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/0678d8ec9772725b47d4fa5b14e3b3a34256d5cf.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: extend the fsb_freq initialization to more platforms
Jani Nikula [Fri, 14 Jun 2024 09:22:36 +0000 (12:22 +0300)]
drm/i915: extend the fsb_freq initialization to more platforms

Initialize fsb frequency for more platforms to be able to use it for GT
clock and rawclk frequency initialization.

Note: There's a discrepancy between existing pnv_fsb_freq() and
i9xx_hrawclk() regarding CLKCFG interpretation. Presume all PNV is
mobile.

Default to 1333 MHz for unknown values, similar to i9xx_hrawclk().

v2:
- Add MISSING_CASE() (Ville)
- Default to the same frequency for both branches (Ville)

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7cd6dbd4dafb900ac1dd12be0ec096ff1d5fc6cf.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: convert fsb_freq and mem_freq to kHz
Jani Nikula [Fri, 14 Jun 2024 09:22:35 +0000 (12:22 +0300)]
drm/i915: convert fsb_freq and mem_freq to kHz

We'll want to use fsb frequency for deriving GT clock and rawclk
frequencies in the future. Increase the accuracy by converting to
kHz. Do the same for mem freq to be aligned.

Round the frequencies ending in 666 to 667.

v2: Also handle mem_freq in gen5_rps_init() (Ville)

Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/17fe2544b876549f63fac0f956273f5f282081b3.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/gt: remove mem freq from gt debugfs
Jani Nikula [Fri, 14 Jun 2024 09:22:34 +0000 (12:22 +0300)]
drm/i915/gt: remove mem freq from gt debugfs

It's a bit out of place, and only printed for VLV/CHV.

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/bbfec4c67a81d1d3de1f40484a80b7164e69df21.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/dram: rearrange mem freq init
Jani Nikula [Fri, 14 Jun 2024 09:22:33 +0000 (12:22 +0300)]
drm/i915/dram: rearrange mem freq init

Follow the same style in mem freq init as in fsb freq init, returning
the value instead of assigning in multiple places.

Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/f098ccdbb0c42016d5dad81e0b089bb4babe29f0.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/dram: split out pnv DDR3 detection
Jani Nikula [Fri, 14 Jun 2024 09:22:32 +0000 (12:22 +0300)]
drm/i915/dram: split out pnv DDR3 detection

Split out the PNV DDR3 detection to a distinct step instead of
conflating it with mem freq detection.

Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/c4bf9d32479ab5024e9daa37a996508f543f05e9.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/dram: separate fsb freq detection from mem freq
Jani Nikula [Fri, 14 Jun 2024 09:22:31 +0000 (12:22 +0300)]
drm/i915/dram: separate fsb freq detection from mem freq

To simplify further changes, add separate functions for reading the fsb
frequency.

This ends up reading CLKCFG register twice, but it's not a big deal.

Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7582651aa21ac2c1472111c4e81ba8fee182f80e.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/wm: clarify logging on not finding CxSR latency config
Jani Nikula [Fri, 14 Jun 2024 09:22:30 +0000 (12:22 +0300)]
drm/i915/wm: clarify logging on not finding CxSR latency config

Clarify and unify the logging on not finding PNV CxSR latency
config.

Just let the i915->fsb_freq == 0 || i915->mem_freq == 0 case go through
the table instead of checking for it separately.

v2: Do not check for fsb == 0 || mem == 0 separately (Matt)

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/6333cb0675c531e971e829105f1ecfc4d71bdc6b.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency
Jani Nikula [Fri, 14 Jun 2024 09:22:29 +0000 (12:22 +0300)]
drm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency

Clarify that the function is specific to PNV, making subsequent changes
slightly easier to grasp.

Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7d4e3c9a4220ff84af2741e5cd7bb62d1b4f2a44.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/mso: using joiner is not possible with eDP MSO
Jani Nikula [Fri, 14 Jun 2024 14:23:11 +0000 (17:23 +0300)]
drm/i915/mso: using joiner is not possible with eDP MSO

It's not possible to use the joiner at the same time with eDP MSO. When
a panel needs MSO, it's not optional, so MSO trumps joiner.

v3: Only change intel_dp_has_joiner(), leave debugfs alone (Ville)

Fixes: bc71194e8897 ("drm/i915/edp: enable eDP MSO during link training")
Cc: <[email protected]> # v5.13+
Cc: Ville Syrjala <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm: zynqmp_dp: Don't delay work
Sean Anderson [Fri, 3 May 2024 19:29:15 +0000 (15:29 -0400)]
drm: zynqmp_dp: Don't delay work

We always call scheduled_delayed_work with no delay, so just use a
non-delayed work_struct instead.

Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm: zynqmp_dp: Rearrange zynqmp_dp for better padding
Sean Anderson [Fri, 3 May 2024 19:29:14 +0000 (15:29 -0400)]
drm: zynqmp_dp: Rearrange zynqmp_dp for better padding

Sort the members of struct zynqmp_dp to reduce padding necessary for
alignment.

Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm: zynqmp_kms: Fix AUX bus not getting unregistered
Sean Anderson [Fri, 3 May 2024 19:29:13 +0000 (15:29 -0400)]
drm: zynqmp_kms: Fix AUX bus not getting unregistered

drm_encoder_cleanup is responsible for calling drm_bridge_detach for
each bridge attached to the encoder. zynqmp_dp_bridge_detach is in turn
responsible for unregistering the AUX bus. However, we never ended up
calling drm_encoder_cleanup in the remove or error paths, so the AUX bus
would stick around after the rest of the driver had been removed.

I don't really understand why drm_mode_config_cleanup doesn't call
drm_encoder_cleanup for us. It will call destroy (which for
simple_encoder is drm_encoder_cleanup) on encoders in the mode_config's
encoder_list.

Should drm_encoder_cleanup get called before or after
drm_atomic_helper_shutdown?

Fixes: 2dfd045c8435 ("drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time")
Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm: xlnx: zynqmp_dpsub: Enable plane in atomic update
Anatoliy Klymenko [Thu, 23 May 2024 23:49:28 +0000 (16:49 -0700)]
drm: xlnx: zynqmp_dpsub: Enable plane in atomic update

Unconditionally enable the DPSUB layer in the corresponding atomic plane
update callback. Setting the new display mode may require disabling and
re-enabling the CRTC. This effectively resets DPSUB to the default state
with all layers disabled. The original implementation of the plane atomic
update enables the corresponding DPSUB layer only if the framebuffer
format has changed. This would leave the layer disabled after switching to
a different display mode with the same framebuffer format.

Signed-off-by: Anatoliy Klymenko <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm: zynqmp_dpsub: Fix an error handling path in zynqmp_dpsub_probe()
Christophe JAILLET [Mon, 20 May 2024 09:40:37 +0000 (11:40 +0200)]
drm: zynqmp_dpsub: Fix an error handling path in zynqmp_dpsub_probe()

If zynqmp_dpsub_drm_init() fails, we must undo the previous
drm_bridge_add() call.

Fixes: be3f3042391d ("drm: zynqmp_dpsub: Always register bridge")
Signed-off-by: Christophe JAILLET <[email protected]>
Reviewed-by: Sean Anderson <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/974d1b062d7c61ee6db00d16fa7c69aa1218ee02.1716198025.git.christophe.jaillet@wanadoo.fr
9 months agodrm/xe/xe2lpg: Add Wa_14021490052
Akshata Jahagirdar [Fri, 14 Jun 2024 18:24:56 +0000 (11:24 -0700)]
drm/xe/xe2lpg: Add Wa_14021490052

Add Wa_14021490052 for Xe2LPG 20.04.

Signed-off-by: Akshata Jahagirdar <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/uc: Fix and start using xe_uc_fw_sanitize()
Michal Wajdeczko [Thu, 13 Jun 2024 15:34:24 +0000 (17:34 +0200)]
drm/xe/uc: Fix and start using xe_uc_fw_sanitize()

Helper xe_uc_fw_sanitize() was defined but never used. First fix
it by properly exiting also from the LOAD_FAIL state, then use it
in GuC and HuC sanitize code.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Matthew Brost <[email protected]>
Reviewed-by: Himal Prasad Ghimiray <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Use fixed CCS mode when running in SR-IOV mode
Michal Wajdeczko [Fri, 14 Jun 2024 10:14:15 +0000 (12:14 +0200)]
drm/xe: Use fixed CCS mode when running in SR-IOV mode

We don't support changing CCS mode when running in SR-IOV mode yet.
When running as a PF driver just apply default ccs_mode=1 that VF
drivers will assume as already applied and fixed.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/sched_job: Promote xe_sched_job_add_deps()
Francois Dugast [Fri, 14 Jun 2024 09:44:33 +0000 (11:44 +0200)]
drm/xe/sched_job: Promote xe_sched_job_add_deps()

Move it out of the xe_migrate compilation unit so it can be re-used in
other places.

Cc: Matthew Brost <[email protected]>
Signed-off-by: Francois Dugast <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodrm/ci: mark kms_addfb_basic@addfb25-bad-modifier as passing on msm
Dmitry Baryshkov [Thu, 13 Jun 2024 16:33:57 +0000 (19:33 +0300)]
drm/ci: mark kms_addfb_basic@addfb25-bad-modifier as passing on msm

The commit b228501ff183 ("drm/msm: merge dpu format database to MDP
formats") made get_format take modifiers into account. This makes
kms_addfb_basic@addfb25-bad-modifier pass on MDP4 and MDP5 platforms.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240613-msm-pass-addfb25-bad-modifier-v1-1-23c556e96c8a@linaro.org
9 months agodrm/i915: Remove bogus MST check in intel_dp_has_audio()
Ville Syrjälä [Fri, 17 May 2024 14:53:56 +0000 (17:53 +0300)]
drm/i915: Remove bogus MST check in intel_dp_has_audio()

No idea what this MST checks is doing in intel_dp_has_audio().
Looks completely pointless, so get rid of it.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Utilize edp_disable_dsc from VBT
Ville Syrjälä [Fri, 17 May 2024 14:53:55 +0000 (17:53 +0300)]
drm/i915: Utilize edp_disable_dsc from VBT

Disable eDP DSC usage when instructed to do so by the VBT.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Reuse intel_dp_supports_dsc() for MST
Ville Syrjälä [Fri, 17 May 2024 14:53:54 +0000 (17:53 +0300)]
drm/i915: Reuse intel_dp_supports_dsc() for MST

intel_dp_supports_dsc() now works for MST as well, reuse it.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Use intel_dp_has_dsc() during .compute_config()
Ville Syrjälä [Fri, 17 May 2024 14:53:53 +0000 (17:53 +0300)]
drm/i915: Use intel_dp_has_dsc() during .compute_config()

Reuse intel_dp_has_dsc() during .compute_config() instead of
repeating some of the checks again by hand. We'll be adding
more checks to intel_dp_has_dsc() and this will make sure
we cover both .mode_valid() and .compute_config() with them.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Handle MST in intel_dp_has_dsc()
Ville Syrjälä [Fri, 17 May 2024 14:53:52 +0000 (17:53 +0300)]
drm/i915: Handle MST in intel_dp_has_dsc()

Utilize intel_dp_has_dsc() for MST as well.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Extract intel_dp_has_dsc()
Ville Syrjälä [Fri, 17 May 2024 14:53:51 +0000 (17:53 +0300)]
drm/i915: Extract intel_dp_has_dsc()

Extract a helper to check whether the source+sink combo
supports DSC. That basic check is needed both during mode
validation and compute config. We'll also need to add extra
checks to both places, so having a single place for it is nicer.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Drop redundant dsc_decompression_aux check
Ville Syrjälä [Fri, 17 May 2024 14:53:50 +0000 (17:53 +0300)]
drm/i915: Drop redundant dsc_decompression_aux check

If we have no dsc_decompression_aux (only possible on MST)
then we won't have the dsc_dpcd caps either. So checking
both is not needed.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodt-bindings: display: panel-edp-legacy: drop several eDP panels
Dmitry Baryshkov [Fri, 14 Jun 2024 00:02:21 +0000 (03:02 +0300)]
dt-bindings: display: panel-edp-legacy: drop several eDP panels

The panel-edp-legacy.yaml includes legacy bindings for several eDP
panels which were never used in DT files present in Linux tree and most
likely have never been used with the upstream kernel. Drop compatibles
for these panels in favour of using a generic "edp-panel" device on the
AUX bus.

Reviewed-by: Douglas Anderson <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
9 months agodrm/panel-edp: drop several legacy panels
Dmitry Baryshkov [Fri, 14 Jun 2024 00:02:22 +0000 (03:02 +0300)]
drm/panel-edp: drop several legacy panels

The panel-edp driver supports legacy compatible strings for several eDP
panels which were never used in DT files present in Linux tree and most
likely have never been used with the upstream kernel. Drop compatibles
for these panels in favour of using a generic "edp-panel" device on the
AUX bus.

Reviewed-by: Douglas Anderson <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
9 months agodrm/panel-edp: add fat warning against adding new panel compatibles
Dmitry Baryshkov [Fri, 14 Jun 2024 00:02:20 +0000 (03:02 +0300)]
drm/panel-edp: add fat warning against adding new panel compatibles

Add a fat warning against adding new panel compatibles to the panel-edp
driver. All new users of the eDP panels are supposed to use the generic
"edp-panel" compatible device on the AUX bus. The remaining compatibles
are either used by the existing DT or were used previously and are
retained for backwards compatibility.

Suggested-by: Doug Anderson <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
9 months agodrm/xe: Drop duplicated declaration
Michal Wajdeczko [Thu, 13 Jun 2024 19:57:02 +0000 (21:57 +0200)]
drm/xe: Drop duplicated declaration

The declaration of xe_reg_whitelist_process_engine() function does
not fit into "xe_wa.h" and is already a duplicate.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: remove unused pipe/plane B register macros
Jani Nikula [Fri, 7 Jun 2024 15:25:40 +0000 (18:25 +0300)]
drm/i915: remove unused pipe/plane B register macros

None of these are used. The parametrized register macros all depend on
the pipe/plane A offset macros alone. Remove the unused ones.

v2: Rebase

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/16d278bea466a69cdce94fd83d98dd15ce1a8c89.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: relocate some DSPCNTR reg bit definitions
Jani Nikula [Fri, 7 Jun 2024 15:25:39 +0000 (18:25 +0300)]
drm/i915: relocate some DSPCNTR reg bit definitions

Some plane B/C specific bits were left next to the unused _DSPBCNTR
macro. Move them next to the DSPCNTR() macro.

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/85409fbe5073797c0dc17df43eeb25abe9ff889f.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE()
Jani Nikula [Fri, 7 Jun 2024 15:25:38 +0000 (18:25 +0300)]
drm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE()

Do not rely on having dev_priv local variable, pass it to the macro.

Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: [email protected]
Reviewed-by: Zhi Wang <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/2ff78ebd0dc84178f5feacee7ef2a6cb4132b9ae.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
This page took 0.11542 seconds and 4 git commands to generate.