xref: /linux/drivers/gpu/drm/i915/display/intel_color.h (revision deb879faa9d2f327ac5c079d9d1a1747b79260e3)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_COLOR_H__
7 #define __INTEL_COLOR_H__
8 
9 #include <linux/types.h>
10 
11 struct intel_atomic_state;
12 struct intel_crtc_state;
13 struct intel_crtc;
14 struct intel_display;
15 struct intel_dsb;
16 struct intel_plane_state;
17 struct drm_property_blob;
18 enum pipe;
19 
20 void intel_color_init_hooks(struct intel_display *display);
21 int intel_color_init(struct intel_display *display);
22 void intel_color_crtc_init(struct intel_crtc *crtc);
23 int intel_color_check(struct intel_atomic_state *state,
24 		      struct intel_crtc *crtc);
25 void intel_color_prepare_commit(struct intel_atomic_state *state,
26 				struct intel_crtc *crtc);
27 void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state);
28 bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state);
29 bool intel_color_uses_chained_dsb(const struct intel_crtc_state *crtc_state);
30 bool intel_color_uses_gosub_dsb(const struct intel_crtc_state *crtc_state);
31 void intel_color_wait_commit(const struct intel_crtc_state *crtc_state);
32 void intel_color_commit_noarm(struct intel_dsb *dsb,
33 			      const struct intel_crtc_state *crtc_state);
34 void intel_color_commit_arm(struct intel_dsb *dsb,
35 			    const struct intel_crtc_state *crtc_state);
36 void intel_color_post_update(const struct intel_crtc_state *crtc_state);
37 void intel_color_load_luts(const struct intel_crtc_state *crtc_state);
38 void intel_color_modeset(const struct intel_crtc_state *crtc_state);
39 void intel_color_get_config(struct intel_crtc_state *crtc_state);
40 bool intel_color_lut_equal(const struct intel_crtc_state *crtc_state,
41 			   const struct drm_property_blob *blob1,
42 			   const struct drm_property_blob *blob2,
43 			   bool is_pre_csc_lut);
44 void intel_color_assert_luts(const struct intel_crtc_state *crtc_state);
45 void intel_color_plane_program_pipeline(struct intel_dsb *dsb,
46 					const struct intel_plane_state *plane_state);
47 void intel_color_plane_commit_arm(struct intel_dsb *dsb,
48 				  const struct intel_plane_state *plane_state);
49 bool intel_color_crtc_has_3dlut(struct intel_display *display, enum pipe pipe);
50 #endif /* __INTEL_COLOR_H__ */
51