Skip to content

Commit c7fafb7

Browse files
Tom Chungalexdeucher
authored andcommitted
drm/amd/display: Change some variable name of psr
Panel Replay feature may also use the same variable with PSR. Change the variable name and make it not specify for PSR. Reviewed-by: Leo Li <[email protected]> Signed-off-by: Tom Chung <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 90eacfb commit c7fafb7

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6790,7 +6790,7 @@ create_stream_for_sink(struct drm_connector *connector,
67906790
if (stream->out_transfer_func.tf == TRANSFER_FUNCTION_GAMMA22)
67916791
tf = TRANSFER_FUNC_GAMMA_22;
67926792
mod_build_vsc_infopacket(stream, &stream->vsc_infopacket, stream->output_color_space, tf);
6793-
aconnector->psr_skip_count = AMDGPU_DM_PSR_ENTRY_DELAY;
6793+
aconnector->sr_skip_count = AMDGPU_DM_PSR_ENTRY_DELAY;
67946794

67956795
}
67966796
finish:
@@ -9047,7 +9047,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
90479047
* during the PSR-SU was disabled.
90489048
*/
90499049
if (acrtc_state->stream->link->psr_settings.psr_version >= DC_PSR_VERSION_SU_1 &&
9050-
acrtc_attach->dm_irq_params.allow_psr_entry &&
9050+
acrtc_attach->dm_irq_params.allow_sr_entry &&
90519051
#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY
90529052
!amdgpu_dm_crc_window_is_activated(acrtc_state->base.crtc) &&
90539053
#endif
@@ -9282,27 +9282,27 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
92829282
}
92839283
}
92849284

9285-
/* Decrement skip count when PSR is enabled and we're doing fast updates. */
9285+
/* Decrement skip count when SR is enabled and we're doing fast updates. */
92869286
if (acrtc_state->update_type == UPDATE_TYPE_FAST &&
92879287
acrtc_state->stream->link->psr_settings.psr_feature_enabled) {
92889288
struct amdgpu_dm_connector *aconn =
92899289
(struct amdgpu_dm_connector *)acrtc_state->stream->dm_stream_context;
92909290

9291-
if (aconn->psr_skip_count > 0)
9292-
aconn->psr_skip_count--;
9291+
if (aconn->sr_skip_count > 0)
9292+
aconn->sr_skip_count--;
92939293

9294-
/* Allow PSR when skip count is 0. */
9295-
acrtc_attach->dm_irq_params.allow_psr_entry = !aconn->psr_skip_count;
9294+
/* Allow SR when skip count is 0. */
9295+
acrtc_attach->dm_irq_params.allow_sr_entry = !aconn->sr_skip_count;
92969296

92979297
/*
9298-
* If sink supports PSR SU, there is no need to rely on
9299-
* a vblank event disable request to enable PSR. PSR SU
9298+
* If sink supports PSR SU/Panel Replay, there is no need to rely on
9299+
* a vblank event disable request to enable PSR/RP. PSR SU/RP
93009300
* can be enabled immediately once OS demonstrates an
93019301
* adequate number of fast atomic commits to notify KMD
93029302
* of update events. See `vblank_control_worker()`.
93039303
*/
93049304
if (acrtc_state->stream->link->psr_settings.psr_version >= DC_PSR_VERSION_SU_1 &&
9305-
acrtc_attach->dm_irq_params.allow_psr_entry &&
9305+
acrtc_attach->dm_irq_params.allow_sr_entry &&
93069306
#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY
93079307
!amdgpu_dm_crc_window_is_activated(acrtc_state->base.crtc) &&
93089308
#endif
@@ -9313,7 +9313,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
93139313
500000000)
93149314
amdgpu_dm_psr_enable(acrtc_state->stream);
93159315
} else {
9316-
acrtc_attach->dm_irq_params.allow_psr_entry = false;
9316+
acrtc_attach->dm_irq_params.allow_sr_entry = false;
93179317
}
93189318

93199319
mutex_unlock(&dm->dc_lock);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ struct amdgpu_dm_connector {
727727
/* Cached display modes */
728728
struct drm_display_mode freesync_vid_base;
729729

730-
int psr_skip_count;
730+
int sr_skip_count;
731731
bool disallow_edp_enter_psr;
732732

733733
/* Record progress status of mst*/

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
268268
if (vblank_work->stream && vblank_work->stream->link) {
269269
amdgpu_dm_crtc_set_panel_sr_feature(
270270
vblank_work, vblank_work->enable,
271-
vblank_work->acrtc->dm_irq_params.allow_psr_entry ||
271+
vblank_work->acrtc->dm_irq_params.allow_sr_entry ||
272272
vblank_work->stream->link->replay_settings.replay_feature_enabled);
273273
}
274274

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq_params.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct dm_irq_params {
3333
struct mod_vrr_params vrr_params;
3434
struct dc_stream_state *stream;
3535
int active_planes;
36-
bool allow_psr_entry;
36+
bool allow_sr_entry;
3737
struct mod_freesync_config freesync_config;
3838

3939
#ifdef CONFIG_DEBUG_FS

0 commit comments

Comments
 (0)