u8 max_ac_packet, u8 rekey, u8 *avi, u8 avi_size,
u8 *vendor, u8 vendor_size);
} hdmi;
+
+ struct {
+ u8 lanes[4];
+ } dp;
};
int nvkm_ior_new_(const struct nvkm_ior_func *func, struct nvkm_disp *,
u32
g94_sor_dp_lane_map(struct nvkm_device *device, u8 lane)
{
- static const u8 gm100[] = { 0, 8, 16, 24 };
- static const u8 mcp89[] = { 24, 16, 8, 0 }; /* thanks, apple.. */
- static const u8 g94[] = { 16, 8, 0, 24 };
- if (device->chipset >= 0x110)
- return gm100[lane];
- if (device->chipset == 0xaf)
- return mcp89[lane];
- return g94[lane];
+ return nvkm_ior_find(device->disp, SOR, -1)->func->dp.lanes[lane] * 8;
}
static int
g94_sor = {
.state = g94_sor_state,
.power = nv50_sor_power,
+ .dp = {
+ .lanes = { 2, 1, 0, 3},
+ },
};
int
.hdmi = {
.ctrl = gf119_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 2, 1, 0, 3 },
+ },
};
int
.hdmi = {
.ctrl = gk104_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 2, 1, 0, 3 },
+ },
};
int
.hdmi = {
.ctrl = gk104_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 0, 1, 2, 3 },
+ },
};
int
static inline u32
gm200_sor_dp_lane_map(struct nvkm_device *device, u8 lane)
{
- return lane * 0x08;
+ return nvkm_ior_find(device->disp, SOR, -1)->func->dp.lanes[lane] * 8;
}
static int
.hdmi = {
.ctrl = gk104_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 0, 1, 2, 3 },
+ },
};
int
.hdmi = {
.ctrl = gt215_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 2, 1, 0, 3 },
+ },
};
int
.hdmi = {
.ctrl = g84_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 2, 1, 0, 3},
+ },
};
int
.hdmi = {
.ctrl = gt215_hdmi_ctrl,
},
+ .dp = {
+ .lanes = { 3, 2, 1, 0 },
+ },
};
int