aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0082-drm-amd-display-Move-dpcd-structs-into-dp_types-head.patch
blob: 99cc9766f6d82e0cc1c4d44c089655c3fafc57a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
From e1b55f04d850ab4c6a1f031afd50ec0b47566984 Mon Sep 17 00:00:00 2001
From: Harry Wentland <harry.wentland@amd.com>
Date: Mon, 19 Dec 2016 14:10:53 -0500
Subject: [PATCH 0082/4131] drm/amd/display: Move dpcd structs into dp_types
 header

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |   1 +
 drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c |   1 +
 drivers/gpu/drm/amd/display/dc/dc.h                |   1 -
 drivers/gpu/drm/amd/display/dc/dc_dp_types.h       | 359 +++++++++++++++++++++
 drivers/gpu/drm/amd/display/include/dpcd_defs.h    | 358 --------------------
 .../drm/amd/display/include/link_service_types.h   |   1 -
 6 files changed, 361 insertions(+), 360 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 47f22d4..ecfca62 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -39,6 +39,7 @@
 #include "resource.h"
 #include "fixed31_32.h"
 #include "include/asic_capability_interface.h"
+#include "dpcd_defs.h"
 
 #include "dce/dce_11_0_d.h"
 #include "dce/dce_11_0_enum.h"
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c
index e89f5f1..0c5f16c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c
@@ -13,6 +13,7 @@
 #include "dm_helpers.h"
 #include "dce/dce_link_encoder.h"
 #include "dce/dce_stream_encoder.h"
+#include "dpcd_defs.h"
 
 enum dc_status core_link_read_dpcd(
 	struct core_link* link,
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 63090a2..f1707b4 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -27,7 +27,6 @@
 #define DC_INTERFACE_H_
 
 #include "dc_types.h"
-#include "dpcd_defs.h"
 #include "grph_object_defs.h"
 #include "logger_types.h"
 #include "gpio_types.h"
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
index befc498..1666f10 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
@@ -102,4 +102,363 @@ struct dc_link_training_settings {
 	struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX];
 };
 
+
+union dpcd_rev {
+	struct {
+		uint8_t MINOR:4;
+		uint8_t MAJOR:4;
+	} bits;
+	uint8_t raw;
+};
+
+union max_lane_count {
+	struct {
+		uint8_t MAX_LANE_COUNT:5;
+		uint8_t POST_LT_ADJ_REQ_SUPPORTED:1;
+		uint8_t TPS3_SUPPORTED:1;
+		uint8_t ENHANCED_FRAME_CAP:1;
+	} bits;
+	uint8_t raw;
+};
+
+union max_down_spread {
+	struct {
+		uint8_t MAX_DOWN_SPREAD:1;
+		uint8_t RESERVED:5;
+		uint8_t NO_AUX_HANDSHAKE_LINK_TRAINING:1;
+		uint8_t TPS4_SUPPORTED:1;
+	} bits;
+	uint8_t raw;
+};
+
+union mstm_cap {
+	struct {
+		uint8_t MST_CAP:1;
+		uint8_t RESERVED:7;
+	} bits;
+	uint8_t raw;
+};
+
+union lane_count_set {
+	struct {
+		uint8_t LANE_COUNT_SET:5;
+		uint8_t POST_LT_ADJ_REQ_GRANTED:1;
+		uint8_t RESERVED:1;
+		uint8_t ENHANCED_FRAMING:1;
+	} bits;
+	uint8_t raw;
+};
+
+union lane_status {
+	struct {
+		uint8_t CR_DONE_0:1;
+		uint8_t CHANNEL_EQ_DONE_0:1;
+		uint8_t SYMBOL_LOCKED_0:1;
+		uint8_t RESERVED0:1;
+		uint8_t CR_DONE_1:1;
+		uint8_t CHANNEL_EQ_DONE_1:1;
+		uint8_t SYMBOL_LOCKED_1:1;
+		uint8_t RESERVED_1:1;
+	} bits;
+	uint8_t raw;
+};
+
+union device_service_irq {
+	struct {
+		uint8_t REMOTE_CONTROL_CMD_PENDING:1;
+		uint8_t AUTOMATED_TEST:1;
+		uint8_t CP_IRQ:1;
+		uint8_t MCCS_IRQ:1;
+		uint8_t DOWN_REP_MSG_RDY:1;
+		uint8_t UP_REQ_MSG_RDY:1;
+		uint8_t SINK_SPECIFIC:1;
+		uint8_t reserved:1;
+	} bits;
+	uint8_t raw;
+};
+
+union sink_count {
+	struct {
+		uint8_t SINK_COUNT:6;
+		uint8_t CPREADY:1;
+		uint8_t RESERVED:1;
+	} bits;
+	uint8_t raw;
+};
+
+union lane_align_status_updated {
+	struct {
+		uint8_t INTERLANE_ALIGN_DONE:1;
+		uint8_t POST_LT_ADJ_REQ_IN_PROGRESS:1;
+		uint8_t RESERVED:4;
+		uint8_t DOWNSTREAM_PORT_STATUS_CHANGED:1;
+		uint8_t LINK_STATUS_UPDATED:1;
+	} bits;
+	uint8_t raw;
+};
+
+union lane_adjust {
+	struct {
+		uint8_t VOLTAGE_SWING_LANE:2;
+		uint8_t PRE_EMPHASIS_LANE:2;
+		uint8_t RESERVED:4;
+	} bits;
+	uint8_t raw;
+};
+
+union dpcd_training_pattern {
+	struct {
+		uint8_t TRAINING_PATTERN_SET:4;
+		uint8_t RECOVERED_CLOCK_OUT_EN:1;
+		uint8_t SCRAMBLING_DISABLE:1;
+		uint8_t SYMBOL_ERROR_COUNT_SEL:2;
+	} v1_4;
+	struct {
+		uint8_t TRAINING_PATTERN_SET:2;
+		uint8_t LINK_QUAL_PATTERN_SET:2;
+		uint8_t RESERVED:4;
+	} v1_3;
+	uint8_t raw;
+};
+
+/* Training Lane is used to configure downstream DP device's voltage swing
+and pre-emphasis levels*/
+/* The DPCD addresses are from 0x103 to 0x106*/
+union dpcd_training_lane {
+	struct {
+		uint8_t VOLTAGE_SWING_SET:2;
+		uint8_t MAX_SWING_REACHED:1;
+		uint8_t PRE_EMPHASIS_SET:2;
+		uint8_t MAX_PRE_EMPHASIS_REACHED:1;
+		uint8_t RESERVED:2;
+	} bits;
+	uint8_t raw;
+};
+
+/* TMDS-converter related */
+union dwnstream_port_caps_byte0 {
+	struct {
+		uint8_t DWN_STRM_PORTX_TYPE:3;
+		uint8_t DWN_STRM_PORTX_HPD:1;
+		uint8_t RESERVERD:4;
+	} bits;
+	uint8_t raw;
+};
+
+/* these are the detailed types stored at DWN_STRM_PORTX_CAP (00080h)*/
+enum dpcd_downstream_port_detailed_type {
+	DOWN_STREAM_DETAILED_DP = 0,
+	DOWN_STREAM_DETAILED_VGA,
+	DOWN_STREAM_DETAILED_DVI,
+	DOWN_STREAM_DETAILED_HDMI,
+	DOWN_STREAM_DETAILED_NONDDC,/* has no EDID (TV,CV)*/
+	DOWN_STREAM_DETAILED_DP_PLUS_PLUS
+};
+
+union dwnstream_port_caps_byte2 {
+	struct {
+		uint8_t MAX_BITS_PER_COLOR_COMPONENT:2;
+		uint8_t RESERVED:6;
+	} bits;
+	uint8_t raw;
+};
+
+union dp_downstream_port_present {
+	uint8_t byte;
+	struct {
+		uint8_t PORT_PRESENT:1;
+		uint8_t PORT_TYPE:2;
+		uint8_t FMT_CONVERSION:1;
+		uint8_t DETAILED_CAPS:1;
+		uint8_t RESERVED:3;
+	} fields;
+};
+
+union dwnstream_port_caps_byte3_dvi {
+	struct {
+		uint8_t RESERVED1:1;
+		uint8_t DUAL_LINK:1;
+		uint8_t HIGH_COLOR_DEPTH:1;
+		uint8_t RESERVED2:5;
+	} bits;
+	uint8_t raw;
+};
+
+union dwnstream_port_caps_byte3_hdmi {
+	struct {
+		uint8_t FRAME_SEQ_TO_FRAME_PACK:1;
+		uint8_t RESERVED:7;
+	} bits;
+	uint8_t raw;
+};
+
+/*4-byte structure for detailed capabilities of a down-stream port
+(DP-to-TMDS converter).*/
+
+union sink_status {
+	struct {
+		uint8_t RX_PORT0_STATUS:1;
+		uint8_t RX_PORT1_STATUS:1;
+		uint8_t RESERVED:6;
+	} bits;
+	uint8_t raw;
+};
+
+/*6-byte structure corresponding to 6 registers (200h-205h)
+read during handling of HPD-IRQ*/
+union hpd_irq_data {
+	struct {
+		union sink_count sink_cnt;/* 200h */
+		union device_service_irq device_service_irq;/* 201h */
+		union lane_status lane01_status;/* 202h */
+		union lane_status lane23_status;/* 203h */
+		union lane_align_status_updated lane_status_updated;/* 204h */
+		union sink_status sink_status;
+	} bytes;
+	uint8_t raw[6];
+};
+
+union down_stream_port_count {
+	struct {
+		uint8_t DOWN_STR_PORT_COUNT:4;
+		uint8_t RESERVED:2; /*Bits 5:4 = RESERVED. Read all 0s.*/
+		/*Bit 6 = MSA_TIMING_PAR_IGNORED
+		0 = Sink device requires the MSA timing parameters
+		1 = Sink device is capable of rendering incoming video
+		 stream without MSA timing parameters*/
+		uint8_t IGNORE_MSA_TIMING_PARAM:1;
+		/*Bit 7 = OUI Support
+		0 = OUI not supported
+		1 = OUI supported
+		(OUI and Device Identification mandatory for DP 1.2)*/
+		uint8_t OUI_SUPPORT:1;
+	} bits;
+	uint8_t raw;
+};
+
+union down_spread_ctrl {
+	struct {
+		uint8_t RESERVED1:4;/* Bit 3:0 = RESERVED. Read all 0s*/
+	/* Bits 4 = SPREAD_AMP. Spreading amplitude
+	0 = Main link signal is not downspread
+	1 = Main link signal is downspread <= 0.5%
+	with frequency in the range of 30kHz ~ 33kHz*/
+		uint8_t SPREAD_AMP:1;
+		uint8_t RESERVED2:2;/*Bit 6:5 = RESERVED. Read all 0s*/
+	/*Bit 7 = MSA_TIMING_PAR_IGNORE_EN
+	0 = Source device will send valid data for the MSA Timing Params
+	1 = Source device may send invalid data for these MSA Timing Params*/
+		uint8_t IGNORE_MSA_TIMING_PARAM:1;
+	} bits;
+	uint8_t raw;
+};
+
+union dpcd_edp_config {
+	struct {
+		uint8_t PANEL_MODE_EDP:1;
+		uint8_t FRAMING_CHANGE_ENABLE:1;
+		uint8_t RESERVED:5;
+		uint8_t PANEL_SELF_TEST_ENABLE:1;
+	} bits;
+	uint8_t raw;
+};
+
+struct dp_device_vendor_id {
+	uint8_t ieee_oui[3];/*24-bit IEEE OUI*/
+	uint8_t ieee_device_id[6];/*usually 6-byte ASCII name*/
+};
+
+struct dp_sink_hw_fw_revision {
+	uint8_t ieee_hw_rev;
+	uint8_t ieee_fw_rev[2];
+};
+
+/*DPCD register of DP receiver capability field bits-*/
+union edp_configuration_cap {
+	struct {
+		uint8_t ALT_SCRAMBLER_RESET:1;
+		uint8_t FRAMING_CHANGE:1;
+		uint8_t RESERVED:1;
+		uint8_t DPCD_DISPLAY_CONTROL_CAPABLE:1;
+		uint8_t RESERVED2:4;
+	} bits;
+	uint8_t raw;
+};
+
+union training_aux_rd_interval {
+	struct {
+		uint8_t TRAINIG_AUX_RD_INTERVAL:7;
+		uint8_t EXT_RECIEVER_CAP_FIELD_PRESENT:1;
+	} bits;
+	uint8_t raw;
+};
+
+/* Automated test structures */
+union test_request {
+	struct {
+	uint8_t LINK_TRAINING         :1;
+	uint8_t LINK_TEST_PATTRN      :1;
+	uint8_t EDID_REAT             :1;
+	uint8_t PHY_TEST_PATTERN      :1;
+	uint8_t AUDIO_TEST_PATTERN    :1;
+	uint8_t RESERVED              :1;
+	uint8_t TEST_STEREO_3D        :1;
+	} bits;
+	uint8_t raw;
+};
+
+union test_response {
+	struct {
+		uint8_t ACK         :1;
+		uint8_t NO_ACK      :1;
+		uint8_t RESERVED    :6;
+	} bits;
+	uint8_t raw;
+};
+
+union phy_test_pattern {
+	struct {
+		/* DpcdPhyTestPatterns. This field is 2 bits for DP1.1
+		 * and 3 bits for DP1.2.
+		 */
+		uint8_t PATTERN     :3;
+		/* BY speci, bit7:2 is 0 for DP1.1. */
+		uint8_t RESERVED    :5;
+	} bits;
+	uint8_t raw;
+};
+
+/* States of Compliance Test Specification (CTS DP1.2). */
+union compliance_test_state {
+	struct {
+		unsigned char STEREO_3D_RUNNING        : 1;
+		unsigned char SET_TEST_PATTERN_PENDING : 1;
+		unsigned char RESERVED                 : 6;
+	} bits;
+	unsigned char raw;
+};
+
+union link_test_pattern {
+	struct {
+		/* dpcd_link_test_patterns */
+		unsigned char PATTERN :2;
+		unsigned char RESERVED:6;
+	} bits;
+	unsigned char raw;
+};
+
+union test_misc {
+	struct dpcd_test_misc_bits {
+		unsigned char SYNC_CLOCK :1;
+		/* dpcd_test_color_format */
+		unsigned char CLR_FORMAT :2;
+		/* dpcd_test_dyn_range */
+		unsigned char DYN_RANGE  :1;
+		unsigned char YCBCR      :1;
+		/* dpcd_test_bit_depth */
+		unsigned char BPC        :3;
+	} bits;
+	unsigned char raw;
+};
+
 #endif /* DC_DP_TYPES_H */
diff --git a/drivers/gpu/drm/amd/display/include/dpcd_defs.h b/drivers/gpu/drm/amd/display/include/dpcd_defs.h
index fbb2729..adfbd33 100644
--- a/drivers/gpu/drm/amd/display/include/dpcd_defs.h
+++ b/drivers/gpu/drm/amd/display/include/dpcd_defs.h
@@ -381,362 +381,4 @@ enum dpcd_edp_revision {
 	DPCD_EDP_REVISION_EDP_UNKNOWN = DPCD_EDP_REVISION_EDP_V1_1,
 };
 
-union dpcd_rev {
-	struct {
-		uint8_t MINOR:4;
-		uint8_t MAJOR:4;
-	} bits;
-	uint8_t raw;
-};
-
-union max_lane_count {
-	struct {
-		uint8_t MAX_LANE_COUNT:5;
-		uint8_t POST_LT_ADJ_REQ_SUPPORTED:1;
-		uint8_t TPS3_SUPPORTED:1;
-		uint8_t ENHANCED_FRAME_CAP:1;
-	} bits;
-	uint8_t raw;
-};
-
-union max_down_spread {
-	struct {
-		uint8_t MAX_DOWN_SPREAD:1;
-		uint8_t RESERVED:5;
-		uint8_t NO_AUX_HANDSHAKE_LINK_TRAINING:1;
-		uint8_t TPS4_SUPPORTED:1;
-	} bits;
-	uint8_t raw;
-};
-
-union mstm_cap {
-	struct {
-		uint8_t MST_CAP:1;
-		uint8_t RESERVED:7;
-	} bits;
-	uint8_t raw;
-};
-
-union lane_count_set {
-	struct {
-		uint8_t LANE_COUNT_SET:5;
-		uint8_t POST_LT_ADJ_REQ_GRANTED:1;
-		uint8_t RESERVED:1;
-		uint8_t ENHANCED_FRAMING:1;
-	} bits;
-	uint8_t raw;
-};
-
-union lane_status {
-	struct {
-		uint8_t CR_DONE_0:1;
-		uint8_t CHANNEL_EQ_DONE_0:1;
-		uint8_t SYMBOL_LOCKED_0:1;
-		uint8_t RESERVED0:1;
-		uint8_t CR_DONE_1:1;
-		uint8_t CHANNEL_EQ_DONE_1:1;
-		uint8_t SYMBOL_LOCKED_1:1;
-		uint8_t RESERVED_1:1;
-	} bits;
-	uint8_t raw;
-};
-
-union device_service_irq {
-	struct {
-		uint8_t REMOTE_CONTROL_CMD_PENDING:1;
-		uint8_t AUTOMATED_TEST:1;
-		uint8_t CP_IRQ:1;
-		uint8_t MCCS_IRQ:1;
-		uint8_t DOWN_REP_MSG_RDY:1;
-		uint8_t UP_REQ_MSG_RDY:1;
-		uint8_t SINK_SPECIFIC:1;
-		uint8_t reserved:1;
-	} bits;
-	uint8_t raw;
-};
-
-union sink_count {
-	struct {
-		uint8_t SINK_COUNT:6;
-		uint8_t CPREADY:1;
-		uint8_t RESERVED:1;
-	} bits;
-	uint8_t raw;
-};
-
-union lane_align_status_updated {
-	struct {
-		uint8_t INTERLANE_ALIGN_DONE:1;
-		uint8_t POST_LT_ADJ_REQ_IN_PROGRESS:1;
-		uint8_t RESERVED:4;
-		uint8_t DOWNSTREAM_PORT_STATUS_CHANGED:1;
-		uint8_t LINK_STATUS_UPDATED:1;
-	} bits;
-	uint8_t raw;
-};
-
-union lane_adjust {
-	struct {
-		uint8_t VOLTAGE_SWING_LANE:2;
-		uint8_t PRE_EMPHASIS_LANE:2;
-		uint8_t RESERVED:4;
-	} bits;
-	uint8_t raw;
-};
-
-union dpcd_training_pattern {
-	struct {
-		uint8_t TRAINING_PATTERN_SET:4;
-		uint8_t RECOVERED_CLOCK_OUT_EN:1;
-		uint8_t SCRAMBLING_DISABLE:1;
-		uint8_t SYMBOL_ERROR_COUNT_SEL:2;
-	} v1_4;
-	struct {
-		uint8_t TRAINING_PATTERN_SET:2;
-		uint8_t LINK_QUAL_PATTERN_SET:2;
-		uint8_t RESERVED:4;
-	} v1_3;
-	uint8_t raw;
-};
-
-/* Training Lane is used to configure downstream DP device's voltage swing
-and pre-emphasis levels*/
-/* The DPCD addresses are from 0x103 to 0x106*/
-union dpcd_training_lane {
-	struct {
-		uint8_t VOLTAGE_SWING_SET:2;
-		uint8_t MAX_SWING_REACHED:1;
-		uint8_t PRE_EMPHASIS_SET:2;
-		uint8_t MAX_PRE_EMPHASIS_REACHED:1;
-		uint8_t RESERVED:2;
-	} bits;
-	uint8_t raw;
-};
-
-/* TMDS-converter related */
-union dwnstream_port_caps_byte0 {
-	struct {
-		uint8_t DWN_STRM_PORTX_TYPE:3;
-		uint8_t DWN_STRM_PORTX_HPD:1;
-		uint8_t RESERVERD:4;
-	} bits;
-	uint8_t raw;
-};
-
-/* these are the detailed types stored at DWN_STRM_PORTX_CAP (00080h)*/
-enum dpcd_downstream_port_detailed_type {
-	DOWN_STREAM_DETAILED_DP = 0,
-	DOWN_STREAM_DETAILED_VGA,
-	DOWN_STREAM_DETAILED_DVI,
-	DOWN_STREAM_DETAILED_HDMI,
-	DOWN_STREAM_DETAILED_NONDDC,/* has no EDID (TV,CV)*/
-	DOWN_STREAM_DETAILED_DP_PLUS_PLUS
-};
-
-union dwnstream_port_caps_byte2 {
-	struct {
-		uint8_t MAX_BITS_PER_COLOR_COMPONENT:2;
-		uint8_t RESERVED:6;
-	} bits;
-	uint8_t raw;
-};
-
-union dp_downstream_port_present {
-	uint8_t byte;
-	struct {
-		uint8_t PORT_PRESENT:1;
-		uint8_t PORT_TYPE:2;
-		uint8_t FMT_CONVERSION:1;
-		uint8_t DETAILED_CAPS:1;
-		uint8_t RESERVED:3;
-	} fields;
-};
-
-union dwnstream_port_caps_byte3_dvi {
-	struct {
-		uint8_t RESERVED1:1;
-		uint8_t DUAL_LINK:1;
-		uint8_t HIGH_COLOR_DEPTH:1;
-		uint8_t RESERVED2:5;
-	} bits;
-	uint8_t raw;
-};
-
-union dwnstream_port_caps_byte3_hdmi {
-	struct {
-		uint8_t FRAME_SEQ_TO_FRAME_PACK:1;
-		uint8_t RESERVED:7;
-	} bits;
-	uint8_t raw;
-};
-
-/*4-byte structure for detailed capabilities of a down-stream port
-(DP-to-TMDS converter).*/
-
-union sink_status {
-	struct {
-		uint8_t RX_PORT0_STATUS:1;
-		uint8_t RX_PORT1_STATUS:1;
-		uint8_t RESERVED:6;
-	} bits;
-	uint8_t raw;
-};
-
-/*6-byte structure corresponding to 6 registers (200h-205h)
-read during handling of HPD-IRQ*/
-union hpd_irq_data {
-	struct {
-		union sink_count sink_cnt;/* 200h */
-		union device_service_irq device_service_irq;/* 201h */
-		union lane_status lane01_status;/* 202h */
-		union lane_status lane23_status;/* 203h */
-		union lane_align_status_updated lane_status_updated;/* 204h */
-		union sink_status sink_status;
-	} bytes;
-	uint8_t raw[6];
-};
-
-union down_stream_port_count {
-	struct {
-		uint8_t DOWN_STR_PORT_COUNT:4;
-		uint8_t RESERVED:2; /*Bits 5:4 = RESERVED. Read all 0s.*/
-		/*Bit 6 = MSA_TIMING_PAR_IGNORED
-		0 = Sink device requires the MSA timing parameters
-		1 = Sink device is capable of rendering incoming video
-		 stream without MSA timing parameters*/
-		uint8_t IGNORE_MSA_TIMING_PARAM:1;
-		/*Bit 7 = OUI Support
-		0 = OUI not supported
-		1 = OUI supported
-		(OUI and Device Identification mandatory for DP 1.2)*/
-		uint8_t OUI_SUPPORT:1;
-	} bits;
-	uint8_t raw;
-};
-
-union down_spread_ctrl {
-	struct {
-		uint8_t RESERVED1:4;/* Bit 3:0 = RESERVED. Read all 0s*/
-	/* Bits 4 = SPREAD_AMP. Spreading amplitude
-	0 = Main link signal is not downspread
-	1 = Main link signal is downspread <= 0.5%
-	with frequency in the range of 30kHz ~ 33kHz*/
-		uint8_t SPREAD_AMP:1;
-		uint8_t RESERVED2:2;/*Bit 6:5 = RESERVED. Read all 0s*/
-	/*Bit 7 = MSA_TIMING_PAR_IGNORE_EN
-	0 = Source device will send valid data for the MSA Timing Params
-	1 = Source device may send invalid data for these MSA Timing Params*/
-		uint8_t IGNORE_MSA_TIMING_PARAM:1;
-	} bits;
-	uint8_t raw;
-};
-
-union dpcd_edp_config {
-	struct {
-		uint8_t PANEL_MODE_EDP:1;
-		uint8_t FRAMING_CHANGE_ENABLE:1;
-		uint8_t RESERVED:5;
-		uint8_t PANEL_SELF_TEST_ENABLE:1;
-	} bits;
-	uint8_t raw;
-};
-
-struct dp_device_vendor_id {
-	uint8_t ieee_oui[3];/*24-bit IEEE OUI*/
-	uint8_t ieee_device_id[6];/*usually 6-byte ASCII name*/
-};
-
-struct dp_sink_hw_fw_revision {
-	uint8_t ieee_hw_rev;
-	uint8_t ieee_fw_rev[2];
-};
-
-/*DPCD register of DP receiver capability field bits-*/
-union edp_configuration_cap {
-	struct {
-		uint8_t ALT_SCRAMBLER_RESET:1;
-		uint8_t FRAMING_CHANGE:1;
-		uint8_t RESERVED:1;
-		uint8_t DPCD_DISPLAY_CONTROL_CAPABLE:1;
-		uint8_t RESERVED2:4;
-	} bits;
-	uint8_t raw;
-};
-
-union training_aux_rd_interval {
-	struct {
-		uint8_t TRAINIG_AUX_RD_INTERVAL:7;
-		uint8_t EXT_RECIEVER_CAP_FIELD_PRESENT:1;
-	} bits;
-	uint8_t raw;
-};
-
-/* Automated test structures */
-union test_request {
-	struct {
-	uint8_t LINK_TRAINING         :1;
-	uint8_t LINK_TEST_PATTRN      :1;
-	uint8_t EDID_REAT             :1;
-	uint8_t PHY_TEST_PATTERN      :1;
-	uint8_t AUDIO_TEST_PATTERN    :1;
-	uint8_t RESERVED              :1;
-	uint8_t TEST_STEREO_3D        :1;
-	} bits;
-	uint8_t raw;
-};
-
-union test_response {
-	struct {
-		uint8_t ACK         :1;
-		uint8_t NO_ACK      :1;
-		uint8_t RESERVED    :6;
-	} bits;
-	uint8_t raw;
-};
-
-union phy_test_pattern {
-	struct {
-		/* DpcdPhyTestPatterns. This field is 2 bits for DP1.1
-		 * and 3 bits for DP1.2.
-		 */
-		uint8_t PATTERN     :3;
-		/* BY speci, bit7:2 is 0 for DP1.1. */
-		uint8_t RESERVED    :5;
-	} bits;
-	uint8_t raw;
-};
-
-/* States of Compliance Test Specification (CTS DP1.2). */
-union compliance_test_state {
-	struct {
-		unsigned char STEREO_3D_RUNNING        : 1;
-		unsigned char SET_TEST_PATTERN_PENDING : 1;
-		unsigned char RESERVED                 : 6;
-	} bits;
-	unsigned char raw;
-};
-
-union link_test_pattern {
-	struct {
-		/* dpcd_link_test_patterns */
-		unsigned char PATTERN :2;
-		unsigned char RESERVED:6;
-	} bits;
-	unsigned char raw;
-};
-
-union test_misc {
-	struct dpcd_test_misc_bits {
-		unsigned char SYNC_CLOCK :1;
-		/* dpcd_test_color_format */
-		unsigned char CLR_FORMAT :2;
-		/* dpcd_test_dyn_range */
-		unsigned char DYN_RANGE  :1;
-		unsigned char YCBCR      :1;
-		/* dpcd_test_bit_depth */
-		unsigned char BPC        :3;
-	} bits;
-	unsigned char raw;
-};
-
 #endif /* __DAL_DPCD_DEFS_H__ */
diff --git a/drivers/gpu/drm/amd/display/include/link_service_types.h b/drivers/gpu/drm/amd/display/include/link_service_types.h
index 06e6842..6160a46 100644
--- a/drivers/gpu/drm/amd/display/include/link_service_types.h
+++ b/drivers/gpu/drm/amd/display/include/link_service_types.h
@@ -27,7 +27,6 @@
 #define __DAL_LINK_SERVICE_TYPES_H__
 
 #include "grph_object_id.h"
-#include "dpcd_defs.h"
 #include "dal_types.h"
 #include "irq_types.h"
 
-- 
2.7.4