.. | .. |
---|
33 | 33 | #include <drm/drm_dp_mst_helper.h> |
---|
34 | 34 | #include "dispnv04/disp.h" |
---|
35 | 35 | struct nv50_head_atom; |
---|
| 36 | +struct nouveau_connector; |
---|
36 | 37 | |
---|
37 | 38 | #define NV_DPMS_CLEARED 0x80 |
---|
38 | 39 | |
---|
.. | .. |
---|
52 | 53 | * actually programmed on the hw, not the proposed crtc */ |
---|
53 | 54 | struct drm_crtc *crtc; |
---|
54 | 55 | u32 ctrl; |
---|
| 56 | + bool audio; |
---|
55 | 57 | |
---|
56 | 58 | struct drm_display_mode mode; |
---|
57 | 59 | int last_dpms; |
---|
.. | .. |
---|
63 | 65 | struct nv50_mstm *mstm; |
---|
64 | 66 | int link_nr; |
---|
65 | 67 | int link_bw; |
---|
| 68 | + |
---|
| 69 | + /* Protects DP state that needs to be accessed outside |
---|
| 70 | + * connector reprobing contexts |
---|
| 71 | + */ |
---|
| 72 | + struct mutex hpd_irq_lock; |
---|
| 73 | + |
---|
| 74 | + u8 dpcd[DP_RECEIVER_CAP_SIZE]; |
---|
| 75 | + u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS]; |
---|
| 76 | + struct drm_dp_desc desc; |
---|
| 77 | + |
---|
| 78 | + u8 sink_count; |
---|
66 | 79 | } dp; |
---|
67 | 80 | }; |
---|
| 81 | + |
---|
| 82 | + struct { |
---|
| 83 | + bool dp_interlace : 1; |
---|
| 84 | + } caps; |
---|
68 | 85 | |
---|
69 | 86 | void (*enc_save)(struct drm_encoder *encoder); |
---|
70 | 87 | void (*enc_restore)(struct drm_encoder *encoder); |
---|
71 | 88 | void (*update)(struct nouveau_encoder *, u8 head, |
---|
72 | 89 | struct nv50_head_atom *, u8 proto, u8 depth); |
---|
| 90 | +}; |
---|
| 91 | + |
---|
| 92 | +struct nv50_mstm { |
---|
| 93 | + struct nouveau_encoder *outp; |
---|
| 94 | + |
---|
| 95 | + struct drm_dp_mst_topology_mgr mgr; |
---|
| 96 | + |
---|
| 97 | + /* Protected under nouveau_encoder->dp.hpd_irq_lock */ |
---|
| 98 | + bool can_mst; |
---|
| 99 | + bool is_mst; |
---|
| 100 | + bool suspended; |
---|
| 101 | + |
---|
| 102 | + bool modified; |
---|
| 103 | + bool disabled; |
---|
| 104 | + int links; |
---|
73 | 105 | }; |
---|
74 | 106 | |
---|
75 | 107 | struct nouveau_encoder * |
---|
.. | .. |
---|
95 | 127 | |
---|
96 | 128 | /* nouveau_dp.c */ |
---|
97 | 129 | enum nouveau_dp_status { |
---|
| 130 | + NOUVEAU_DP_NONE, |
---|
98 | 131 | NOUVEAU_DP_SST, |
---|
99 | 132 | NOUVEAU_DP_MST, |
---|
100 | 133 | }; |
---|
101 | 134 | |
---|
102 | | -int nouveau_dp_detect(struct nouveau_encoder *); |
---|
| 135 | +int nouveau_dp_detect(struct nouveau_connector *, struct nouveau_encoder *); |
---|
| 136 | +void nouveau_dp_irq(struct nouveau_drm *drm, |
---|
| 137 | + struct nouveau_connector *nv_connector); |
---|
| 138 | +enum drm_mode_status nv50_dp_mode_valid(struct drm_connector *, |
---|
| 139 | + struct nouveau_encoder *, |
---|
| 140 | + const struct drm_display_mode *, |
---|
| 141 | + unsigned *clock); |
---|
103 | 142 | |
---|
104 | 143 | struct nouveau_connector * |
---|
105 | | -nouveau_encoder_connector_get(struct nouveau_encoder *encoder); |
---|
| 144 | +nv50_outp_get_new_connector(struct nouveau_encoder *outp, |
---|
| 145 | + struct drm_atomic_state *state); |
---|
| 146 | +struct nouveau_connector * |
---|
| 147 | +nv50_outp_get_old_connector(struct nouveau_encoder *outp, |
---|
| 148 | + struct drm_atomic_state *state); |
---|
106 | 149 | |
---|
107 | | -int nv50_mstm_detect(struct nv50_mstm *, u8 dpcd[8], int allow); |
---|
108 | | -void nv50_mstm_remove(struct nv50_mstm *); |
---|
109 | | -void nv50_mstm_service(struct nv50_mstm *); |
---|
| 150 | +int nv50_mstm_detect(struct nouveau_encoder *encoder); |
---|
| 151 | +void nv50_mstm_remove(struct nv50_mstm *mstm); |
---|
| 152 | +bool nv50_mstm_service(struct nouveau_drm *drm, |
---|
| 153 | + struct nouveau_connector *nv_connector, |
---|
| 154 | + struct nv50_mstm *mstm); |
---|
110 | 155 | #endif /* __NOUVEAU_ENCODER_H__ */ |
---|