Home | History | Annotate | Line # | Download | only in display
      1 /*	$NetBSD: intel_hdmi.h,v 1.2 2021/12/18 23:45:30 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 /*
      5  * Copyright  2019 Intel Corporation
      6  */
      7 
      8 #ifndef __INTEL_HDMI_H__
      9 #define __INTEL_HDMI_H__
     10 
     11 #include <linux/hdmi.h>
     12 #include <linux/types.h>
     13 
     14 #include <drm/i915_drm.h>
     15 
     16 #include "i915_reg.h"
     17 
     18 struct drm_connector;
     19 struct drm_encoder;
     20 struct drm_i915_private;
     21 struct intel_connector;
     22 struct intel_digital_port;
     23 struct intel_encoder;
     24 struct intel_crtc_state;
     25 struct intel_hdmi;
     26 struct drm_connector_state;
     27 union hdmi_infoframe;
     28 enum port;
     29 
     30 void intel_hdmi_init(struct drm_i915_private *dev_priv, i915_reg_t hdmi_reg,
     31 		     enum port port);
     32 void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
     33 			       struct intel_connector *intel_connector);
     34 struct intel_hdmi *enc_to_intel_hdmi(struct intel_encoder *encoder);
     35 int intel_hdmi_compute_config(struct intel_encoder *encoder,
     36 			      struct intel_crtc_state *pipe_config,
     37 			      struct drm_connector_state *conn_state);
     38 bool intel_hdmi_handle_sink_scrambling(struct intel_encoder *encoder,
     39 				       struct drm_connector *connector,
     40 				       bool high_tmds_clock_ratio,
     41 				       bool scrambling);
     42 void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable);
     43 void intel_infoframe_init(struct intel_digital_port *intel_dig_port);
     44 u32 intel_hdmi_infoframes_enabled(struct intel_encoder *encoder,
     45 				  const struct intel_crtc_state *crtc_state);
     46 u32 intel_hdmi_infoframe_enable(unsigned int type);
     47 void intel_hdmi_read_gcp_infoframe(struct intel_encoder *encoder,
     48 				   struct intel_crtc_state *crtc_state);
     49 void intel_read_infoframe(struct intel_encoder *encoder,
     50 			  const struct intel_crtc_state *crtc_state,
     51 			  enum hdmi_infoframe_type type,
     52 			  union hdmi_infoframe *frame);
     53 
     54 #endif /* __INTEL_HDMI_H__ */
     55