summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h3
l---------src/mesa/drivers/dri/r200/radeon_bo_int_drm.h1
l---------src/mesa/drivers/dri/r200/radeon_bocs_wrapper.h1
l---------src/mesa/drivers/dri/r200/radeon_cs_int_drm.h1
l---------src/mesa/drivers/dri/r200/radeon_cs_legacy.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_drm.h75
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_int_drm.h45
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cmdbuf.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_drm.h141
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_int_drm.h66
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.h3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c2
14 files changed, 4 insertions, 351 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index 60c1f618b9a..02a06a32b42 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -38,7 +38,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/simple_list.h"
#include "radeon_dri.h"
-#include "radeon_bocs_wrapper.h"
+#include "radeon_bo_gem.h"
+#include "radeon_cs_gem.h"
#include "xf86drm.h"
#include "drm.h"
diff --git a/src/mesa/drivers/dri/r200/radeon_bo_int_drm.h b/src/mesa/drivers/dri/r200/radeon_bo_int_drm.h
deleted file mode 120000
index 029450928be..00000000000
--- a/src/mesa/drivers/dri/r200/radeon_bo_int_drm.h
+++ /dev/null
@@ -1 +0,0 @@
-../radeon/radeon_bo_int_drm.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_bocs_wrapper.h b/src/mesa/drivers/dri/r200/radeon_bocs_wrapper.h
deleted file mode 120000
index ca894b2443c..00000000000
--- a/src/mesa/drivers/dri/r200/radeon_bocs_wrapper.h
+++ /dev/null
@@ -1 +0,0 @@
-../radeon/radeon_bocs_wrapper.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_cs_int_drm.h b/src/mesa/drivers/dri/r200/radeon_cs_int_drm.h
deleted file mode 120000
index 462f5245d0e..00000000000
--- a/src/mesa/drivers/dri/r200/radeon_cs_int_drm.h
+++ /dev/null
@@ -1 +0,0 @@
-../radeon/radeon_cs_int_drm.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_cs_legacy.c b/src/mesa/drivers/dri/r200/radeon_cs_legacy.c
deleted file mode 120000
index 006720f8a46..00000000000
--- a/src/mesa/drivers/dri/r200/radeon_cs_legacy.c
+++ /dev/null
@@ -1 +0,0 @@
-../radeon/radeon_cs_legacy.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h b/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
deleted file mode 100644
index beb2369880a..00000000000
--- a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright © 2008 Jérôme Glisse
- * 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 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 THE COPYRIGHT HOLDERS, AUTHORS
- * 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- */
-/*
- * Authors:
- * Jérôme Glisse <[email protected]>
- */
-#ifndef RADEON_BO_H
-#define RADEON_BO_H
-
-#include <stdio.h>
-#include <stdint.h>
-
-/* bo object */
-#define RADEON_BO_FLAGS_MACRO_TILE 1
-#define RADEON_BO_FLAGS_MICRO_TILE 2
-
-struct radeon_bo_manager;
-struct radeon_cs;
-
-struct radeon_bo {
- void *ptr;
- uint32_t flags;
- uint32_t handle;
- uint32_t size;
-};
-
-struct radeon_bo_manager;
-
-void radeon_bo_debug(struct radeon_bo *bo,
- const char *op);
-
-struct radeon_bo *radeon_bo_open(struct radeon_bo_manager *bom,
- uint32_t handle,
- uint32_t size,
- uint32_t alignment,
- uint32_t domains,
- uint32_t flags);
-
-void radeon_bo_ref(struct radeon_bo *bo);
-struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo);
-int radeon_bo_map(struct radeon_bo *bo, int write);
-int radeon_bo_unmap(struct radeon_bo *bo);
-int radeon_bo_wait(struct radeon_bo *bo);
-int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain);
-int radeon_bo_set_tiling(struct radeon_bo *bo, uint32_t tiling_flags, uint32_t pitch);
-int radeon_bo_get_tiling(struct radeon_bo *bo, uint32_t *tiling_flags, uint32_t *pitch);
-int radeon_bo_is_static(struct radeon_bo *bo);
-int radeon_bo_is_referenced_by_cs(struct radeon_bo *bo,
- struct radeon_cs *cs);
-uint32_t radeon_bo_get_handle(struct radeon_bo *bo);
-uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo);
-#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_int_drm.h b/src/mesa/drivers/dri/radeon/radeon_bo_int_drm.h
deleted file mode 100644
index 190c332475b..00000000000
--- a/src/mesa/drivers/dri/radeon/radeon_bo_int_drm.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef RADEON_BO_INT
-#define RADEON_BO_INT
-
-struct radeon_bo_manager {
- struct radeon_bo_funcs *funcs;
- int fd;
-};
-
-struct radeon_bo_int {
- void *ptr;
- uint32_t flags;
- uint32_t handle;
- uint32_t size;
- /* private members */
- uint32_t alignment;
- uint32_t domains;
- unsigned cref;
- struct radeon_bo_manager *bom;
- uint32_t space_accounted;
- uint32_t referenced_in_cs;
-};
-
-/* bo functions */
-struct radeon_bo_funcs {
- struct radeon_bo *(*bo_open)(struct radeon_bo_manager *bom,
- uint32_t handle,
- uint32_t size,
- uint32_t alignment,
- uint32_t domains,
- uint32_t flags);
- void (*bo_ref)(struct radeon_bo_int *bo);
- struct radeon_bo *(*bo_unref)(struct radeon_bo_int *bo);
- int (*bo_map)(struct radeon_bo_int *bo, int write);
- int (*bo_unmap)(struct radeon_bo_int *bo);
- int (*bo_wait)(struct radeon_bo_int *bo);
- int (*bo_is_static)(struct radeon_bo_int *bo);
- int (*bo_set_tiling)(struct radeon_bo_int *bo, uint32_t tiling_flags,
- uint32_t pitch);
- int (*bo_get_tiling)(struct radeon_bo_int *bo, uint32_t *tiling_flags,
- uint32_t *pitch);
- int (*bo_is_busy)(struct radeon_bo_int *bo, uint32_t *domain);
- int (*bo_is_referenced_by_cs)(struct radeon_bo_int *bo, struct radeon_cs *cs);
-};
-
-#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
deleted file mode 100644
index ef688b8ddfa..00000000000
--- a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef RADEON_CS_WRAPPER_H
-#define RADEON_CS_WRAPPER_H
-
-/* to be used to build locally in mesa with no libdrm bits */
-#include "../radeon/radeon_bo_drm.h"
-#include "../radeon/radeon_cs_drm.h"
-
-#include "radeon_bo.h"
-#include "radeon_bo_gem.h"
-#include "radeon_cs.h"
-#include "radeon_cs_gem.h"
-
-#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_cmdbuf.h b/src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
index c5310abfe9b..603f7fc9a04 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
+++ b/src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
@@ -1,8 +1,6 @@
#ifndef COMMON_CMDBUF_H
#define COMMON_CMDBUF_H
-#include "radeon_bocs_wrapper.h"
-
GLboolean rcommonEnsureCmdBufSpace(radeonContextPtr rmesa, int dwords, const char *caller);
int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller);
int rcommonFlushCmdBufLocked(radeonContextPtr rmesa, const char *caller);
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index c7ba2afc473..8f682175afb 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -53,7 +53,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "vblank.h"
#include "radeon_common.h"
-#include "radeon_bocs_wrapper.h"
#include "radeon_drm.h"
#include "radeon_queryobj.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_drm.h b/src/mesa/drivers/dri/radeon/radeon_cs_drm.h
deleted file mode 100644
index a3f1750c6ed..00000000000
--- a/src/mesa/drivers/dri/radeon/radeon_cs_drm.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright © 2008 Nicolai Haehnle
- * Copyright © 2008 Jérôme Glisse
- * 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 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
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- */
-/*
- * Authors:
- * Aapo Tahkola <[email protected]>
- * Nicolai Haehnle <[email protected]>
- * Jérôme Glisse <[email protected]>
- */
-#ifndef RADEON_CS_H
-#define RADEON_CS_H
-
-#include <stdint.h>
-#include <string.h>
-#include "drm.h"
-#include "radeon_drm.h"
-#include "radeon_bo_drm.h"
-
-struct radeon_cs_reloc {
- struct radeon_bo *bo;
- uint32_t read_domain;
- uint32_t write_domain;
- uint32_t flags;
-};
-
-
-#define RADEON_CS_SPACE_OK 0
-#define RADEON_CS_SPACE_OP_TO_BIG 1
-#define RADEON_CS_SPACE_FLUSH 2
-
-struct radeon_cs {
- uint32_t *packets;
- unsigned cdw;
- unsigned ndw;
- unsigned section_ndw;
- unsigned section_cdw;
-};
-
-#define MAX_SPACE_BOS (32)
-
-struct radeon_cs_manager;
-
-extern struct radeon_cs *radeon_cs_create(struct radeon_cs_manager *csm,
- uint32_t ndw);
-
-extern int radeon_cs_begin(struct radeon_cs *cs,
- uint32_t ndw,
- const char *file,
- const char *func, int line);
-extern int radeon_cs_end(struct radeon_cs *cs,
- const char *file,
- const char *func,
- int line);
-extern int radeon_cs_emit(struct radeon_cs *cs);
-extern int radeon_cs_destroy(struct radeon_cs *cs);
-extern int radeon_cs_erase(struct radeon_cs *cs);
-extern int radeon_cs_need_flush(struct radeon_cs *cs);
-extern void radeon_cs_print(struct radeon_cs *cs, FILE *file);
-extern void radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit);
-extern void radeon_cs_space_set_flush(struct radeon_cs *cs, void (*fn)(void *), void *data);
-extern int radeon_cs_write_reloc(struct radeon_cs *cs,
- struct radeon_bo *bo,
- uint32_t read_domain,
- uint32_t write_domain,
- uint32_t flags);
-
-/*
- * add a persistent BO to the list
- * a persistent BO is one that will be referenced across flushes,
- * i.e. colorbuffer, textures etc.
- * They get reset when a new "operation" happens, where an operation
- * is a state emission with a color/textures etc followed by a bunch of vertices.
- */
-void radeon_cs_space_add_persistent_bo(struct radeon_cs *cs,
- struct radeon_bo *bo,
- uint32_t read_domains,
- uint32_t write_domain);
-
-/* reset the persistent BO list */
-void radeon_cs_space_reset_bos(struct radeon_cs *cs);
-
-/* do a space check with the current persistent BO list */
-int radeon_cs_space_check(struct radeon_cs *cs);
-
-/* do a space check with the current persistent BO list and a temporary BO
- * a temporary BO is like a DMA buffer, which gets flushed with the
- * command buffer */
-int radeon_cs_space_check_with_bo(struct radeon_cs *cs,
- struct radeon_bo *bo,
- uint32_t read_domains,
- uint32_t write_domain);
-
-static inline void radeon_cs_write_dword(struct radeon_cs *cs, uint32_t dword)
-{
- cs->packets[cs->cdw++] = dword;
- if (cs->section_ndw) {
- cs->section_cdw++;
- }
-}
-
-static inline void radeon_cs_write_qword(struct radeon_cs *cs, uint64_t qword)
-{
- memcpy(cs->packets + cs->cdw, &qword, sizeof(uint64_t));
- cs->cdw += 2;
- if (cs->section_ndw) {
- cs->section_cdw += 2;
- }
-}
-
-static inline void radeon_cs_write_table(struct radeon_cs *cs,
- void *data, uint32_t size)
-{
- memcpy(cs->packets + cs->cdw, data, size * 4);
- cs->cdw += size;
- if (cs->section_ndw) {
- cs->section_cdw += size;
- }
-}
-#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_int_drm.h b/src/mesa/drivers/dri/radeon/radeon_cs_int_drm.h
deleted file mode 100644
index 8ba76bf9517..00000000000
--- a/src/mesa/drivers/dri/radeon/radeon_cs_int_drm.h
+++ /dev/null
@@ -1,66 +0,0 @@
-
-#ifndef _RADEON_CS_INT_H_
-#define _RADEON_CS_INT_H_
-
-struct radeon_cs_space_check {
- struct radeon_bo_int *bo;
- uint32_t read_domains;
- uint32_t write_domain;
- uint32_t new_accounted;
-};
-
-struct radeon_cs_int {
- /* keep first two in same place */
- uint32_t *packets;
- unsigned cdw;
- unsigned ndw;
- unsigned section_ndw;
- unsigned section_cdw;
- /* private members */
- struct radeon_cs_manager *csm;
- void *relocs;
- unsigned crelocs;
- unsigned relocs_total_size;
- const char *section_file;
- const char *section_func;
- int section_line;
- struct radeon_cs_space_check bos[MAX_SPACE_BOS];
- int bo_count;
- void (*space_flush_fn)(void *);
- void *space_flush_data;
-};
-
-/* cs functions */
-struct radeon_cs_funcs {
- struct radeon_cs_int *(*cs_create)(struct radeon_cs_manager *csm,
- uint32_t ndw);
- int (*cs_write_reloc)(struct radeon_cs_int *cs,
- struct radeon_bo *bo,
- uint32_t read_domain,
- uint32_t write_domain,
- uint32_t flags);
- int (*cs_begin)(struct radeon_cs_int *cs,
- uint32_t ndw,
- const char *file,
- const char *func,
- int line);
- int (*cs_end)(struct radeon_cs_int *cs,
- const char *file, const char *func,
- int line);
-
-
- int (*cs_emit)(struct radeon_cs_int *cs);
- int (*cs_destroy)(struct radeon_cs_int *cs);
- int (*cs_erase)(struct radeon_cs_int *cs);
- int (*cs_need_flush)(struct radeon_cs_int *cs);
- void (*cs_print)(struct radeon_cs_int *cs, FILE *file);
-};
-
-struct radeon_cs_manager {
- struct radeon_cs_funcs *funcs;
- int fd;
- int32_t vram_limit, gart_limit;
- int32_t vram_write_used, gart_write_used;
- int32_t read_used;
-};
-#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.h b/src/mesa/drivers/dri/radeon/radeon_ioctl.h
index d7d1d84282b..3297b5cd841 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.h
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.h
@@ -37,7 +37,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define __RADEON_IOCTL_H__
#include "main/simple_list.h"
-#include "radeon_bocs_wrapper.h"
+#include "radeon_bo_gem.h"
+#include "radeon_cs_gem.h"
extern void radeonEmitVertexAOS( r100ContextPtr rmesa,
GLuint vertex_size,
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index c142239cf28..30b1e574b17 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -60,8 +60,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "utils.h"
#include "vblank.h"
-#include "radeon_bocs_wrapper.h"
-
#include "GL/internal/dri_interface.h"
/* Radeon configuration