| 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* |
| 3 | * Copyright © 2025 Intel Corporation |
| 4 | */ |
| 5 | |
| 6 | #ifndef __SKL_PREFILL_H__ |
| 7 | #define __SKL_PREFILL_H__ |
| 8 | |
| 9 | #include <linux/types.h> |
| 10 | |
| 11 | struct intel_crtc_state; |
| 12 | |
| 13 | struct skl_prefill_ctx { |
| 14 | /* .16 scanlines */ |
| 15 | struct { |
| 16 | unsigned int fixed; |
| 17 | unsigned int wm0; |
| 18 | unsigned int scaler_1st; |
| 19 | unsigned int scaler_2nd; |
| 20 | unsigned int dsc; |
| 21 | unsigned int full; |
| 22 | } prefill; |
| 23 | |
| 24 | /* .16 adjustment factors */ |
| 25 | struct { |
| 26 | unsigned int cdclk; |
| 27 | unsigned int scaler_1st; |
| 28 | unsigned int scaler_2nd; |
| 29 | } adj; |
| 30 | }; |
| 31 | |
| 32 | void skl_prefill_init_worst(struct skl_prefill_ctx *ctx, |
| 33 | const struct intel_crtc_state *crtc_state); |
| 34 | void skl_prefill_init(struct skl_prefill_ctx *ctx, |
| 35 | const struct intel_crtc_state *crtc_state); |
| 36 | |
| 37 | bool skl_prefill_vblank_too_short(const struct skl_prefill_ctx *ctx, |
| 38 | const struct intel_crtc_state *crtc_state, |
| 39 | unsigned int latency_us); |
| 40 | int skl_prefill_min_guardband(const struct skl_prefill_ctx *ctx, |
| 41 | const struct intel_crtc_state *crtc_state, |
| 42 | unsigned int latency_us); |
| 43 | int skl_prefill_min_cdclk(const struct skl_prefill_ctx *ctx, |
| 44 | const struct intel_crtc_state *crtc_state); |
| 45 | |
| 46 | #endif /* __SKL_PREFILL_H__ */ |
| 47 | |