drm/amd/display: use a more lax vblank enable policy for older ASICs
Ideally, we want to drop the legacy vblank enable for older ASICs. This should be possible now, since we can now specify how many frames we need to wait before disabling vblanking instead of being forced to either choose between no delay (which can still be buggy) and drm_vblank_offdelay (which is much longer by default than is required on AMD hardware). Suggested-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240822161856.174600-4-hamza.mahfooz@amd.com
This commit is contained in:
parent
e45b6716de
commit
58a261bfc9
1 changed files with 6 additions and 8 deletions
|
@ -8244,10 +8244,9 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
|
||||||
|
|
||||||
if (acrtc_state) {
|
if (acrtc_state) {
|
||||||
if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
|
if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
|
||||||
IP_VERSION(3, 5, 0)) {
|
IP_VERSION(3, 5, 0) ||
|
||||||
drm_crtc_vblank_on(&acrtc->base);
|
acrtc_state->stream->link->psr_settings.psr_version <
|
||||||
} else if (acrtc_state->stream->link->psr_settings.psr_version <
|
DC_PSR_VERSION_UNSUPPORTED) {
|
||||||
DC_PSR_VERSION_UNSUPPORTED) {
|
|
||||||
timing = &acrtc_state->stream->timing;
|
timing = &acrtc_state->stream->timing;
|
||||||
|
|
||||||
/* at least 2 frames */
|
/* at least 2 frames */
|
||||||
|
@ -8257,14 +8256,13 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
|
||||||
timing->pix_clk_100hz);
|
timing->pix_clk_100hz);
|
||||||
|
|
||||||
config.offdelay_ms = offdelay ?: 30;
|
config.offdelay_ms = offdelay ?: 30;
|
||||||
drm_crtc_vblank_on_config(&acrtc->base,
|
|
||||||
&config);
|
|
||||||
} else {
|
} else {
|
||||||
config.disable_immediate = true;
|
config.disable_immediate = true;
|
||||||
drm_crtc_vblank_on_config(&acrtc->base,
|
|
||||||
&config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drm_crtc_vblank_on_config(&acrtc->base,
|
||||||
|
&config);
|
||||||
|
|
||||||
amdgpu_irq_get(
|
amdgpu_irq_get(
|
||||||
adev,
|
adev,
|
||||||
&adev->pageflip_irq,
|
&adev->pageflip_irq,
|
||||||
|
|
Loading…
Add table
Reference in a new issue