Commit 257e9891 authored by Josip Pavic's avatar Josip Pavic Committed by Alex Deucher

drm/amd/display: cache trace buffer size

[Why & How]
Cache the trace buffer size retrieved from DMUB FW in the driver
Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarAric Cyr <aric.cyr@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarJosip Pavic <josip.pavic@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5b466b28
...@@ -428,6 +428,7 @@ struct dmub_srv { ...@@ -428,6 +428,7 @@ struct dmub_srv {
enum dmub_asic asic; enum dmub_asic asic;
void *user_ctx; void *user_ctx;
uint32_t fw_version; uint32_t fw_version;
uint32_t trace_buffer_size;
bool is_virtual; bool is_virtual;
struct dmub_fb scratch_mem_fb; struct dmub_fb scratch_mem_fb;
volatile const struct dmub_fw_state *fw_state; volatile const struct dmub_fw_state *fw_state;
......
...@@ -427,6 +427,8 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub, ...@@ -427,6 +427,8 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub,
dmub->fw_version = fw_info->fw_version; dmub->fw_version = fw_info->fw_version;
} }
dmub->trace_buffer_size = trace_buffer_size;
trace_buff->base = dmub_align(mail->top, 256); trace_buff->base = dmub_align(mail->top, 256);
trace_buff->top = trace_buff->base + dmub_align(trace_buffer_size, 64); trace_buff->top = trace_buff->base + dmub_align(trace_buffer_size, 64);
......
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