aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-11-28 18:50:33 -0500
committerDave Airlie <airlied@redhat.com>2018-11-28 18:50:34 -0500
commitbfeb122d3080b03aa49405c615f4d8144ab30073 (patch)
tree82eff682912a83e87b61c6d5de6b4a04cd2f6dcf /include
parentb239499f927f79401d51a677bc640980ca630604 (diff)
parentb4bf44d2dcbd6c35d9651bc6286e4940b8b3df95 (diff)
Merge tag 'drm-intel-next-2018-11-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Changes outside i915: - Connector property to limit max bpc (Radhakrishna) - Fix LPE audio runtime PM and deinit (Ville) - DP FEC prep work (Anusha) - Mark pinned shmemfs pages as unevictable (Kuo-Hsin) - Backmerge drm-next (Jani) Inside i915: - Revert OA UAPI change that lacks userspace (Joonas) - Register macro cleanup (Jani) - 32-bit build fixes on pin flags (Chris) - Fix MG DP mode and PHY gating for HDMI (Imre) - DP MST race, hpd and irq fixes (Lyude) - Combo PHY fixes and cleanup (Imre, Lucas) - Move display init and cleanup under modeset init and cleanup (José) - PSR fixes (José) - Subslice size fixes (Daniele) - Abstract and clean up fixed point helpers (Jani) - Plane input CSC for YUV to RGB conversion (Uma) - Break long iterations for get/put shmemfs pages (Chris) - Improve DDI encoder hw state readout sanity checks (Imre) - Fix power well leaks for MST (José) - Scaler fixes (Ville) - Watermark fixes (Ville) - Fix VLV/CHV DSI panel orientation readout (Ville) - ICL rawclock fixes (Paulo) - Workaround DMC power well request issues (Imre) - Plane allocation fix (Maarten) - Transcoder enum value/ordering robustness fixes (Imre) - UTS_RELEASE build dependency fix (Hans Holmberg) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87k1l4cesj.fsf@intel.com
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_connector.h20
-rw-r--r--include/drm/drm_dp_helper.h95
-rw-r--r--include/drm/drm_hdcp.h212
-rw-r--r--include/drm/i915_pciids.h21
-rw-r--r--include/linux/swap.h4
-rw-r--r--include/uapi/drm/i915_drm.h8
6 files changed, 351 insertions, 9 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index dd0552cb7472..af0a761f52f0 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -508,6 +508,18 @@ struct drm_connector_state {
508 * drm_writeback_signal_completion() 508 * drm_writeback_signal_completion()
509 */ 509 */
510 struct drm_writeback_job *writeback_job; 510 struct drm_writeback_job *writeback_job;
511
512 /**
513 * @max_requested_bpc: Connector property to limit the maximum bit
514 * depth of the pixels.
515 */
516 u8 max_requested_bpc;
517
518 /**
519 * @max_bpc: Connector max_bpc based on the requested max_bpc property
520 * and the connector bpc limitations obtained from edid.
521 */
522 u8 max_bpc;
511}; 523};
512 524
513/** 525/**
@@ -973,6 +985,12 @@ struct drm_connector {
973 */ 985 */
974 struct drm_property_blob *path_blob_ptr; 986 struct drm_property_blob *path_blob_ptr;
975 987
988 /**
989 * @max_bpc_property: Default connector property for the max bpc to be
990 * driven out of the connector.
991 */
992 struct drm_property *max_bpc_property;
993
976#define DRM_CONNECTOR_POLL_HPD (1 << 0) 994#define DRM_CONNECTOR_POLL_HPD (1 << 0)
977#define DRM_CONNECTOR_POLL_CONNECT (1 << 1) 995#define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
978#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) 996#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
@@ -1269,6 +1287,8 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
1269 uint64_t link_status); 1287 uint64_t link_status);
1270int drm_connector_init_panel_orientation_property( 1288int drm_connector_init_panel_orientation_property(
1271 struct drm_connector *connector, int width, int height); 1289 struct drm_connector *connector, int width, int height);
1290int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
1291 int min, int max);
1272 1292
1273/** 1293/**
1274 * struct drm_tile_group - Tile group metadata 1294 * struct drm_tile_group - Tile group metadata
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 9ad98e8d9ede..3314e91f6eb3 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -231,6 +231,8 @@
231#define DP_DSC_MAX_BITS_PER_PIXEL_LOW 0x067 /* eDP 1.4 */ 231#define DP_DSC_MAX_BITS_PER_PIXEL_LOW 0x067 /* eDP 1.4 */
232 232
233#define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */ 233#define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */
234# define DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK (0x3 << 0)
235# define DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT 8
234 236
235#define DP_DSC_DEC_COLOR_FORMAT_CAP 0x069 237#define DP_DSC_DEC_COLOR_FORMAT_CAP 0x069
236# define DP_DSC_RGB (1 << 0) 238# define DP_DSC_RGB (1 << 0)
@@ -279,6 +281,8 @@
279# define DP_DSC_THROUGHPUT_MODE_1_1000 (14 << 4) 281# define DP_DSC_THROUGHPUT_MODE_1_1000 (14 << 4)
280 282
281#define DP_DSC_MAX_SLICE_WIDTH 0x06C 283#define DP_DSC_MAX_SLICE_WIDTH 0x06C
284#define DP_DSC_MIN_SLICE_WIDTH_VALUE 2560
285#define DP_DSC_SLICE_WIDTH_MULTIPLIER 320
282 286
283#define DP_DSC_SLICE_CAP_2 0x06D 287#define DP_DSC_SLICE_CAP_2 0x06D
284# define DP_DSC_16_PER_DP_DSC_SINK (1 << 0) 288# define DP_DSC_16_PER_DP_DSC_SINK (1 << 0)
@@ -477,6 +481,7 @@
477# define DP_AUX_FRAME_SYNC_VALID (1 << 0) 481# define DP_AUX_FRAME_SYNC_VALID (1 << 0)
478 482
479#define DP_DSC_ENABLE 0x160 /* DP 1.4 */ 483#define DP_DSC_ENABLE 0x160 /* DP 1.4 */
484# define DP_DECOMPRESSION_EN (1 << 0)
480 485
481#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */ 486#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */
482# define DP_PSR_ENABLE (1 << 0) 487# define DP_PSR_ENABLE (1 << 0)
@@ -907,6 +912,57 @@
907#define DP_AUX_HDCP_KSV_FIFO 0x6802C 912#define DP_AUX_HDCP_KSV_FIFO 0x6802C
908#define DP_AUX_HDCP_AINFO 0x6803B 913#define DP_AUX_HDCP_AINFO 0x6803B
909 914
915/* DP HDCP2.2 parameter offsets in DPCD address space */
916#define DP_HDCP_2_2_REG_RTX_OFFSET 0x69000
917#define DP_HDCP_2_2_REG_TXCAPS_OFFSET 0x69008
918#define DP_HDCP_2_2_REG_CERT_RX_OFFSET 0x6900B
919#define DP_HDCP_2_2_REG_RRX_OFFSET 0x69215
920#define DP_HDCP_2_2_REG_RX_CAPS_OFFSET 0x6921D
921#define DP_HDCP_2_2_REG_EKPUB_KM_OFFSET 0x69220
922#define DP_HDCP_2_2_REG_EKH_KM_WR_OFFSET 0x692A0
923#define DP_HDCP_2_2_REG_M_OFFSET 0x692B0
924#define DP_HDCP_2_2_REG_HPRIME_OFFSET 0x692C0
925#define DP_HDCP_2_2_REG_EKH_KM_RD_OFFSET 0x692E0
926#define DP_HDCP_2_2_REG_RN_OFFSET 0x692F0
927#define DP_HDCP_2_2_REG_LPRIME_OFFSET 0x692F8
928#define DP_HDCP_2_2_REG_EDKEY_KS_OFFSET 0x69318
929#define DP_HDCP_2_2_REG_RIV_OFFSET 0x69328
930#define DP_HDCP_2_2_REG_RXINFO_OFFSET 0x69330
931#define DP_HDCP_2_2_REG_SEQ_NUM_V_OFFSET 0x69332
932#define DP_HDCP_2_2_REG_VPRIME_OFFSET 0x69335
933#define DP_HDCP_2_2_REG_RECV_ID_LIST_OFFSET 0x69345
934#define DP_HDCP_2_2_REG_V_OFFSET 0x693E0
935#define DP_HDCP_2_2_REG_SEQ_NUM_M_OFFSET 0x693F0
936#define DP_HDCP_2_2_REG_K_OFFSET 0x693F3
937#define DP_HDCP_2_2_REG_STREAM_ID_TYPE_OFFSET 0x693F5
938#define DP_HDCP_2_2_REG_MPRIME_OFFSET 0x69473
939#define DP_HDCP_2_2_REG_RXSTATUS_OFFSET 0x69493
940#define DP_HDCP_2_2_REG_STREAM_TYPE_OFFSET 0x69494
941#define DP_HDCP_2_2_REG_DBG_OFFSET 0x69518
942
943/* DP HDCP message start offsets in DPCD address space */
944#define DP_HDCP_2_2_AKE_INIT_OFFSET DP_HDCP_2_2_REG_RTX_OFFSET
945#define DP_HDCP_2_2_AKE_SEND_CERT_OFFSET DP_HDCP_2_2_REG_CERT_RX_OFFSET
946#define DP_HDCP_2_2_AKE_NO_STORED_KM_OFFSET DP_HDCP_2_2_REG_EKPUB_KM_OFFSET
947#define DP_HDCP_2_2_AKE_STORED_KM_OFFSET DP_HDCP_2_2_REG_EKH_KM_WR_OFFSET
948#define DP_HDCP_2_2_AKE_SEND_HPRIME_OFFSET DP_HDCP_2_2_REG_HPRIME_OFFSET
949#define DP_HDCP_2_2_AKE_SEND_PAIRING_INFO_OFFSET \
950 DP_HDCP_2_2_REG_EKH_KM_RD_OFFSET
951#define DP_HDCP_2_2_LC_INIT_OFFSET DP_HDCP_2_2_REG_RN_OFFSET
952#define DP_HDCP_2_2_LC_SEND_LPRIME_OFFSET DP_HDCP_2_2_REG_LPRIME_OFFSET
953#define DP_HDCP_2_2_SKE_SEND_EKS_OFFSET DP_HDCP_2_2_REG_EDKEY_KS_OFFSET
954#define DP_HDCP_2_2_REP_SEND_RECVID_LIST_OFFSET DP_HDCP_2_2_REG_RXINFO_OFFSET
955#define DP_HDCP_2_2_REP_SEND_ACK_OFFSET DP_HDCP_2_2_REG_V_OFFSET
956#define DP_HDCP_2_2_REP_STREAM_MANAGE_OFFSET DP_HDCP_2_2_REG_SEQ_NUM_M_OFFSET
957#define DP_HDCP_2_2_REP_STREAM_READY_OFFSET DP_HDCP_2_2_REG_MPRIME_OFFSET
958
959#define HDCP_2_2_DP_RXSTATUS_LEN 1
960#define HDCP_2_2_DP_RXSTATUS_READY(x) ((x) & BIT(0))
961#define HDCP_2_2_DP_RXSTATUS_H_PRIME(x) ((x) & BIT(1))
962#define HDCP_2_2_DP_RXSTATUS_PAIRING(x) ((x) & BIT(2))
963#define HDCP_2_2_DP_RXSTATUS_REAUTH_REQ(x) ((x) & BIT(3))
964#define HDCP_2_2_DP_RXSTATUS_LINK_FAILED(x) ((x) & BIT(4))
965
910/* DP 1.2 Sideband message defines */ 966/* DP 1.2 Sideband message defines */
911/* peer device type - DP 1.2a Table 2-92 */ 967/* peer device type - DP 1.2a Table 2-92 */
912#define DP_PEER_DEVICE_NONE 0x0 968#define DP_PEER_DEVICE_NONE 0x0
@@ -965,6 +1021,7 @@ u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SI
965 1021
966#define DP_BRANCH_OUI_HEADER_SIZE 0xc 1022#define DP_BRANCH_OUI_HEADER_SIZE 0xc
967#define DP_RECEIVER_CAP_SIZE 0xf 1023#define DP_RECEIVER_CAP_SIZE 0xf
1024#define DP_DSC_RECEIVER_CAP_SIZE 0xf
968#define EDP_PSR_RECEIVER_CAP_SIZE 2 1025#define EDP_PSR_RECEIVER_CAP_SIZE 2
969#define EDP_DISPLAY_CTL_CAP_SIZE 3 1026#define EDP_DISPLAY_CTL_CAP_SIZE 3
970 1027
@@ -995,6 +1052,7 @@ struct dp_sdp_header {
995 1052
996#define EDP_SDP_HEADER_REVISION_MASK 0x1F 1053#define EDP_SDP_HEADER_REVISION_MASK 0x1F
997#define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES 0x1F 1054#define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES 0x1F
1055#define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
998 1056
999struct edp_vsc_psr { 1057struct edp_vsc_psr {
1000 struct dp_sdp_header sdp_header; 1058 struct dp_sdp_header sdp_header;
@@ -1061,6 +1119,43 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
1061 return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT; 1119 return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT;
1062} 1120}
1063 1121
1122/* DP/eDP DSC support */
1123u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
1124 bool is_edp);
1125u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]);
1126u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpc[DP_DSC_RECEIVER_CAP_SIZE]);
1127
1128static inline bool
1129drm_dp_sink_supports_dsc(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1130{
1131 return dsc_dpcd[DP_DSC_SUPPORT - DP_DSC_SUPPORT] &
1132 DP_DSC_DECOMPRESSION_IS_SUPPORTED;
1133}
1134
1135static inline u16
1136drm_edp_dsc_sink_output_bpp(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1137{
1138 return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
1139 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
1140 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
1141 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
1142}
1143
1144static inline u32
1145drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1146{
1147 /* Max Slicewidth = Number of Pixels * 320 */
1148 return dsc_dpcd[DP_DSC_MAX_SLICE_WIDTH - DP_DSC_SUPPORT] *
1149 DP_DSC_SLICE_WIDTH_MULTIPLIER;
1150}
1151
1152/* Forward Error Correction Support on DP 1.4 */
1153static inline bool
1154drm_dp_sink_supports_fec(const u8 fec_capable)
1155{
1156 return fec_capable & DP_FEC_CAPABLE;
1157}
1158
1064/* 1159/*
1065 * DisplayPort AUX channel 1160 * DisplayPort AUX channel
1066 */ 1161 */
diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
index 98e63d870139..a6de09c5e47f 100644
--- a/include/drm/drm_hdcp.h
+++ b/include/drm/drm_hdcp.h
@@ -38,4 +38,216 @@
38#define DRM_HDCP_DDC_BSTATUS 0x41 38#define DRM_HDCP_DDC_BSTATUS 0x41
39#define DRM_HDCP_DDC_KSV_FIFO 0x43 39#define DRM_HDCP_DDC_KSV_FIFO 0x43
40 40
41#define DRM_HDCP_1_4_SRM_ID 0x8
42#define DRM_HDCP_1_4_VRL_LENGTH_SIZE 3
43#define DRM_HDCP_1_4_DCP_SIG_SIZE 40
44
45/* Protocol message definition for HDCP2.2 specification */
46/*
47 * Protected content streams are classified into 2 types:
48 * - Type0: Can be transmitted with HDCP 1.4+
49 * - Type1: Can be transmitted with HDCP 2.2+
50 */
51#define HDCP_STREAM_TYPE0 0x00
52#define HDCP_STREAM_TYPE1 0x01
53
54/* HDCP2.2 Msg IDs */
55#define HDCP_2_2_NULL_MSG 1
56#define HDCP_2_2_AKE_INIT 2
57#define HDCP_2_2_AKE_SEND_CERT 3
58#define HDCP_2_2_AKE_NO_STORED_KM 4
59#define HDCP_2_2_AKE_STORED_KM 5
60#define HDCP_2_2_AKE_SEND_HPRIME 7
61#define HDCP_2_2_AKE_SEND_PAIRING_INFO 8
62#define HDCP_2_2_LC_INIT 9
63#define HDCP_2_2_LC_SEND_LPRIME 10
64#define HDCP_2_2_SKE_SEND_EKS 11
65#define HDCP_2_2_REP_SEND_RECVID_LIST 12
66#define HDCP_2_2_REP_SEND_ACK 15
67#define HDCP_2_2_REP_STREAM_MANAGE 16
68#define HDCP_2_2_REP_STREAM_READY 17
69#define HDCP_2_2_ERRATA_DP_STREAM_TYPE 50
70
71#define HDCP_2_2_RTX_LEN 8
72#define HDCP_2_2_RRX_LEN 8
73
74#define HDCP_2_2_K_PUB_RX_MOD_N_LEN 128
75#define HDCP_2_2_K_PUB_RX_EXP_E_LEN 3
76#define HDCP_2_2_K_PUB_RX_LEN (HDCP_2_2_K_PUB_RX_MOD_N_LEN + \
77 HDCP_2_2_K_PUB_RX_EXP_E_LEN)
78
79#define HDCP_2_2_DCP_LLC_SIG_LEN 384
80
81#define HDCP_2_2_E_KPUB_KM_LEN 128
82#define HDCP_2_2_E_KH_KM_M_LEN (16 + 16)
83#define HDCP_2_2_H_PRIME_LEN 32
84#define HDCP_2_2_E_KH_KM_LEN 16
85#define HDCP_2_2_RN_LEN 8
86#define HDCP_2_2_L_PRIME_LEN 32
87#define HDCP_2_2_E_DKEY_KS_LEN 16
88#define HDCP_2_2_RIV_LEN 8
89#define HDCP_2_2_SEQ_NUM_LEN 3
90#define HDCP_2_2_V_PRIME_HALF_LEN (HDCP_2_2_L_PRIME_LEN / 2)
91#define HDCP_2_2_RECEIVER_ID_LEN DRM_HDCP_KSV_LEN
92#define HDCP_2_2_MAX_DEVICE_COUNT 31
93#define HDCP_2_2_RECEIVER_IDS_MAX_LEN (HDCP_2_2_RECEIVER_ID_LEN * \
94 HDCP_2_2_MAX_DEVICE_COUNT)
95#define HDCP_2_2_MPRIME_LEN 32
96
97/* Following Macros take a byte at a time for bit(s) masking */
98/*
99 * TODO: This has to be changed for DP MST, as multiple stream on
100 * same port is possible.
101 * For HDCP2.2 on HDMI and DP SST this value is always 1.
102 */
103#define HDCP_2_2_MAX_CONTENT_STREAMS_CNT 1
104#define HDCP_2_2_TXCAP_MASK_LEN 2
105#define HDCP_2_2_RXCAPS_LEN 3
106#define HDCP_2_2_RX_REPEATER(x) ((x) & BIT(0))
107#define HDCP_2_2_DP_HDCP_CAPABLE(x) ((x) & BIT(1))
108#define HDCP_2_2_RXINFO_LEN 2
109
110/* HDCP1.x compliant device in downstream */
111#define HDCP_2_2_HDCP1_DEVICE_CONNECTED(x) ((x) & BIT(0))
112
113/* HDCP2.0 Compliant repeater in downstream */
114#define HDCP_2_2_HDCP_2_0_REP_CONNECTED(x) ((x) & BIT(1))
115#define HDCP_2_2_MAX_CASCADE_EXCEEDED(x) ((x) & BIT(2))
116#define HDCP_2_2_MAX_DEVS_EXCEEDED(x) ((x) & BIT(3))
117#define HDCP_2_2_DEV_COUNT_LO(x) (((x) & (0xF << 4)) >> 4)
118#define HDCP_2_2_DEV_COUNT_HI(x) ((x) & BIT(0))
119#define HDCP_2_2_DEPTH(x) (((x) & (0x7 << 1)) >> 1)
120
121struct hdcp2_cert_rx {
122 u8 receiver_id[HDCP_2_2_RECEIVER_ID_LEN];
123 u8 kpub_rx[HDCP_2_2_K_PUB_RX_LEN];
124 u8 reserved[2];
125 u8 dcp_signature[HDCP_2_2_DCP_LLC_SIG_LEN];
126} __packed;
127
128struct hdcp2_streamid_type {
129 u8 stream_id;
130 u8 stream_type;
131} __packed;
132
133/*
134 * The TxCaps field specified in the HDCP HDMI, DP specs
135 * This field is big endian as specified in the errata.
136 */
137struct hdcp2_tx_caps {
138 /* Transmitter must set this to 0x2 */
139 u8 version;
140
141 /* Reserved for HDCP and DP Spec. Read as Zero */
142 u8 tx_cap_mask[HDCP_2_2_TXCAP_MASK_LEN];
143} __packed;
144
145/* Main structures for HDCP2.2 protocol communication */
146struct hdcp2_ake_init {
147 u8 msg_id;
148 u8 r_tx[HDCP_2_2_RTX_LEN];
149 struct hdcp2_tx_caps tx_caps;
150} __packed;
151
152struct hdcp2_ake_send_cert {
153 u8 msg_id;
154 struct hdcp2_cert_rx cert_rx;
155 u8 r_rx[HDCP_2_2_RRX_LEN];
156 u8 rx_caps[HDCP_2_2_RXCAPS_LEN];
157} __packed;
158
159struct hdcp2_ake_no_stored_km {
160 u8 msg_id;
161 u8 e_kpub_km[HDCP_2_2_E_KPUB_KM_LEN];
162} __packed;
163
164struct hdcp2_ake_stored_km {
165 u8 msg_id;
166 u8 e_kh_km_m[HDCP_2_2_E_KH_KM_M_LEN];
167} __packed;
168
169struct hdcp2_ake_send_hprime {
170 u8 msg_id;
171 u8 h_prime[HDCP_2_2_H_PRIME_LEN];
172} __packed;
173
174struct hdcp2_ake_send_pairing_info {
175 u8 msg_id;
176 u8 e_kh_km[HDCP_2_2_E_KH_KM_LEN];
177} __packed;
178
179struct hdcp2_lc_init {
180 u8 msg_id;
181 u8 r_n[HDCP_2_2_RN_LEN];
182} __packed;
183
184struct hdcp2_lc_send_lprime {
185 u8 msg_id;
186 u8 l_prime[HDCP_2_2_L_PRIME_LEN];
187} __packed;
188
189struct hdcp2_ske_send_eks {
190 u8 msg_id;
191 u8 e_dkey_ks[HDCP_2_2_E_DKEY_KS_LEN];
192 u8 riv[HDCP_2_2_RIV_LEN];
193} __packed;
194
195struct hdcp2_rep_send_receiverid_list {
196 u8 msg_id;
197 u8 rx_info[HDCP_2_2_RXINFO_LEN];
198 u8 seq_num_v[HDCP_2_2_SEQ_NUM_LEN];
199 u8 v_prime[HDCP_2_2_V_PRIME_HALF_LEN];
200 u8 receiver_ids[HDCP_2_2_RECEIVER_IDS_MAX_LEN];
201} __packed;
202
203struct hdcp2_rep_send_ack {
204 u8 msg_id;
205 u8 v[HDCP_2_2_V_PRIME_HALF_LEN];
206} __packed;
207
208struct hdcp2_rep_stream_manage {
209 u8 msg_id;
210 u8 seq_num_m[HDCP_2_2_SEQ_NUM_LEN];
211 __be16 k;
212 struct hdcp2_streamid_type streams[HDCP_2_2_MAX_CONTENT_STREAMS_CNT];
213} __packed;
214
215struct hdcp2_rep_stream_ready {
216 u8 msg_id;
217 u8 m_prime[HDCP_2_2_MPRIME_LEN];
218} __packed;
219
220struct hdcp2_dp_errata_stream_type {
221 u8 msg_id;
222 u8 stream_type;
223} __packed;
224
225/* HDCP2.2 TIMEOUTs in mSec */
226#define HDCP_2_2_CERT_TIMEOUT_MS 100
227#define HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS 1000
228#define HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS 200
229#define HDCP_2_2_PAIRING_TIMEOUT_MS 200
230#define HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS 20
231#define HDCP_2_2_DP_LPRIME_TIMEOUT_MS 7
232#define HDCP_2_2_RECVID_LIST_TIMEOUT_MS 3000
233#define HDCP_2_2_STREAM_READY_TIMEOUT_MS 100
234
235/* HDMI HDCP2.2 Register Offsets */
236#define HDCP_2_2_HDMI_REG_VER_OFFSET 0x50
237#define HDCP_2_2_HDMI_REG_WR_MSG_OFFSET 0x60
238#define HDCP_2_2_HDMI_REG_RXSTATUS_OFFSET 0x70
239#define HDCP_2_2_HDMI_REG_RD_MSG_OFFSET 0x80
240#define HDCP_2_2_HDMI_REG_DBG_OFFSET 0xC0
241
242#define HDCP_2_2_HDMI_SUPPORT_MASK BIT(2)
243#define HDCP_2_2_RX_CAPS_VERSION_VAL 0x02
244#define HDCP_2_2_SEQ_NUM_MAX 0xFFFFFF
245#define HDCP_2_2_DELAY_BEFORE_ENCRYPTION_EN 200
246
247/* Below macros take a byte at a time and mask the bit(s) */
248#define HDCP_2_2_HDMI_RXSTATUS_LEN 2
249#define HDCP_2_2_HDMI_RXSTATUS_MSG_SZ_HI(x) ((x) & 0x3)
250#define HDCP_2_2_HDMI_RXSTATUS_READY(x) ((x) & BIT(2))
251#define HDCP_2_2_HDMI_RXSTATUS_REAUTH_REQ(x) ((x) & BIT(3))
252
41#endif 253#endif
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index fd965ffbb92e..192667144693 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -365,16 +365,20 @@
365 INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */ 365 INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */
366 366
367/* AML/KBL Y GT2 */ 367/* AML/KBL Y GT2 */
368#define INTEL_AML_GT2_IDS(info) \ 368#define INTEL_AML_KBL_GT2_IDS(info) \
369 INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \ 369 INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \
370 INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */ 370 INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */
371 371
372/* AML/CFL Y GT2 */
373#define INTEL_AML_CFL_GT2_IDS(info) \
374 INTEL_VGA_DEVICE(0x87CA, info)
375
372#define INTEL_KBL_IDS(info) \ 376#define INTEL_KBL_IDS(info) \
373 INTEL_KBL_GT1_IDS(info), \ 377 INTEL_KBL_GT1_IDS(info), \
374 INTEL_KBL_GT2_IDS(info), \ 378 INTEL_KBL_GT2_IDS(info), \
375 INTEL_KBL_GT3_IDS(info), \ 379 INTEL_KBL_GT3_IDS(info), \
376 INTEL_KBL_GT4_IDS(info), \ 380 INTEL_KBL_GT4_IDS(info), \
377 INTEL_AML_GT2_IDS(info) 381 INTEL_AML_KBL_GT2_IDS(info)
378 382
379/* CFL S */ 383/* CFL S */
380#define INTEL_CFL_S_GT1_IDS(info) \ 384#define INTEL_CFL_S_GT1_IDS(info) \
@@ -407,17 +411,17 @@
407 411
408/* WHL/CFL U GT1 */ 412/* WHL/CFL U GT1 */
409#define INTEL_WHL_U_GT1_IDS(info) \ 413#define INTEL_WHL_U_GT1_IDS(info) \
410 INTEL_VGA_DEVICE(0x3EA1, info) 414 INTEL_VGA_DEVICE(0x3EA1, info), \
415 INTEL_VGA_DEVICE(0x3EA4, info)
411 416
412/* WHL/CFL U GT2 */ 417/* WHL/CFL U GT2 */
413#define INTEL_WHL_U_GT2_IDS(info) \ 418#define INTEL_WHL_U_GT2_IDS(info) \
414 INTEL_VGA_DEVICE(0x3EA0, info) 419 INTEL_VGA_DEVICE(0x3EA0, info), \
420 INTEL_VGA_DEVICE(0x3EA3, info)
415 421
416/* WHL/CFL U GT3 */ 422/* WHL/CFL U GT3 */
417#define INTEL_WHL_U_GT3_IDS(info) \ 423#define INTEL_WHL_U_GT3_IDS(info) \
418 INTEL_VGA_DEVICE(0x3EA2, info), \ 424 INTEL_VGA_DEVICE(0x3EA2, info)
419 INTEL_VGA_DEVICE(0x3EA3, info), \
420 INTEL_VGA_DEVICE(0x3EA4, info)
421 425
422#define INTEL_CFL_IDS(info) \ 426#define INTEL_CFL_IDS(info) \
423 INTEL_CFL_S_GT1_IDS(info), \ 427 INTEL_CFL_S_GT1_IDS(info), \
@@ -427,7 +431,8 @@
427 INTEL_CFL_U_GT3_IDS(info), \ 431 INTEL_CFL_U_GT3_IDS(info), \
428 INTEL_WHL_U_GT1_IDS(info), \ 432 INTEL_WHL_U_GT1_IDS(info), \
429 INTEL_WHL_U_GT2_IDS(info), \ 433 INTEL_WHL_U_GT2_IDS(info), \
430 INTEL_WHL_U_GT3_IDS(info) 434 INTEL_WHL_U_GT3_IDS(info), \
435 INTEL_AML_CFL_GT2_IDS(info)
431 436
432/* CNL */ 437/* CNL */
433#define INTEL_CNL_IDS(info) \ 438#define INTEL_CNL_IDS(info) \
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d8a07a4f171d..a8f6d5d89524 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -18,6 +18,8 @@ struct notifier_block;
18 18
19struct bio; 19struct bio;
20 20
21struct pagevec;
22
21#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ 23#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
22#define SWAP_FLAG_PRIO_MASK 0x7fff 24#define SWAP_FLAG_PRIO_MASK 0x7fff
23#define SWAP_FLAG_PRIO_SHIFT 0 25#define SWAP_FLAG_PRIO_SHIFT 0
@@ -369,7 +371,7 @@ static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask,
369#endif 371#endif
370 372
371extern int page_evictable(struct page *page); 373extern int page_evictable(struct page *page);
372extern void check_move_unevictable_pages(struct page **, int nr_pages); 374extern void check_move_unevictable_pages(struct pagevec *pvec);
373 375
374extern int kswapd_run(int nid); 376extern int kswapd_run(int nid);
375extern void kswapd_stop(int nid); 377extern void kswapd_stop(int nid);
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index a4446f452040..298b2e197744 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -412,6 +412,14 @@ typedef struct drm_i915_irq_wait {
412 int irq_seq; 412 int irq_seq;
413} drm_i915_irq_wait_t; 413} drm_i915_irq_wait_t;
414 414
415/*
416 * Different modes of per-process Graphics Translation Table,
417 * see I915_PARAM_HAS_ALIASING_PPGTT
418 */
419#define I915_GEM_PPGTT_NONE 0
420#define I915_GEM_PPGTT_ALIASING 1
421#define I915_GEM_PPGTT_FULL 2
422
415/* Ioctl to query kernel params: 423/* Ioctl to query kernel params:
416 */ 424 */
417#define I915_PARAM_IRQ_ACTIVE 1 425#define I915_PARAM_IRQ_ACTIVE 1