xref: /linux/drivers/gpu/drm/i915/display/intel_vdsc.h (revision 9e4e86a604dfd06402933467578c4b79f5412b2c)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_VDSC_H__
7 #define __INTEL_VDSC_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_printer;
12 
13 enum transcoder;
14 struct intel_crtc;
15 struct intel_crtc_state;
16 struct intel_display;
17 struct intel_dsb;
18 struct intel_dsc_slice_config;
19 struct intel_encoder;
20 
21 bool intel_dsc_source_support(const struct intel_crtc_state *crtc_state);
22 int intel_dsc_line_slice_count(const struct intel_dsc_slice_config *config);
23 bool intel_dsc_get_slice_config(struct intel_display *display,
24 				int num_joined_pipes, int slice_per_pipe,
25 				struct intel_dsc_slice_config *config);
26 void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state);
27 void intel_dsc_enable(const struct intel_crtc_state *crtc_state);
28 void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
29 int intel_dsc_compute_params(struct intel_crtc_state *pipe_config);
30 void intel_dsc_enable_on_crtc(struct intel_crtc_state *crtc_state);
31 bool intel_dsc_enabled_on_link(const struct intel_crtc_state *crtc_state);
32 void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
33 enum intel_display_power_domain
34 intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder);
35 struct intel_crtc *intel_dsc_get_bigjoiner_secondary(const struct intel_crtc *primary_crtc);
36 int intel_dsc_get_num_vdsc_instances(const struct intel_crtc_state *crtc_state);
37 void intel_dsc_dsi_pps_write(struct intel_encoder *encoder,
38 			     const struct intel_crtc_state *crtc_state);
39 void intel_dsc_dp_pps_write(struct intel_encoder *encoder,
40 			    const struct intel_crtc_state *crtc_state);
41 void intel_dsc_su_et_parameters_configure(struct intel_dsb *dsb, struct intel_encoder *encoder,
42 					  const struct intel_crtc_state *crtc_state, int su_lines);
43 void intel_vdsc_state_dump(struct drm_printer *p, int indent,
44 			   const struct intel_crtc_state *crtc_state);
45 int intel_vdsc_min_cdclk(const struct intel_crtc_state *crtc_state);
46 unsigned int intel_vdsc_prefill_lines(const struct intel_crtc_state *crtc_state);
47 int intel_dsc_get_pixel_rate_with_dsc_bubbles(struct intel_display *display,
48 					      int pixel_rate, int htotal,
49 					      int dsc_horizontal_slices);
50 
51 #endif /* __INTEL_VDSC_H__ */
52