aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvd0_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-11-12 08:52:07 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-12-21 04:01:37 -0500
commit8a46438a6a7492296c5dbfcc8e4a5106ab37bca8 (patch)
tree7eeea0d58375f973effc4d58937490955312765f /drivers/gpu/drm/nouveau/nvd0_display.c
parent3376ee374d2318d311bd3aa7b9bb0186f64ccca5 (diff)
drm/nvd0/disp: initialise overlay channels
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvd0_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvd0_display.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c
index dec1dd844d31..8fceebd110e6 100644
--- a/drivers/gpu/drm/nouveau/nvd0_display.c
+++ b/drivers/gpu/drm/nouveau/nvd0_display.c
@@ -35,8 +35,12 @@
35#include "nouveau_fb.h" 35#include "nouveau_fb.h"
36#include "nv50_display.h" 36#include "nv50_display.h"
37 37
38#define EVO_DMA_NR 9
39
38#define EVO_MASTER (0x00) 40#define EVO_MASTER (0x00)
39#define EVO_SYNC(c) (0x01 + (c)) 41#define EVO_SYNC(c) (0x01 + (c))
42#define EVO_OVLY(c) (0x05 + (c))
43#define EVO_OIMM(c) (0x09 + (c))
40#define EVO_CURS(c) (0x0d + (c)) 44#define EVO_CURS(c) (0x0d + (c))
41 45
42struct evo { 46struct evo {
@@ -52,7 +56,7 @@ struct evo {
52 56
53struct nvd0_display { 57struct nvd0_display {
54 struct nouveau_gpuobj *mem; 58 struct nouveau_gpuobj *mem;
55 struct evo evo[3]; 59 struct evo evo[9];
56 60
57 struct tasklet_struct tasklet; 61 struct tasklet_struct tasklet;
58 u32 modeset; 62 u32 modeset;
@@ -1642,9 +1646,11 @@ nvd0_display_fini(struct drm_device *dev)
1642{ 1646{
1643 int i; 1647 int i;
1644 1648
1645 /* fini cursors + syncs */ 1649 /* fini cursors + overlays + syncs */
1646 for (i = 1; i >= 0; i--) { 1650 for (i = 1; i >= 0; i--) {
1647 evo_fini_pio(dev, EVO_CURS(i)); 1651 evo_fini_pio(dev, EVO_CURS(i));
1652 evo_fini_pio(dev, EVO_OIMM(i));
1653 evo_fini_dma(dev, EVO_OVLY(i));
1648 evo_fini_dma(dev, EVO_SYNC(i)); 1654 evo_fini_dma(dev, EVO_SYNC(i));
1649 } 1655 }
1650 1656
@@ -1700,9 +1706,11 @@ nvd0_display_init(struct drm_device *dev)
1700 if (ret) 1706 if (ret)
1701 goto error; 1707 goto error;
1702 1708
1703 /* init syncs + cursors */ 1709 /* init syncs + overlays + cursors */
1704 for (i = 0; i < dev->mode_config.num_crtc; i++) { 1710 for (i = 0; i < dev->mode_config.num_crtc; i++) {
1705 if ((ret = evo_init_dma(dev, EVO_SYNC(i))) || 1711 if ((ret = evo_init_dma(dev, EVO_SYNC(i))) ||
1712 (ret = evo_init_dma(dev, EVO_OVLY(i))) ||
1713 (ret = evo_init_pio(dev, EVO_OIMM(i))) ||
1706 (ret = evo_init_pio(dev, EVO_CURS(i)))) 1714 (ret = evo_init_pio(dev, EVO_CURS(i))))
1707 goto error; 1715 goto error;
1708 } 1716 }
@@ -1736,7 +1744,7 @@ nvd0_display_destroy(struct drm_device *dev)
1736 struct pci_dev *pdev = dev->pdev; 1744 struct pci_dev *pdev = dev->pdev;
1737 int i; 1745 int i;
1738 1746
1739 for (i = 0; i < 3; i++) { 1747 for (i = 0; i < EVO_DMA_NR; i++) {
1740 struct evo *evo = &disp->evo[i]; 1748 struct evo *evo = &disp->evo[i];
1741 nouveau_bo_unmap(evo->sem.bo); 1749 nouveau_bo_unmap(evo->sem.bo);
1742 nouveau_bo_ref(NULL, &evo->sem.bo); 1750 nouveau_bo_ref(NULL, &evo->sem.bo);
@@ -1822,7 +1830,7 @@ nvd0_display_create(struct drm_device *dev)
1822 goto out; 1830 goto out;
1823 1831
1824 /* create evo dma channels */ 1832 /* create evo dma channels */
1825 for (i = 0; i < 3; i++) { 1833 for (i = 0; i < EVO_DMA_NR; i++) {
1826 struct evo *evo = &disp->evo[i]; 1834 struct evo *evo = &disp->evo[i];
1827 u32 dmao = 0x1000 + (i * 0x100); 1835 u32 dmao = 0x1000 + (i * 0x100);
1828 u32 hash = 0x0000 + (i * 0x040); 1836 u32 hash = 0x0000 + (i * 0x040);