]> Git Repo - linux.git/log
linux.git
9 months agodrm/i915/gvt: rename range variable to stride
Jani Nikula [Fri, 7 Jun 2024 15:25:37 +0000 (18:25 +0300)]
drm/i915/gvt: rename range variable to stride

Range is a bit odd name for what really is stride. Rename. Switch to u32
while at it.

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/8b8d4acee15da07845ed1779d6856d5c3f50a132.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/gvt: use proper i915_reg_t for calc_index() parameters
Jani Nikula [Fri, 7 Jun 2024 15:25:36 +0000 (18:25 +0300)]
drm/i915/gvt: use proper i915_reg_t for calc_index() parameters

In order to be able to use the proper register macros instead of the
underscore prefixed ones, pass i915_reg_t for the calc_index()
parameters.

Side note: DSPSURF is really about planes, not pipes. Fixed stride
doesn't work for plane C for CHV (but that's okay for gvt). This doesn't
support planes beyond C either. But all that is unrelated to the change
at hand.

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/282b19c44d83c96b52c261cfc7218e7e54076cba.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/gvt: remove the unused end parameter from calc_index()
Jani Nikula [Fri, 7 Jun 2024 15:25:35 +0000 (18:25 +0300)]
drm/i915/gvt: remove the unused end parameter from calc_index()

All callers of calc_index() pass 0 for the end parameter. Remove it.

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/aaa24a5cbcf876d3b95e0f5f6594f972a860b6bc.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agoaccel/ivpu: Remove unused ivpu_rpm_get_if_active()
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:32 +0000 (14:04 +0200)]
accel/ivpu: Remove unused ivpu_rpm_get_if_active()

This is now dead code and has to be removed.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Remove duplicated debug messages
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:31 +0000 (14:04 +0200)]
accel/ivpu: Remove duplicated debug messages

Remove duplicated debug messages from ivpu_jsm_(un)register_db().
Debug messages are already printed one level higher.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Increase autosuspend delay to 100ms on 40xx
Andrzej Kacprowski [Tue, 11 Jun 2024 12:04:30 +0000 (14:04 +0200)]
accel/ivpu: Increase autosuspend delay to 100ms on 40xx

The new HW is more power efficient and there is no
need to enter the D0i3/D3 so quickly. Increasing
autosuspend delay reduces latency in certain usage
scenarios.

Signed-off-by: Andrzej Kacprowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Synchronize device unbind with recovery work
Wachowski, Karol [Tue, 11 Jun 2024 12:04:29 +0000 (14:04 +0200)]
accel/ivpu: Synchronize device unbind with recovery work

Do not allow unbinding device in the middle of recovery flow.

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Disable MMU before checking for idle
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:28 +0000 (14:04 +0200)]
accel/ivpu: Disable MMU before checking for idle

Disable MMU communication before checking if NPU is idle.
NPU may otherwise be woken up when adding/removing contexts.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Add test mode flag for disabling timeouts
Maciej Falkowski [Tue, 11 Jun 2024 12:04:27 +0000 (14:04 +0200)]
accel/ivpu: Add test mode flag for disabling timeouts

Add new test mode flag that will disable all timeouts
defined in timeout fields of struct ivpu_device.
Remove also reschedule_suspend field as it is unused.

Signed-off-by: Maciej Falkowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Make parts of FW image read-only
Wachowski, Karol [Tue, 11 Jun 2024 12:04:26 +0000 (14:04 +0200)]
accel/ivpu: Make parts of FW image read-only

Implement setting specified buffer ranges as read-only.
In case if specified range is not 64K aligned and 64K contiguous
MMU600 pages are turned on, split 64K mapping to allow 4K granularity
for read-only configuration.

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Update FW BOOT API headers
Wachowski, Karol [Tue, 11 Jun 2024 12:04:25 +0000 (14:04 +0200)]
accel/ivpu: Update FW BOOT API headers

This commit bumps BOOT API version to 3.24

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Make selected params read-only
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:24 +0000 (14:04 +0200)]
accel/ivpu: Make selected params read-only

Make disable_mmu_cont_pages and force_snoop params read-only.
It is unsafe to change these params after driver is loaded.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Implement DCT handling
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:23 +0000 (14:04 +0200)]
accel/ivpu: Implement DCT handling

When host system is under heavy load and the NPU is already running
on the lowest frequency, PUNIT may request Duty Cycle Throttling (DCT).
This will further reduce NPU power usage.

PUNIT requests DCT mode using Survabilty IRQ and mailbox register.
The driver then issues a JSM message to the FW that enables
the DCT mode. If the NPU resets while in DCT mode, the driver request
DCT mode during FW boot.

Also add debugfs "dct" file that allows to set arbitrary DCT percentage,
which is used by driver tests.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Disable clock relinquish for MMIO reset
Wachowski, Karol [Tue, 11 Jun 2024 12:04:22 +0000 (14:04 +0200)]
accel/ivpu: Disable clock relinquish for MMIO reset

It is required to disable NPU clock relinquish for the time
of MMIO reset. Clock relinquish gets into default (enabled)
state after MMIO reset is performed.

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Disable disable_clock_relinquish WA for LNL B0+
Wachowski, Karol [Tue, 11 Jun 2024 12:04:21 +0000 (14:04 +0200)]
accel/ivpu: Disable disable_clock_relinquish WA for LNL B0+

This WA is only needed for LNL revision A.

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Remove suspend_reschedule_counter
Jacek Lawrynowicz [Tue, 11 Jun 2024 12:04:20 +0000 (14:04 +0200)]
accel/ivpu: Remove suspend_reschedule_counter

Don't retry runtime suspend. It is now expected to succeed on the first
try. After autosuspend_delay passed, FW should already be idle and
ready for warm suspend.

Signed-off-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Wachowski, Karol <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Abort jobs of faulty context
Maciej Falkowski [Tue, 11 Jun 2024 12:04:19 +0000 (14:04 +0200)]
accel/ivpu: Abort jobs of faulty context

Abort all jobs that belong to contexts generating MMU faults in order
to avoid flooding host with MMU IRQs.

Jobs are cancelled with:
  - SSID_RELEASE command when OS scheduling is enabled
  - DESTROY_CMDQ command when HW scheduling is enabled

Signed-off-by: Maciej Falkowski <[email protected]>
Co-developed-by: Wachowski, Karol <[email protected]>
Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoaccel/ivpu: Add wp0_during_power_up WA
Wachowski, Karol [Tue, 11 Jun 2024 12:04:18 +0000 (14:04 +0200)]
accel/ivpu: Add wp0_during_power_up WA

Send workpoint 0 request during power up on 37xx.
This is needed in rare case where WP0 was not sent
during power down due to device hang.

Signed-off-by: Wachowski, Karol <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/vf: Use correct check for being a VF driver
Michal Wajdeczko [Thu, 13 Jun 2024 12:07:49 +0000 (14:07 +0200)]
drm/xe/vf: Use correct check for being a VF driver

The IS_SRIOV macro returns true also when we are running as a PF
driver. Use correct IS_SRIOV_VF macro to skip force-wake management.

Fixes: 513ea833c201 ("drm/xe/vf: Ignore force-wake requests if VF")
Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Piotr Piórkowski <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Nirmoy Das <[email protected]>
Reviewed-by: Piotr Piórkowski <[email protected]>
Reviewed-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Add debugfs entry to get the link retrain disabled state
Imre Deak [Mon, 10 Jun 2024 16:49:33 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to get the link retrain disabled state

Add a connector debugfs entry showing if link retraining is disabled.

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Add debugfs entry to force link retrain
Imre Deak [Mon, 10 Jun 2024 16:49:32 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to force link retrain

Add a connector debugfs entry to force retrain an active link. This can
be used to test both custom link parameters (previously forced via the
force_link_rate/lane_count entries) or link train failure scenarios
(previously forced via the force_link_training_failure entry). The entry
will autoreset after the link-retrain is complete.

v2: Add the entry from intel_dp_link_training.c (Jani)
v3: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Jani Nikula <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Add debugfs entry to force link training failure
Imre Deak [Mon, 10 Jun 2024 16:49:31 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to force link training failure

Add a connector debugfs entry to force a failure during the following
1-2 link training. The entry will auto-reset after the specified link
training events are complete.

v2: Add the entry from intel_dp_link_training.c (Jani)
v3: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Jani Nikula <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Add debugfs entries to get the max link rate/lane count
Imre Deak [Mon, 10 Jun 2024 16:49:30 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entries to get the max link rate/lane count

Add connector debugfs entries to get the maximum link rate and lane
count.

v2: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Add debugfs entries to force the link rate/lane count
Imre Deak [Mon, 10 Jun 2024 16:49:29 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entries to force the link rate/lane count

Add connector debugfs entries to force the link rate/lane count to be
used by a link training afterwards. These settings will be clamped to
the supported, i.e. the source's and sink's common rate/lane count.

After forcing the link rate/lane count reset the link training
parameters and for a non-auto setting disable reducing the link
parameters via the fallback logic. The former one can be used after
testing link training failure scenarios - via debugfs entries added
later - to reset the reduced link parameters after the test.

v2:
- Add the entries from intel_dp_link_training.c (Jani)
- Rename the entries to i915_dp_set_link_rate/lane_count.
v3: (Ville)
- Rename the entries/struct fields to force_link_rate/lane_count.
- Lock connection_mutex only for the required intel_dp state.

Cc: Jani Nikula <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp_mst: Enable link training fallback for MST
Imre Deak [Mon, 10 Jun 2024 16:49:28 +0000 (19:49 +0300)]
drm/i915/dp_mst: Enable link training fallback for MST

Reduce the link parameters after a link training failure for MST
outputs, similarly to how this is done for SST.

For now allow the reduction only by staying in the 8b/10b vs. 128b/132b
mode. Enabling the mode switch is left for a follow-up patchset, after
taking measures ensuring that the mode switch happens properly. In
particular a rediscovery of the whole MST topology may be required for
such a switch, see the References below.

Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10970
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp_mst: Reset intel_dp->link_trained during disabling
Imre Deak [Mon, 10 Jun 2024 16:49:27 +0000 (19:49 +0300)]
drm/i915/dp_mst: Reset intel_dp->link_trained during disabling

Reset the flag indicating an active link after disabling an MST link,
similarly to how this is done for SST outputs. This avoids trying to
retrain an MST link while its disabled.

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Disable link retraining after the last fallback step
Imre Deak [Mon, 10 Jun 2024 16:49:26 +0000 (19:49 +0300)]
drm/i915/dp: Disable link retraining after the last fallback step

After a link training failure if the link parameters can't be further
reduced, there is no point in trying to retrain the link in the driver.
This avoids excessive retrain attempts after detecting a bad link, for
instance while handling MST HPD IRQs, which is likely redundant as the
link training failed already twice with the same minimum link
parameters. Userspace can still try to retrain the link with these
parameters via a modeset.

While at it make the error message more accurate.

v2: Move converting the error to a debug message to the relevant
    follow-up patch. (Ville)

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Use check link state work in the HPD IRQ handler
Imre Deak [Mon, 10 Jun 2024 16:49:25 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the HPD IRQ handler

Simplify things by retraining a DP link if a bad link is detected in the
HPD IRQ handler from the encoder's check link state work, similarly to
how this is done after a modeset link training failure.

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Use check link state work in the detect handler
Imre Deak [Mon, 10 Jun 2024 16:49:24 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the detect handler

Simplify things by retraining a DP link if a bad link is detected in the
connector detect handler from the encoder's check link state work,
similarly to how this is done after a modeset link training failure.

v2: Add TODO: comment to remove the detect-time link state check.
    (Ville)

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Use check link state work in the hotplug handler
Imre Deak [Mon, 10 Jun 2024 16:49:23 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the hotplug handler

Simplify things by retraining a DP link if a bad link is detected in the
hotplug handler from the encoder's check link state work, similarly to
how this is done after a modeset link training failure.

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Send a link training modeset-retry uevent to all MST connectors
Imre Deak [Mon, 10 Jun 2024 16:49:22 +0000 (19:49 +0300)]
drm/i915/dp: Send a link training modeset-retry uevent to all MST connectors

Send a modeset-retry uevent to all connectors in the same MST topology
after a link training failure and reduction of the link parameters. This
matches the way the same uevent is sent after a DP tunnel BW allocation
failure.

v2: Add NOTE that the atomic state may not be valid for SST links and
    assert that it's valid for MST links. (Ville)

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Pass atomic state to link training function
Imre Deak [Mon, 10 Jun 2024 16:49:21 +0000 (19:49 +0300)]
drm/i915/dp: Pass atomic state to link training function

The next patch adds sending a modeset-retry uevent after a link training
failure to all MST connectors on link. This requires the atomic state,
so pass it to intel_dp_start_link_train(). In case of SST where
retraining still happens by calling this function directly instead of a
modeset commit the atomic state is not available and NULL is passed
instead. This is ok, since in this case the encoder's only DP connector
is available from intel_dp->attached_connector not requiring the atomic
state.

v2: Add NOTE that the atomic state may not be valid for SST links and
    assert that it's valid for MST links. (Ville)

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Reduce link params only after retrying with unchanged params
Imre Deak [Mon, 10 Jun 2024 16:49:20 +0000 (19:49 +0300)]
drm/i915/dp: Reduce link params only after retrying with unchanged params

Try to maintain the current link parameters by retrying the link
training with unchanged link parameters before reducing these parameters
(sending an uevent to userspace to retrain the link instead).

Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Recheck link state after modeset
Imre Deak [Mon, 10 Jun 2024 18:14:28 +0000 (21:14 +0300)]
drm/i915/dp: Recheck link state after modeset

Recheck the link state after a passing link training, with a 2 sec delay
to account for cases where the link goes bad following the link training
and the sink doesn't report this via an HPD IRQ.

The delayed work added here will be also used by a later patch after a
failed link training to try to retrain the link with unchanged link
params before reducing the link params.

v2: Don't flush an uninitialized delayed work (on HDMI-only DDI ports).
v3:
- Move the helpers to a new intel_encoder.c file, rename them
  accordingly. (Ville)
- Add the work to intel_encoder instead of intel_digital_port.
- Call the encoder specific link check function via an encoder hook.
- Flush the link check work during encoder destroy from
  intel_dp_encoder_flush_work().
- Flush the link check work during encoder suspend as well.
v4: Call intel_encoder_link_check_init() with a valid encoder pointer.

Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Use a commit modeset for link retraining MST links
Imre Deak [Mon, 10 Jun 2024 16:49:18 +0000 (19:49 +0300)]
drm/i915/dp: Use a commit modeset for link retraining MST links

Instead of direct calls to the link train functions, retrain the link
via a commit modeset. The direct call means that the output port will be
disabled/re-enabled while the rest of the pipeline (transcoder) is
active, which doesn't seem to work on MST at least. It leads to
underruns and black screen, presumedly because the transcoder is not
disabled/re-enabled along the port.

Leave switching to a commit modeset on SST for a later patchset, as that
seems to work ok currently (though better to using a commit there too,
due to the suppressed underruns).

v2: Keep reverse line length order for local variables. (Ville)

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: Factor out function to modeset commit a set of pipes
Imre Deak [Mon, 10 Jun 2024 16:49:17 +0000 (19:49 +0300)]
drm/i915: Factor out function to modeset commit a set of pipes

Factor out a function to modeset commit a set of pipes, which a later
patch will reuse for DP link retraining.

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()
Imre Deak [Mon, 10 Jun 2024 16:49:16 +0000 (19:49 +0300)]
drm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()

Reduce the indentation in intel_dp_get_link_train_fallback_values() by
adding separate helpers to reduce the link rate and lane count. Also
simplify things by passing crtc_state to the function.

This also prepares for later patches in the patchset adding a limitation
on how the link params are reduced.

While at it use lt_dbg()/lt_err() for debug/error prints in the function
which will also print the connector/encoder prefix and add a debug print
about reducing the link parameters.

v2:
- Align reduce_lane_count()'s error handling flow with
  reduce_link_rate(). (Ville, Jani)
- Use lt_dbg()/lt_err() in the function.

Cc: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Move link train fallback to intel_dp_link_training.c
Imre Deak [Mon, 10 Jun 2024 16:49:15 +0000 (19:49 +0300)]
drm/i915/dp: Move link train fallback to intel_dp_link_training.c

Move the functions used to reduce the link parameters during link
training to intel_dp_link_training.c .

Reviewed-by: Ville Syrjälä <[email protected]>
Reviewed-by: Manasi Navare <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp: Move link train params to a substruct in intel_dp
Imre Deak [Mon, 10 Jun 2024 16:49:14 +0000 (19:49 +0300)]
drm/i915/dp: Move link train params to a substruct in intel_dp

For clarity move the link training parameters updated during link
training based on the pass/fail LT result under a substruct in intel_dp.
This prepares for later patches in this patchset adding similar params
here. Rename intel_dp_reset_max_link_params() to
intel_dp_reset_link_params() to better reflect what state gets reset.

v2: Add the parameters to a more generic link substruct. (Jani)

Cc: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/dp_mst: Align TUs to avoid splitting symbols across MTPs
Imre Deak [Mon, 10 Jun 2024 16:49:13 +0000 (19:49 +0300)]
drm/i915/dp_mst: Align TUs to avoid splitting symbols across MTPs

Symbols consisting of multiple (4) TU timeslots may get split across
MTPs when using 2 or 1 link lanes. Avoid this, as required by Bspec by
aligning the allocated TUs to 2 when using 2 lanes and 4 when using 1
lane.

Atm, we also have to align the PBNs used to allocate BW along the MST
path, since DRM core keeps track of its own TU value, derived from the
PBN and that TU value must match what the driver calculates.

On some platforms the alignment is only required on 8b/10b links, a
follow-up patch will remove the limitation for those.

Bspec: 49266, 68922

Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/bridge: sii902x: Add pixel clock check in atomic_check
Jayesh Choudhary [Thu, 13 Jun 2024 08:38:05 +0000 (14:08 +0530)]
drm/bridge: sii902x: Add pixel clock check in atomic_check

Check the pixel clock for the mode in atomic_check and ensure that
it is within the range supported by the bridge.

Signed-off-by: Jayesh Choudhary <[email protected]>
Reviewed-by: Aradhya Bhatia <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
9 months agodrm/bridge: sii902x: Support atomic bridge APIs
Jayesh Choudhary [Thu, 13 Jun 2024 08:38:04 +0000 (14:08 +0530)]
drm/bridge: sii902x: Support atomic bridge APIs

Change exisitig enable() and disable() bridge hooks to their atomic
counterparts as the former hooks are deprecated.

Signed-off-by: Jayesh Choudhary <[email protected]>
Reviewed-by: Aradhya Bhatia <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
9 months agodrm/bridge: sii902x: Fix mode_valid hook
Jayesh Choudhary [Thu, 13 Jun 2024 08:38:03 +0000 (14:08 +0530)]
drm/bridge: sii902x: Fix mode_valid hook

Currently, mode_valid is defined only in drm_connector_helper_funcs.
When the bridge is attached with the 'DRM_BRIDGE_ATTACH_NO_CONNECTOR'
flag, the connector is not initialized, and so is the mode_valid
hook under connector helper funcs.
It also returns MODE_OK for all modes without actually checking the
modes.
So move the mode_valid hook to drm_bridge_funcs with proper clock
checks for maximum and minimum pixel clock supported by the bridge.

Signed-off-by: Jayesh Choudhary <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Acked-by: Sui Jingfeng <[email protected]>
Reviewed-by: Aradhya Bhatia <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
9 months agodrm/i915/dp_mst: Fix DSC input BPP computation
Imre Deak [Tue, 11 Jun 2024 15:33:51 +0000 (18:33 +0300)]
drm/i915/dp_mst: Fix DSC input BPP computation

The branch or sink device decompressing a stream may have a limitation
on the input/uncompressed BPP, which is lower than the base line BPP
(determined by the sink's EDID). In some cases a stream with an input
BPP higher than this limit will be converted automatically by the device
decompressing the stream, by truncating the BPP, however in some cases
- seen at least in Dell dock's DP->HDMI converters - the decompression
will fail.

Fix the above by limiting the input BPP correctly. This is done already
correctly for SST outputs.

Reviewed-by: Luca Coelho <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/connector: hdmi: Fix kerneldoc warnings
Maxime Ripard [Mon, 10 Jun 2024 11:12:00 +0000 (13:12 +0200)]
drm/connector: hdmi: Fix kerneldoc warnings

It looks like the documentation for the HDMI-related fields recently
added to both the drm_connector and drm_connector_state structures
trigger some warnings because of their use of anonymous structures:

  $ scripts/kernel-doc -none include/drm/drm_connector.h
  include/drm/drm_connector.h:1138: warning: Excess struct member 'broadcast_rgb' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'infoframes' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'avi' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'hdr_drm' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'spd' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'vendor' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'is_limited_range' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'output_bpc' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'output_format' description in 'drm_connector_state'
  include/drm/drm_connector.h:1138: warning: Excess struct member 'tmds_char_rate' description in 'drm_connector_state'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'vendor' description in 'drm_connector'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'product' description in 'drm_connector'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'supported_formats' description in 'drm_connector'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'infoframes' description in 'drm_connector'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'lock' description in 'drm_connector'
  include/drm/drm_connector.h:2112: warning: Excess struct member 'audio' description in 'drm_connector'

Create some intermediate structures instead of anonymous ones to silence
the warnings.

Reported-by: Jani Nikula <[email protected]>
Suggested-by: Jani Nikula <[email protected]>
Fixes: 54cb39e2293b ("drm/connector: hdmi: Create an HDMI sub-state")
Fixes: 948f01d5e559 ("drm/connector: hdmi: Add support for output format")
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/mgag200: Set .detect_ctx() and enable connector polling
Thomas Zimmermann [Mon, 10 Jun 2024 14:06:06 +0000 (16:06 +0200)]
drm/mgag200: Set .detect_ctx() and enable connector polling

Set .detect_ctx() in struct drm_connector_helper_funcs to the
common helper drm_connector_helper_detect_from_ddc() and enable
polling for the connector. Mgag200 will now test for the monitor's
presence by probing the DDC in regular intervals.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/mgag200: Add BMC output
Thomas Zimmermann [Mon, 10 Jun 2024 14:06:05 +0000 (16:06 +0200)]
drm/mgag200: Add BMC output

The BMC output can be viewed via the BMC's web interface or a
similar client. Represent it as virtual encoder and connector.
It's attached to the same CRTC as the VGA connector.

The connector's status depends on the physical connector's status.
The BMC is only connected if the physical connector is not. This
is necessary to support userspace clients that can only handle a
single output per CRTC.

The BMC is a server feature. Add a BMC output for all server chips,
but not the desktop models.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/mgag200: Consolidate VGA output
Thomas Zimmermann [Mon, 10 Jun 2024 14:06:04 +0000 (16:06 +0200)]
drm/mgag200: Consolidate VGA output

The various models have common code for the VGA output's encoder and
connector. Move everything into a single shared source file. Remove some
obsolete initializer macros. No functional changes.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jocelyn Falempe <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Send vrr vsync params whne vrr is enabled
Mitul Golani [Tue, 11 Jun 2024 12:05:24 +0000 (17:35 +0530)]
drm/i915/display: Send vrr vsync params whne vrr is enabled

Compute trans vrr vsync params only when either VRR or CMRR
is enabled.

Fixes: 5922f45329cd ("drm/i915/display: Compute vrr vsync params")
Cc: Mitul Golani <[email protected]>
Cc: Ankit Nautiyal <[email protected]>
Cc: Suraj Kandpal <[email protected]>
Cc: Jani Nikula <[email protected]>
Signed-off-by: Mitul Golani <[email protected]>
Reviewed-by: Ankit Nautiyal <[email protected]>
Signed-off-by: Suraj Kandpal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Sample ctx timestamp to determine if jobs have timed out
Matthew Brost [Tue, 11 Jun 2024 14:40:53 +0000 (07:40 -0700)]
drm/xe: Sample ctx timestamp to determine if jobs have timed out

In GuC TDR sample ctx timestamp to determine if jobs have timed out. The
scheduling enable needs to be toggled to properly sample the timestamp.
If a job has not been running for longer than the timeout period,
re-enable scheduling and restart the TDR.

v2:
 - Use GT clock to msec helper (Umesh, off list)
 - s/ctx_timestamp_job/ctx_job_timestamp
v3:
 - Fix state machine for TDR, mainly decouple sched disable and
   deregister (testing)
 - Rebase (CI)
v4:
 - Fix checkpatch && newline issue (CI)
 - Do not deregister on wedged or unregistered (CI)
 - Fix refcounting bugs (CI)
 - Move devcoredump above VM / kernel job check (John H)
 - Add comment for check_timeout state usage (John H)
 - Assert pending disable not inflight when enabling scheduling (John H)
 - Use enable_scheduling in other scheduling enable code (John H)
 - Add comments on a few steps in TDR (John H)
 - Add assert for timestamp overflow protection (John H)
v6:
 - Use mul_u64_u32_div (CI, checkpath)
 - Change check time to dbg level (Paulo)
 - Add immediate mode to sched disable (inspection)
 - Use xe_gt_* messages (John H)
 - Fix typo in comment (John H)
 - Check timeout before clearing pending disable (Paulo)
v7:
 - Fix ADJUST_FIVE_PERCENT macro (checkpatch)
 - Don't print sched disable failure message on GT reset (John H)
 - Move kernel / VM jobs WARNs near comment (John H)

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add killed, banned, or wedged as stick bit during GuC reset
Matthew Brost [Tue, 11 Jun 2024 14:40:52 +0000 (07:40 -0700)]
drm/xe: Add killed, banned, or wedged as stick bit during GuC reset

These bits should be persistent across reset, treat them as such.

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add pending disable assert to handle_sched_done
Matthew Brost [Tue, 11 Jun 2024 14:40:51 +0000 (07:40 -0700)]
drm/xe: Add pending disable assert to handle_sched_done

Will help catch bugs in GuC state machine.

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add GuC state asserts to deregister_exec_queue
Matthew Brost [Tue, 11 Jun 2024 14:40:50 +0000 (07:40 -0700)]
drm/xe: Add GuC state asserts to deregister_exec_queue

Will help catch bugs in GuC state machine.

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Assert runnable state in handle_sched_done
Matthew Brost [Tue, 11 Jun 2024 14:40:49 +0000 (07:40 -0700)]
drm/xe: Assert runnable state in handle_sched_done

Ensure G2H and KMD GuC machine match.

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Improve unexpected state error messages
Matthew Brost [Tue, 11 Jun 2024 14:40:48 +0000 (07:40 -0700)]
drm/xe: Improve unexpected state error messages

Include G2H handler name when an unexpected error state messages.

v6:
- Use xe_gt_err (Michal)
- Print runnable state (John H)

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add xe_gt_clock_interval_to_ms helper
Matthew Brost [Tue, 11 Jun 2024 14:40:47 +0000 (07:40 -0700)]
drm/xe: Add xe_gt_clock_interval_to_ms helper

Add helper to convert GT clock ticks to msec. Useful for determining if
timeouts occur by examing GT clock ticks.

v6:
- s/nom/n , s/dom/d (Jonathan)
- include math64 (CI)

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add ctx timestamp to LRC snapshot
Matthew Brost [Tue, 11 Jun 2024 14:40:46 +0000 (07:40 -0700)]
drm/xe: Add ctx timestamp to LRC snapshot

The ctx timestamp is useful information, add to LRC snapshot.

v2:
  - s/ctx_timestamp_job/ctx_job_timestamp

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Emit ctx timestamp copy in ring ops
Matthew Brost [Tue, 11 Jun 2024 14:40:45 +0000 (07:40 -0700)]
drm/xe: Emit ctx timestamp copy in ring ops

Copy ctx timestamp at beginning of every GPU job to a saved location.
Used to determine how long a job has been running on the hardware.

v2:
 - - s/ctx_timestamp_job/ctx_job_timestamp

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add MI_COPY_MEM_MEM GPU instruction definitions
Matthew Brost [Tue, 11 Jun 2024 14:40:44 +0000 (07:40 -0700)]
drm/xe: Add MI_COPY_MEM_MEM GPU instruction definitions

MI_COPY_MEM_MEM GPU instructions are used to copy ctx timestamp from a
LRC registers to another location at the beginning of every jobs
execution. Add MI_COPY_MEM_MEM GPU instruction definitions.

v2:
 - Include MI_COPY_MEM_MEM based on instruction order (Michal)
 - Fix tabs/spaces issue (Michal)
 - Use macro for DW definition (Michal)

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add LRC ctx timestamp support functions
Matthew Brost [Tue, 11 Jun 2024 14:40:43 +0000 (07:40 -0700)]
drm/xe: Add LRC ctx timestamp support functions

LRC ctx timestamp support functions are used to determine how long a job
has run on the hardware.

v2:
 - Don't use static inlines (Jani)
 - Kernel doc
 - s/ctx_timestamp_job/ctx_job_timestamp
v6:
 - Add kernel doc for xe_lrc_update_timestamp (Lucas)
 - Call xe_lrc_ctx_timestamp() in xe_lrc_update_timestamp (Lucas)

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: Rename bigjoiner master/slave to bigjoiner primary/secondary
Stanislav Lisovskiy [Mon, 3 Jun 2024 11:25:50 +0000 (14:25 +0300)]
drm/i915: Rename bigjoiner master/slave to bigjoiner primary/secondary

According to BSpec we now should call "master" pipes, "primary" pipes
and "slave" pipes, should be "secondary" pipes.

Signed-off-by: Stanislav Lisovskiy <[email protected]>
[vsyrjala: Don't rename port sync stuff, catch a few more things]
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: Rename all bigjoiner to joiner
Stanislav Lisovskiy [Fri, 7 Jun 2024 07:54:57 +0000 (10:54 +0300)]
drm/i915: Rename all bigjoiner to joiner

Lets unify both bigjoiner and ultrajoiner under simple "joiner" name,
because in future we might have multiple configurations, involving
multiple bigjoiners, ultrajoiner, however it is possible to use
same api for handling both.

v2: - Renamed back some bigjoiner specific parts for now(Ville)

Signed-off-by: Stanislav Lisovskiy <[email protected]>
[vsyrjala: Catch a few more cases]
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/bmg: Add PCI IDs
Matt Roper [Mon, 3 Jun 2024 14:54:30 +0000 (20:24 +0530)]
drm/xe/bmg: Add PCI IDs

Add the initial set of device IDs for Battlemage.

Signed-off-by: Matt Roper <[email protected]>
Signed-off-by: Balasubramani Vivekanandan <[email protected]>
Reviewed-by: Gustavo Sousa <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Add reg read/write trace
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:43 +0000 (11:29 -0700)]
drm/xe: Add reg read/write trace

This will help debug register read/writes and provides
a way to trace all the mmio transactions.

v2: Fix kunit error
v3: Print devid to help in multi-gpu setup
v3: rebase and use variable sized variant to display
    dev name(Gustavo)
v4: Pass single argument to __asign_str to fix kunit error
v5: Remove unrelated include xe_tile.h and remove cast in trace

Reviewed-by: Gustavo Sousa <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/trace: Print device_id in xe_trace events
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:42 +0000 (11:29 -0700)]
drm/xe/trace: Print device_id in xe_trace events

In multi-gpu environments it is important to know the device
gt events belongs to. The tracing information includes the device_id
to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)
v3: Pass single argument to __assign_str to fix kunit error
v4: Remove unused sting_helper library include

Suggested-by: Ville Syrjälä <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Gustavo Sousa <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/trace: Print device_id in xe_trace_guc events
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:41 +0000 (11:29 -0700)]
drm/xe/trace: Print device_id in xe_trace_guc events

In multi-gpu environments it is important to know the device
guc txn belongs to. The tracing information includes the device_id
to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)
v3: Pass single argument to __assign_str to fix kunit error
v4: Minor formatting tweaks

Suggested-by: Ville Syrjälä <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Gustavo Sousa <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/trace: Print device_id in xe_trace_bo events
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:40 +0000 (11:29 -0700)]
drm/xe/trace: Print device_id in xe_trace_bo events

In multi-gpu environments it is important to know the device
bo/vm belongs to. The tracing information includes the device_id
to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)
v3: Pass single argument to __assign_str to fix kunit error
v4: Minor cleanups(Gustavo)

Suggested-by: Ville Syrjälä <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Gustavo Sousa <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/trace: Extract guc related traces
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:39 +0000 (11:29 -0700)]
drm/xe/trace: Extract guc related traces

xe_trace.h is starting to get over crowded. Move the traces
related to guc to its own file.

v2: Update year in License(Gustavo)

Reviewed-by: Gustavo Sousa <[email protected]>
Suggested-by: Jani Nikula <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/trace: Extract bo, vm, vma traces
Radhakrishna Sripada [Fri, 7 Jun 2024 18:29:38 +0000 (11:29 -0700)]
drm/xe/trace: Extract bo, vm, vma traces

xe_trace.h is starting to get over crowded. Move the traces
related to bo, vm, vma's to its own file.

v2: Update year in License(Gustavo)

Reviewed-by: Gustavo Sousa <[email protected]>
Suggested-by: Jani Nikula <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoMerge drm/drm-next into drm-xe-next
Rodrigo Vivi [Wed, 12 Jun 2024 15:31:42 +0000 (11:31 -0400)]
Merge drm/drm-next into drm-xe-next

Needed to get tracing cleanup and add mmio tracing series.

Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodrm/xe: Increase devcoredump timeout
José Roberto de Souza [Tue, 11 Jun 2024 17:47:16 +0000 (10:47 -0700)]
drm/xe: Increase devcoredump timeout

5 minutes is too short for a regular user to search and understand
what he needs to do to report capture devcoredump and report a bug to
us, so here increasing this timeout to 1 hour.

Cc: Rodrigo Vivi <[email protected]>
Cc: Jonathan Cavitt <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodevcoredump: Add dev_coredumpm_timeout()
José Roberto de Souza [Tue, 11 Jun 2024 17:47:15 +0000 (10:47 -0700)]
devcoredump: Add dev_coredumpm_timeout()

Add function to set a custom coredump timeout.

For Xe driver usage, current 5 minutes timeout may be too short for
users to search and understand what needs to be done to capture
coredump to report bugs.

We have plans to automate(distribute a udev script) it but at the end
will be up to distros and users to pack it so having a option to
increase the timeout is a safer option.

v2:
- replace dev_coredump_timeout_set() by dev_coredumpm_timeout() (Mukesh)

v3:
- make dev_coredumpm() static inline (Johannes)

v5:
- rename DEVCOREDUMP_TIMEOUT -> DEVCD_TIMEOUT to avoid redefinition
in include/net/bluetooth/coredump.h

v6:
- fix definition of dev_coredumpm_timeout() when CONFIG_DEV_COREDUMP
is disabled

Cc: Rodrigo Vivi <[email protected]>
Cc: Mukesh Ojha <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Jonathan Cavitt <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Johannes Berg <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
9 months agodrm/panel: himax-hx83102: fix incorrect argument to mipi_dsi_msleep
Tejas Vipin [Wed, 12 Jun 2024 13:35:42 +0000 (19:05 +0530)]
drm/panel: himax-hx83102: fix incorrect argument to mipi_dsi_msleep

mipi_dsi_msleep should be modified to accept ctx as a pointer and the
function call should be adjusted accordingly.

Fixes: a2ab7cb169da ("drm/panel: himax-hx83102: use wrapped MIPI DCS functions")
Signed-off-by: Tejas Vipin <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[narmstrong: fixed subject and fixes tag]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/mipi-dsi: fix handling of ctx in mipi_dsi_msleep
Tejas Vipin [Wed, 12 Jun 2024 13:35:43 +0000 (19:05 +0530)]
drm/mipi-dsi: fix handling of ctx in mipi_dsi_msleep

ctx would be better off treated as a pointer to account for most of its
usage so far, and brackets should be added to account for operator
precedence for correct evaluation.

Fixes: f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling")
Signed-off-by: Tejas Vipin <[email protected]>
Suggested-by: Douglas Anderson <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[narmstrong: fixed fixes tag]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/vf: Ignore force-wake requests if VF
Michal Wajdeczko [Tue, 11 Jun 2024 16:35:37 +0000 (18:35 +0200)]
drm/xe/vf: Ignore force-wake requests if VF

The control and ack force-wake registers are not accessible for
the VF drivers. To avoid changing existing code logic that tracks
woken domains, simply ignore all attempts to access control or ack
registers if we are running as a VF driver.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Combine common force-wake code into helpers
Michal Wajdeczko [Tue, 11 Jun 2024 16:35:36 +0000 (18:35 +0200)]
drm/xe: Combine common force-wake code into helpers

The code of 'control' and 'wait' force-wake operations are very
similar for both 'wake' and 'sleep' cases. Add helpers to maximize
code reuse.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Include additional info on failed force-wake operation
Michal Wajdeczko [Tue, 11 Jun 2024 16:35:35 +0000 (18:35 +0200)]
drm/xe: Include additional info on failed force-wake operation

For debug purposes it might be useful to look at the values of the
force-wake ack registers in case wake/sleep operations failures.

Move xe_gt_notice() from the caller to the helper function, where
we have the latest value of force-wake ack register available.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Kill fw_to_gt() helper
Michal Wajdeczko [Tue, 11 Jun 2024 16:35:34 +0000 (18:35 +0200)]
drm/xe: Kill fw_to_gt() helper

It's too simple to deserve separate helper.

Suggested-by: Lucas De Marchi <[email protected]>
Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Francois Dugast <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe: Prefer GT oriented messages in xe_force_wake.c
Michal Wajdeczko [Tue, 11 Jun 2024 16:35:33 +0000 (18:35 +0200)]
drm/xe: Prefer GT oriented messages in xe_force_wake.c

If possible, we should prefer xe_gt_notice() over drm_notice().

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/bridge-connector: implement glue code for HDMI connector
Dmitry Baryshkov [Fri, 7 Jun 2024 13:23:00 +0000 (16:23 +0300)]
drm/bridge-connector: implement glue code for HDMI connector

In order to let bridge chains implement HDMI connector infrastructure,
add necessary glue code to the drm_bridge_connector. In case there is a
bridge that sets DRM_BRIDGE_OP_HDMI, drm_bridge_connector will register
itself as a HDMI connector and provide proxy drm_connector_hdmi_funcs
implementation.

Note, to simplify implementation, there can be only one bridge in a
chain that sets DRM_BRIDGE_OP_HDMI. Setting more than one is considered
an error. This limitation can be lifted later, if the need arises.

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/bridge-connector: switch to using drmm allocations
Dmitry Baryshkov [Fri, 7 Jun 2024 13:22:59 +0000 (16:22 +0300)]
drm/bridge-connector: switch to using drmm allocations

Turn drm_bridge_connector to using drmm_kzalloc() and
drmm_connector_init() and drop the custom destroy function. The
drm_connector_unregister() and fwnode_handle_put() are already handled
by the drm_connector_cleanup() and so are safe to be dropped.

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/connector: hdmi: allow disabling Audio Infoframe
Dmitry Baryshkov [Fri, 7 Jun 2024 13:22:58 +0000 (16:22 +0300)]
drm/connector: hdmi: allow disabling Audio Infoframe

Add drm_atomic_helper_connector_hdmi_disable_audio_infoframe(), an API
to allow the driver disable sending the Audio Infoframe. This is to be
used by the drivers if setup of the infoframes is not tightly coupled
with the audio functionality and just disabling the audio playback
doesn't stop the HDMI hardware from sending the Infoframe.

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/xe2lpm: Fixup Wa_14020756599
Tejas Upadhyay [Fri, 7 Jun 2024 12:25:28 +0000 (17:55 +0530)]
drm/xe/xe2lpm: Fixup Wa_14020756599

This WA needs to be applied to graphics GT when the media version
is 2000. Currently, media version 2000 is always paired with
graphics version 2004 which will result in writing same register
with same bits twice. We can't add optional rule in rtp
framework and also writing same register with same bits gives
warning.

Currently, media version 2000 is always paired with graphics version
2004, so just checking the latter is sufficient.

V2(Lucas):
  - Add more detail in commit message
  - Improve code comment to follow guideline

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2016
Fixes: 131328aa5699 ("drm/xe/xe2lpm: Add permanent Wa_14020756599")
Signed-off-by: Tejas Upadhyay <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
9 months agodrm/xe/guc: Add kernel-doc for HXG Fast Request
Michal Wajdeczko [Mon, 10 Jun 2024 12:04:11 +0000 (14:04 +0200)]
drm/xe/guc: Add kernel-doc for HXG Fast Request

We have kernel-doc for all HXG message types but Fast Request.

Signed-off-by: Michal Wajdeczko <[email protected]>
Acked-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/xe/guc: Drop unused legacy GuC message ABI definitions
Michal Wajdeczko [Mon, 10 Jun 2024 12:04:10 +0000 (14:04 +0200)]
drm/xe/guc: Drop unused legacy GuC message ABI definitions

Those were copy-pasted from i915 code and never used in Xe driver.

Signed-off-by: Michal Wajdeczko <[email protected]>
Reviewed-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Wake time is aux less wake time for Panel Replay
Jouni Högander [Fri, 7 Jun 2024 13:49:17 +0000 (16:49 +0300)]
drm/i915/psr: Wake time is aux less wake time for Panel Replay

When checking vblank length used wake time is aux less wake time for eDP
Panel Replay (vblank length is not checked for DP2.0 Panel Replay).

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: Check vblank against IO buffer wake time on Lunarlake
Jouni Högander [Fri, 7 Jun 2024 13:49:16 +0000 (16:49 +0300)]
drm/i915/psr: Check vblank against IO buffer wake time on Lunarlake

As Lunarlake doesn't have block count configuration vblank should be
checked against IO buffer wake time.

Bspec: 68920

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: Take into account SU SDP scanline indication in vblank check
Jouni Högander [Fri, 7 Jun 2024 13:49:15 +0000 (16:49 +0300)]
drm/i915/psr: Take into account SU SDP scanline indication in vblank check

SU SDP scanline indication should be taken into account when checking
vblank length. In Bspec we have:

PSR2_CTL[ SU SDP scanline indication ] = 0: (TRANS_VBLANK Vertical Blank
End- TRANS_VBLANK Vertical Blank Start) > PSR2_CTL Block Count Number value
in lines

PSR2_CTL[ SU SDP scanline indication ] = 1: (TRANS_VBLANK Vertical Blank
End- TRANS_VBLANK Vertical Blank Start- 1) > PSR2_CTL Block Count Number
value in lines

Bspec: 49274

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: Move vblank length check to separate function
Jouni Högander [Fri, 7 Jun 2024 13:49:14 +0000 (16:49 +0300)]
drm/i915/psr: Move vblank length check to separate function

We are about to add more complexity to vblank length check. It makes sense
to move it to separate function for sake of clarity.

v2: change name to wake_lines_fit_into_vblank

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: Print Panel Replay status instead of frame lock status
Jouni Högander [Fri, 7 Jun 2024 13:49:13 +0000 (16:49 +0300)]
drm/i915/psr: Print Panel Replay status instead of frame lock status

Currently Panel Replay status printout is printing frame lock status. It
should print Panel Replay status instead. Panel Replay status register
field follows PSR status register field. Use existing PSR code for that.

Fixes: ef75c25e8fed ("drm/i915/panelreplay: Debugfs support for panel replay")
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 Panel Replay support to intel_psr2_config_et_valid
Jouni Högander [Fri, 7 Jun 2024 13:49:12 +0000 (16:49 +0300)]
drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid

Early Transport is possible and in our HW mandatory on eDP Panel
Replay. Add parameter to intel_psr2_config_et_valid to differentiate
validity check for Panel Replay.

v2: fix intel_dp->psr_dpcd[0] check

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: Share alpm support checks with PSR code
Jouni Högander [Fri, 7 Jun 2024 13:49:11 +0000 (16:49 +0300)]
drm/i915/alpm: Share alpm support checks with PSR code

Convert intel_alpm_aux_wake_supported and
intel_alpm_aux_less_wake_supported as non-static. Use them in intel_psr.c
instead of local variables.

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: Split enabling sink for PSR and Panel Replay
Jouni Högander [Fri, 7 Jun 2024 13:49:10 +0000 (16:49 +0300)]
drm/i915/psr: Split enabling sink for PSR and Panel Replay

Current intel_psr_enable_sink is a mess due to partly reusing PSR bit
definitions for Panel Replay. Even thought PSR and Panel Replay enable
registers do have common bits they still have also different bits and same
bits with different meaning. For sake of clarity split enabling sink to PSR
and Panel Replay specific parts.

Also fix issue caused by using psr->panel_replay_enabled to early.

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/display: Add missing Panel Replay Enable SU Region ET bit
Jouni Högander [Fri, 7 Jun 2024 13:49:09 +0000 (16:49 +0300)]
drm/display: Add missing Panel Replay Enable SU Region ET bit

Add missing Panel Replay Enable SU Region ET bit defined in DP2.1
specification.

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Skip Panel Replay on pipe comparison if no active planes
Jouni Högander [Fri, 7 Jun 2024 13:49:08 +0000 (16:49 +0300)]
drm/i915/display: Skip Panel Replay on pipe comparison if no active planes

Panel Replay is not enabled if there are no active planes. Do not compare
it on pipe comparison. Otherwise we get pipe mismatch.

Fixes: ac9ef327327b ("drm/i915/psr: Panel replay has to be enabled before link training")
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: Take panel replay into account in vsc sdp unpacking
Jouni Högander [Fri, 7 Jun 2024 13:49:07 +0000 (16:49 +0300)]
drm/i915/display: Take panel replay into account in vsc sdp unpacking

Currently intel_dp_vsc_sdp_unpack is not taking into account Panel Replay
vsc sdp. Fix this by adding vsc sdp revision 0x6 and length 0x10 into
intel_dp_vsc_sdp_unpack

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: Write also AUX Less Wake lines into ALPM_CTL
Jouni Högander [Fri, 7 Jun 2024 13:49:06 +0000 (16:49 +0300)]
drm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL

Currently AUX Less Wake lines are not written into ALPM_CTL. Fix this.

Fixes: 1ccbf135862b ("drm/i915/psr: Enable ALPM on source side for eDP Panel replay")
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: Do not use fast_wake_lines for aux less wake time
Jouni Högander [Fri, 7 Jun 2024 13:49:05 +0000 (16:49 +0300)]
drm/i915/alpm: Do not use fast_wake_lines for aux less wake time

We want to have own variables for fast wake lines and aux less wake
time. It might be needed to choose if we can enable Panel Replay Selective
Update or PSR2.

Also currently aux less wake time is overwritten by calculated fast wake
time.

v2:use aux less wake time in intel_alpm_lobf_compute_config

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/panel: Update TODO list item for cleaning up prepared/enabled tracking
Douglas Anderson [Wed, 5 Jun 2024 00:23:09 +0000 (17:23 -0700)]
drm/panel: Update TODO list item for cleaning up prepared/enabled tracking

Now that most panels have been updated not to track/double-check their
prepared/enabled state update the TODO with next steps.

Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeid
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeid
9 months agodrm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown
Douglas Anderson [Wed, 5 Jun 2024 00:23:08 +0000 (17:23 -0700)]
drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown

It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.

A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.

A grep through mainline for compatible strings used by this driver
indicates that it is used by IMX boards. The IMX driver appears to be
correctly calling drm_atomic_helper_shutdown() so we can remove the
calls.

[1] https://lore.kernel.org/r/20230901234015[email protected]
[2] https://lore.kernel.org/r/20230901234202[email protected]
[3] https://lore.kernel.org/r/20230921192749.1542462[email protected]

Cc: Robert Chiras <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid
This page took 0.114585 seconds and 4 git commands to generate.