2019-05-24 18:36:14 +03:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright © 2019 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INTEL_BW_H__
|
|
|
|
#define __INTEL_BW_H__
|
|
|
|
|
|
|
|
#include <drm/drm_atomic.h>
|
|
|
|
|
|
|
|
struct intel_atomic_state;
|
2025-06-25 13:32:26 +03:00
|
|
|
struct intel_bw_state;
|
2025-03-06 18:34:10 +02:00
|
|
|
struct intel_crtc;
|
2019-05-24 18:36:14 +03:00
|
|
|
struct intel_crtc_state;
|
2025-03-06 18:34:12 +02:00
|
|
|
struct intel_display;
|
2025-06-25 13:32:26 +03:00
|
|
|
struct intel_global_state;
|
2019-05-24 18:36:14 +03:00
|
|
|
|
2025-06-25 13:32:26 +03:00
|
|
|
struct intel_bw_state *to_intel_bw_state(struct intel_global_state *obj_state);
|
2019-05-24 18:36:14 +03:00
|
|
|
|
2020-04-15 17:39:02 +03:00
|
|
|
struct intel_bw_state *
|
|
|
|
intel_atomic_get_old_bw_state(struct intel_atomic_state *state);
|
|
|
|
|
|
|
|
struct intel_bw_state *
|
|
|
|
intel_atomic_get_new_bw_state(struct intel_atomic_state *state);
|
|
|
|
|
|
|
|
struct intel_bw_state *
|
|
|
|
intel_atomic_get_bw_state(struct intel_atomic_state *state);
|
|
|
|
|
2025-03-11 14:04:51 -03:00
|
|
|
void intel_bw_init_hw(struct intel_display *display);
|
|
|
|
int intel_bw_init(struct intel_display *display);
|
2025-03-26 18:25:42 +02:00
|
|
|
int intel_bw_atomic_check(struct intel_atomic_state *state, bool any_ms);
|
2022-03-03 21:12:06 +02:00
|
|
|
int intel_bw_calc_min_cdclk(struct intel_atomic_state *state,
|
|
|
|
bool *need_cdclk_calc);
|
2025-03-11 14:04:51 -03:00
|
|
|
int intel_bw_min_cdclk(struct intel_display *display,
|
2022-03-03 21:12:06 +02:00
|
|
|
const struct intel_bw_state *bw_state);
|
2025-03-06 18:34:12 +02:00
|
|
|
void intel_bw_update_hw_state(struct intel_display *display);
|
2025-03-06 18:34:10 +02:00
|
|
|
void intel_bw_crtc_disable_noatomic(struct intel_crtc *crtc);
|
2019-05-24 18:36:14 +03:00
|
|
|
|
2025-06-25 13:32:22 +03:00
|
|
|
bool intel_bw_pmdemand_needs_update(struct intel_atomic_state *state);
|
2025-06-25 13:32:23 +03:00
|
|
|
bool intel_bw_can_enable_sagv(struct intel_display *display,
|
|
|
|
const struct intel_bw_state *bw_state);
|
2025-06-25 13:32:24 +03:00
|
|
|
void icl_sagv_pre_plane_update(struct intel_atomic_state *state);
|
|
|
|
void icl_sagv_post_plane_update(struct intel_atomic_state *state);
|
2025-06-25 13:32:25 +03:00
|
|
|
int intel_bw_qgv_point_peakbw(const struct intel_bw_state *bw_state);
|
2025-06-25 13:32:22 +03:00
|
|
|
|
2019-05-24 18:36:14 +03:00
|
|
|
#endif /* __INTEL_BW_H__ */
|