0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _DRM_DP_HELPER_H_
0024 #define _DRM_DP_HELPER_H_
0025
0026 #include <linux/delay.h>
0027 #include <linux/i2c.h>
0028
0029 #include <drm/display/drm_dp.h>
0030 #include <drm/drm_connector.h>
0031
0032 struct drm_device;
0033 struct drm_dp_aux;
0034 struct drm_panel;
0035
0036 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
0037 int lane_count);
0038 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
0039 int lane_count);
0040 u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE],
0041 int lane);
0042 u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SIZE],
0043 int lane);
0044 u8 drm_dp_get_adjust_tx_ffe_preset(const u8 link_status[DP_LINK_STATUS_SIZE],
0045 int lane);
0046
0047 int drm_dp_read_clock_recovery_delay(struct drm_dp_aux *aux, const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0048 enum drm_dp_phy dp_phy, bool uhbr);
0049 int drm_dp_read_channel_eq_delay(struct drm_dp_aux *aux, const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0050 enum drm_dp_phy dp_phy, bool uhbr);
0051
0052 void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux,
0053 const u8 dpcd[DP_RECEIVER_CAP_SIZE]);
0054 void drm_dp_lttpr_link_train_clock_recovery_delay(void);
0055 void drm_dp_link_train_channel_eq_delay(const struct drm_dp_aux *aux,
0056 const u8 dpcd[DP_RECEIVER_CAP_SIZE]);
0057 void drm_dp_lttpr_link_train_channel_eq_delay(const struct drm_dp_aux *aux,
0058 const u8 caps[DP_LTTPR_PHY_CAP_SIZE]);
0059
0060 int drm_dp_128b132b_read_aux_rd_interval(struct drm_dp_aux *aux);
0061 bool drm_dp_128b132b_lane_channel_eq_done(const u8 link_status[DP_LINK_STATUS_SIZE],
0062 int lane_count);
0063 bool drm_dp_128b132b_lane_symbol_locked(const u8 link_status[DP_LINK_STATUS_SIZE],
0064 int lane_count);
0065 bool drm_dp_128b132b_eq_interlane_align_done(const u8 link_status[DP_LINK_STATUS_SIZE]);
0066 bool drm_dp_128b132b_cds_interlane_align_done(const u8 link_status[DP_LINK_STATUS_SIZE]);
0067 bool drm_dp_128b132b_link_training_failed(const u8 link_status[DP_LINK_STATUS_SIZE]);
0068
0069 u8 drm_dp_link_rate_to_bw_code(int link_rate);
0070 int drm_dp_bw_code_to_link_rate(u8 link_bw);
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 struct drm_dp_vsc_sdp {
0089 unsigned char sdp_type;
0090 unsigned char revision;
0091 unsigned char length;
0092 enum dp_pixelformat pixelformat;
0093 enum dp_colorimetry colorimetry;
0094 int bpc;
0095 enum dp_dynamic_range dynamic_range;
0096 enum dp_content_type content_type;
0097 };
0098
0099 void drm_dp_vsc_sdp_log(const char *level, struct device *dev,
0100 const struct drm_dp_vsc_sdp *vsc);
0101
0102 int drm_dp_psr_setup_time(const u8 psr_cap[EDP_PSR_RECEIVER_CAP_SIZE]);
0103
0104 static inline int
0105 drm_dp_max_link_rate(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0106 {
0107 return drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]);
0108 }
0109
0110 static inline u8
0111 drm_dp_max_lane_count(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0112 {
0113 return dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
0114 }
0115
0116 static inline bool
0117 drm_dp_enhanced_frame_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0118 {
0119 return dpcd[DP_DPCD_REV] >= 0x11 &&
0120 (dpcd[DP_MAX_LANE_COUNT] & DP_ENHANCED_FRAME_CAP);
0121 }
0122
0123 static inline bool
0124 drm_dp_fast_training_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0125 {
0126 return dpcd[DP_DPCD_REV] >= 0x11 &&
0127 (dpcd[DP_MAX_DOWNSPREAD] & DP_NO_AUX_HANDSHAKE_LINK_TRAINING);
0128 }
0129
0130 static inline bool
0131 drm_dp_tps3_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0132 {
0133 return dpcd[DP_DPCD_REV] >= 0x12 &&
0134 dpcd[DP_MAX_LANE_COUNT] & DP_TPS3_SUPPORTED;
0135 }
0136
0137 static inline bool
0138 drm_dp_max_downspread(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0139 {
0140 return dpcd[DP_DPCD_REV] >= 0x11 ||
0141 dpcd[DP_MAX_DOWNSPREAD] & DP_MAX_DOWNSPREAD_0_5;
0142 }
0143
0144 static inline bool
0145 drm_dp_tps4_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0146 {
0147 return dpcd[DP_DPCD_REV] >= 0x14 &&
0148 dpcd[DP_MAX_DOWNSPREAD] & DP_TPS4_SUPPORTED;
0149 }
0150
0151 static inline u8
0152 drm_dp_training_pattern_mask(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0153 {
0154 return (dpcd[DP_DPCD_REV] >= 0x14) ? DP_TRAINING_PATTERN_MASK_1_4 :
0155 DP_TRAINING_PATTERN_MASK;
0156 }
0157
0158 static inline bool
0159 drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0160 {
0161 return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT;
0162 }
0163
0164
0165 u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
0166 bool is_edp);
0167 u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]);
0168 int drm_dp_dsc_sink_supported_input_bpcs(const u8 dsc_dpc[DP_DSC_RECEIVER_CAP_SIZE],
0169 u8 dsc_bpc[3]);
0170
0171 static inline bool
0172 drm_dp_sink_supports_dsc(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
0173 {
0174 return dsc_dpcd[DP_DSC_SUPPORT - DP_DSC_SUPPORT] &
0175 DP_DSC_DECOMPRESSION_IS_SUPPORTED;
0176 }
0177
0178 static inline u16
0179 drm_edp_dsc_sink_output_bpp(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
0180 {
0181 return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
0182 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
0183 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
0184 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
0185 }
0186
0187 static inline u32
0188 drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
0189 {
0190
0191 return dsc_dpcd[DP_DSC_MAX_SLICE_WIDTH - DP_DSC_SUPPORT] *
0192 DP_DSC_SLICE_WIDTH_MULTIPLIER;
0193 }
0194
0195
0196 static inline bool
0197 drm_dp_sink_supports_fec(const u8 fec_capable)
0198 {
0199 return fec_capable & DP_FEC_CAPABLE;
0200 }
0201
0202 static inline bool
0203 drm_dp_channel_coding_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0204 {
0205 return dpcd[DP_MAIN_LINK_CHANNEL_CODING] & DP_CAP_ANSI_8B10B;
0206 }
0207
0208 static inline bool
0209 drm_dp_alternate_scrambler_reset_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0210 {
0211 return dpcd[DP_EDP_CONFIGURATION_CAP] &
0212 DP_ALTERNATE_SCRAMBLER_RESET_CAP;
0213 }
0214
0215
0216 static inline bool
0217 drm_dp_sink_can_do_video_without_timing_msa(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
0218 {
0219 return dpcd[DP_DOWN_STREAM_PORT_COUNT] &
0220 DP_MSA_TIMING_PAR_IGNORED;
0221 }
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234 static inline bool
0235 drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE])
0236 {
0237 return !!(edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP);
0238 }
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252 struct drm_dp_aux_msg {
0253 unsigned int address;
0254 u8 request;
0255 u8 reply;
0256 void *buffer;
0257 size_t size;
0258 };
0259
0260 struct cec_adapter;
0261 struct edid;
0262 struct drm_connector;
0263
0264
0265
0266
0267
0268
0269
0270
0271 struct drm_dp_aux_cec {
0272 struct mutex lock;
0273 struct cec_adapter *adap;
0274 struct drm_connector *connector;
0275 struct delayed_work unregister_work;
0276 };
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291 struct drm_dp_aux {
0292
0293
0294
0295
0296
0297
0298
0299 const char *name;
0300
0301
0302
0303
0304
0305 struct i2c_adapter ddc;
0306
0307
0308
0309
0310
0311 struct device *dev;
0312
0313
0314
0315
0316
0317
0318
0319
0320
0321
0322
0323
0324 struct drm_device *drm_dev;
0325
0326
0327
0328
0329
0330 struct drm_crtc *crtc;
0331
0332
0333
0334
0335
0336
0337
0338
0339 struct mutex hw_mutex;
0340
0341
0342
0343
0344 struct work_struct crc_work;
0345
0346
0347
0348
0349 u8 crc_count;
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389 ssize_t (*transfer)(struct drm_dp_aux *aux,
0390 struct drm_dp_aux_msg *msg);
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420 int (*wait_hpd_asserted)(struct drm_dp_aux *aux, unsigned long wait_us);
0421
0422
0423
0424
0425 unsigned i2c_nack_count;
0426
0427
0428
0429 unsigned i2c_defer_count;
0430
0431
0432
0433 struct drm_dp_aux_cec cec;
0434
0435
0436
0437 bool is_remote;
0438 };
0439
0440 int drm_dp_dpcd_probe(struct drm_dp_aux *aux, unsigned int offset);
0441 ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset,
0442 void *buffer, size_t size);
0443 ssize_t drm_dp_dpcd_write(struct drm_dp_aux *aux, unsigned int offset,
0444 void *buffer, size_t size);
0445
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455 static inline ssize_t drm_dp_dpcd_readb(struct drm_dp_aux *aux,
0456 unsigned int offset, u8 *valuep)
0457 {
0458 return drm_dp_dpcd_read(aux, offset, valuep, 1);
0459 }
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470 static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux,
0471 unsigned int offset, u8 value)
0472 {
0473 return drm_dp_dpcd_write(aux, offset, &value, 1);
0474 }
0475
0476 int drm_dp_read_dpcd_caps(struct drm_dp_aux *aux,
0477 u8 dpcd[DP_RECEIVER_CAP_SIZE]);
0478
0479 int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
0480 u8 status[DP_LINK_STATUS_SIZE]);
0481
0482 int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
0483 enum drm_dp_phy dp_phy,
0484 u8 link_status[DP_LINK_STATUS_SIZE]);
0485
0486 bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
0487 u8 real_edid_checksum);
0488
0489 int drm_dp_read_downstream_info(struct drm_dp_aux *aux,
0490 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0491 u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS]);
0492 bool drm_dp_downstream_is_type(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0493 const u8 port_cap[4], u8 type);
0494 bool drm_dp_downstream_is_tmds(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0495 const u8 port_cap[4],
0496 const struct edid *edid);
0497 int drm_dp_downstream_max_dotclock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0498 const u8 port_cap[4]);
0499 int drm_dp_downstream_max_tmds_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0500 const u8 port_cap[4],
0501 const struct edid *edid);
0502 int drm_dp_downstream_min_tmds_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0503 const u8 port_cap[4],
0504 const struct edid *edid);
0505 int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0506 const u8 port_cap[4],
0507 const struct edid *edid);
0508 bool drm_dp_downstream_420_passthrough(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0509 const u8 port_cap[4]);
0510 bool drm_dp_downstream_444_to_420_conversion(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0511 const u8 port_cap[4]);
0512 struct drm_display_mode *drm_dp_downstream_mode(struct drm_device *dev,
0513 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0514 const u8 port_cap[4]);
0515 int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);
0516 void drm_dp_downstream_debug(struct seq_file *m,
0517 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0518 const u8 port_cap[4],
0519 const struct edid *edid,
0520 struct drm_dp_aux *aux);
0521 enum drm_mode_subconnector
0522 drm_dp_subconnector_type(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0523 const u8 port_cap[4]);
0524 void drm_dp_set_subconnector_property(struct drm_connector *connector,
0525 enum drm_connector_status status,
0526 const u8 *dpcd,
0527 const u8 port_cap[4]);
0528
0529 struct drm_dp_desc;
0530 bool drm_dp_read_sink_count_cap(struct drm_connector *connector,
0531 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0532 const struct drm_dp_desc *desc);
0533 int drm_dp_read_sink_count(struct drm_dp_aux *aux);
0534
0535 int drm_dp_read_lttpr_common_caps(struct drm_dp_aux *aux,
0536 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0537 u8 caps[DP_LTTPR_COMMON_CAP_SIZE]);
0538 int drm_dp_read_lttpr_phy_caps(struct drm_dp_aux *aux,
0539 const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0540 enum drm_dp_phy dp_phy,
0541 u8 caps[DP_LTTPR_PHY_CAP_SIZE]);
0542 int drm_dp_lttpr_count(const u8 cap[DP_LTTPR_COMMON_CAP_SIZE]);
0543 int drm_dp_lttpr_max_link_rate(const u8 caps[DP_LTTPR_COMMON_CAP_SIZE]);
0544 int drm_dp_lttpr_max_lane_count(const u8 caps[DP_LTTPR_COMMON_CAP_SIZE]);
0545 bool drm_dp_lttpr_voltage_swing_level_3_supported(const u8 caps[DP_LTTPR_PHY_CAP_SIZE]);
0546 bool drm_dp_lttpr_pre_emphasis_level_3_supported(const u8 caps[DP_LTTPR_PHY_CAP_SIZE]);
0547
0548 void drm_dp_remote_aux_init(struct drm_dp_aux *aux);
0549 void drm_dp_aux_init(struct drm_dp_aux *aux);
0550 int drm_dp_aux_register(struct drm_dp_aux *aux);
0551 void drm_dp_aux_unregister(struct drm_dp_aux *aux);
0552
0553 int drm_dp_start_crc(struct drm_dp_aux *aux, struct drm_crtc *crtc);
0554 int drm_dp_stop_crc(struct drm_dp_aux *aux);
0555
0556 struct drm_dp_dpcd_ident {
0557 u8 oui[3];
0558 u8 device_id[6];
0559 u8 hw_rev;
0560 u8 sw_major_rev;
0561 u8 sw_minor_rev;
0562 } __packed;
0563
0564
0565
0566
0567
0568
0569 struct drm_dp_desc {
0570 struct drm_dp_dpcd_ident ident;
0571 u32 quirks;
0572 };
0573
0574 int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc,
0575 bool is_branch);
0576
0577
0578
0579
0580
0581
0582
0583
0584 enum drm_dp_quirk {
0585
0586
0587
0588
0589
0590
0591 DP_DPCD_QUIRK_CONSTANT_N,
0592
0593
0594
0595
0596
0597
0598 DP_DPCD_QUIRK_NO_PSR,
0599
0600
0601
0602
0603
0604
0605
0606 DP_DPCD_QUIRK_NO_SINK_COUNT,
0607
0608
0609
0610
0611
0612
0613 DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD,
0614
0615
0616
0617
0618
0619
0620 DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_3_24_GBPS,
0621 };
0622
0623
0624
0625
0626
0627
0628
0629
0630 static inline bool
0631 drm_dp_has_quirk(const struct drm_dp_desc *desc, enum drm_dp_quirk quirk)
0632 {
0633 return desc->quirks & BIT(quirk);
0634 }
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646
0647
0648 struct drm_edp_backlight_info {
0649 u8 pwmgen_bit_count;
0650 u8 pwm_freq_pre_divider;
0651 u16 max;
0652
0653 bool lsb_reg_used : 1;
0654 bool aux_enable : 1;
0655 bool aux_set : 1;
0656 };
0657
0658 int
0659 drm_edp_backlight_init(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl,
0660 u16 driver_pwm_freq_hz, const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE],
0661 u16 *current_level, u8 *current_mode);
0662 int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
0663 u16 level);
0664 int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
0665 u16 level);
0666 int drm_edp_backlight_disable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl);
0667
0668 #if IS_ENABLED(CONFIG_DRM_KMS_HELPER) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
0669 (IS_MODULE(CONFIG_DRM_KMS_HELPER) && IS_MODULE(CONFIG_BACKLIGHT_CLASS_DEVICE)))
0670
0671 int drm_panel_dp_aux_backlight(struct drm_panel *panel, struct drm_dp_aux *aux);
0672
0673 #else
0674
0675 static inline int drm_panel_dp_aux_backlight(struct drm_panel *panel,
0676 struct drm_dp_aux *aux)
0677 {
0678 return 0;
0679 }
0680
0681 #endif
0682
0683 #ifdef CONFIG_DRM_DP_CEC
0684 void drm_dp_cec_irq(struct drm_dp_aux *aux);
0685 void drm_dp_cec_register_connector(struct drm_dp_aux *aux,
0686 struct drm_connector *connector);
0687 void drm_dp_cec_unregister_connector(struct drm_dp_aux *aux);
0688 void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid);
0689 void drm_dp_cec_unset_edid(struct drm_dp_aux *aux);
0690 #else
0691 static inline void drm_dp_cec_irq(struct drm_dp_aux *aux)
0692 {
0693 }
0694
0695 static inline void
0696 drm_dp_cec_register_connector(struct drm_dp_aux *aux,
0697 struct drm_connector *connector)
0698 {
0699 }
0700
0701 static inline void drm_dp_cec_unregister_connector(struct drm_dp_aux *aux)
0702 {
0703 }
0704
0705 static inline void drm_dp_cec_set_edid(struct drm_dp_aux *aux,
0706 const struct edid *edid)
0707 {
0708 }
0709
0710 static inline void drm_dp_cec_unset_edid(struct drm_dp_aux *aux)
0711 {
0712 }
0713
0714 #endif
0715
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725 struct drm_dp_phy_test_params {
0726 int link_rate;
0727 u8 num_lanes;
0728 u8 phy_pattern;
0729 u8 hbr2_reset[2];
0730 u8 custom80[10];
0731 bool enhanced_frame_cap;
0732 };
0733
0734 int drm_dp_get_phy_test_pattern(struct drm_dp_aux *aux,
0735 struct drm_dp_phy_test_params *data);
0736 int drm_dp_set_phy_test_pattern(struct drm_dp_aux *aux,
0737 struct drm_dp_phy_test_params *data, u8 dp_rev);
0738 int drm_dp_get_pcon_max_frl_bw(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0739 const u8 port_cap[4]);
0740 int drm_dp_pcon_frl_prepare(struct drm_dp_aux *aux, bool enable_frl_ready_hpd);
0741 bool drm_dp_pcon_is_frl_ready(struct drm_dp_aux *aux);
0742 int drm_dp_pcon_frl_configure_1(struct drm_dp_aux *aux, int max_frl_gbps,
0743 u8 frl_mode);
0744 int drm_dp_pcon_frl_configure_2(struct drm_dp_aux *aux, int max_frl_mask,
0745 u8 frl_type);
0746 int drm_dp_pcon_reset_frl_config(struct drm_dp_aux *aux);
0747 int drm_dp_pcon_frl_enable(struct drm_dp_aux *aux);
0748
0749 bool drm_dp_pcon_hdmi_link_active(struct drm_dp_aux *aux);
0750 int drm_dp_pcon_hdmi_link_mode(struct drm_dp_aux *aux, u8 *frl_trained_mask);
0751 void drm_dp_pcon_hdmi_frl_link_error_count(struct drm_dp_aux *aux,
0752 struct drm_connector *connector);
0753 bool drm_dp_pcon_enc_is_dsc_1_2(const u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE]);
0754 int drm_dp_pcon_dsc_max_slices(const u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE]);
0755 int drm_dp_pcon_dsc_max_slice_width(const u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE]);
0756 int drm_dp_pcon_dsc_bpp_incr(const u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE]);
0757 int drm_dp_pcon_pps_default(struct drm_dp_aux *aux);
0758 int drm_dp_pcon_pps_override_buf(struct drm_dp_aux *aux, u8 pps_buf[128]);
0759 int drm_dp_pcon_pps_override_param(struct drm_dp_aux *aux, u8 pps_param[6]);
0760 bool drm_dp_downstream_rgb_to_ycbcr_conversion(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
0761 const u8 port_cap[4], u8 color_spc);
0762 int drm_dp_pcon_convert_rgb_to_ycbcr(struct drm_dp_aux *aux, u8 color_spc);
0763
0764 #endif