1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVIF_OUTP_H__
3 #define __NVIF_OUTP_H__
4 #include <nvif/object.h>
5 #include <nvif/if0012.h>
6 #include <drm/display/drm_dp.h>
10 struct nvif_object object;
18 int nvif_outp_ctor(struct nvif_disp *, const char *name, int id, struct nvif_outp *);
19 void nvif_outp_dtor(struct nvif_outp *);
21 enum nvif_outp_detect_status {
27 enum nvif_outp_detect_status nvif_outp_detect(struct nvif_outp *);
28 int nvif_outp_edid_get(struct nvif_outp *, u8 **pedid);
30 int nvif_outp_load_detect(struct nvif_outp *, u32 loadval);
31 int nvif_outp_acquire_dac(struct nvif_outp *);
32 int nvif_outp_acquire_sor(struct nvif_outp *, bool hda);
33 int nvif_outp_acquire_pior(struct nvif_outp *);
34 int nvif_outp_acquire_dp(struct nvif_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE],
35 int link_nr, int link_bw, bool hda, bool mst);
36 int nvif_outp_inherit_rgb_crt(struct nvif_outp *outp, u8 *proto_out);
37 int nvif_outp_inherit_lvds(struct nvif_outp *outp, u8 *proto_out);
38 int nvif_outp_inherit_tmds(struct nvif_outp *outp, u8 *proto_out);
39 int nvif_outp_inherit_dp(struct nvif_outp *outp, u8 *proto_out);
41 void nvif_outp_release(struct nvif_outp *);
44 nvif_outp_acquired(struct nvif_outp *outp)
46 return outp->or.id >= 0;
49 int nvif_outp_bl_get(struct nvif_outp *);
50 int nvif_outp_bl_set(struct nvif_outp *, int level);
52 int nvif_outp_lvds(struct nvif_outp *, bool dual, bool bpc8);
54 int nvif_outp_hdmi(struct nvif_outp *, int head, bool enable, u8 max_ac_packet, u8 rekey, u32 khz,
55 bool scdc, bool scdc_scrambling, bool scdc_low_rates);
57 int nvif_outp_infoframe(struct nvif_outp *, u8 type, struct nvif_outp_infoframe_v0 *, u32 size);
58 int nvif_outp_hda_eld(struct nvif_outp *, int head, void *data, u32 size);
60 int nvif_outp_dp_aux_pwr(struct nvif_outp *, bool enable);
61 int nvif_outp_dp_aux_xfer(struct nvif_outp *, u8 type, u8 *size, u32 addr, u8 *data);
63 struct nvif_outp_dp_rate {
64 int dpcd; /* -1 for non-indexed rates */
68 int nvif_outp_dp_rates(struct nvif_outp *, struct nvif_outp_dp_rate *rate, int rate_nr);
70 int nvif_outp_dp_retrain(struct nvif_outp *);
71 int nvif_outp_dp_mst_vcpi(struct nvif_outp *, int head,
72 u8 start_slot, u8 num_slots, u16 pbn, u16 aligned_pbn);