summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-01-24 16:15:51 -0500
committerYounes Manton <younes.m@gmail.com>2009-01-24 16:18:20 -0500
commit0cd1ee764a1775d0a3da860ebb73e441adbaafb8 (patch)
tree3cf0901a4c590626154e989d999fdd5890abf345 /src
parent3af89cd3dec09b8cc5733cd45e2af05b689d0374 (diff)
g3dvl: Remove dead links to files that are now in libnouveaudrm.
Diffstat (limited to 'src')
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_device.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_local.h1
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c92
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c1
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c282
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h1
l---------src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c1
l---------src/gallium/winsys/g3dvl/nouveau/nv04_surface.c1
l---------src/gallium/winsys/g3dvl/nouveau/nv50_surface.c1
20 files changed, 0 insertions, 392 deletions
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c
deleted file mode 120000
index 1005282dd4..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_bo.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_bo.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c
deleted file mode 120000
index 5af8202950..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_channel.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_channel.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c
deleted file mode 120000
index 63f1fa040c..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_device.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_device.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c
deleted file mode 120000
index cd0d32e537..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_dma.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h
deleted file mode 120000
index e6c7d4bc96..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dma.h
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_dma.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h
deleted file mode 120000
index c8f9dbdc3a..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_dri.h
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_dri.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h
deleted file mode 120000
index 27082c9d34..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_drmif.h
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_drmif.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c
deleted file mode 120000
index 51a50527e6..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_fence.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_fence.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c
deleted file mode 120000
index db17c72e6d..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_grobj.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_grobj.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h
deleted file mode 120000
index 4e9d3042cb..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_local.h
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_local.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c
deleted file mode 100644
index f292586974..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#include <pipe/p_thread.h>
-#include <driclient.h>
-#include "nouveau_context.h"
-#include "nouveau_screen.h"
-
-pipe_static_mutex(lockMutex);
-
-static void
-nouveau_contended_lock(struct nouveau_context *nv, unsigned int flags)
-{
- dri_drawable_t *dri_drawable = nv->dri_drawable;
- dri_screen_t *dri_screen = nv->dri_context->dri_screen;
- struct nouveau_screen *nv_screen = nv->nv_screen;
- struct nouveau_device *dev = nv_screen->device;
- struct nouveau_device_priv *nvdev = nouveau_device(dev);
-
- drmGetLock(nvdev->fd, nvdev->ctx, flags);
-
- /* If the window moved, may need to set a new cliprect now.
- *
- * NOTE: This releases and regains the hw lock, so all state
- * checking must be done *after* this call:
- */
- if (dri_drawable)
- DRI_VALIDATE_DRAWABLE_INFO(dri_screen, dri_drawable);
-}
-
-/* Lock the hardware and validate our state.
- */
-void
-LOCK_HARDWARE(struct nouveau_context *nv)
-{
- struct nouveau_screen *nv_screen = nv->nv_screen;
- struct nouveau_device *dev = nv_screen->device;
- struct nouveau_device_priv *nvdev = nouveau_device(dev);
- char __ret=0;
-
- pipe_mutex_lock(lockMutex);
- assert(!nv->locked);
-
- DRM_CAS(nvdev->lock, nvdev->ctx,
- (DRM_LOCK_HELD | nvdev->ctx), __ret);
-
- if (__ret)
- nouveau_contended_lock(nv, 0);
- nv->locked = 1;
-}
-
-
-/* Unlock the hardware using the global current context
- */
-void
-UNLOCK_HARDWARE(struct nouveau_context *nv)
-{
- struct nouveau_screen *nv_screen = nv->nv_screen;
- struct nouveau_device *dev = nv_screen->device;
- struct nouveau_device_priv *nvdev = nouveau_device(dev);
-
- assert(nv->locked);
- nv->locked = 0;
-
- DRM_UNLOCK(nvdev->fd, nvdev->lock, nvdev->ctx);
-
- pipe_mutex_unlock(lockMutex);
-}
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c
deleted file mode 120000
index 703bc3ce4a..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_notifier.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_notifier.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c
deleted file mode 120000
index 4ac137cada..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_pushbuf.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_pushbuf.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c
deleted file mode 120000
index 2241af328f..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_resource.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_resource.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c
deleted file mode 120000
index ce4052d557..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_winsys.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
deleted file mode 100644
index 2d8463037f..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.c
+++ /dev/null
@@ -1,282 +0,0 @@
-#include "pipe/p_winsys.h"
-#include "pipe/p_defines.h"
-#include "pipe/p_inlines.h"
-#include "util/u_memory.h"
-
-#include "nouveau_context.h"
-#include "nouveau_local.h"
-#include "nouveau_screen.h"
-#include "nouveau_swapbuffers.h"
-#include "nouveau_winsys_pipe.h"
-
-static void
-nouveau_flush_frontbuffer(struct pipe_winsys *pws, struct pipe_surface *surf,
- void *context_private)
-{
- struct nouveau_context *nv = context_private;
- dri_drawable_t *dri_drawable = nv->dri_drawable;
-
- nouveau_copy_buffer(dri_drawable, surf, NULL);
-}
-
-static const char *
-nouveau_get_name(struct pipe_winsys *pws)
-{
- return "Nouveau/DRI";
-}
-
-static struct pipe_surface *
-nouveau_surface_alloc(struct pipe_winsys *ws)
-{
- struct pipe_surface *surf;
-
- surf = CALLOC_STRUCT(pipe_surface);
- if (!surf)
- return NULL;
-
- surf->refcount = 1;
- surf->winsys = ws;
- return surf;
-}
-
-/* Borrowed from Mesa's xm_winsys */
-static unsigned int
-round_up(unsigned n, unsigned multiple)
-{
- return (n + multiple - 1) & ~(multiple - 1);
-}
-
-static struct pipe_buffer *
-nouveau_surface_buffer_create
-(
- struct pipe_winsys *pws,
- unsigned width,
- unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned *stride
-)
-{
- const unsigned int ALIGNMENT = 256;
- struct pipe_format_block block;
- unsigned nblocksx, nblocksy;
-
- pf_get_block(format, &block);
- nblocksx = pf_get_nblocksx(&block, width);
- nblocksy = pf_get_nblocksy(&block, height);
- *stride = round_up(nblocksx * block.size, ALIGNMENT);
-
- return winsys->buffer_create(winsys, ALIGNMENT,
- usage,
- *stride * nblocksy);
-}
-
-static void
-nouveau_surface_release(struct pipe_winsys *ws, struct pipe_surface **s)
-{
- struct pipe_surface *surf = *s;
-
- *s = NULL;
- if (--surf->refcount <= 0) {
- if (surf->buffer)
- winsys_buffer_reference(ws, &surf->buffer, NULL);
- free(surf);
- }
-}
-
-static uint32_t
-nouveau_flags_from_usage(struct nouveau_context *nv, unsigned usage)
-{
- uint32_t flags = NOUVEAU_BO_LOCAL;
-
- if (usage & PIPE_BUFFER_USAGE_PIXEL) {
- if (usage & NOUVEAU_BUFFER_USAGE_TEXTURE)
- flags |= NOUVEAU_BO_GART;
- if (!(usage & PIPE_BUFFER_USAGE_CPU_READ_WRITE))
- flags |= NOUVEAU_BO_VRAM;
- }
-
- if (usage & PIPE_BUFFER_USAGE_VERTEX) {
- if (nv->cap.hw_vertex_buffer)
- flags |= NOUVEAU_BO_GART;
- }
-
- if (usage & PIPE_BUFFER_USAGE_INDEX) {
- if (nv->cap.hw_index_buffer)
- flags |= NOUVEAU_BO_GART;
- }
-
- return flags;
-}
-
-static struct pipe_buffer *
-nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment,
- unsigned usage, unsigned size)
-{
- struct nouveau_pipe_winsys *nvpws = (struct nouveau_pipe_winsys *)pws;
- struct nouveau_context *nv = nvpws->nv;
- struct nouveau_device *dev = nv->nv_screen->device;
- struct nouveau_pipe_buffer *nvbuf;
- uint32_t flags;
-
- nvbuf = calloc(1, sizeof(*nvbuf));
- if (!nvbuf)
- return NULL;
- nvbuf->base.refcount = 1;
- nvbuf->base.alignment = alignment;
- nvbuf->base.usage = usage;
- nvbuf->base.size = size;
-
- flags = nouveau_flags_from_usage(nv, usage);
-
- if (nouveau_bo_new(dev, flags, alignment, size, &nvbuf->bo)) {
- free(nvbuf);
- return NULL;
- }
-
- return &nvbuf->base;
-}
-
-static struct pipe_buffer *
-nouveau_pipe_bo_user_create(struct pipe_winsys *pws, void *ptr, unsigned bytes)
-{
- struct nouveau_pipe_winsys *nvpws = (struct nouveau_pipe_winsys *)pws;
- struct nouveau_device *dev = nvpws->nv->nv_screen->device;
- struct nouveau_pipe_buffer *nvbuf;
-
- nvbuf = calloc(1, sizeof(*nvbuf));
- if (!nvbuf)
- return NULL;
- nvbuf->base.refcount = 1;
- nvbuf->base.size = bytes;
-
- if (nouveau_bo_user(dev, ptr, bytes, &nvbuf->bo)) {
- free(nvbuf);
- return NULL;
- }
-
- return &nvbuf->base;
-}
-
-static void
-nouveau_pipe_bo_del(struct pipe_winsys *ws, struct pipe_buffer *buf)
-{
- struct nouveau_pipe_buffer *nvbuf = nouveau_buffer(buf);
-
- nouveau_bo_del(&nvbuf->bo);
- free(nvbuf);
-}
-
-static void *
-nouveau_pipe_bo_map(struct pipe_winsys *pws, struct pipe_buffer *buf,
- unsigned flags)
-{
- struct nouveau_pipe_buffer *nvbuf = nouveau_buffer(buf);
- uint32_t map_flags = 0;
-
- if (flags & PIPE_BUFFER_USAGE_CPU_READ)
- map_flags |= NOUVEAU_BO_RD;
- if (flags & PIPE_BUFFER_USAGE_CPU_WRITE)
- map_flags |= NOUVEAU_BO_WR;
-
- if ((map_flags & NOUVEAU_BO_RDWR) == NOUVEAU_BO_WR &&
- !nouveau_bo_busy(nvbuf->bo, map_flags)) {
- /* XXX: Technically incorrect. If the client maps a buffer for write-only
- * and leaves part of the buffer untouched it probably expects those parts
- * to remain intact. This is violated because we allocate a whole new buffer
- * and don't copy the previous buffer's contents, so this optimization is
- * only valid if the client intends to overwrite the whole buffer.
- */
- struct nouveau_pipe_winsys *nvpws = (struct nouveau_pipe_winsys *)pws;
- struct nouveau_context *nv = nvpws->nv;
- struct nouveau_device *dev = nv->nv_screen->device;
- struct nouveau_bo *rename;
- uint32_t flags = nouveau_flags_from_usage(nv, buf->usage);
-
- if (!nouveau_bo_new(dev, flags, buf->alignment, buf->size, &rename)) {
- nouveau_bo_del(&nvbuf->bo);
- nvbuf->bo = rename;
- }
- }
-
- if (nouveau_bo_map(nvbuf->bo, map_flags))
- return NULL;
- return nvbuf->bo->map;
-}
-
-static void
-nouveau_pipe_bo_unmap(struct pipe_winsys *pws, struct pipe_buffer *buf)
-{
- struct nouveau_pipe_buffer *nvbuf = nouveau_buffer(buf);
-
- nouveau_bo_unmap(nvbuf->bo);
-}
-
-static INLINE struct nouveau_fence *
-nouveau_pipe_fence(struct pipe_fence_handle *pfence)
-{
- return (struct nouveau_fence *)pfence;
-}
-
-static void
-nouveau_pipe_fence_reference(struct pipe_winsys *ws,
- struct pipe_fence_handle **ptr,
- struct pipe_fence_handle *pfence)
-{
- nouveau_fence_ref((void *)pfence, (void *)ptr);
-}
-
-static int
-nouveau_pipe_fence_signalled(struct pipe_winsys *ws,
- struct pipe_fence_handle *pfence, unsigned flag)
-{
- struct nouveau_pipe_winsys *nvpws = (struct nouveau_pipe_winsys *)ws;
- struct nouveau_fence *fence = nouveau_pipe_fence(pfence);
-
- if (nouveau_fence(fence)->signalled == 0)
- nouveau_fence_flush(nvpws->nv->nvc->channel);
-
- return !nouveau_fence(fence)->signalled;
-}
-
-static int
-nouveau_pipe_fence_finish(struct pipe_winsys *ws,
- struct pipe_fence_handle *pfence, unsigned flag)
-{
- struct nouveau_fence *fence = nouveau_pipe_fence(pfence);
- struct nouveau_fence *ref = NULL;
-
- nouveau_fence_ref(fence, &ref);
- return nouveau_fence_wait(&ref);
-}
-
-struct pipe_winsys *
-nouveau_create_pipe_winsys(struct nouveau_context *nv)
-{
- struct nouveau_pipe_winsys *nvpws;
- struct pipe_winsys *pws;
-
- nvpws = CALLOC_STRUCT(nouveau_pipe_winsys);
- if (!nvpws)
- return NULL;
- nvpws->nv = nv;
- pws = &nvpws->pws;
-
- pws->flush_frontbuffer = nouveau_flush_frontbuffer;
-
- pws->surface_buffer_create = nouveau_surface_buffer_create;
-
- pws->buffer_create = nouveau_pipe_bo_create;
- pws->buffer_destroy = nouveau_pipe_bo_del;
- pws->user_buffer_create = nouveau_pipe_bo_user_create;
- pws->buffer_map = nouveau_pipe_bo_map;
- pws->buffer_unmap = nouveau_pipe_bo_unmap;
-
- pws->fence_reference = nouveau_pipe_fence_reference;
- pws->fence_signalled = nouveau_pipe_fence_signalled;
- pws->fence_finish = nouveau_pipe_fence_finish;
-
- pws->get_name = nouveau_get_name;
-
- return &nvpws->pws;
-}
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h
deleted file mode 120000
index 9d9460883e..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_pipe.h
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_winsys_pipe.h \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c
deleted file mode 120000
index ec613ecbf6..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_winsys_softpipe.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nouveau_winsys_softpipe.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c b/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c
deleted file mode 120000
index 4455d8f924..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nv04_surface.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nv04_surface.c \ No newline at end of file
diff --git a/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c b/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c
deleted file mode 120000
index 19f102001e..0000000000
--- a/src/gallium/winsys/g3dvl/nouveau/nv50_surface.c
+++ /dev/null
@@ -1 +0,0 @@
-../../drm/nouveau/nv50_surface.c \ No newline at end of file