diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_hw.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_hw.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_hw.h b/drivers/gpu/drm/nouveau/nouveau_hw.h index 869130f83602..2989090b9434 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hw.h +++ b/drivers/gpu/drm/nouveau/nouveau_hw.h | |||
@@ -416,6 +416,25 @@ nv_fix_nv40_hw_cursor(struct drm_device *dev, int head) | |||
416 | } | 416 | } |
417 | 417 | ||
418 | static inline void | 418 | static inline void |
419 | nv_set_crtc_base(struct drm_device *dev, int head, uint32_t offset) | ||
420 | { | ||
421 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
422 | |||
423 | NVWriteCRTC(dev, head, NV_PCRTC_START, offset); | ||
424 | |||
425 | if (dev_priv->card_type == NV_04) { | ||
426 | /* | ||
427 | * Hilarious, the 24th bit doesn't want to stick to | ||
428 | * PCRTC_START... | ||
429 | */ | ||
430 | int cre_heb = NVReadVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX); | ||
431 | |||
432 | NVWriteVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX, | ||
433 | (cre_heb & ~0x40) | ((offset >> 18) & 0x40)); | ||
434 | } | ||
435 | } | ||
436 | |||
437 | static inline void | ||
419 | nv_show_cursor(struct drm_device *dev, int head, bool show) | 438 | nv_show_cursor(struct drm_device *dev, int head, bool show) |
420 | { | 439 | { |
421 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 440 | struct drm_nouveau_private *dev_priv = dev->dev_private; |