1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright �� 2019 Intel Corporation
4 */
5
6#ifndef __INTEL_LSPCON_H__
7#define __INTEL_LSPCON_H__
8
9#include <linux/types.h>
10
11struct drm_connector;
12struct drm_connector_state;
13struct intel_crtc_state;
14struct intel_digital_port;
15struct intel_encoder;
16struct intel_lspcon;
17
18bool lspcon_init(struct intel_digital_port *dig_port);
19void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon);
20void lspcon_resume(struct intel_digital_port *dig_port);
21void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon);
22void lspcon_write_infoframe(struct intel_encoder *encoder,
23			    const struct intel_crtc_state *crtc_state,
24			    unsigned int type,
25			    const void *buf, ssize_t len);
26void lspcon_read_infoframe(struct intel_encoder *encoder,
27			   const struct intel_crtc_state *crtc_state,
28			   unsigned int type,
29			   void *frame, ssize_t len);
30void lspcon_set_infoframes(struct intel_encoder *encoder,
31			   bool enable,
32			   const struct intel_crtc_state *crtc_state,
33			   const struct drm_connector_state *conn_state);
34u32 lspcon_infoframes_enabled(struct intel_encoder *encoder,
35			      const struct intel_crtc_state *pipe_config);
36u32 intel_lspcon_infoframes_enabled(struct intel_encoder *encoder,
37				    const struct intel_crtc_state *pipe_config);
38void hsw_write_infoframe(struct intel_encoder *encoder,
39			 const struct intel_crtc_state *crtc_state,
40			 unsigned int type,
41			 const void *frame, ssize_t len);
42void hsw_read_infoframe(struct intel_encoder *encoder,
43			const struct intel_crtc_state *crtc_state,
44			unsigned int type,
45			void *frame, ssize_t len);
46
47#endif /* __INTEL_LSPCON_H__ */
48