Jani Nikula
ca37e99ec9
drm/i915/wm: DG2 doesn't have dram info to look up wm_lv_0_adjust_needed
...
There's no dram info on DG2 that we could use. The struct dram_info is
all zero on it, but be explicit about this.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://lore.kernel.org/r/a866641bff364dcfcaaabaa1d53c4a8cfa94ff3f.1748337870.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 18:57:23 +03:00
Jani Nikula
612abe44f7
drm/i915/dram: add accessor for struct dram_info and use it
...
Add a function to get the (const) pointer to struct dram_info, and use
that to obtain the pointer instead of poking at i915->dram_info
directly.
Clean up a couple of local variables while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://lore.kernel.org/r/4174edf649e2f6805dab6fd6ce2ec10f4e5f2498.1748337870.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 18:57:22 +03:00
Jani Nikula
9ab671afac
drm/i915/bw: pass struct dram_info pointer around
...
Have just one place to figure out the pointer to struct dram_info, and
pass that around. This simplifies future changes.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://lore.kernel.org/r/1752b4987ff39a685c28cebae1be4ce326b67c7b.1748337870.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 18:57:22 +03:00
Jani Nikula
e583c27a8f
drm/i915/sbi: clean up SBI register macro definitions and usage
...
Use REG_BIT() and friends for defining the register macros. Switch GVT
to use the same macros, and drop its own copies.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/e148e8621c6055d0441fdf6d651d4ad24be53d09.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:47 +03:00
Jani Nikula
0b6d7dbf18
drm/i915/sbi: split out intel_sbi_regs.h
...
Split out display/intel_sbi_regs.h from i915_reg.h. Include both the SBI
interface MMIO as well as the known sideband offsets.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/c96197159e05ebcb63fcc05f0f0801624cd4fdeb.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:42 +03:00
Jani Nikula
ad3cfb65ac
drm/i915/sbi: convert to intel_de_*()
...
Convert SBI to use the intel_de_*() interface. This allows us to drop
the dependency in i915_drv.h while at it.
The fast timeout for the status wait drops from 100 us to 2 us on i915,
but that should be of no consequence. The slow timeout remains the same.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/146f9027f565feb827861f06c1ae218b378edd95.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:36 +03:00
Jani Nikula
ac3bff5d63
drm/i915: add out_value to intel_wait_for_register_fw() and intel_de_wait_fw()
...
Future users of intel_de_wait_fw() need the final value. Just return it
for everyone using intel_wait_for_register_fw() and intel_de_wait_fw()
to avoid adding or using another set of specialized functions. There
aren't that many users for these anyway.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/f804b2fe85ad63389e74d82e4c97220e9275f170.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:35 +03:00
Jani Nikula
07a86ee12e
drm/i915/de: rename timeout parameters timeout_ms to highlight unit
...
The timeout parameters are in ms. Rename the parameters to highlight the
unit.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/cd4c775ad323a577f612e6a942f83b22641fb798.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:33 +03:00
Jani Nikula
9ab17ede10
drm/i915/sbi: move sbi_lock under struct intel_display
...
With SBI under display, also move sbi_lock to display->sbi.lock.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/838fa712fc8a691a3f9427e5f4ed551bd1c62c49.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:31 +03:00
Jani Nikula
a737ab4a87
drm/i915/sbi: convert intel_sbi.[ch] to struct intel_display
...
Convert intel_sbi.[ch] to struct intel_display, as much as possible
anyway, and as a consequence drop the dependency on i915_drv.h from
intel_pch_refclk.c.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/9fa9f9a828a7e0e93208111566478b16838abe0d.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:26 +03:00
Jani Nikula
7fb3a1f7a4
drm/i915/sbi: move intel_sbi.[ch] under display/
...
The LPT/WPT SBI is arguably part of south display, and it's only used by
intel_pch_refclk.c anyway. Move it under display/.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://lore.kernel.org/r/341268d633e9705bc582f1cc985dc4554e39d87d.1748343520.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-04 16:28:22 +03:00
Dibin Moolakadan Subrahmanian
ce924116e4
drm/i915/display: Fix u32 overflow in SNPS PHY HDMI PLL setup
...
When configuring the HDMI PLL, calculations use DIV_ROUND_UP_ULL and
DIV_ROUND_DOWN_ULL macros, which internally rely on do_div. However, do_div
expects a 32-bit (u32) divisor, and at higher data rates, the divisor can
exceed this limit. This leads to incorrect division results and
ultimately misconfigured PLL values.
This fix replaces do_div calls with div64_base64 calls where diviser
can exceed u32 limit.
Fixes: 5947642004 ("drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Cc: Suraj Kandpal <suraj.kandpal@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250528064557.4172149-1-dibin.moolakadan.subrahmanian@intel.com
2025-06-03 18:17:27 +05:30
Jani Nikula
d201a9797b
drm/i915: drop intel_dpio_phy.h include from VLV IOSF SB
...
vlv_iosf_sb.c no longer depends on enum dpio_phy from
intel_dpio_phy.h. Drop the include.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://lore.kernel.org/r/20250527114854.3687469-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-30 15:45:01 +03:00
Jouni Högander
9856a688e4
drm/i915/psr: Do not disable Panel Replay in case VRR is enabled
...
Allow Panel Replay with VRR. All VRR modes are supposed to work with
Panel Replay.
Bspec: 68920, 68925
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-13-jouni.hogander@intel.com
2025-05-29 08:13:45 +03:00
Jouni Högander
8097128a40
drm/i915/psr: Fix using wrong mask in REG_FIELD_PREP
...
Wrong mask is used in PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION and
PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION.
Fixes: 295099580f ("drm/i915/psr: Add missing ALPM AUX-Less register definitions")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-12-jouni.hogander@intel.com
2025-05-29 08:13:44 +03:00
Jouni Högander
9dc619680d
drm/i915/display: Add function to configure LFPS sending
...
Add function to configre LFPS sending for Panel Replay according to link
training sequence in HAS document.
This assumes we are using AUX Less always if it's supported by the sink and
the source.
v2:
- drop HAS reference
- replay kerneldoc comment with a generic comment
- check display version in intel_lnl_mac_transmit_lfps
Bspec: 68849
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-11-jouni.hogander@intel.com
2025-05-29 08:13:43 +03:00
Jouni Högander
7acc76a37e
drm/i915/display: Add PHY_CMN1_CONTROL register definitions
...
Add PHY_CMN1_CONTROL register and its definitions to configure port LFPS
sending.
Bspec: 68962
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-10-jouni.hogander@intel.com
2025-05-29 08:13:43 +03:00
Jouni Högander
6ecb8e586f
drm/i915/alpm: Move port alpm configuration
...
It is specified in Bspec where port alpm configuration is supposed to be
performed. Change accordingly.
v2:
- drop HAS reference
- ensure PORT_ALPM registers are not writen on older platform
Bspec: 68849
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-9-jouni.hogander@intel.com
2025-05-29 08:13:42 +03:00
Jouni Högander
5d9d4feb33
drm/i915/alpm: Add new interface to check if AUXLess ALPM is used
...
we need to know if AUXLess ALPM is used when preparing for link
training. Add new interface for this and use it in existing code where
possible.
v2: remove kerneldoc comment
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-8-jouni.hogander@intel.com
2025-05-29 08:13:41 +03:00
Jouni Högander
e6503d10ca
drm/i915/psr: Add interface to check if AUXLess ALPM is needed by PSR
...
Currently we spread ugly PSR details into ALPM code to check if AUXLess
ALPM is needed. Prepare to hide these details to PSR code by adding new
interface for checking if AUXLess ALPM is needed.
v2: remove kerneldoc comment
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-7-jouni.hogander@intel.com
2025-05-29 08:13:41 +03:00
Jouni Högander
d6a8336c5f
drm/i915/alpm: Write PR_ALPM_CTL register
...
PR_ALPM_CTL register contains configurations related to Adaptive sync
sdp. Configure these if Adaptive Sync SDP is supported.
v2: avoid using hardcoded indices
Bspec: 71014
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-6-jouni.hogander@intel.com
2025-05-29 08:13:40 +03:00
Jouni Högander
91a2cd6236
drm/i915/alpm: Add PR_ALPM_CTL register definitions
...
Add PR_ALPM_CTL register definition and bits for it.
Bspec: 71014
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-5-jouni.hogander@intel.com
2025-05-29 08:13:39 +03:00
Jouni Högander
deb8d0fe88
drm/i915/psr: Read all Panel Replay capability registers from DPCD
...
There are several Panel Replay capability register in DPCD. Read them
all for later use.
v2:
- avoid using hardcoded indices
- read all Panel Replay capability registers
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-4-jouni.hogander@intel.com
2025-05-29 08:13:39 +03:00
Jouni Högander
3e61b092e6
drm/dp: Add Panel Replay capability bits from DP2.1 specification
...
Add PANEL REPLAY CAPABILITY register (0xb1) bits.
v3:
- added DP_DSC_DECODE_CAPABILITY definitions
- use defined shift instead of hardcoded value
v2: comment about DP2.1 changed as DP2.1a
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-3-jouni.hogander@intel.com
2025-05-29 08:13:38 +03:00
Jouni Högander
07cc32ecc6
drm/panelreplay: Panel Replay capability DPCD register definitions
...
Add new definition for size of Panel Replay DPCD capability registers
area. Rename existing definitions to group capability registers together.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: https://lore.kernel.org/r/20250526120512.1702815-2-jouni.hogander@intel.com
2025-05-29 08:13:38 +03:00
Ville Syrjälä
7ce53db1ff
drm/i915: Indicate which pipe lied about its interrupts
...
Indicate which pipe signalled the spurious DE PIPE interrupt.
Might help with debugging a bit if we know where the interrupt
is supposedly coming from.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250513092820.18715-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2025-05-28 15:01:19 +03:00
Jani Nikula
e6ba431676
drm/xe: stop including intel_display_{core, device}.h from xe_device_types.h
...
Make xe->display pointer opaque to most of core xe driver. A few places
now need explicit include of intel_display_core.h.
With this dependency broken, changes in display should cause radically
less recompilation of xe.
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Link: https://lore.kernel.org/r/a12918f4d404e2d6d4e963126ce96df01d5064f3.1747907216.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-27 11:25:53 +03:00
Jani Nikula
62384da2a0
drm/i915: stop including display/intel_display_{core, limits}.h from i915_drv.h
...
Make i915->display pointer opaque to most of core i915 driver. Lots of
places now need explicit include of intel_display_core.h, or a more
specific header.
With this dependency broken, changes in display should cause radically
less recompilation of i915.
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Link: https://lore.kernel.org/r/b381b59acb7e4f600e0282935a68aedf77768109.1747907216.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-27 11:25:53 +03:00
Jani Nikula
6f142c52d3
drm/i915/display: allocate struct intel_display dynamically
...
Allocate struct intel_display dynamically in
intel_display_device_probe() and free in intel_display_device_remove().
v2: Remove duplicate intel_display_device_remove() on error path (Lucas)
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://lore.kernel.org/r/8cd526a177061cddf71db59bd0901bd1a24e77be.1747907216.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-27 11:25:53 +03:00
Chaitanya Kumar Borah
dc0698d1b3
drm/i915: Disable updating of LUT values during vblank
...
Do not schedule vblank worker for LUT update if the registers are
double buffered
v2: Do not schedule the worker at all (Ville)
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-12-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:16 +05:30
Chaitanya Kumar Borah
88d7e284b2
drm/i915/color: Do not pre-load LUTs with DB registers
...
Since Double Buffered LUT registers can be written in active region
no need to preload them.
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-11-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:16 +05:30
Chaitanya Kumar Borah
d94a92b7d0
drm/i915: Program DB LUT registers before vblank
...
Double Buffered LUT registers can be programmed in the active region.
This patch implements the MMIO path for it. Program the registers after
evading vblank. The HW latches on to the registers after delayed vblank.
It takes around 1024 cdclk cycles(~one scanline) for this.
Following assumptions have been made while making this change
- Current vblank evasion time is sufficient for programming
the LUT registers.
- Current guardband calculation would be sufficient for the HW
to latch on to the new values
v2: move loading LUTs to commit_pipe_post_planes() since a vblank
evasion failure for this is probably less drastic than
for plane programming. (Ville)
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-10-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:16 +05:30
Chaitanya Kumar Borah
b0e0369bca
drm/i915/display: use GOSUB to program double buffered LUT registers
...
With addition of double buffered GAMMA registers in PTL, we can now
program them in the active region. Use GOSUB instruction of DSB to
program them.
It is done in the following steps:
1. intel_color_prepare_commit()
- If the platform supports, prepare a dsb instance (dsb_color)
hooked to DSB0.
- Add all the register write instructions to dsb_color through
the load_lut() hook
- Do not add the vrr_send_push() logic to the buffer as it
should be taken care by dsb_commit instance of DSB0
- Finish preparation of the buffer by aligning it to 64 bit
2. intel_atomic_dsb_finish()
- Add the gosub instruction into the dsb_commit instance of DSB0
using intel_dsb_gosub()
- If needed, add the vrr_send_push() logic to dsb_commit after it
v2: Refactor code to simplify commit completion flow.
Add some helpers along the way (Ville)
v3: s/doubled/double and add display to commit message prefix (Uma)
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-9-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:16 +05:30
Chaitanya Kumar Borah
9dae0b6e9c
drm/i915: s/dsb_color_vblank/dsb_color
...
With double buffer gamma registers in the mix, we need not wait for
vblank to execute gamma writes through dsb. Before we implement
that s/dsb_color_vblank/dsb_color.
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-8-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:16 +05:30
Chaitanya Kumar Borah
78f237a6a6
drm/i915/dsb: Add support for GOSUB interrupt
...
DSB raises an interrupt when there is a nested GOSUB command or
illegal Head/Tail. Add support to log such errors in the DSB
interrupt handler.
v2: Enable support only in platforms that support this (Ville)
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-7-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Chaitanya Kumar Borah
796b6df0f8
drm/i915/dsb: add intel_dsb_gosub_finish()
...
A DSB buffer which will be used for GOSUB execution does not need
the DEWAKE mechanism but still need to be 64 bit aligned. Add helper
to finish preparation of a dsb buffer to be executed with GOSUB
instruction.
v2: Add a cacheline of noops at the end of GOSUB buffer (Ville)
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-6-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Ville Syrjälä
2c41d62f6f
drm/i915/dsb: Implement intel_dsb_gosub()
...
Add support for the new GOSUB DSB instruction (available on ptl+),
which instructs the DSB to jump to a different buffer, execute
the commands there, and then return execution to the next
instruction in the original buffer.
There are a few alignment related workarounds that need to
be dealt with when emitting GOSUB instruction.
v2: Right shift head and tail pointer passed to gosub command (chaitanya)
v3: Add macro for right shifting head/tail pointers (Animesh)
v4: Fix typo in commit message (Uma)
Add comments explaining why right shifting htp is needed (Animesh)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-5-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Ville Syrjälä
bb3de17e2b
drm/i915/dsb: Extract intel_dsb_{head,tail}()
...
Extract the code that calculates the DSB_HEAD/TAIL register
values into small helpers. We already have two copies of this,
and soon there will be a third.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-4-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Ville Syrjälä
d535ae997d
drm/i915/dsb: Extract assert_dsb_tail_is_aligned()
...
Extract the DSB tail alignment checks into helper. We already
have two uses of this, and soon we'll get a third.
v2: s/soo/soon in commit message (Animesh)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-3-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Ville Syrjälä
55f233aaad
drm/i915/dsb: Extract intel_dsb_ins_align()
...
Extract the code that alings the next instruction to the next
QW boundary into a small helper. I'll have some more uses for
this later.
Also explain why we don't have to zero out the extra DW.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://lore.kernel.org/r/20250523062041.166468-2-chaitanya.kumar.borah@intel.com
2025-05-26 13:18:15 +05:30
Yumeng Fang
42e5fc672f
drm/i915/display: Use str_true_false() helper
...
Remove hard-coded strings by using the str_true_false() helper.
Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn >
Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn >
Link: https://lore.kernel.org/r/20250523141422844GEA-yzba-OvN0lZirDsS-@zte.com.cn
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-23 13:08:05 +03:00
Imre Deak
56764c845a
drm/i915/dp: Fix the enabling/disabling of audio SDP splitting
...
Adjust the enabling/disabling steps of the DP audio SDP splitting
according to a recent Bspec update. This moves the enabling to the audio
codec enable sequence after the transcoder is enabled and disables SDP
splitting explicitly during the audio disable sequence.
Bspec requires waiting for a vblank event after the transcoder is
enabled and before SDP splitting is enabled. There is no need for an
explicit wait for this, since after the transcoder is enabled this
vblank event is guaranteed to have happened via a flip done wait (see
intel_atomic_commit_tail() -> drm_atomic_helper_wait_for_flip_done()).
The bspec update is for LNL+ only, but the HW team clarified that this
has been always the intended sequence on all platforms and bspec will be
updated everywhere accordingly.
The way SDP splitting was originally enabled matched the version of
bspec at that time. Adding here the Fixes: line still, since this
change fixes a FIFO underrun on PTL during output enabling when DSC is
enabled.
Bspec: 49283, 68943
Fixes: 8853750dba ("drm/i915: Enable SDP split for DP2.0")
Cc: Vinod Govindapillai <vinod.govindapillai@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://lore.kernel.org/r/20250520142219.1688401-1-imre.deak@intel.com
2025-05-21 16:28:44 +03:00
Jani Nikula
5a9f299f95
drm/xe/display: use xe->display to decide whether to do anything
...
Since we only initialize xe->display when xe->info.probe_display, we can
use !xe->display to bail out early. This seems cleaner and more accurate
than relying on xe->info.probe_display, since xe->display may indeed be
NULL.
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/945d2a987214044a81f4816684972961b772b45a.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:23 +03:00
Jani Nikula
7e49ab36e6
drm/xe/display: add notes about how early a few functions can be called
...
xe_display_driver_probe_defer() and xe_display_driver_set_hooks() get
called before either struct xe_device or struct intel_display
exist. Make a note of that.
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/937ea1e16e970a6f6944b94c6a9c216d36e728d1.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Jani Nikula
1e2803e565
drm/xe/display: move xe->display initialization to xe_display_probe()
...
The future goal is to have intel_display_device_probe() create struct
intel_display. As the first step, postpone xe->display initialization
right before that call. This is the same location as in i915.
There's a subtle functional change here: xe->display will now be
initialized only if xe->info.probe_display.
The xe_display_create() function becomes empty, and can be removed. Move
its documentation to xe_display_probe()
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/6c3075739d84cecea258d686c3ef38455a61191c.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Jani Nikula
ed23224b3f
drm/i915/display: move hotplug.dp_wq init from xe and i915 to display
...
The workqueue init and destroy belongs in display. Move it.
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/4730167548a40dc2abe38cd084809b74de988f1a.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Jani Nikula
b617341e48
drm/xe/display: drop duplicate display->fb_tracking.lock init
...
The spinlock is initialized in intel_display_driver_early_probe(). Drop
the extra init.
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/f895a8a43c61a6e60db8e1eb698919ce0faab27c.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Haoxiang Li
5b62d63395
drm/xe/display: Add check for alloc_ordered_workqueue()
...
Add check for the return value of alloc_ordered_workqueue()
in xe_display_create() to catch potential exception.
Fixes: 44e694958b ("drm/xe/display: Implement display support")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/4ee1b0e5d1626ce1dde2e82af05c2edaed50c3aa.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Haoxiang Li
dcab7a228f
drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue()
...
Add check for the return value of alloc_ordered_workqueue()
and alloc_workqueue(). Furthermore, if some allocations fail,
cleanup works are added to avoid potential memory leak problem.
Fixes: 40053823ba ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://lore.kernel.org/r/20d3d096c6a4907636f8a1389b3b4dd753ca356e.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-20 20:55:22 +03:00
Imre Deak
c3a48363cf
drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
...
Due to a problem in the iTBT DP-in adapter's firmware the sink on a TBT
link may get disconnected inadvertently if the SINK_COUNT_ESI and the
DP_LINK_SERVICE_IRQ_VECTOR_ESI0 registers are read in a single AUX
transaction. Work around the issue by reading these registers in
separate transactions.
The issue affects MTL+ platforms and will be fixed in the DP-in adapter
firmware, however releasing that firmware fix may take some time and is
not guaranteed to be available for all systems. Based on this apply the
workaround on affected platforms.
See HSD #13013007775 .
v2: Cc'ing Mika Westerberg.
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13760
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14147
Cc: Mika Westerberg <mika.westerberg@linux.intel.com >
Cc: stable@vger.kernel.org
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://lore.kernel.org/r/20250519133417.1469181-1-imre.deak@intel.com
2025-05-20 11:20:17 +03:00