diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-08-04 21:09:21 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-09-20 02:11:00 -0400 |
commit | 1b45dbe0bc5af68b87d4a535c520eec542c45447 (patch) | |
tree | 0eb1a56c87ea4b838ba635302a31e4d957744eb4 /drivers/gpu/drm | |
parent | 856ed888754e98b5933878f56b9c540b68dab1d6 (diff) |
drm/nouveau/dp: use alternate lane mask for nvaf
Naturally... Because Macs can't just be the same as everything else
now can they?
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 55782bd7df0f..7eb841c8ddd9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c | |||
@@ -342,16 +342,25 @@ dp_set_training_pattern(struct drm_device *dev, struct dp_state *dp, u8 tp) | |||
342 | auxch_tx(dev, dp->auxch, 8, DP_TRAINING_PATTERN_SET, &tp, 1); | 342 | auxch_tx(dev, dp->auxch, 8, DP_TRAINING_PATTERN_SET, &tp, 1); |
343 | } | 343 | } |
344 | 344 | ||
345 | static const u8 nv50_lane_map[] = { 16, 8, 0, 24 }; | ||
346 | static const u8 nvaf_lane_map[] = { 24, 16, 8, 0 }; | ||
347 | |||
345 | static int | 348 | static int |
346 | dp_link_train_commit(struct drm_device *dev, struct dp_state *dp) | 349 | dp_link_train_commit(struct drm_device *dev, struct dp_state *dp) |
347 | { | 350 | { |
351 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
348 | u32 mask = 0, drv = 0, pre = 0, unk = 0; | 352 | u32 mask = 0, drv = 0, pre = 0, unk = 0; |
349 | u8 shifts[4] = { 16, 8, 0, 24 }; | ||
350 | u8 *bios, *last, headerlen; | 353 | u8 *bios, *last, headerlen; |
354 | const u8 *shifts; | ||
351 | int link = dp->link; | 355 | int link = dp->link; |
352 | int or = dp->or; | 356 | int or = dp->or; |
353 | int i; | 357 | int i; |
354 | 358 | ||
359 | if (dev_priv->chipset != 0xaf) | ||
360 | shifts = nv50_lane_map; | ||
361 | else | ||
362 | shifts = nvaf_lane_map; | ||
363 | |||
355 | bios = nouveau_bios_dp_table(dev, dp->dcb, &headerlen); | 364 | bios = nouveau_bios_dp_table(dev, dp->dcb, &headerlen); |
356 | last = bios + headerlen + (bios[4] * 5); | 365 | last = bios + headerlen + (bios[4] * 5); |
357 | for (i = 0; i < dp->link_nr; i++) { | 366 | for (i = 0; i < dp->link_nr; i++) { |