diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-11-22 15:35:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-11-22 15:35:50 +0000 |
commit | 411899ca491a03152c7803585e5b999d2f566201 (patch) | |
tree | aaff0b3418c817a8bde2d0d58ae1842b28724c64 | |
parent | ae00fbc8a4af662a3b1361075ec3b2936485b844 (diff) |
Remove drm_gem_object_alloc() and associated infrastructure. It's unused and
has been removed upstream as well.
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 5 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 30 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_gem.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_kms.c | 4 |
5 files changed, 5 insertions, 46 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 57c9dc8df10..0a2e2f568c2 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.199 2015/11/21 15:23:44 kettenis Exp $ */ +/* $OpenBSD: drmP.h,v 1.200 2015/11/22 15:35:49 kettenis Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -521,7 +521,6 @@ struct drm_driver_info { * * Returns 0 on success. */ - int (*gem_init_object) (struct drm_gem_object *obj); void (*gem_free_object) (struct drm_gem_object *obj); int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); @@ -844,8 +843,6 @@ drm_sysfs_hotplug_event(struct drm_device *dev) /* Graphics Execution Manager library functions (drm_gem.c) */ void drm_gem_object_release(struct drm_gem_object *obj); -struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, - size_t size); int drm_gem_object_init(struct drm_device *dev, struct drm_gem_object *obj, size_t size); diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 17674c67cd6..d891084c630 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_drv.c,v 1.139 2015/11/21 15:23:44 kettenis Exp $ */ +/* $OpenBSD: drm_drv.c,v 1.140 2015/11/22 15:35:49 kettenis Exp $ */ /*- * Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org> * Copyright © 2008 Intel Corporation @@ -1467,34 +1467,6 @@ drm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, * Code to support memory managers based on the GEM (Graphics * Execution Manager) api. */ -struct drm_gem_object * -drm_gem_object_alloc(struct drm_device *dev, size_t size) -{ - struct drm_gem_object *obj; - - KASSERT((size & (PAGE_SIZE -1)) == 0); - - if ((obj = pool_get(&dev->objpl, PR_WAITOK | PR_ZERO)) == NULL) - return (NULL); - - obj->dev = dev; - - /* uao create can't fail in the 0 case, it just sleeps */ - obj->uao = uao_create(size, 0); - obj->size = size; - uvm_objinit(&obj->uobj, &drm_pgops, 1); - - if (dev->driver->gem_init_object != NULL && - dev->driver->gem_init_object(obj) != 0) { - uao_detach(obj->uao); - pool_put(&dev->objpl, obj); - return (NULL); - } - atomic_inc(&dev->obj_count); - atomic_add(obj->size, &dev->obj_memory); - return (obj); -} - int drm_gem_object_init(struct drm_device *dev, struct drm_gem_object *obj, size_t size) { diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index f3a24f1b346..c8ff324549b 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.97 2015/11/01 03:42:56 jsg Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.98 2015/11/22 15:35:49 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -459,7 +459,6 @@ static struct drm_driver_info inteldrm_driver = { .preclose = i915_driver_preclose, .postclose = i915_driver_postclose, -// .gem_init_object = i915_gem_init_object, .gem_free_object = i915_gem_free_object, .gem_fault = i915_gem_fault, .gem_size = sizeof(struct drm_i915_gem_object), diff --git a/sys/dev/pci/drm/radeon/radeon_gem.c b/sys/dev/pci/drm/radeon/radeon_gem.c index 37ffed0dcab..0292a511e5f 100644 --- a/sys/dev/pci/drm/radeon/radeon_gem.c +++ b/sys/dev/pci/drm/radeon/radeon_gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_gem.c,v 1.7 2015/04/18 14:47:35 jsg Exp $ */ +/* $OpenBSD: radeon_gem.c,v 1.8 2015/11/22 15:35:49 kettenis Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -30,13 +30,6 @@ #include <dev/pci/drm/radeon_drm.h> #include "radeon.h" -int radeon_gem_object_init(struct drm_gem_object *obj) -{ - BUG(); - - return 0; -} - void radeon_gem_object_free(struct drm_gem_object *gobj) { struct radeon_bo *robj = gem_to_radeon_bo(gobj); diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c index b1885e39f96..4737c19754a 100644 --- a/sys/dev/pci/drm/radeon/radeon_kms.c +++ b/sys/dev/pci/drm/radeon/radeon_kms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_kms.c,v 1.43 2015/11/16 11:24:58 kettenis Exp $ */ +/* $OpenBSD: radeon_kms.c,v 1.44 2015/11/22 15:35:49 kettenis Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -54,7 +54,6 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *); int radeon_driver_irq_postinstall_kms(struct drm_device *); void radeon_driver_irq_uninstall_kms(struct drm_device *d); -int radeon_gem_object_init(struct drm_gem_object *); void radeon_gem_object_free(struct drm_gem_object *); int radeon_gem_object_open(struct drm_gem_object *, struct drm_file *); void radeon_gem_object_close(struct drm_gem_object *, struct drm_file *); @@ -231,7 +230,6 @@ static struct drm_driver_info kms_driver = { .irq_postinstall = radeon_driver_irq_postinstall_kms, .irq_uninstall = radeon_driver_irq_uninstall_kms, .ioctls = radeon_ioctls_kms, - .gem_init_object = radeon_gem_object_init, .gem_free_object = radeon_gem_object_free, .gem_open_object = radeon_gem_object_open, .gem_close_object = radeon_gem_object_close, |