mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: Fix writeback on DCN 3.2+
[WHAT] 1. Set no scaling for writeback as they are hardcoded in DCN3.2+. 2. Set no fast plane update for writeback commits. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -10662,10 +10662,10 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm,
|
||||
|
||||
wb_info->dwb_params.capture_rate = dwb_capture_rate_0;
|
||||
|
||||
wb_info->dwb_params.scaler_taps.h_taps = 4;
|
||||
wb_info->dwb_params.scaler_taps.v_taps = 4;
|
||||
wb_info->dwb_params.scaler_taps.h_taps_c = 2;
|
||||
wb_info->dwb_params.scaler_taps.v_taps_c = 2;
|
||||
wb_info->dwb_params.scaler_taps.h_taps = 1;
|
||||
wb_info->dwb_params.scaler_taps.v_taps = 1;
|
||||
wb_info->dwb_params.scaler_taps.h_taps_c = 1;
|
||||
wb_info->dwb_params.scaler_taps.v_taps_c = 1;
|
||||
wb_info->dwb_params.subsample_position = DWB_INTERSTITIAL_SUBSAMPLING;
|
||||
|
||||
wb_info->mcif_buf_params.luma_pitch = afb->base.pitches[0];
|
||||
@@ -11681,6 +11681,8 @@ static bool should_reset_plane(struct drm_atomic_state *state,
|
||||
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
|
||||
struct dm_crtc_state *old_dm_crtc_state, *new_dm_crtc_state;
|
||||
struct amdgpu_device *adev = drm_to_adev(plane->dev);
|
||||
struct drm_connector_state *new_con_state;
|
||||
struct drm_connector *connector;
|
||||
int i;
|
||||
|
||||
/*
|
||||
@@ -11691,6 +11693,15 @@ static bool should_reset_plane(struct drm_atomic_state *state,
|
||||
state->allow_modeset)
|
||||
return true;
|
||||
|
||||
/* Check for writeback commit */
|
||||
for_each_new_connector_in_state(state, connector, new_con_state, i) {
|
||||
if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
|
||||
continue;
|
||||
|
||||
if (new_con_state->writeback_job)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (amdgpu_in_reset(adev) && state->allow_modeset)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user