Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282632
b: refs/heads/master
c: 8a46438
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent a7d8690 commit d05bbba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3376ee374d2318d311bd3aa7b9bb0186f64ccca5
refs/heads/master: 8a46438a6a7492296c5dbfcc8e4a5106ab37bca8
18 changes: 13 additions & 5 deletions trunk/drivers/gpu/drm/nouveau/nvd0_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@
#include "nouveau_fb.h"
#include "nv50_display.h"

#define EVO_DMA_NR 9

#define EVO_MASTER (0x00)
#define EVO_SYNC(c) (0x01 + (c))
#define EVO_OVLY(c) (0x05 + (c))
#define EVO_OIMM(c) (0x09 + (c))
#define EVO_CURS(c) (0x0d + (c))

struct evo {
Expand All @@ -52,7 +56,7 @@ struct evo {

struct nvd0_display {
struct nouveau_gpuobj *mem;
struct evo evo[3];
struct evo evo[9];

struct tasklet_struct tasklet;
u32 modeset;
Expand Down Expand Up @@ -1642,9 +1646,11 @@ nvd0_display_fini(struct drm_device *dev)
{
int i;

/* fini cursors + syncs */
/* fini cursors + overlays + syncs */
for (i = 1; i >= 0; i--) {
evo_fini_pio(dev, EVO_CURS(i));
evo_fini_pio(dev, EVO_OIMM(i));
evo_fini_dma(dev, EVO_OVLY(i));
evo_fini_dma(dev, EVO_SYNC(i));
}

Expand Down Expand Up @@ -1700,9 +1706,11 @@ nvd0_display_init(struct drm_device *dev)
if (ret)
goto error;

/* init syncs + cursors */
/* init syncs + overlays + cursors */
for (i = 0; i < dev->mode_config.num_crtc; i++) {
if ((ret = evo_init_dma(dev, EVO_SYNC(i))) ||
(ret = evo_init_dma(dev, EVO_OVLY(i))) ||
(ret = evo_init_pio(dev, EVO_OIMM(i))) ||
(ret = evo_init_pio(dev, EVO_CURS(i))))
goto error;
}
Expand Down Expand Up @@ -1736,7 +1744,7 @@ nvd0_display_destroy(struct drm_device *dev)
struct pci_dev *pdev = dev->pdev;
int i;

for (i = 0; i < 3; i++) {
for (i = 0; i < EVO_DMA_NR; i++) {
struct evo *evo = &disp->evo[i];
nouveau_bo_unmap(evo->sem.bo);
nouveau_bo_ref(NULL, &evo->sem.bo);
Expand Down Expand Up @@ -1822,7 +1830,7 @@ nvd0_display_create(struct drm_device *dev)
goto out;

/* create evo dma channels */
for (i = 0; i < 3; i++) {
for (i = 0; i < EVO_DMA_NR; i++) {
struct evo *evo = &disp->evo[i];
u32 dmao = 0x1000 + (i * 0x100);
u32 hash = 0x0000 + (i * 0x040);
Expand Down

0 comments on commit d05bbba

Please sign in to comment.