diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-06-19 14:54:20 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-19 14:54:20 +1000 |
commit | 8ad0465e15bfc502abc259e886d6dcb448e0141a (patch) | |
tree | 107d4e24a103f78dc2fa5834b4128fe3f22b3571 | |
parent | 4b138ab18f58c6d459e21dc319615f536c8e69c8 (diff) |
50/c0/e0 -> tesla/fermi/kepler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | src/nouveau_copy.c | 6 | ||||
-rw-r--r-- | src/nouveau_dri2.c | 4 | ||||
-rw-r--r-- | src/nouveau_exa.c | 24 | ||||
-rw-r--r-- | src/nouveau_xv.c | 14 | ||||
-rw-r--r-- | src/nv04_exa.c | 2 | ||||
-rw-r--r-- | src/nv50_xv.c | 2 | ||||
-rw-r--r-- | src/nv_accel_common.c | 28 | ||||
-rw-r--r-- | src/nv_driver.c | 10 | ||||
-rw-r--r-- | src/nv_type.h | 7 | ||||
-rw-r--r-- | src/nvc0_accel.c | 6 | ||||
-rw-r--r-- | src/nvc0_accel.h | 2 |
11 files changed, 53 insertions, 52 deletions
diff --git a/src/nouveau_copy.c b/src/nouveau_copy.c index f4b7de8..c737834 100644 --- a/src/nouveau_copy.c +++ b/src/nouveau_copy.c @@ -60,18 +60,18 @@ nouveau_copy_init(ScreenPtr pScreen) } switch (pNv->Architecture) { - case NV_ARCH_50: + case NV_TESLA: data = &(struct nv04_fifo) { .vram = NvDmaFB, .gart = NvDmaTT, }; size = sizeof(struct nv04_fifo); break; - case NV_ARCH_C0: + case NV_FERMI: data = &(struct nvc0_fifo) {}; size = sizeof(struct nvc0_fifo); break; - case NV_ARCH_E0: + case NV_KEPLER: data = &(struct nve0_fifo) { .engine = NVE0_FIFO_ENGINE_CE0 | NVE0_FIFO_ENGINE_CE1, diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 12e7af3..778ecee 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -401,10 +401,10 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, 1); - if (pNv->Architecture >= NV_ARCH_C0) + if (pNv->Architecture >= NV_FERMI) NVC0SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); else - if (pNv->Architecture >= NV_ARCH_50) + if (pNv->Architecture >= NV_TESLA) NV50SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); else NV11SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 4e00ba6..2272d44 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -52,17 +52,17 @@ NVAccelM2MF(NVPtr pNv, int w, int h, int cpp, uint32_t srcoff, uint32_t dstoff, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else - if (pNv->Architecture >= NV_ARCH_E0) + if (pNv->Architecture >= NV_KEPLER) return NVE0EXARectCopy(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else - if (pNv->Architecture >= NV_ARCH_C0) + if (pNv->Architecture >= NV_FERMI) return NVC0EXARectM2MF(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else - if (pNv->Architecture >= NV_ARCH_50) + if (pNv->Architecture >= NV_TESLA) return NV50EXARectM2MF(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); @@ -202,7 +202,7 @@ nv50_style_tiled_pixmap(PixmapPtr ppix) ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); - return pNv->Architecture >= NV_ARCH_50 && + return pNv->Architecture >= NV_TESLA && nouveau_pixmap_bo(ppix)->config.nv50.memtype; } @@ -319,13 +319,13 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h, /* try hostdata transfer */ if (w * h * cpp < 16*1024) /* heuristic */ { - if (pNv->Architecture < NV_ARCH_50) { + if (pNv->Architecture < NV_TESLA) { if (NV04EXAUploadIFC(pScrn, src, src_pitch, pdpix, x, y, w, h, cpp)) { return TRUE; } } else - if (pNv->Architecture < NV_ARCH_C0) { + if (pNv->Architecture < NV_FERMI) { if (NV50EXAUploadSIFC(src, src_pitch, pdpix, x, y, w, h, cpp)) { return TRUE; @@ -441,7 +441,7 @@ nouveau_exa_init(ScreenPtr pScreen) exa->SetSharedPixmapBacking = nouveau_exa_set_shared_pixmap_backing; #endif - if (pNv->Architecture >= NV_ARCH_50) { + if (pNv->Architecture >= NV_TESLA) { exa->maxX = 8192; exa->maxY = 8192; } else @@ -459,7 +459,7 @@ nouveau_exa_init(ScreenPtr pScreen) exa->DownloadFromScreen = nouveau_exa_download_from_screen; exa->UploadToScreen = nouveau_exa_upload_to_screen; - if (pNv->Architecture < NV_ARCH_50) { + if (pNv->Architecture < NV_TESLA) { exa->PrepareCopy = NV04EXAPrepareCopy; exa->Copy = NV04EXACopy; exa->DoneCopy = NV04EXADoneCopy; @@ -468,7 +468,7 @@ nouveau_exa_init(ScreenPtr pScreen) exa->Solid = NV04EXASolid; exa->DoneSolid = NV04EXADoneSolid; } else - if (pNv->Architecture < NV_ARCH_C0) { + if (pNv->Architecture < NV_FERMI) { exa->PrepareCopy = NV50EXAPrepareCopy; exa->Copy = NV50EXACopy; exa->DoneCopy = NV50EXADoneCopy; @@ -506,14 +506,14 @@ nouveau_exa_init(ScreenPtr pScreen) exa->Composite = NV40EXAComposite; exa->DoneComposite = NV40EXADoneComposite; break; - case NV_ARCH_50: + case NV_TESLA: exa->CheckComposite = NV50EXACheckComposite; exa->PrepareComposite = NV50EXAPrepareComposite; exa->Composite = NV50EXAComposite; exa->DoneComposite = NV50EXADoneComposite; break; - case NV_ARCH_C0: - case NV_ARCH_E0: + case NV_FERMI: + case NV_KEPLER: exa->CheckComposite = NVC0EXACheckComposite; exa->PrepareComposite = NVC0EXAPrepareComposite; exa->Composite = NVC0EXAComposite; diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index b6c1dac..162b146 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -257,10 +257,10 @@ nouveau_xv_bo_realloc(ScrnInfoPtr pScrn, unsigned flags, unsigned size, } if (flags & NOUVEAU_BO_VRAM) { - if (pNv->Architecture == NV_ARCH_50) + if (pNv->Architecture == NV_TESLA) config.nv50.memtype = 0x70; else - if (pNv->Architecture >= NV_ARCH_C0) + if (pNv->Architecture >= NV_FERMI) config.nvc0.memtype = 0xfe; } flags |= NOUVEAU_BO_MAP; @@ -729,7 +729,7 @@ NV_calculate_pitches_and_mem_size(NVPtr pNv, int action_flags, int *srcPitch, { int tmp; - if (pNv->Architecture >= NV_ARCH_50) { + if (pNv->Architecture >= NV_TESLA) { npixels = (npixels + 7) & ~7; nlines = (nlines + 7) & ~7; } @@ -1080,7 +1080,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, pPriv->TT_mem_chunk[pPriv->currentHostBuffer]; } if (!destination_buffer) { - if (pNv->Architecture >= NV_ARCH_50) { + if (pNv->Architecture >= NV_TESLA) { NOUVEAU_ERR("No scratch buffer for tiled upload\n"); return BadAlloc; } @@ -1283,7 +1283,7 @@ CPU_copy: src_w, src_h, drw_w, drw_h, clipBoxes, ppix, pPriv); } else - if (pNv->Architecture == NV_ARCH_50) { + if (pNv->Architecture == NV_TESLA) { ret = nv50_xv_image_put(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, @@ -2048,7 +2048,7 @@ NVSetupTexturedVideo (ScreenPtr pScreen, XF86VideoAdaptorPtr *textureAdaptor) textureAdaptor[0] = NV40SetupTexturedVideo(pScreen, FALSE); textureAdaptor[1] = NV40SetupTexturedVideo(pScreen, TRUE); } else - if (pNv->Architecture >= NV_ARCH_50) { + if (pNv->Architecture >= NV_TESLA) { textureAdaptor[0] = NV50SetupTexturedVideo(pScreen); } } @@ -2082,7 +2082,7 @@ NVInitVideo(ScreenPtr pScreen) if (pScrn->bitsPerPixel != 8 && pNv->AccelMethod == EXA) { xvSyncToVBlank = MAKE_ATOM("XV_SYNC_TO_VBLANK"); - if (pNv->Architecture < NV_ARCH_50) { + if (pNv->Architecture < NV_TESLA) { overlayAdaptor = NVSetupOverlayVideo(pScreen); blitAdaptor = NVSetupBlitVideo(pScreen); } diff --git a/src/nv04_exa.c b/src/nv04_exa.c index ca92868..7a58dd7 100644 --- a/src/nv04_exa.c +++ b/src/nv04_exa.c @@ -289,7 +289,7 @@ NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch, int padbytes; Bool ret = FALSE; - if (pNv->Architecture >= NV_ARCH_50) + if (pNv->Architecture >= NV_TESLA) return FALSE; if (h > 1024) diff --git a/src/nv50_xv.c b/src/nv50_xv.c index 8ab7202..909074a 100644 --- a/src/nv50_xv.c +++ b/src/nv50_xv.c @@ -326,7 +326,7 @@ nv50_xv_csc_update(ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) off[1] = Loff * yco + Coff * (uco[1] + vco[1]) + bright; off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright; - if (pNv->Architecture >= NV_ARCH_C0) { + if (pNv->Architecture >= NV_FERMI) { nvc0_xv_csc_update(pNv, yco, off, uco, vco); return; } diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c index a55171b..d059f48 100644 --- a/src/nv_accel_common.c +++ b/src/nv_accel_common.c @@ -48,7 +48,7 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, if (bpp >= 8) flags |= shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM; - if (pNv->Architecture >= NV_ARCH_50) { + if (pNv->Architecture >= NV_TESLA) { if (scanout) { if (pNv->tiled_scanout) { tiled = TRUE; @@ -68,7 +68,7 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, } if (tiled) { - if (pNv->Architecture >= NV_ARCH_C0) { + if (pNv->Architecture >= NV_FERMI) { if (height > 64) cfg.nvc0.tile_mode = 0x040; else if (height > 32) cfg.nvc0.tile_mode = 0x030; else if (height > 16) cfg.nvc0.tile_mode = 0x020; @@ -82,7 +82,7 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, height = NOUVEAU_ALIGN(height, NVC0_TILE_HEIGHT(cfg.nv50.tile_mode)); - } else if (pNv->Architecture >= NV_ARCH_50) { + } else if (pNv->Architecture >= NV_TESLA) { if (height > 32) cfg.nv50.tile_mode = 0x040; else if (height > 16) cfg.nv50.tile_mode = 0x030; else if (height > 8) cfg.nv50.tile_mode = 0x020; @@ -108,7 +108,7 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, } } - if (pNv->Architecture < NV_ARCH_50) { + if (pNv->Architecture < NV_TESLA) { if (bpp == 16) cfg.nv04.surf_flags |= NV04_BO_16BPP; if (bpp == 32) @@ -640,7 +640,7 @@ NVAccelCommonInit(ScrnInfoPtr pScrn) return FALSE; } - if (pNv->Architecture < NV_ARCH_C0) { + if (pNv->Architecture < NV_FERMI) { data = &nv04_data; size = sizeof(nv04_data); } else { @@ -685,13 +685,13 @@ NVAccelCommonInit(ScrnInfoPtr pScrn) } /* General engine objects */ - if (pNv->Architecture < NV_ARCH_C0) { + if (pNv->Architecture < NV_FERMI) { INIT_CONTEXT_OBJECT(DmaNotifier0); INIT_CONTEXT_OBJECT(Null); } /* 2D engine */ - if (pNv->Architecture < NV_ARCH_50) { + if (pNv->Architecture < NV_TESLA) { INIT_CONTEXT_OBJECT(ContextSurfaces); INIT_CONTEXT_OBJECT(ContextBeta1); INIT_CONTEXT_OBJECT(ContextBeta4); @@ -703,19 +703,19 @@ NVAccelCommonInit(ScrnInfoPtr pScrn) INIT_CONTEXT_OBJECT(ClipRectangle); INIT_CONTEXT_OBJECT(ImageFromCpu); } else - if (pNv->Architecture < NV_ARCH_C0) { + if (pNv->Architecture < NV_FERMI) { INIT_CONTEXT_OBJECT(2D_NV50); } else { INIT_CONTEXT_OBJECT(2D_NVC0); } - if (pNv->Architecture < NV_ARCH_50) + if (pNv->Architecture < NV_TESLA) INIT_CONTEXT_OBJECT(MemFormat); else - if (pNv->Architecture < NV_ARCH_C0) + if (pNv->Architecture < NV_FERMI) INIT_CONTEXT_OBJECT(M2MF_NV50); else - if (pNv->Architecture < NV_ARCH_E0) + if (pNv->Architecture < NV_KEPLER) INIT_CONTEXT_OBJECT(M2MF_NVC0); else { INIT_CONTEXT_OBJECT(P2MF_NVE0); @@ -724,11 +724,11 @@ NVAccelCommonInit(ScrnInfoPtr pScrn) /* 3D init */ switch (pNv->Architecture) { - case NV_ARCH_C0: - case NV_ARCH_E0: + case NV_FERMI: + case NV_KEPLER: INIT_CONTEXT_OBJECT(3D_NVC0); break; - case NV_ARCH_50: + case NV_TESLA: INIT_CONTEXT_OBJECT(NV50TCL); break; case NV_ARCH_40: diff --git a/src/nv_driver.c b/src/nv_driver.c index 8b15b1c..9e015de 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -895,16 +895,16 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) case 0x80: case 0x90: case 0xa0: - pNv->Architecture = NV_ARCH_50; + pNv->Architecture = NV_TESLA; break; case 0xc0: case 0xd0: - pNv->Architecture = NV_ARCH_C0; + pNv->Architecture = NV_FERMI; break; case 0xe0: case 0xf0: case 0x100: - pNv->Architecture = NV_ARCH_E0; + pNv->Architecture = NV_KEPLER; break; default: return FALSE; @@ -930,7 +930,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) break; case 30: /* OK on NV50 KMS */ - if (pNv->Architecture < NV_ARCH_50) + if (pNv->Architecture < NV_TESLA) NVPreInitFail("Depth 30 supported on G80+ only\n"); break; case 15: /* 15 may get done one day, so leave any code for it in place */ @@ -1031,7 +1031,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) } if (pNv->AccelMethod > NONE) { - if (pNv->Architecture >= NV_ARCH_50) + if (pNv->Architecture >= NV_TESLA) pNv->wfb_enabled = xf86ReturnOptValBool( pNv->Options, OPTION_WFB, FALSE); diff --git a/src/nv_type.h b/src/nv_type.h index 076e000..a1133b6 100644 --- a/src/nv_type.h +++ b/src/nv_type.h @@ -19,9 +19,10 @@ #define NV_ARCH_20 0x20 #define NV_ARCH_30 0x30 #define NV_ARCH_40 0x40 -#define NV_ARCH_50 0x50 -#define NV_ARCH_C0 0xc0 -#define NV_ARCH_E0 0xe0 +#define NV_TESLA 0x50 +#define NV_FERMI 0xc0 +#define NV_KEPLER 0xe0 +#define NV_MAXWELL 0x110 struct xf86_platform_device; diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c index 1b36e4f..f76cbfa 100644 --- a/src/nvc0_accel.c +++ b/src/nvc0_accel.c @@ -211,7 +211,7 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) uint32_t class, handle; int ret; - if (pNv->Architecture < NV_ARCH_E0) { + if (pNv->Architecture < NV_KEPLER) { class = 0x9097; handle = 0x001f906e; } else @@ -279,7 +279,7 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(LINKED_TSC), 1); PUSH_DATA (push, 1); - if (pNv->Architecture < NV_ARCH_E0) { + if (pNv->Architecture < NV_KEPLER) { BEGIN_NVC0(push, NVC0_3D(TEX_LIMITS(4)), 1); PUSH_DATA (push, 0x54); BEGIN_NIC0(push, NVC0_3D(BIND_TIC(4)), 2); @@ -307,7 +307,7 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) BEGIN_NVC0(push, NVC0_3D(CODE_ADDRESS_HIGH), 2); PUSH_DATA (push, (bo->offset + CODE_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + CODE_OFFSET)); - if (pNv->Architecture < NV_ARCH_E0) { + if (pNv->Architecture < NV_KEPLER) { NVC0PushProgram(pNv, PVP_PASS, NVC0VP_Transform2); NVC0PushProgram(pNv, PFP_S, NVC0FP_Source); NVC0PushProgram(pNv, PFP_C, NVC0FP_Composite); diff --git a/src/nvc0_accel.h b/src/nvc0_accel.h index e340d18..4c3bb0f 100644 --- a/src/nvc0_accel.h +++ b/src/nvc0_accel.h @@ -34,7 +34,7 @@ #define MISC_OFFSET 0x10000 /* vertex/fragment programs */ -#define SPO ((pNv->Architecture < NV_ARCH_E0) ? 0x0000 : 0x0030) +#define SPO ((pNv->Architecture < NV_KEPLER) ? 0x0000 : 0x0030) #define PVP_PASS (0x0000 + SPO) /* vertex pass-through shader */ #define PFP_S (0x0200 + SPO) /* (src) */ #define PFP_C (0x0400 + SPO) /* (src IN mask) */ |