| .. | .. |
|---|
| 89 | 89 | } |
|---|
| 90 | 90 | |
|---|
| 91 | 91 | static const struct nvkm_ior_func |
|---|
| 92 | | -gm200_sor = { |
|---|
| 92 | +gm200_sor_hda = { |
|---|
| 93 | 93 | .route = { |
|---|
| 94 | 94 | .get = gm200_sor_route_get, |
|---|
| 95 | 95 | .set = gm200_sor_route_set, |
|---|
| .. | .. |
|---|
| 99 | 99 | .clock = gf119_sor_clock, |
|---|
| 100 | 100 | .hdmi = { |
|---|
| 101 | 101 | .ctrl = gk104_hdmi_ctrl, |
|---|
| 102 | + .scdc = gm200_hdmi_scdc, |
|---|
| 102 | 103 | }, |
|---|
| 103 | 104 | .dp = { |
|---|
| 104 | 105 | .lanes = { 0, 1, 2, 3 }, |
|---|
| .. | .. |
|---|
| 114 | 115 | .hda = { |
|---|
| 115 | 116 | .hpd = gf119_hda_hpd, |
|---|
| 116 | 117 | .eld = gf119_hda_eld, |
|---|
| 118 | + .device_entry = gf119_hda_device_entry, |
|---|
| 119 | + }, |
|---|
| 120 | +}; |
|---|
| 121 | + |
|---|
| 122 | +static const struct nvkm_ior_func |
|---|
| 123 | +gm200_sor = { |
|---|
| 124 | + .route = { |
|---|
| 125 | + .get = gm200_sor_route_get, |
|---|
| 126 | + .set = gm200_sor_route_set, |
|---|
| 127 | + }, |
|---|
| 128 | + .state = gf119_sor_state, |
|---|
| 129 | + .power = nv50_sor_power, |
|---|
| 130 | + .clock = gf119_sor_clock, |
|---|
| 131 | + .hdmi = { |
|---|
| 132 | + .ctrl = gk104_hdmi_ctrl, |
|---|
| 133 | + .scdc = gm200_hdmi_scdc, |
|---|
| 134 | + }, |
|---|
| 135 | + .dp = { |
|---|
| 136 | + .lanes = { 0, 1, 2, 3 }, |
|---|
| 137 | + .links = gf119_sor_dp_links, |
|---|
| 138 | + .power = g94_sor_dp_power, |
|---|
| 139 | + .pattern = gm107_sor_dp_pattern, |
|---|
| 140 | + .drive = gm200_sor_dp_drive, |
|---|
| 141 | + .vcpi = gf119_sor_dp_vcpi, |
|---|
| 142 | + .audio = gf119_sor_dp_audio, |
|---|
| 143 | + .audio_sym = gf119_sor_dp_audio_sym, |
|---|
| 144 | + .watermark = gf119_sor_dp_watermark, |
|---|
| 117 | 145 | }, |
|---|
| 118 | 146 | }; |
|---|
| 119 | 147 | |
|---|
| 120 | 148 | int |
|---|
| 121 | 149 | gm200_sor_new(struct nvkm_disp *disp, int id) |
|---|
| 122 | 150 | { |
|---|
| 151 | + struct nvkm_device *device = disp->engine.subdev.device; |
|---|
| 152 | + u32 hda; |
|---|
| 153 | + |
|---|
| 154 | + if (!((hda = nvkm_rd32(device, 0x08a15c)) & 0x40000000)) |
|---|
| 155 | + hda = nvkm_rd32(device, 0x101034); |
|---|
| 156 | + |
|---|
| 157 | + if (hda & BIT(id)) |
|---|
| 158 | + return nvkm_ior_new_(&gm200_sor_hda, disp, SOR, id); |
|---|
| 123 | 159 | return nvkm_ior_new_(&gm200_sor, disp, SOR, id); |
|---|
| 124 | 160 | } |
|---|