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
11struct intel_atomic_state;
12struct intel_crtc_state;
13struct intel_crtc;
14struct intel_display;
15struct intel_dsb;
16struct drm_property_blob;
17
18void intel_color_init_hooks(struct intel_display *display);
19int intel_color_init(struct intel_display *display);
20void intel_color_crtc_init(struct intel_crtc *crtc);
21int intel_color_check(struct intel_atomic_state *state,
22 struct intel_crtc *crtc);
23void intel_color_prepare_commit(struct intel_atomic_state *state,
24 struct intel_crtc *crtc);
25void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state);
26bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state);
27bool intel_color_uses_chained_dsb(const struct intel_crtc_state *crtc_state);
28bool intel_color_uses_gosub_dsb(const struct intel_crtc_state *crtc_state);
29void intel_color_wait_commit(const struct intel_crtc_state *crtc_state);
30void intel_color_commit_noarm(struct intel_dsb *dsb,
31 const struct intel_crtc_state *crtc_state);
32void intel_color_commit_arm(struct intel_dsb *dsb,
33 const struct intel_crtc_state *crtc_state);
34void intel_color_post_update(const struct intel_crtc_state *crtc_state);
35void intel_color_load_luts(const struct intel_crtc_state *crtc_state);
36void intel_color_modeset(const struct intel_crtc_state *crtc_state);
37void intel_color_get_config(struct intel_crtc_state *crtc_state);
38bool intel_color_lut_equal(const struct intel_crtc_state *crtc_state,
39 const struct drm_property_blob *blob1,
40 const struct drm_property_blob *blob2,
41 bool is_pre_csc_lut);
42void intel_color_assert_luts(const struct intel_crtc_state *crtc_state);
43
44#endif /* __INTEL_COLOR_H__ */
45