mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
Merge tag 'amd-drm-fixes-6.1-2022-11-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.1-2022-11-09: amdgpu: - SMU 13.0.4 update - GPUVM TLB race fix - DCN 3.1.4 fixes - DCN 3.2.x fixes - Vega10 fan fix - BACO fix for Beige Goby board - PSR fix - GPU VM PT locking fixes amdkfd: - CRIU fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221109234554.6028-1-alexander.deucher@amd.com
This commit is contained in:
commit
5bf06c4c51
@ -992,6 +992,7 @@ out_free_user_pages:
|
||||
kvfree(e->user_pages);
|
||||
e->user_pages = NULL;
|
||||
}
|
||||
mutex_unlock(&p->bo_list->bo_list_mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -143,32 +143,6 @@ int amdgpu_vm_set_pasid(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* vm eviction_lock can be taken in MMU notifiers. Make sure no reclaim-FS
|
||||
* happens while holding this lock anywhere to prevent deadlocks when
|
||||
* an MMU notifier runs in reclaim-FS context.
|
||||
*/
|
||||
static inline void amdgpu_vm_eviction_lock(struct amdgpu_vm *vm)
|
||||
{
|
||||
mutex_lock(&vm->eviction_lock);
|
||||
vm->saved_flags = memalloc_noreclaim_save();
|
||||
}
|
||||
|
||||
static inline int amdgpu_vm_eviction_trylock(struct amdgpu_vm *vm)
|
||||
{
|
||||
if (mutex_trylock(&vm->eviction_lock)) {
|
||||
vm->saved_flags = memalloc_noreclaim_save();
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void amdgpu_vm_eviction_unlock(struct amdgpu_vm *vm)
|
||||
{
|
||||
memalloc_noreclaim_restore(vm->saved_flags);
|
||||
mutex_unlock(&vm->eviction_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_vm_bo_evicted - vm_bo is evicted
|
||||
*
|
||||
|
@ -492,7 +492,48 @@ void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m);
|
||||
*/
|
||||
static inline uint64_t amdgpu_vm_tlb_seq(struct amdgpu_vm *vm)
|
||||
{
|
||||
unsigned long flags;
|
||||
spinlock_t *lock;
|
||||
|
||||
/*
|
||||
* Workaround to stop racing between the fence signaling and handling
|
||||
* the cb. The lock is static after initially setting it up, just make
|
||||
* sure that the dma_fence structure isn't freed up.
|
||||
*/
|
||||
rcu_read_lock();
|
||||
lock = vm->last_tlb_flush->lock;
|
||||
rcu_read_unlock();
|
||||
|
||||
spin_lock_irqsave(lock, flags);
|
||||
spin_unlock_irqrestore(lock, flags);
|
||||
|
||||
return atomic64_read(&vm->tlb_seq);
|
||||
}
|
||||
|
||||
/*
|
||||
* vm eviction_lock can be taken in MMU notifiers. Make sure no reclaim-FS
|
||||
* happens while holding this lock anywhere to prevent deadlocks when
|
||||
* an MMU notifier runs in reclaim-FS context.
|
||||
*/
|
||||
static inline void amdgpu_vm_eviction_lock(struct amdgpu_vm *vm)
|
||||
{
|
||||
mutex_lock(&vm->eviction_lock);
|
||||
vm->saved_flags = memalloc_noreclaim_save();
|
||||
}
|
||||
|
||||
static inline bool amdgpu_vm_eviction_trylock(struct amdgpu_vm *vm)
|
||||
{
|
||||
if (mutex_trylock(&vm->eviction_lock)) {
|
||||
vm->saved_flags = memalloc_noreclaim_save();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void amdgpu_vm_eviction_unlock(struct amdgpu_vm *vm)
|
||||
{
|
||||
memalloc_noreclaim_restore(vm->saved_flags);
|
||||
mutex_unlock(&vm->eviction_lock);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -597,7 +597,9 @@ static int amdgpu_vm_pt_alloc(struct amdgpu_device *adev,
|
||||
if (entry->bo)
|
||||
return 0;
|
||||
|
||||
amdgpu_vm_eviction_unlock(vm);
|
||||
r = amdgpu_vm_pt_create(adev, vm, cursor->level, immediate, &pt);
|
||||
amdgpu_vm_eviction_lock(vm);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
|
@ -1950,7 +1950,7 @@ static int criu_checkpoint(struct file *filep,
|
||||
{
|
||||
int ret;
|
||||
uint32_t num_devices, num_bos, num_objects;
|
||||
uint64_t priv_size, priv_offset = 0;
|
||||
uint64_t priv_size, priv_offset = 0, bo_priv_offset;
|
||||
|
||||
if (!args->devices || !args->bos || !args->priv_data)
|
||||
return -EINVAL;
|
||||
@ -1994,38 +1994,34 @@ static int criu_checkpoint(struct file *filep,
|
||||
if (ret)
|
||||
goto exit_unlock;
|
||||
|
||||
ret = criu_checkpoint_bos(p, num_bos, (uint8_t __user *)args->bos,
|
||||
(uint8_t __user *)args->priv_data, &priv_offset);
|
||||
if (ret)
|
||||
goto exit_unlock;
|
||||
/* Leave room for BOs in the private data. They need to be restored
|
||||
* before events, but we checkpoint them last to simplify the error
|
||||
* handling.
|
||||
*/
|
||||
bo_priv_offset = priv_offset;
|
||||
priv_offset += num_bos * sizeof(struct kfd_criu_bo_priv_data);
|
||||
|
||||
if (num_objects) {
|
||||
ret = kfd_criu_checkpoint_queues(p, (uint8_t __user *)args->priv_data,
|
||||
&priv_offset);
|
||||
if (ret)
|
||||
goto close_bo_fds;
|
||||
goto exit_unlock;
|
||||
|
||||
ret = kfd_criu_checkpoint_events(p, (uint8_t __user *)args->priv_data,
|
||||
&priv_offset);
|
||||
if (ret)
|
||||
goto close_bo_fds;
|
||||
goto exit_unlock;
|
||||
|
||||
ret = kfd_criu_checkpoint_svm(p, (uint8_t __user *)args->priv_data, &priv_offset);
|
||||
if (ret)
|
||||
goto close_bo_fds;
|
||||
goto exit_unlock;
|
||||
}
|
||||
|
||||
close_bo_fds:
|
||||
if (ret) {
|
||||
/* If IOCTL returns err, user assumes all FDs opened in criu_dump_bos are closed */
|
||||
uint32_t i;
|
||||
struct kfd_criu_bo_bucket *bo_buckets = (struct kfd_criu_bo_bucket *) args->bos;
|
||||
|
||||
for (i = 0; i < num_bos; i++) {
|
||||
if (bo_buckets[i].alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM)
|
||||
close_fd(bo_buckets[i].dmabuf_fd);
|
||||
}
|
||||
}
|
||||
/* This must be the last thing in this function that can fail.
|
||||
* Otherwise we leak dmabuf file descriptors.
|
||||
*/
|
||||
ret = criu_checkpoint_bos(p, num_bos, (uint8_t __user *)args->bos,
|
||||
(uint8_t __user *)args->priv_data, &bo_priv_offset);
|
||||
|
||||
exit_unlock:
|
||||
mutex_unlock(&p->mutex);
|
||||
|
@ -506,6 +506,7 @@ int kfd_criu_restore_event(struct file *devkfd,
|
||||
ret = create_other_event(p, ev, &ev_priv->event_id);
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&p->event_mutex);
|
||||
|
||||
exit:
|
||||
if (ret)
|
||||
@ -513,8 +514,6 @@ exit:
|
||||
|
||||
kfree(ev_priv);
|
||||
|
||||
mutex_unlock(&p->event_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -7622,9 +7622,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
|
||||
bundle->surface_updates[planes_count].plane_info =
|
||||
&bundle->plane_infos[planes_count];
|
||||
|
||||
fill_dc_dirty_rects(plane, old_plane_state, new_plane_state,
|
||||
new_crtc_state,
|
||||
&bundle->flip_addrs[planes_count]);
|
||||
if (acrtc_state->stream->link->psr_settings.psr_feature_enabled)
|
||||
fill_dc_dirty_rects(plane, old_plane_state,
|
||||
new_plane_state, new_crtc_state,
|
||||
&bundle->flip_addrs[planes_count]);
|
||||
|
||||
/*
|
||||
* Only allow immediate flips for fast updates that don't
|
||||
|
@ -363,32 +363,32 @@ static struct wm_table ddr5_wm_table = {
|
||||
.wm_inst = WM_A,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.72,
|
||||
.sr_exit_time_us = 9,
|
||||
.sr_enter_plus_exit_time_us = 11,
|
||||
.sr_exit_time_us = 12.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_B,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.72,
|
||||
.sr_exit_time_us = 9,
|
||||
.sr_enter_plus_exit_time_us = 11,
|
||||
.sr_exit_time_us = 12.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_C,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.72,
|
||||
.sr_exit_time_us = 9,
|
||||
.sr_enter_plus_exit_time_us = 11,
|
||||
.sr_exit_time_us = 12.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_D,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.72,
|
||||
.sr_exit_time_us = 9,
|
||||
.sr_enter_plus_exit_time_us = 11,
|
||||
.sr_exit_time_us = 12.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.valid = true,
|
||||
},
|
||||
}
|
||||
@ -400,32 +400,32 @@ static struct wm_table lpddr5_wm_table = {
|
||||
.wm_inst = WM_A,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.65333,
|
||||
.sr_exit_time_us = 11.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.sr_exit_time_us = 16.5,
|
||||
.sr_enter_plus_exit_time_us = 18.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_B,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.65333,
|
||||
.sr_exit_time_us = 11.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.sr_exit_time_us = 16.5,
|
||||
.sr_enter_plus_exit_time_us = 18.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_C,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.65333,
|
||||
.sr_exit_time_us = 11.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.sr_exit_time_us = 16.5,
|
||||
.sr_enter_plus_exit_time_us = 18.5,
|
||||
.valid = true,
|
||||
},
|
||||
{
|
||||
.wm_inst = WM_D,
|
||||
.wm_type = WM_TYPE_PSTATE_CHG,
|
||||
.pstate_latency_us = 11.65333,
|
||||
.sr_exit_time_us = 11.5,
|
||||
.sr_enter_plus_exit_time_us = 14.5,
|
||||
.sr_exit_time_us = 16.5,
|
||||
.sr_enter_plus_exit_time_us = 18.5,
|
||||
.valid = true,
|
||||
},
|
||||
}
|
||||
|
@ -853,6 +853,7 @@ struct dc_debug_options {
|
||||
bool enable_dp_dig_pixel_rate_div_policy;
|
||||
enum lttpr_mode lttpr_mode_override;
|
||||
unsigned int dsc_delay_factor_wa_x1000;
|
||||
unsigned int min_prefetch_in_strobe_ns;
|
||||
};
|
||||
|
||||
struct gpu_info_soc_bounding_box_v1_0;
|
||||
|
@ -49,18 +49,30 @@
|
||||
#define CTX \
|
||||
enc1->base.ctx
|
||||
|
||||
static void enc314_reset_fifo(struct stream_encoder *enc, bool reset)
|
||||
{
|
||||
struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
|
||||
uint32_t reset_val = reset ? 1 : 0;
|
||||
uint32_t is_symclk_on;
|
||||
|
||||
REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_RESET, reset_val);
|
||||
REG_GET(DIG_FE_CNTL, DIG_SYMCLK_FE_ON, &is_symclk_on);
|
||||
|
||||
if (is_symclk_on)
|
||||
REG_WAIT(DIG_FIFO_CTRL0, DIG_FIFO_RESET_DONE, reset_val, 10, 5000);
|
||||
else
|
||||
udelay(10);
|
||||
}
|
||||
|
||||
static void enc314_enable_fifo(struct stream_encoder *enc)
|
||||
{
|
||||
struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
|
||||
|
||||
/* TODO: Confirm if we need to wait for DIG_SYMCLK_FE_ON */
|
||||
REG_WAIT(DIG_FE_CNTL, DIG_SYMCLK_FE_ON, 1, 10, 5000);
|
||||
REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_READ_START_LEVEL, 0x7);
|
||||
REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_RESET, 1);
|
||||
REG_WAIT(DIG_FIFO_CTRL0, DIG_FIFO_RESET_DONE, 1, 10, 5000);
|
||||
REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_RESET, 0);
|
||||
REG_WAIT(DIG_FIFO_CTRL0, DIG_FIFO_RESET_DONE, 0, 10, 5000);
|
||||
|
||||
enc314_reset_fifo(enc, true);
|
||||
enc314_reset_fifo(enc, false);
|
||||
|
||||
REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_ENABLE, 1);
|
||||
}
|
||||
|
||||
|
@ -724,6 +724,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
||||
.enable_dp_dig_pixel_rate_div_policy = 1,
|
||||
.allow_sw_cursor_fallback = false,
|
||||
.alloc_extra_way_for_cursor = true,
|
||||
.min_prefetch_in_strobe_ns = 60000, // 60us
|
||||
};
|
||||
|
||||
static const struct dc_debug_options debug_defaults_diags = {
|
||||
|
@ -722,6 +722,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
||||
.enable_dp_dig_pixel_rate_div_policy = 1,
|
||||
.allow_sw_cursor_fallback = false,
|
||||
.alloc_extra_way_for_cursor = true,
|
||||
.min_prefetch_in_strobe_ns = 60000, // 60us
|
||||
};
|
||||
|
||||
static const struct dc_debug_options debug_defaults_diags = {
|
||||
|
@ -146,8 +146,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_14_soc = {
|
||||
},
|
||||
},
|
||||
.num_states = 5,
|
||||
.sr_exit_time_us = 9.0,
|
||||
.sr_enter_plus_exit_time_us = 11.0,
|
||||
.sr_exit_time_us = 16.5,
|
||||
.sr_enter_plus_exit_time_us = 18.5,
|
||||
.sr_exit_z8_time_us = 442.0,
|
||||
.sr_enter_plus_exit_z8_time_us = 560.0,
|
||||
.writeback_latency_us = 12.0,
|
||||
|
@ -2364,6 +2364,8 @@ void dcn32_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_pa
|
||||
/* DML DSC delay factor workaround */
|
||||
dcn3_2_ip.dsc_delay_factor_wa = dc->debug.dsc_delay_factor_wa_x1000 / 1000.0;
|
||||
|
||||
dcn3_2_ip.min_prefetch_in_strobe_us = dc->debug.min_prefetch_in_strobe_ns / 1000.0;
|
||||
|
||||
/* Override dispclk_dppclk_vco_speed_mhz from Clk Mgr */
|
||||
dcn3_2_soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
|
||||
dc->dml.soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
|
||||
|
@ -786,6 +786,8 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
|
||||
v->SwathHeightY[k],
|
||||
v->SwathHeightC[k],
|
||||
TWait,
|
||||
v->DRAMSpeedPerState[mode_lib->vba.VoltageLevel] <= MEM_STROBE_FREQ_MHZ ?
|
||||
mode_lib->vba.ip.min_prefetch_in_strobe_us : 0,
|
||||
/* Output */
|
||||
&v->DSTXAfterScaler[k],
|
||||
&v->DSTYAfterScaler[k],
|
||||
@ -3192,6 +3194,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
|
||||
mode_lib->vba.FCLKChangeLatency, mode_lib->vba.UrgLatency[i],
|
||||
mode_lib->vba.SREnterPlusExitTime);
|
||||
|
||||
memset(&v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull, 0, sizeof(DmlPipe));
|
||||
v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.myPipe.Dppclk = mode_lib->vba.RequiredDPPCLK[i][j][k];
|
||||
v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.myPipe.Dispclk = mode_lib->vba.RequiredDISPCLK[i][j];
|
||||
v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.myPipe.PixelClock = mode_lib->vba.PixelClock[k];
|
||||
@ -3244,6 +3247,8 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
|
||||
v->swath_width_chroma_ub_this_state[k],
|
||||
v->SwathHeightYThisState[k],
|
||||
v->SwathHeightCThisState[k], v->TWait,
|
||||
v->DRAMSpeedPerState[i] <= MEM_STROBE_FREQ_MHZ ?
|
||||
mode_lib->vba.ip.min_prefetch_in_strobe_us : 0,
|
||||
|
||||
/* Output */
|
||||
&v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.DSTXAfterScaler[k],
|
||||
|
@ -49,6 +49,9 @@
|
||||
#define BPP_INVALID 0
|
||||
#define BPP_BLENDED_PIPE 0xffffffff
|
||||
|
||||
#define MEM_STROBE_FREQ_MHZ 1600
|
||||
#define MEM_STROBE_MAX_DELIVERY_TIME_US 60.0
|
||||
|
||||
struct display_mode_lib;
|
||||
|
||||
void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib);
|
||||
|
@ -3417,6 +3417,7 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
unsigned int SwathHeightY,
|
||||
unsigned int SwathHeightC,
|
||||
double TWait,
|
||||
double TPreReq,
|
||||
/* Output */
|
||||
double *DSTXAfterScaler,
|
||||
double *DSTYAfterScaler,
|
||||
@ -3474,6 +3475,7 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
double min_Lsw;
|
||||
double Tsw_est1 = 0;
|
||||
double Tsw_est3 = 0;
|
||||
double TPreMargin = 0;
|
||||
|
||||
if (v->GPUVMEnable == true && v->HostVMEnable == true)
|
||||
HostVMDynamicLevelsTrips = v->HostVMMaxNonCachedPageTableLevels;
|
||||
@ -3699,6 +3701,8 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
|
||||
dst_y_prefetch_equ = dml_floor(4.0 * (dst_y_prefetch_equ + 0.125), 1) / 4.0;
|
||||
Tpre_rounded = dst_y_prefetch_equ * LineTime;
|
||||
|
||||
TPreMargin = Tpre_rounded - TPreReq;
|
||||
#ifdef __DML_VBA_DEBUG__
|
||||
dml_print("DML::%s: dst_y_prefetch_equ: %f (after round)\n", __func__, dst_y_prefetch_equ);
|
||||
dml_print("DML::%s: LineTime: %f\n", __func__, LineTime);
|
||||
@ -3726,7 +3730,7 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
*VRatioPrefetchY = 0;
|
||||
*VRatioPrefetchC = 0;
|
||||
*RequiredPrefetchPixDataBWLuma = 0;
|
||||
if (dst_y_prefetch_equ > 1) {
|
||||
if (dst_y_prefetch_equ > 1 && TPreMargin > 0.0) {
|
||||
double PrefetchBandwidth1;
|
||||
double PrefetchBandwidth2;
|
||||
double PrefetchBandwidth3;
|
||||
@ -3872,7 +3876,11 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
}
|
||||
|
||||
if (dst_y_prefetch_oto < dst_y_prefetch_equ) {
|
||||
*DestinationLinesForPrefetch = dst_y_prefetch_oto;
|
||||
if (dst_y_prefetch_oto * LineTime < TPreReq) {
|
||||
*DestinationLinesForPrefetch = dst_y_prefetch_equ;
|
||||
} else {
|
||||
*DestinationLinesForPrefetch = dst_y_prefetch_oto;
|
||||
}
|
||||
TimeForFetchingMetaPTE = Tvm_oto;
|
||||
TimeForFetchingRowInVBlank = Tr0_oto;
|
||||
*PrefetchBandwidth = prefetch_bw_oto;
|
||||
@ -4397,7 +4405,7 @@ void dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(
|
||||
|
||||
if (v->NumberOfActiveSurfaces > 1) {
|
||||
ActiveClockChangeLatencyHidingY = ActiveClockChangeLatencyHidingY
|
||||
- (1 - 1 / v->NumberOfActiveSurfaces) * SwathHeightY[k] * v->HTotal[k]
|
||||
- (1.0 - 1.0 / v->NumberOfActiveSurfaces) * SwathHeightY[k] * v->HTotal[k]
|
||||
/ v->PixelClock[k] / v->VRatio[k];
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "os_types.h"
|
||||
#include "../dc_features.h"
|
||||
#include "../display_mode_structs.h"
|
||||
#include "dml/display_mode_vba.h"
|
||||
#include "../display_mode_vba.h"
|
||||
|
||||
unsigned int dml32_dscceComputeDelay(
|
||||
unsigned int bpc,
|
||||
@ -743,6 +743,7 @@ bool dml32_CalculatePrefetchSchedule(
|
||||
unsigned int SwathHeightY,
|
||||
unsigned int SwathHeightC,
|
||||
double TWait,
|
||||
double TPreReq,
|
||||
/* Output */
|
||||
double *DSTXAfterScaler,
|
||||
double *DSTYAfterScaler,
|
||||
|
@ -544,6 +544,8 @@ void dcn321_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_p
|
||||
/* DML DSC delay factor workaround */
|
||||
dcn3_21_ip.dsc_delay_factor_wa = dc->debug.dsc_delay_factor_wa_x1000 / 1000.0;
|
||||
|
||||
dcn3_21_ip.min_prefetch_in_strobe_us = dc->debug.min_prefetch_in_strobe_ns / 1000.0;
|
||||
|
||||
/* Override dispclk_dppclk_vco_speed_mhz from Clk Mgr */
|
||||
dcn3_21_soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
|
||||
dc->dml.soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
|
||||
|
@ -367,6 +367,7 @@ struct _vcs_dpi_ip_params_st {
|
||||
|
||||
/* DM workarounds */
|
||||
double dsc_delay_factor_wa; // TODO: Remove after implementing root cause fix
|
||||
double min_prefetch_in_strobe_us;
|
||||
};
|
||||
|
||||
struct _vcs_dpi_display_xfc_params_st {
|
||||
|
@ -107,6 +107,13 @@ static const struct ddc_registers ddc_data_regs_dcn[] = {
|
||||
ddc_data_regs_dcn2(3),
|
||||
ddc_data_regs_dcn2(4),
|
||||
ddc_data_regs_dcn2(5),
|
||||
{
|
||||
// add a dummy entry for cases no such port
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
|
||||
.ddc_setup = 0,
|
||||
.phy_aux_cntl = 0,
|
||||
.dc_gpio_aux_ctrl_5 = 0
|
||||
},
|
||||
{
|
||||
DDC_GPIO_VGA_REG_LIST(DATA),
|
||||
.ddc_setup = 0,
|
||||
@ -121,6 +128,13 @@ static const struct ddc_registers ddc_clk_regs_dcn[] = {
|
||||
ddc_clk_regs_dcn2(3),
|
||||
ddc_clk_regs_dcn2(4),
|
||||
ddc_clk_regs_dcn2(5),
|
||||
{
|
||||
// add a dummy entry for cases no such port
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
|
||||
.ddc_setup = 0,
|
||||
.phy_aux_cntl = 0,
|
||||
.dc_gpio_aux_ctrl_5 = 0
|
||||
},
|
||||
{
|
||||
DDC_GPIO_VGA_REG_LIST(CLK),
|
||||
.ddc_setup = 0,
|
||||
|
@ -94,11 +94,14 @@ static enum gpio_result set_config(
|
||||
* is required for detection of AUX mode */
|
||||
if (hw_gpio->base.en != GPIO_DDC_LINE_VIP_PAD) {
|
||||
if (!ddc_data_pd_en || !ddc_clk_pd_en) {
|
||||
|
||||
REG_SET_2(gpio.MASK_reg, regval,
|
||||
if (hw_gpio->base.en == GPIO_DDC_LINE_DDC_VGA) {
|
||||
// bit 4 of mask has different usage in some cases
|
||||
REG_SET(gpio.MASK_reg, regval, DC_GPIO_DDC1DATA_PD_EN, 1);
|
||||
} else {
|
||||
REG_SET_2(gpio.MASK_reg, regval,
|
||||
DC_GPIO_DDC1DATA_PD_EN, 1,
|
||||
DC_GPIO_DDC1CLK_PD_EN, 1);
|
||||
|
||||
}
|
||||
if (config_data->type ==
|
||||
GPIO_CONFIG_TYPE_I2C_AUX_DUAL_MODE)
|
||||
msleep(3);
|
||||
|
@ -67,22 +67,21 @@ int vega10_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr,
|
||||
int vega10_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr,
|
||||
uint32_t *speed)
|
||||
{
|
||||
uint32_t current_rpm;
|
||||
uint32_t percent = 0;
|
||||
struct amdgpu_device *adev = hwmgr->adev;
|
||||
uint32_t duty100, duty;
|
||||
uint64_t tmp64;
|
||||
|
||||
if (hwmgr->thermal_controller.fanInfo.bNoFan)
|
||||
return 0;
|
||||
duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1),
|
||||
CG_FDO_CTRL1, FMAX_DUTY100);
|
||||
duty = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_THERMAL_STATUS),
|
||||
CG_THERMAL_STATUS, FDO_PWM_DUTY);
|
||||
|
||||
if (vega10_get_current_rpm(hwmgr, ¤t_rpm))
|
||||
return -1;
|
||||
if (!duty100)
|
||||
return -EINVAL;
|
||||
|
||||
if (hwmgr->thermal_controller.
|
||||
advanceFanControlParameters.usMaxFanRPM != 0)
|
||||
percent = current_rpm * 255 /
|
||||
hwmgr->thermal_controller.
|
||||
advanceFanControlParameters.usMaxFanRPM;
|
||||
|
||||
*speed = MIN(percent, 255);
|
||||
tmp64 = (uint64_t)duty * 255;
|
||||
do_div(tmp64, duty100);
|
||||
*speed = MIN((uint32_t)tmp64, 255);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -54,14 +54,14 @@
|
||||
#define PPSMC_MSG_TestMessage 0x01 ///< To check if PMFW is alive and responding. Requirement specified by PMFW team
|
||||
#define PPSMC_MSG_GetPmfwVersion 0x02 ///< Get PMFW version
|
||||
#define PPSMC_MSG_GetDriverIfVersion 0x03 ///< Get PMFW_DRIVER_IF version
|
||||
#define PPSMC_MSG_EnableGfxOff 0x04 ///< Enable GFXOFF
|
||||
#define PPSMC_MSG_DisableGfxOff 0x05 ///< Disable GFXOFF
|
||||
#define PPSMC_MSG_SPARE0 0x04 ///< SPARE
|
||||
#define PPSMC_MSG_SPARE1 0x05 ///< SPARE
|
||||
#define PPSMC_MSG_PowerDownVcn 0x06 ///< Power down VCN
|
||||
#define PPSMC_MSG_PowerUpVcn 0x07 ///< Power up VCN; VCN is power gated by default
|
||||
#define PPSMC_MSG_SetHardMinVcn 0x08 ///< For wireless display
|
||||
#define PPSMC_MSG_SetSoftMinGfxclk 0x09 ///< Set SoftMin for GFXCLK, argument is frequency in MHz
|
||||
#define PPSMC_MSG_ActiveProcessNotify 0x0A ///< Needs update
|
||||
#define PPSMC_MSG_ForcePowerDownGfx 0x0B ///< Force power down GFX, i.e. enter GFXOFF
|
||||
#define PPSMC_MSG_SPARE2 0x0A ///< SPARE
|
||||
#define PPSMC_MSG_SPARE3 0x0B ///< SPARE
|
||||
#define PPSMC_MSG_PrepareMp1ForUnload 0x0C ///< Prepare PMFW for GFX driver unload
|
||||
#define PPSMC_MSG_SetDriverDramAddrHigh 0x0D ///< Set high 32 bits of DRAM address for Driver table transfer
|
||||
#define PPSMC_MSG_SetDriverDramAddrLow 0x0E ///< Set low 32 bits of DRAM address for Driver table transfer
|
||||
@ -73,8 +73,7 @@
|
||||
#define PPSMC_MSG_SetSoftMinFclk 0x14 ///< Set hard min for FCLK
|
||||
#define PPSMC_MSG_SetSoftMinVcn 0x15 ///< Set soft min for VCN clocks (VCLK and DCLK)
|
||||
|
||||
|
||||
#define PPSMC_MSG_EnableGfxImu 0x16 ///< Needs update
|
||||
#define PPSMC_MSG_EnableGfxImu 0x16 ///< Enable GFX IMU
|
||||
|
||||
#define PPSMC_MSG_GetGfxclkFrequency 0x17 ///< Get GFX clock frequency
|
||||
#define PPSMC_MSG_GetFclkFrequency 0x18 ///< Get FCLK frequency
|
||||
@ -102,8 +101,8 @@
|
||||
#define PPSMC_MSG_SetHardMinIspxclkByFreq 0x2C ///< Set HardMin by frequency for ISPXCLK
|
||||
#define PPSMC_MSG_PowerDownUmsch 0x2D ///< Power down VCN.UMSCH (aka VSCH) scheduler
|
||||
#define PPSMC_MSG_PowerUpUmsch 0x2E ///< Power up VCN.UMSCH (aka VSCH) scheduler
|
||||
#define PPSMC_Message_IspStutterOn_MmhubPgDis 0x2F ///< ISP StutterOn mmHub PgDis
|
||||
#define PPSMC_Message_IspStutterOff_MmhubPgEn 0x30 ///< ISP StufferOff mmHub PgEn
|
||||
#define PPSMC_MSG_IspStutterOn_MmhubPgDis 0x2F ///< ISP StutterOn mmHub PgDis
|
||||
#define PPSMC_MSG_IspStutterOff_MmhubPgEn 0x30 ///< ISP StufferOff mmHub PgEn
|
||||
|
||||
#define PPSMC_Message_Count 0x31 ///< Total number of PPSMC messages
|
||||
/** @}*/
|
||||
|
@ -377,7 +377,9 @@ static void sienna_cichlid_check_bxco_support(struct smu_context *smu)
|
||||
if (((adev->pdev->device == 0x73A1) &&
|
||||
(adev->pdev->revision == 0x00)) ||
|
||||
((adev->pdev->device == 0x73BF) &&
|
||||
(adev->pdev->revision == 0xCF)))
|
||||
(adev->pdev->revision == 0xCF)) ||
|
||||
((adev->pdev->device == 0x7422) &&
|
||||
(adev->pdev->revision == 0x00)))
|
||||
smu_baco->platform_support = false;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user