Files
omarchy-pkgs/pkgbuilds/edge/linux-ptl/0027-drm-i915-trans-push-frame-change-for-panel-replay.patch
T
49214baae5 linux-ptl: [EXPERIMENTAL] enable Panel Replay Selective Update with cursor fix (#77)
* linux-ptl: add package with audio, wifi, and Panel Replay SU patches

Adds the linux-ptl Omarchy package for Panther Lake (PTL) hardware.
The stock Arch linux kernel on PTL is missing: SDCA audio class
driver backports, an iwlwifi generation-data fix, and Panel Replay
SU enablement + cursor-lag workaround. Ship them in this package
until they land upstream and Arch picks them up.

Patch sets
==========

Audio (SDCA backports on 6.19.10)
  0001-0005, 0007-0008, 0010, 0012-0014, 0017
  Cirrus CS35L57 amps and SDCA jack on Dell XPS OLED require the
  SDCA class driver plus a NULL-pointer fix (0017). Without these
  the sound card never registers. 0006/0009/0011/0015/0016 from the
  full upstream series are already in 6.19.10 stable and not needed.

WiFi
  0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch
  Backport from wifi-next to fix wifi generation data reporting on
  Intel AX/BE radios in PTL.

Display (PSR2 + Panel Replay SU)
  0019-drm-i915-psr-accept-early-transport-for-psr2.patch
  0020-drm-i915-psr-fix-su-granularity-source-for-psr2.patch
  0022-drm-i915-psr-allow-psr-with-vrr-on-ptl.patch
    Enable PSR2 Early Transport and fix the SU-granularity DPCD
    source so PSR2 is not rejected at compute_config on OLED
    panels (LGD 2880x1800 etc). Also allow PSR with VRR on PTL.

  0026-drm-i915-psr-handle-Panel-Replay-full-line-SU-granul.patch
    PR SU can advertise X granularity = 0xFFFF (full-line).
    Without this the modulo check rejects PR SU.

  0027-drm-i915-trans-push-frame-change-for-panel-replay.patch
    Program TRANS_PUSH Frame Change path so PR SU cursor/plane
    updates actually trigger selective updates.

  0028-drm-i915-psr-exit-Panel-Replay-for-ALPM-lag.patch
    Workaround for the LGD OLED panel (Dell XPS 14 DA14260,
    sink OUI 00:22:b9). PR ALPM AUX-Less wake/sleep cycling on
    this panel cannot resume selective updates at frame rate,
    producing ~15 Hz visible motion from a 120 Hz source.

    The workaround exits PR in frontbuffer_flush() and uses the
    existing dc3co_work delayed_work as a 50 ms idle timer.
    During continuous motion the timer is re-armed by each flush,
    so the link stays awake and motion is smooth; after 50 ms of
    genuine idle, dc3co_work fires and PR re-activates with ALPM
    for power savings.

    Compared to a per-commit exit/re-enter approach (earlier
    revision of this PR), the delayed re-entry keeps video and
    animation playback smooth: per-commit cycling pays the panel's
    wake-to-display latency on every frame, which is visible as
    playback stutter. 50 ms was chosen empirically against 100 ms
    and 200 ms on the same device; 50 ms gives the best idle and
    cursor-motion power while remaining subjectively identical in
    smoothness to the longer delays.

    Power on Dell XPS 14 OLED (LGD 2880x1800 @ 120 Hz, battery,
    brightness 268/512, 10-run averaged idle):

      PR SU + delayed-re-entry WA  : 3268 mW  (smooth)
      PR SU stock (cursor laggy)   : 3384 mW
      PR SU + WA 100 ms            : 3436 mW
      PR SU + WA 200 ms            : 3484 mW
      PSR2                         : 4060 mW  (baseline)

config.x86_64 changes
=====================

Required for the kernel to boot cleanly on this hardware:

  CONFIG_PINCTRL_INTEL_PLATFORM=y   (was =m)
    Without this the PTL GPIO controller is a late-loaded module
    and early probe of CS35L57 audio amps (spk-id-gpios) and the
    I2C touchpad time out with EPROBE_DEFER / -110 ETIMEDOUT.

  CONFIG_VFAT_FS=y, CONFIG_FAT_FS=y, CONFIG_MSDOS_FS=y,
  CONFIG_NLS_ISO8859_1=y   (all were =m)
    Required for the ESP /boot to mount in the initramfs / UKI
    boot flow. Without these the box drops to emergency mode.

CONFIG_RUST is disabled in this package because Arch Rust 1.94.1
is too new for kernel 6.19.x Rust code.

* Backport DisplayID adaptive sync VRR parsing

* add vrr patch

* fix linux-ptl patch indentation

* linux-ptl: renumber DisplayID VRR patch

---------

Co-authored-by: Gaggery Tsai <gaggery.tsai@gmail.com>
Co-authored-by: Spencer Bull <Spencer.Bull@Dell.com>
2026-04-21 14:39:32 +02:00

61 lines
2.4 KiB
Diff

From: Gaggery Tsai <gaggery.tsai@intel.com>
Date: Thu, 10 Apr 2026 10:00:00 -0700
Subject: [PATCH] drm/i915: send TRANS_PUSH Frame Change for Panel Replay cursor updates
Panel Replay Selective Update requires a software-triggered Frame
Change event via TRANS_PUSH to send dirty regions to the panel.
Cursor updates (legacy_cursor_update) skip TRANS_PUSH_SEND, so the
panel never receives cursor position changes under Panel Replay SU.
Fix by sending TRANS_PUSH with LNL_TRANS_PUSH_PSR_PR_EN for cursor
updates when Panel Replay is active.
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
---
diff --git a/drivers/gpu/drm/i915/display/intel_vrr_regs.h b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
--- a/drivers/gpu/drm/i915/display/intel_vrr_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
@@ -97,6 +97,7 @@
#define TRANS_PUSH(display, trans) _MMIO_TRANS2((display), (trans), _TRANS_PUSH_A)
#define TRANS_PUSH_EN REG_BIT(31)
#define TRANS_PUSH_SEND REG_BIT(30)
+#define LNL_TRANS_PUSH_PSR_PR_EN REG_BIT(16)
#define _TRANS_VRR_VSYNC_A 0x60078
#define TRANS_VRR_VSYNC(display, trans) _MMIO_TRANS2((display), (trans), _TRANS_VRR_VSYNC_A)
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -732,7 +732,8 @@
* which would cause the next frame to terminate already at vmin
* vblank start instead of vmax vblank start.
*/
- if (!state->base.legacy_cursor_update)
+ if (!state->base.legacy_cursor_update ||
+ new_crtc_state->has_panel_replay)
intel_vrr_send_push(NULL, new_crtc_state);
local_irq_enable();
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -597,7 +597,7 @@
struct intel_display *display = to_intel_display(crtc_state);
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
- if (!crtc_state->vrr.enable)
+ if (!crtc_state->vrr.enable && !crtc_state->has_panel_replay)
return;
if (dsb)
@@ -605,7 +605,8 @@
intel_de_write_dsb(display, dsb,
TRANS_PUSH(display, cpu_transcoder),
- TRANS_PUSH_EN | TRANS_PUSH_SEND);
+ TRANS_PUSH_EN | TRANS_PUSH_SEND |
+ (crtc_state->has_panel_replay ? LNL_TRANS_PUSH_PSR_PR_EN : 0));
if (dsb)
intel_dsb_nonpost_end(dsb);