summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/radeon/radeon.h3
-rw-r--r--sys/dev/pci/drm/radeon/radeon_gart.c3
-rw-r--r--sys/dev/pci/drm/radeon/radeon_object.h4
-rw-r--r--sys/dev/pci/drm/radeon/radeon_ring.c3
-rw-r--r--sys/dev/pci/drm/radeon/radeon_sa.c9
5 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon.h b/sys/dev/pci/drm/radeon/radeon.h
index 40a3cdc4267..ca8c0da7b0d 100644
--- a/sys/dev/pci/drm/radeon/radeon.h
+++ b/sys/dev/pci/drm/radeon/radeon.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon.h,v 1.5 2014/01/23 03:15:09 kettenis Exp $ */
+/* $OpenBSD: radeon.h,v 1.6 2014/02/09 23:57:04 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -392,6 +392,7 @@ struct radeon_sa_manager {
uint64_t gpu_addr;
void *cpu_ptr;
uint32_t domain;
+ uint32_t align;
};
struct radeon_sa_bo;
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c
index 1f2a20d9729..d1f65aab3c6 100644
--- a/sys/dev/pci/drm/radeon/radeon_gart.c
+++ b/sys/dev/pci/drm/radeon/radeon_gart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_gart.c,v 1.3 2014/02/09 13:07:10 jsg Exp $ */
+/* $OpenBSD: radeon_gart.c,v 1.4 2014/02/09 23:57:04 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -464,6 +464,7 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
size *= 2;
r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager,
RADEON_GPU_PAGE_ALIGN(size),
+ RADEON_GPU_PAGE_SIZE,
RADEON_GEM_DOMAIN_VRAM);
if (r) {
dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n",
diff --git a/sys/dev/pci/drm/radeon/radeon_object.h b/sys/dev/pci/drm/radeon/radeon_object.h
index 3839a8e0833..86d59e3d9be 100644
--- a/sys/dev/pci/drm/radeon/radeon_object.h
+++ b/sys/dev/pci/drm/radeon/radeon_object.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_object.h,v 1.1 2013/08/12 04:11:53 jsg Exp $ */
+/* $OpenBSD: radeon_object.h,v 1.2 2014/02/09 23:57:04 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -161,7 +161,7 @@ static inline void * radeon_sa_bo_cpu_addr(struct radeon_sa_bo *sa_bo)
extern int radeon_sa_bo_manager_init(struct radeon_device *rdev,
struct radeon_sa_manager *sa_manager,
- unsigned size, u32 domain);
+ unsigned size, u32 align, u32 domain);
extern void radeon_sa_bo_manager_fini(struct radeon_device *rdev,
struct radeon_sa_manager *sa_manager);
extern int radeon_sa_bo_manager_start(struct radeon_device *rdev,
diff --git a/sys/dev/pci/drm/radeon/radeon_ring.c b/sys/dev/pci/drm/radeon/radeon_ring.c
index b4ed0e90f3b..662fdc774da 100644
--- a/sys/dev/pci/drm/radeon/radeon_ring.c
+++ b/sys/dev/pci/drm/radeon/radeon_ring.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_ring.c,v 1.3 2014/02/09 13:22:04 jsg Exp $ */
+/* $OpenBSD: radeon_ring.c,v 1.4 2014/02/09 23:57:04 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -206,6 +206,7 @@ int radeon_ib_pool_init(struct radeon_device *rdev)
}
r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo,
RADEON_IB_POOL_SIZE*64*1024,
+ RADEON_GPU_PAGE_SIZE,
RADEON_GEM_DOMAIN_GTT);
if (r) {
return r;
diff --git a/sys/dev/pci/drm/radeon/radeon_sa.c b/sys/dev/pci/drm/radeon/radeon_sa.c
index f54c516ef79..55682dfd9ce 100644
--- a/sys/dev/pci/drm/radeon/radeon_sa.c
+++ b/sys/dev/pci/drm/radeon/radeon_sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_sa.c,v 1.3 2014/02/09 23:50:36 jsg Exp $ */
+/* $OpenBSD: radeon_sa.c,v 1.4 2014/02/09 23:57:04 jsg Exp $ */
/*
* Copyright 2011 Red Hat Inc.
* All Rights Reserved.
@@ -55,7 +55,7 @@ bool radeon_sa_bo_next_hole(struct radeon_sa_manager *, struct radeon_fence **,
int radeon_sa_bo_manager_init(struct radeon_device *rdev,
struct radeon_sa_manager *sa_manager,
- unsigned size, u32 domain)
+ unsigned size, u32 align, u32 domain)
{
int i, r;
@@ -66,13 +66,14 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev,
sa_manager->bo = NULL;
sa_manager->size = size;
sa_manager->domain = domain;
+ sa_manager->align = align;
sa_manager->hole = &sa_manager->olist;
INIT_LIST_HEAD(&sa_manager->olist);
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
INIT_LIST_HEAD(&sa_manager->flist[i]);
}
- r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
+ r = radeon_bo_create(rdev, size, align, true,
domain, NULL, &sa_manager->bo);
if (r) {
dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r);
@@ -329,7 +330,7 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
unsigned tries[RADEON_NUM_RINGS];
int i, r, error;
- BUG_ON(align > RADEON_GPU_PAGE_SIZE);
+ BUG_ON(align > sa_manager->align);
BUG_ON(size > sa_manager->size);
*sa_bo = kmalloc(sizeof(struct radeon_sa_bo), GFP_KERNEL);