Jouni Högander
c66c670ded
drm/i915/psr: Split intel_psr2_config_valid for panel replay
...
Part of intel_psr2_config_valid is valid for panel replay. rename it as
intel_sel_update_config_valid. Split psr2 specific part and name it as
intel_psr2_config_valid.
v3:
- move early transport check to psr2 specific check
- check intel_psr2_config_valid only for non-Panel Replay case
v2:
- use psr2_global_enabled for panel replay as well
- goto unsupported instead of return when global enabled check fails
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-12-jouni.hogander@intel.com
2024-05-15 10:56:28 +03:00
Jouni Högander
54599011b7
drm/i915/psr: Do not apply workarounds in case of panel replay
...
There are some workarounds that are not applicable for panel replay. Do not
apply these if panel replay is used.
Bspec: 66624, 50422
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-10-jouni.hogander@intel.com
2024-05-15 10:56:28 +03:00
Jouni Högander
29fb595d48
drm/i915/psr: Panel replay uses SRD_STATUS to track it's status
...
DP Panel replay uses SRD_STATUS to track it's status despite selective
update mode.
Bspec: 53370, 68920
v4:
- use PSR2_STATUS for eDP Panel Replay
- handle intel_psr_wait_exit_locked as well
v3:
- do not use PSR2_STATUS for PSR1
v2:
- use intel_dp_is_edp to differentiate
- modify debugfs status as well
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-9-jouni.hogander@intel.com
2024-05-15 10:56:27 +03:00
Jouni Högander
d210d8c0df
drm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay
...
Currently intel_dp_get_su_granularity doesn't support panel replay.
This fix modifies it to support panel replay as well.
v4:
- use drm_dp_dpcd_readb instead of drm_dp_dpcd_read
- ensure return value is 0 if drm_dp_dpcd_readb fails
v3: use correct offset for DP_PANEL_PANEL_REPLAY_CAPABILITY
v2: rely on PSR definitions on common bits
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-8-jouni.hogander@intel.com
2024-05-15 10:56:27 +03:00
Jouni Högander
3a745dfc71
drm/i915/psr: Detect panel replay selective update support
...
Add new boolean to store panel replay selective update support of sink into
intel_psr struct. Detect panel replay selective update support and store
it into this new boolean.
v3: Clear sink_panel_replay_su_support in intel_dp_detect
v2: Merge adding new boolean into this patch
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-7-jouni.hogander@intel.com
2024-05-15 10:56:27 +03:00
Jouni Högander
ba7cf33f23
drm/i915/psr: Rename psr2_enabled as sel_update_enabled
...
We are about to reuse psr2_enabled for panel replay as well. Rename
it as sel_update_enabled to avoid confusion.
v3: Rebase
v2: Rebase
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-5-jouni.hogander@intel.com
2024-05-15 10:54:53 +03:00
Jouni Högander
1e52db8a43
drm/i915/psr: Rename has_psr2 as has_sel_update
...
We are going to reuse has_psr2 for panel_replay as well. Rename it
as has_sel_update to avoid confusion.
v3: do not add has_psr check into psr2 case in intel_dp_compute_vsc_sdp
v2: Rebase
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-2-jouni.hogander@intel.com
2024-05-15 10:54:51 +03:00
Jani Nikula
accd3e041e
drm/i915: pass dev_priv explicitly to PORT_ALPM_LFPS_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PORT_ALPM_LFPS_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/f8a3bbade94258852b8129c5f5918fb06ceab54b.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 11:24:53 +03:00
Jani Nikula
7f4eae0a94
drm/i915: pass dev_priv explicitly to PORT_ALPM_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PORT_ALPM_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/86e8f5649c822ff6fa0502ad88964bfcb269c6c5.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 11:24:53 +03:00
Jani Nikula
13b77ac5dc
drm/i915: pass dev_priv explicitly to ALPM_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the ALPM_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/96da9be36dc93fa9a7c329f25ff963e4998998c1.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:41 +03:00
Jani Nikula
db92d423dc
drm/i915: pass dev_priv explicitly to PIPE_SRCSZ_ERLY_TPT
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_SRCSZ_ERLY_TPT register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b37217f55702fc10190c2c5aded7d845a36766f6.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:39 +03:00
Jani Nikula
dd17285e94
drm/i915: pass dev_priv explicitly to PSR2_MAN_TRK_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PSR2_MAN_TRK_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/72934c8ac3a923ca0c12fc6cdeec1e0b87ecc4a4.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:38 +03:00
Jani Nikula
a0d1cfa86c
drm/i915: pass dev_priv explicitly to PSR2_SU_STATUS
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PSR2_SU_STATUS register macro.
v2: Expand from _PSR2_SU_STATUS to PSR2_SU_STATUS (Rodrigo)
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240502103925.1829104-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:35 +03:00
Jani Nikula
d82d1a6be6
drm/i915: pass dev_priv explicitly to EDP_PSR2_STATUS
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR2_STATUS register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5d86a48f51ae6fa4c5a3abf098440a94d07de870.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:34 +03:00
Jani Nikula
ccd5bc537b
drm/i915: pass dev_priv explicitly to PSR_EVENT
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PSR_EVENT register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/9bc5819afa46416eb8f12ac050ed4d3bcde34b63.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:32 +03:00
Jani Nikula
9b0dddd50e
drm/i915: pass dev_priv explicitly to EDP_PSR2_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR2_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/e7df99445716ce404bbfe733dd962288a529cf0d.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:31 +03:00
Jani Nikula
83f4ccb3f3
drm/i915: pass dev_priv explicitly to EDP_PSR_DEBUG
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_DEBUG register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/187dd49632d46e67705bd258ed7f9eabdeb108b2.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:30 +03:00
Jani Nikula
5aa0cb6b1e
drm/i915: pass dev_priv explicitly to EDP_PSR_PERF_CNT
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_PERF_CNT register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/21805960967ab88c1418037b98fe3e051eb00608.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:29 +03:00
Jani Nikula
218f3d28d1
drm/i915: pass dev_priv explicitly to EDP_PSR_STATUS
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_STATUS register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4aaa0187b16d2b96b5b4b1d775d7349c9fc28c7c.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:27 +03:00
Jani Nikula
4c3cbdb12d
drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_DATA
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_AUX_DATA register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4e3dc15b170c2b64168e46ebf1802d63df34b4a2.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:26 +03:00
Jani Nikula
cf3d5f89a6
drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_AUX_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/66ec1f81be49c87cd9613ba052ce6fd50362d0e0.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:25 +03:00
Jani Nikula
7a7a4c4eeb
drm/i915: pass dev_priv explicitly to TRANS_PSR_IIR
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_PSR_IIR register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3a03109d11e7f55a456c3e5ef28d3ffa69582d3d.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:23 +03:00
Jani Nikula
f9f8f84717
drm/i915: pass dev_priv explicitly to TRANS_PSR_IMR
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_PSR_IMR register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/09e9c11ffb669dac901c2416462a8f3dabc86020.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:22 +03:00
Jani Nikula
676a6a1c99
drm/i915: pass dev_priv explicitly to EDP_PSR_CTL
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the EDP_PSR_CTL register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/198858bc3925c02c0975670e3ebb5ce2084ac658.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:20 +03:00
Jani Nikula
1d231cd898
drm/i915: pass dev_priv explicitly to TRANS_EXITLINE
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_EXITLINE register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/eb1e5fe155daf2d271af76e683a1f3f33e34403a.1714471597.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-06 10:25:19 +03:00
Jouni Högander
3a487d111d
drm/i915/psr: Use crtc_state->port_clock instead of intel_dp->link_rate
...
Intel_dp->link_rate is not yet set at this point. Instead use
crtc_state->port_clock.
Fixes: 0dd21f8369 ("drm/i915/psr: Silence period and lfps half cycle")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240409085759.178235-1-jouni.hogander@intel.com
2024-04-11 12:09:48 +03:00
Ville Syrjälä
372fa0c79d
drm/i915/psr: Disable PSR when bigjoiner is used
...
Bigjoiner seem to be causing all kinds of grief to the PSR
code currently. I don't believe there is any hardware issue
but the code simply not handling this correctly. For now
just disable PSR when bigjoiner is needed.
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-3-ville.syrjala@linux.intel.com
Reviewed-by: Arun R Murthy <arun.r.mruthy@intel.com >
Acked-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2024-04-08 15:27:24 +03:00
Jouni Högander
ac9ef32732
drm/i915/psr: Panel replay has to be enabled before link training
...
Panel replay has to be enabled on sink side before link training. Take this
into account in fastset check and in initial fastset check.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-9-jouni.hogander@intel.com
2024-04-08 10:28:55 +03:00
Jouni Högander
88ae6c65ec
drm/i915/psr: Unify panel replay enable/disable sink
...
Unify enabling and disabling of psr/panel replay for a sink. Modify
intel_psr_enable_sink accordingly and use it for both cases.
v3:
- move psr2_su_region_et_valid to be check for PSR2 only
v2:
- enable panel replay for sink before link training
- write ALPM_CONFIG only for PSR
- add DP_PSR_CRC_VERIFICATION only for PSR
- take care of disable sink as well
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-8-jouni.hogander@intel.com
2024-04-08 10:28:54 +03:00
Jouni Högander
251ff160c4
drm/i915/psr: Do not write registers/bits not applicable for panel replay
...
Bspec is saying this
mask register: Only PSR_MASK[Mask FBC modify] and PSR_MASK[Mask Hotplug]
are used in panel replay mode.
Status register: Only SRD_STATUS[SRD state] field is used in panel replay
mode.
Due to this stop writing and reading registers and bits not used by panel
replay if panel replay is used.
Bspec: 53370, 68920
v2:
- use intel_dp_is_edp with PSR_MASK register
- handle LunarLake as well
- hanle ALPM configuration as well
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-7-jouni.hogander@intel.com
2024-04-08 10:28:54 +03:00
Jouni Högander
b7fc3d12a1
drm/i915/psr: Check possible errors for panel replay as well
...
On HPD interrupt we want to check if the reason for HPD was some panel
replay error detected by monitor/panel. This is already done for PSR. We
want to do this for panel replay as well. Modify intel_psr_short_pulse to
support panel replay as well.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-6-jouni.hogander@intel.com
2024-04-08 10:28:53 +03:00
Jouni Högander
5d1e4cfa9c
drm/i915/psr: Do not update phy power state in case of non-eDP panel replay
...
Currently panel replay is supporting only main link on mode -> Do not
update phy power state for non-eDP panel replay.
Bspec: 53370
v2: use intel_dp_is_edp to differentiate
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-5-jouni.hogander@intel.com
2024-04-08 10:28:53 +03:00
Jouni Högander
72c222838d
drm/i915/psr: Intel_psr_pause/resume needs to support panel replay
...
Currently intel_psr_pause and intel_psr_resume do nothing in case of panel
replay. Change them to perform pause and return also in case of panel
replay.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-4-jouni.hogander@intel.com
2024-04-08 10:28:52 +03:00
Jouni Högander
5afa6e4960
drm/i915/psr: Set intel_crtc_state->has_psr on panel replay as well
...
Current code is setting only intel_crtc_state->has_panel_replay in panel
replay case. There are lots of stuff behind intel_crtc_state->has_psr that
is needed for panel replay as well. Instead of converting each check to
has_psr || has_panel_replay set has_psr in case of panel replay as
well. Code can then differentiate between psr and panel replay by using
intel_crtc_state->has_panel_replay.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-3-jouni.hogander@intel.com
2024-04-08 10:28:52 +03:00
Jouni Högander
7de3363e60
drm/i915/psr: Add some documentation of variables used in psr code
...
We are adding more boolean variable into intel_psr and intel_crtc_state
structs. Add some documentation about these for sake of clarity.
v2: Modify has_psr + has_panel_replay to mean panel replay
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-2-jouni.hogander@intel.com
2024-04-08 10:28:51 +03:00
Jouni Högander
71cdfa8cad
drm/i915/psr: Do not write ALPM configuration for PSR1 or DP2.0 Panel Replay
...
No need to write ALPM configuration for DP2.0 Panel Replay or PSR1.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240328141928.1311284-6-jouni.hogander@intel.com
2024-04-02 12:15:43 +03:00
Jouni Högander
1ccbf13586
drm/i915/psr: Enable ALPM on source side for eDP Panel replay
...
Enable ALPM AUX-Less on source side for Panel Replay eDP. Also write all
calculated AUX-Less configuration values accordingly. Enabling it on sink
side is in upcoming patch.
Bspec: 71477
v5:
- mention enable is only on source side in commit message
v4:
- add comment explaining why AUX less is enabled on eDP panel replay
without any extra checks
v3:
- do not use alpm_ctl as uninitialized variable
v2:
- do not set AUX-Wake related bits for AUX-Less case
- drop switch to active latency
- add SLEEP_HOLD_TIME_50_SYMBOLS
- add PORT_ALPM_CTL_MAX_PHY_SWING_HOLD
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240328141928.1311284-5-jouni.hogander@intel.com
2024-04-02 12:15:43 +03:00
Jouni Högander
0dd21f8369
drm/i915/psr: Silence period and lfps half cycle
...
Add get function for silence period and lfps half cycle. Values are taken
from the tables in bspec.
Bspec: 71632
v3:
- use PORT_ALPM_CTL_SILENCE_PERIOD_MASK instead of value 255
- use PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION_MASK instead of
value 31
v2:
- fix some checks
- add some more comments
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240328141928.1311284-4-jouni.hogander@intel.com
2024-04-02 12:15:43 +03:00
Jouni Högander
da6a9836ac
drm/i915/psr: Calculate aux less wake time
...
Calculate aux less wake time and store it into alpm_params struct
Bspec: 71477
v4:
- re-use fast_wake_lines to store aux_less_wake_lines
v3:
- use ALPM_CTL_AUX_LESS_WAKE_TIME_MASK instead of value 63
v2:
- use variables instead of values directly
- fix max value
- move converting port clock to Mhz into _lnl_compute_aux_less_wake_time
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240328141928.1311284-3-jouni.hogander@intel.com
2024-04-02 12:15:43 +03:00
Jouni Högander
29cdef8539
drm/i915/display: Implement Wa_16021440873
...
This patch is implementing Wa_16021440873.
Bspec: 74151
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240319123327.1661097-6-jouni.hogander@intel.com
2024-03-28 15:16:04 +02:00
Jouni Högander
d37b3dac68
drm/i915/psr: Fix intel_psr2_sel_fetch_et_alignment usage
...
Currently we are not aligning selective update area to cover cursor fully
when cursor is not updated by itself but still in the selective update
area. Fix this by checking cursor separately after
drm_atomic_add_affected_planes.
Bspec: 68927
Fixes: 1bff93b8bc ("drm/i915/psr: Extend SU area to cover cursor fully if needed")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240319123327.1661097-4-jouni.hogander@intel.com
2024-03-28 15:15:35 +02:00
Jouni Högander
b52c4093b0
drm/i915/psr: Move writing early transport pipe src
...
Currently PIPE_SRCSZ_ERLY_TPT is written in
intel_display.c:intel_set_pipe_src_size. This doesn't work as
intel_set_pipe_src_size is called only on modeset.
Bspec: 68927
Fixes: 3291bbb93e ("drm/i915/psr: Configure PIPE_SRCSZ_ERLY_TPT for psr2 early transport")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240319123327.1661097-3-jouni.hogander@intel.com
2024-03-28 15:04:41 +02:00
Jouni Högander
f3b899f0b4
drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value
...
When early transport is enabled we need to write PIPE_SRCSZ_ERLY_TPT on
every flip doing selective update. This patch calculates
PIPE_SRCSZ_ERLY_TPT same way as is done for PSR2_MAN_TRK_CTL value and
stores i in intel_crtc_state->pipe_srcsz_early_tpt to be written later
during flip.
Bspec: 68927
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240319123327.1661097-2-jouni.hogander@intel.com
2024-03-28 15:04:41 +02:00
Jani Nikula
0a099232d2
drm/i915/snps: pass encoder to intel_snps_phy_update_psr_power_state()
...
Pass encoder to intel_snps_phy_update_psr_power_state(). The encoder
will be more helpful than just port in the subsequent changes.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4711919a9834cf4a49fd665009ba9d44b4b42bc4.1710949619.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-03-21 14:10:11 +02:00
Jouni Högander
1d81ee5562
drm/i915/psr: Calculate IO wake and fast wake lines for DISPLAY_VER < 12
...
Bspec mentions 50 us for IO wake time and 32 us for fast wake time. 32 us
is most probably wrong as it doesn't meet the specification as fast wake
time is calculated in Bspec like this:
10..16 us (precharge) + 8 us (preamble) + 4 us (phy_wake) + 20 us
(tfw_exit_latency)
Instead of using these constants calculate IO wake and fast wake for
DISPLAY_VER < 12 as well.
v3:
- do not handle < 9 separately
- add own helper for skl and tgl io buffer wake times
v2:
- initialize io/fast_wake_time for display version < 9
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240313133221.868391-4-jouni.hogander@intel.com
2024-03-14 16:27:03 +02:00
Jouni Högander
fe10e7c681
drm/i915/psr: Improve fast and IO wake lines calculation
...
Current fast and IO wake lines calculation is assuming fast wake sync
length is 18 pulses. Let's improve this by checking actual length.
Add getter for IO buffer wake time and return 10 us there which was assumed
with static 42 us IO wake time. Upcoming patches will extent this for
different display versions.
Bspec: 65450
v3:
- s/get_io_buffer_wake_time/io_buffer_wake_time/ and use it directly in
calculation.
v2:
- rename io_wake_time in if block to io_buffer_wake_time
- rename get_io_wake_time to get_io_buffer_wake_time
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240313133221.868391-3-jouni.hogander@intel.com
2024-03-14 16:26:51 +02:00
Animesh Manna
1cca19bf29
drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector()
...
Move psr_init_dpcd() from init-connector to connector-detect
function. The dpcd probe for checking panel replay capability
for external dp connector is causing delay during boot which can
be optimized by moving dpcd probe to connector specific detect().
v1: Initial version.
v2: Add details in commit description. [Jani]
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Fixes: cceeaa312d ("drm/i915/panelreplay: Enable panel replay dpcd initialization for DP")
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240229043716.4065760-1-animesh.manna@intel.com
2024-03-01 13:04:41 +05:30
Jouni Högander
449c2d5948
drm/i915/alpm: Alpm aux wake configuration for lnl
...
Lunarlake has some configurations in ALPM_CTL register for legacy ALPM as
well. Write these.
Bspec: 71477
v2: move version check to lnl_alpm_configure
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240130111130.3298779-5-jouni.hogander@intel.com
2024-02-07 09:58:04 +02:00
Jouni Högander
29f3067a23
drm/i915/alpm: Calculate ALPM Entry check
...
ALPM Entry Check represents the number of lines needed to put the main link
to sleep and keep it in the sleep state before it can be taken out of the
SLEEP state (eDP requires the main link to be in the SLEEP state for a
minimum of 5us).
Bspec: 71477
v2: move display version check into _lnl_compute_alpm_param
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240130111130.3298779-4-jouni.hogander@intel.com
2024-02-07 09:58:03 +02:00
Jouni Högander
96a2494573
drm/i915/psr: Add alpm_parameters struct
...
Add new alpm_parameters struct into intel_psr for all calculated
alpm parameters.
v2: Move alpm_parameters struct definition to intel_psr struct
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240130111130.3298779-3-jouni.hogander@intel.com
2024-02-07 09:58:03 +02:00