Skip to content

Commit f74291c

Browse files
Wenjing Liualexdeucher
authored andcommitted
drm/amd/display: Update dchubbub.h for hubbub perfmon support
[why] dchubbub supports performance monitoring for hubbub. The interfaces define the performance monitoring events and their attributes. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@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>
1 parent 215bed5 commit f74291c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@ struct dcn_hubbub_state {
137137
uint32_t dram_state_cntl;
138138
};
139139

140+
struct hubbub_system_latencies {
141+
uint32_t max_latency_ns;
142+
uint32_t avg_latency_ns;
143+
uint32_t min_latency_ns;
144+
};
145+
146+
struct hubbub_urgent_latency_params {
147+
uint32_t refclk_mhz;
148+
uint32_t t_win_ns;
149+
uint32_t bandwidth_mbps;
150+
uint32_t bw_factor_x1000;
151+
};
152+
140153
struct hubbub_funcs {
141154
void (*update_dchub)(
142155
struct hubbub *hubbub,
@@ -231,6 +244,15 @@ struct hubbub_funcs {
231244
bool (*program_arbiter)(struct hubbub *hubbub, struct dml2_display_arb_regs *arb_regs, bool safe_to_lower);
232245
void (*get_det_sizes)(struct hubbub *hubbub, uint32_t *curr_det_sizes, uint32_t *target_det_sizes);
233246
uint32_t (*compbuf_config_error)(struct hubbub *hubbub);
247+
struct hubbub_perfmon_funcs{
248+
void (*start_system_latency_measurement)(struct hubbub *hubbub);
249+
void (*get_system_latency_result)(struct hubbub *hubbub, uint32_t refclk_mhz, struct hubbub_system_latencies *latencies);
250+
void (*start_in_order_bandwidth_measurement)(struct hubbub *hubbub);
251+
void (*get_in_order_bandwidth_result)(struct hubbub *hubbub, uint32_t refclk_mhz, uint32_t *bandwidth_mbps);
252+
void (*start_urgent_ramp_latency_measurement)(struct hubbub *hubbub, const struct hubbub_urgent_latency_params *params);
253+
void (*get_urgent_ramp_latency_result)(struct hubbub *hubbub, uint32_t refclk_mhz, uint32_t *latency_ns);
254+
void (*reset)(struct hubbub *hubbub);
255+
} perfmon;
234256
};
235257

236258
struct hubbub {

0 commit comments

Comments
 (0)