Commit 5e77c339 authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher

drm/amd/display: Skip dmub memory flush when not needed

[WHY&HOW]
Readback is only necessary when loaded via CPU.
Reviewed-by: default avatarChris Park <chris.park@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarDillon Varone <dillon.varone@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d12f00c9
......@@ -142,6 +142,13 @@ enum dpia_notify_bw_alloc_status {
DPIA_BW_ALLOC_CAPS_CHANGED
};
/* enum dmub_memory_access_type - memory access method */
enum dmub_memory_access_type {
DMUB_MEMORY_ACCESS_DEFAULT,
DMUB_MEMORY_ACCESS_CPU = DMUB_MEMORY_ACCESS_DEFAULT,
DMUB_MEMORY_ACCESS_DMA
};
/**
* struct dmub_region - dmub hw memory region
* @base: base address for region, must be 256 byte aligned
......@@ -264,6 +271,7 @@ struct dmub_srv_hw_params {
bool dpia_hpd_int_enable_supported;
bool disable_clock_gate;
bool disallow_dispclk_dppclk_ds;
enum dmub_memory_access_type mem_access_type;
};
/**
......
......@@ -564,7 +564,8 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,
* DMCUB when backdoor loading if the write from x86 hasn't been
* flushed yet. This only occurs in backdoor loading.
*/
dmub_flush_buffer_mem(inst_fb);
if (params->mem_access_type == DMUB_MEMORY_ACCESS_CPU)
dmub_flush_buffer_mem(inst_fb);
if (params->fw_in_system_memory && dmub->hw_funcs.backdoor_load_zfb_mode)
dmub->hw_funcs.backdoor_load_zfb_mode(dmub, &cw0, &cw1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment