xref: /linux/drivers/gpu/drm/i915/display/intel_dip.h (revision 20bed0d6ff62d985fe8222958825504b8aad4e88)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2026 Intel Corporation
4  */
5 
6 #ifndef __INTEL_DIP_H__
7 #define __INTEL_DIP_H__
8 
9 #include "intel_display_device.h"
10 
11 /*
12  * Video DIP (Data Island Packet) helpers.
13  *
14  * This file contains helpers for programming video DIP related hardware.
15  *
16  * TODO: Currently, this is only used for programming EMP_AS_SDP_TL i.e. to
17  * program Transmission Line for HDMI 2.1 Extended Metadata Packet (EMP) and
18  * DP Adaptive Sync (AS) Secondary Data Packet (SDP). However, all low level
19  * DIP buffer read/write and related helpers should be extracted here later.
20  */
21 
22 struct intel_crtc_state;
23 
24 /*
25  * EMP AS SDP TL: Extended Metadata Packet (EMP) Adaptive Sync (AS)
26  * Secondary Data Packet (SDP) Transmission Line (TL).
27  *
28  * Starting with BMG (display ver 14.01) and LNL+ (display ver 20+),
29  * the AS SDP transmission line is programmable via the EMP AS SDP TL
30  * register.
31  */
32 #define HAS_EMP_AS_SDP_TL(__display)	(DISPLAY_VERx100(__display) == 1401 || \
33 					 DISPLAY_VER(__display) >= 20)
34 
35 /*
36  * CMN SDP TL: Common Secondary Data Packet Transmission Line.
37  *
38  * Xe3p_lpd introduces new register CMN_SDP_TL to program a common SDP
39  * Transmission line that will be used by the Hardware to position the
40  * SDPs. Along with this, another new register CMN_SDP_TL_STGR_CTL is
41  * also added to stagger the different SDPs.
42  */
43 #define HAS_COMMON_SDP_TL(__display)      (DISPLAY_VER(__display) >= 35)
44 
45 u16 intel_dip_read_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state);
46 void intel_dip_write_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state);
47 
48 void intel_dip_sdp_tl_compute_config_late(struct intel_crtc_state *crtc_state);
49 void intel_dip_sdp_transmission_line_get_config(struct intel_crtc_state *crtc_state);
50 void intel_dip_cmn_sdp_transmission_line_enable(const struct intel_crtc_state *crtc_state);
51 void intel_dip_cmn_sdp_transmission_line_disable(const struct intel_crtc_state *old_crtc_state);
52 
53 #endif /* __INTEL_DIP_H__ */
54