summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2013-01-18 04:59:46 +0100
committerMark Kettenis <kettenis@openbsd.org>2013-01-18 04:59:46 +0100
commit33fc922fd9cf1f1f74a5b168296f21ed123ae9d7 (patch)
treef2ba3058f1b511b2b27ba765bb5ba82cb387320f
parent8ce2700fc22b7c0d74235b3138b82df2e7daaf10 (diff)
Rename struct inteldrm_obj into drm_i915_gem_object.
-rw-r--r--sys/dev/pci/drm/i915_drv.c87
-rw-r--r--sys/dev/pci/drm/i915_drv.h48
-rw-r--r--sys/dev/pci/drm/i915_gem.c80
-rw-r--r--sys/dev/pci/drm/i915_gem_evict.c16
-rw-r--r--sys/dev/pci/drm/i915_gem_execbuffer.c8
-rw-r--r--sys/dev/pci/drm/i915_gem_tiling.c8
-rw-r--r--sys/dev/pci/drm/intel_display.c75
-rw-r--r--sys/dev/pci/drm/intel_drv.h16
-rw-r--r--sys/dev/pci/drm/intel_fb.c4
-rw-r--r--sys/dev/pci/drm/intel_overlay.c30
-rw-r--r--sys/dev/pci/drm/intel_sprite.c14
11 files changed, 194 insertions, 192 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 1d9e01153cd..8cc36d1e09e 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -374,7 +374,7 @@ static const struct drm_driver_info inteldrm_driver = {
.gem_init_object = i915_gem_init_object,
.gem_free_object = i915_gem_free_object,
.gem_fault = inteldrm_fault,
- .gem_size = sizeof(struct inteldrm_obj),
+ .gem_size = sizeof(struct drm_i915_gem_object),
.dumb_create = i915_gem_dumb_create,
.dumb_map_offset = i915_gem_mmap_gtt,
@@ -1002,13 +1002,13 @@ u_int32_t
inteldrm_read_hws(struct inteldrm_softc *dev_priv, int reg)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
bus_dma_tag_t tag;
bus_dmamap_t map;
u_int32_t val;
if (I915_NEED_GFX_HWS(dev_priv)) {
- obj_priv = (struct inteldrm_obj *)dev_priv->hws_obj;
+ obj_priv = (struct drm_i915_gem_object *)dev_priv->hws_obj;
map = obj_priv->dmamap;
tag = dev_priv->agpdmat;
} else {
@@ -1367,7 +1367,7 @@ i915_gem_gtt_map_ioctl(struct drm_device *dev, void *data,
{
struct drm_i915_gem_mmap *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
vaddr_t addr;
voff_t offset;
vsize_t end, nsize;
@@ -1380,7 +1380,7 @@ i915_gem_gtt_map_ioctl(struct drm_device *dev, void *data,
/* Since we are doing purely uvm-related operations here we do
* not need to hold the object, a reference alone is sufficient
*/
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
/* Check size. Also ensure that the object is not purgeable */
if (args->size == 0 || args->offset > obj->size || args->size >
@@ -1439,14 +1439,14 @@ void
inteldrm_process_flushing(struct inteldrm_softc *dev_priv,
u_int32_t flush_domains)
{
- struct inteldrm_obj *obj_priv, *next;
+ struct drm_i915_gem_object *obj_priv, *next;
MUTEX_ASSERT_LOCKED(&dev_priv->request_lock);
mtx_enter(&dev_priv->list_lock);
for (obj_priv = TAILQ_FIRST(&dev_priv->mm.gpu_write_list);
obj_priv != TAILQ_END(&dev_priv->mm.gpu_write_list);
obj_priv = next) {
- struct drm_obj *obj = &(obj_priv->obj);
+ struct drm_obj *obj = &(obj_priv->base);
next = TAILQ_NEXT(obj_priv, write_list);
@@ -1483,14 +1483,14 @@ void
i915_gem_retire_request(struct inteldrm_softc *dev_priv,
struct inteldrm_request *request)
{
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
MUTEX_ASSERT_LOCKED(&dev_priv->request_lock);
mtx_enter(&dev_priv->list_lock);
/* Move any buffers on the active list that are no longer referenced
* by the ringbuffer to the flushing/inactive lists as appropriate. */
while ((obj_priv = TAILQ_FIRST(&dev_priv->mm.active_list)) != NULL) {
- struct drm_obj *obj = &obj_priv->obj;
+ struct drm_obj *obj = &obj_priv->base;
/* If the seqno being retired doesn't match the oldest in the
* list, then the oldest in the list must still be newer than
@@ -1609,7 +1609,7 @@ i915_gem_find_inactive_object(struct inteldrm_softc *dev_priv,
size_t min_size)
{
struct drm_obj *obj, *best = NULL, *first = NULL;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
/*
* We don't need references to the object as long as we hold the list
@@ -1617,7 +1617,7 @@ i915_gem_find_inactive_object(struct inteldrm_softc *dev_priv,
*/
mtx_enter(&dev_priv->list_lock);
TAILQ_FOREACH(obj_priv, &dev_priv->mm.inactive_list, list) {
- obj = &obj_priv->obj;
+ obj = &obj_priv->base;
if (obj->size >= min_size) {
if ((!inteldrm_is_dirty(obj_priv) ||
i915_obj_purgeable(obj_priv)) &&
@@ -1664,8 +1664,8 @@ i915_gem_get_fence_reg(struct drm_obj *obj, int interruptible)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
- struct inteldrm_obj *old_obj_priv = NULL;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
+ struct drm_i915_gem_object *old_obj_priv = NULL;
struct drm_obj *old_obj = NULL;
struct inteldrm_fence *reg = NULL;
int i, ret, avail;
@@ -1711,7 +1711,7 @@ again:
if (reg->obj == NULL)
break;
- old_obj_priv = (struct inteldrm_obj *)reg->obj;
+ old_obj_priv = (struct drm_i915_gem_object *)reg->obj;
if (old_obj_priv->pin_count == 0)
avail++;
}
@@ -1726,7 +1726,7 @@ again:
TAILQ_FOREACH(reg, &dev_priv->mm.fence_list,
list) {
old_obj = reg->obj;
- old_obj_priv = (struct inteldrm_obj *)old_obj;
+ old_obj_priv = (struct drm_i915_gem_object *)old_obj;
if (old_obj_priv->pin_count)
continue;
@@ -1801,7 +1801,7 @@ inteldrm_fault(struct drm_obj *obj, struct uvm_faultinfo *ufi, off_t offset,
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
paddr_t paddr;
int lcv, ret;
int write = !!(access_type & VM_PROT_WRITE);
@@ -1945,7 +1945,7 @@ error:
void
inteldrm_wipe_mappings(struct drm_obj *obj)
{
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
struct vm_page *pg;
@@ -1972,7 +1972,7 @@ i915_gem_object_pin_and_relocate(struct drm_obj *obj,
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_obj *target_obj;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
bus_space_handle_t bsh;
int i, ret, needs_fence;
@@ -1995,7 +1995,7 @@ i915_gem_object_pin_and_relocate(struct drm_obj *obj,
*/
for (i = 0; i < entry->relocation_count; i++) {
struct drm_i915_gem_relocation_entry *reloc = &relocs[i];
- struct inteldrm_obj *target_obj_priv;
+ struct drm_i915_gem_object *target_obj_priv;
uint32_t reloc_val, reloc_offset;
target_obj = drm_gem_object_lookup(obj->dev, file_priv,
@@ -2012,7 +2012,7 @@ i915_gem_object_pin_and_relocate(struct drm_obj *obj,
goto err;
}
- target_obj_priv = (struct inteldrm_obj *)target_obj;
+ target_obj_priv = (struct drm_i915_gem_object *)target_obj;
/* The target buffer should have appeared before us in the
* exec_object list, so it should have a GTT space bound by now.
@@ -2266,7 +2266,7 @@ i915_gem_init_hws(struct inteldrm_softc *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret;
/* If we need a physical address for the status page, it's already
@@ -2280,7 +2280,7 @@ i915_gem_init_hws(struct inteldrm_softc *dev_priv)
DRM_ERROR("Failed to allocate status page\n");
return (ENOMEM);
}
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
drm_hold_object(obj);
/*
* snooped gtt mapping please .
@@ -2344,7 +2344,7 @@ i915_gem_init_ringbuffer(struct inteldrm_softc *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret;
ret = i915_gem_init_hws(dev_priv);
@@ -2358,7 +2358,7 @@ i915_gem_init_ringbuffer(struct inteldrm_softc *dev_priv)
goto delhws;
}
drm_hold_object(obj);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
ret = i915_gem_object_pin(obj, 4096, 0);
if (ret != 0)
@@ -2396,7 +2396,7 @@ int
inteldrm_start_ring(struct inteldrm_softc *dev_priv)
{
struct drm_obj *obj = dev_priv->ring.ring_obj;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
u_int32_t head;
/* Stop the ring if it's running. */
@@ -2586,7 +2586,7 @@ inteldrm_hung(void *arg, void *reset_type)
{
struct inteldrm_softc *dev_priv = arg;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
u_int8_t reset = (u_int8_t)(uintptr_t)reset_type;
DRM_LOCK();
@@ -2610,16 +2610,16 @@ inteldrm_hung(void *arg, void *reset_type)
*/
mtx_enter(&dev_priv->list_lock);
while ((obj_priv = TAILQ_FIRST(&dev_priv->mm.flushing_list)) != NULL) {
- drm_lock_obj(&obj_priv->obj);
- if (obj_priv->obj.write_domain & I915_GEM_GPU_DOMAINS) {
+ drm_lock_obj(&obj_priv->base);
+ if (obj_priv->base.write_domain & I915_GEM_GPU_DOMAINS) {
TAILQ_REMOVE(&dev_priv->mm.gpu_write_list,
obj_priv, write_list);
- atomic_clearbits_int(&obj_priv->obj.do_flags,
+ atomic_clearbits_int(&obj_priv->base.do_flags,
I915_GPU_WRITE);
- obj_priv->obj.write_domain &= ~I915_GEM_GPU_DOMAINS;
+ obj_priv->base.write_domain &= ~I915_GEM_GPU_DOMAINS;
}
/* unlocks object and list */
- i915_gem_object_move_to_inactive_locked(&obj_priv->obj);
+ i915_gem_object_move_to_inactive_locked(&obj_priv->base);
mtx_enter(&dev_priv->list_lock);
}
mtx_leave(&dev_priv->list_lock);
@@ -2692,7 +2692,8 @@ out:
}
void
-i915_move_to_tail(struct inteldrm_obj *obj_priv, struct i915_gem_list *head)
+i915_move_to_tail(struct drm_i915_gem_object *obj_priv,
+ struct i915_gem_list *head)
{
i915_list_remove(obj_priv);
TAILQ_INSERT_TAIL(head, obj_priv, list);
@@ -2700,7 +2701,7 @@ i915_move_to_tail(struct inteldrm_obj *obj_priv, struct i915_gem_list *head)
}
void
-i915_list_remove(struct inteldrm_obj *obj_priv)
+i915_list_remove(struct drm_i915_gem_object *obj_priv)
{
if (obj_priv->current_list != NULL)
TAILQ_REMOVE(obj_priv->current_list, obj_priv, list);
@@ -3025,7 +3026,7 @@ i915_gem_bit_17_swizzle(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
struct vm_page *pg;
bus_dma_segment_t *segp;
int page_count = obj->size >> PAGE_SHIFT;
@@ -3066,7 +3067,7 @@ i915_gem_save_bit_17_swizzle(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
bus_dma_segment_t *segp;
int page_count = obj->size >> PAGE_SHIFT, i, n;
@@ -3132,7 +3133,7 @@ i915_gem_object_fence_offset_ok(struct drm_obj *obj, int tiling_mode)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
if (obj_priv->dmamap == NULL || tiling_mode == I915_TILING_NONE)
return (1);
@@ -3212,7 +3213,7 @@ inteldrm_965_reset(struct inteldrm_softc *dev_priv, u_int8_t flags)
/* put the hardware status page back */
if (I915_NEED_GFX_HWS(dev_priv)) {
- I915_WRITE(HWS_PGA, ((struct inteldrm_obj *)
+ I915_WRITE(HWS_PGA, ((struct drm_i915_gem_object *)
dev_priv->hws_obj)->gtt_offset);
} else {
I915_WRITE(HWS_PGA,
@@ -3242,7 +3243,7 @@ inteldrm_verify_inactive(struct inteldrm_softc *dev_priv, char *file,
int line)
{
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
TAILQ_FOREACH(obj_priv, &dev_priv->mm.inactive_list, list) {
obj = (struct drm_obj *)obj_priv;
@@ -3258,7 +3259,7 @@ inteldrm_verify_inactive(struct inteldrm_softc *dev_priv, char *file,
#if (INTELDRM_DEBUG > 1)
-static const char *get_pin_flag(struct inteldrm_obj *obj_priv)
+static const char *get_pin_flag(struct drm_i915_gem_object *obj_priv)
{
if (obj_priv->pin_count > 0)
return "p";
@@ -3266,7 +3267,7 @@ static const char *get_pin_flag(struct inteldrm_obj *obj_priv)
return " ";
}
-static const char *get_tiling_flag(struct inteldrm_obj *obj_priv)
+static const char *get_tiling_flag(struct drm_i915_gem_object *obj_priv)
{
switch (obj_priv->tiling_mode) {
default:
@@ -3329,9 +3330,9 @@ i915_gem_fence_regs_info(int kdev)
if (obj == NULL) {
printf("Fenced object[%2d] = unused\n", i);
} else {
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
printf("Fenced object[%2d] = %p: %s "
"%08x %08zx %08x %s %08x %08x %d",
i, obj, get_pin_flag(obj_priv),
@@ -3391,7 +3392,7 @@ i915_batchbuffer_info(int kdev)
struct drm_device *dev = drm_get_device_from_kdev(kdev);
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
bus_space_handle_t bsh;
int ret;
diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h
index 1acb2598f2b..bb109d69431 100644
--- a/sys/dev/pci/drm/i915_drv.h
+++ b/sys/dev/pci/drm/i915_drv.h
@@ -84,7 +84,7 @@ enum plane {
struct drm_i915_gem_phys_object {
int id;
struct drm_dmamem *handle;
- struct inteldrm_obj *cur_obj;
+ struct drm_i915_gem_object *cur_obj;
};
struct inteldrm_ring {
@@ -121,7 +121,7 @@ struct drm_i915_display_funcs {
void (*init_pch_clock_gating)(struct drm_device *dev);
int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_framebuffer *fb,
- struct inteldrm_obj *obj);
+ struct drm_i915_gem_object *obj);
void (*force_wake_get)(struct inteldrm_softc *dev_priv);
void (*force_wake_put)(struct inteldrm_softc *dev_priv);
int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb,
@@ -540,7 +540,7 @@ struct inteldrm_softc {
*
* A reference is held on the buffer while on this list.
*/
- TAILQ_HEAD(i915_gem_list, inteldrm_obj) active_list;
+ TAILQ_HEAD(i915_gem_list, drm_i915_gem_object) active_list;
/**
* List of objects which are not in the ringbuffer but which
@@ -740,12 +740,12 @@ struct inteldrm_file {
#define I915_FENCE_INVALID 0x2000 /* fence has been lazily invalidated */
/** driver private structure attached to each drm_gem_object */
-struct inteldrm_obj {
- struct drm_obj obj;
+struct drm_i915_gem_object {
+ struct drm_obj base;
/** This object's place on the active/flushing/inactive lists */
- TAILQ_ENTRY(inteldrm_obj) list;
- TAILQ_ENTRY(inteldrm_obj) write_list;
+ TAILQ_ENTRY(drm_i915_gem_object) list;
+ TAILQ_ENTRY(drm_i915_gem_object) write_list;
struct i915_gem_list *current_list;
/* GTT binding. */
bus_dmamap_t dmamap;
@@ -780,6 +780,8 @@ struct inteldrm_obj {
int pending_flip;
};
+#define to_intel_bo(x) container_of(x,struct drm_i915_gem_object, base)
+
/**
* Request queue structure.
*
@@ -858,8 +860,8 @@ void i915_gem_object_move_to_inactive(struct drm_obj *);
void i915_gem_object_move_to_inactive_locked(struct drm_obj *);
uint32_t i915_add_request(struct inteldrm_softc *);
void inteldrm_process_flushing(struct inteldrm_softc *, u_int32_t);
-void i915_move_to_tail(struct inteldrm_obj *, struct i915_gem_list *);
-void i915_list_remove(struct inteldrm_obj *);
+void i915_move_to_tail(struct drm_i915_gem_object *, struct i915_gem_list *);
+void i915_list_remove(struct drm_i915_gem_object *);
int i915_gem_init_hws(struct inteldrm_softc *);
void i915_gem_cleanup_hws(struct inteldrm_softc *);
int i915_gem_init_ringbuffer(struct inteldrm_softc *);
@@ -934,9 +936,9 @@ u_int32_t i915_gem_flush(struct inteldrm_softc *, uint32_t, uint32_t);
#define I915_GEM_GPU_DOMAINS (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT))
void i915_gem_detach_phys_object(struct drm_device *,
- struct inteldrm_obj *);
+ struct drm_i915_gem_object *);
int i915_gem_attach_phys_object(struct drm_device *dev,
- struct inteldrm_obj *, int, int);
+ struct drm_i915_gem_object *, int, int);
int i915_gem_dumb_create(struct drm_file *, struct drm_device *,
struct drm_mode_create_dumb *);
@@ -1258,39 +1260,39 @@ i915_get_gem_seqno(struct inteldrm_softc *dev_priv)
}
static __inline int
-i915_obj_purgeable(struct inteldrm_obj *obj_priv)
+i915_obj_purgeable(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_DONTNEED);
+ return (obj_priv->base.do_flags & I915_DONTNEED);
}
static __inline int
-i915_obj_purged(struct inteldrm_obj *obj_priv)
+i915_obj_purged(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_PURGED);
+ return (obj_priv->base.do_flags & I915_PURGED);
}
static __inline int
-inteldrm_is_active(struct inteldrm_obj *obj_priv)
+inteldrm_is_active(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_ACTIVE);
+ return (obj_priv->base.do_flags & I915_ACTIVE);
}
static __inline int
-inteldrm_is_dirty(struct inteldrm_obj *obj_priv)
+inteldrm_is_dirty(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_DIRTY);
+ return (obj_priv->base.do_flags & I915_DIRTY);
}
static __inline int
-inteldrm_exec_needs_fence(struct inteldrm_obj *obj_priv)
+inteldrm_exec_needs_fence(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_EXEC_NEEDS_FENCE);
+ return (obj_priv->base.do_flags & I915_EXEC_NEEDS_FENCE);
}
static __inline int
-inteldrm_needs_fence(struct inteldrm_obj *obj_priv)
+inteldrm_needs_fence(struct drm_i915_gem_object *obj_priv)
{
- return (obj_priv->obj.do_flags & I915_FENCED_EXEC);
+ return (obj_priv->base.do_flags & I915_FENCED_EXEC);
}
static inline void
diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c
index c4e333d0407..2d926b29dd1 100644
--- a/sys/dev/pci/drm/i915_gem.c
+++ b/sys/dev/pci/drm/i915_gem.c
@@ -63,7 +63,7 @@
void i915_gem_object_flush_cpu_write_domain(struct drm_obj *obj);
int i915_gem_init_phys_object(struct drm_device *, int, int, int);
-int i915_gem_phys_pwrite(struct drm_device *, struct inteldrm_obj *,
+int i915_gem_phys_pwrite(struct drm_device *, struct drm_i915_gem_object *,
struct drm_i915_gem_pwrite *, struct drm_file *);
// i915_gem_info_add_obj
@@ -79,7 +79,7 @@ int i915_gem_phys_pwrite(struct drm_device *, struct inteldrm_obj *,
void
i915_gem_free_object(struct drm_obj *obj)
{
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
DRM_ASSERT_HELD(obj);
while (obj_priv->pin_count > 0)
@@ -251,7 +251,7 @@ int
i915_gem_object_pin(struct drm_obj *obj, uint32_t alignment, int needs_fence)
{
struct drm_device *dev = obj->dev;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret;
DRM_ASSERT_HELD(obj);
@@ -319,7 +319,7 @@ void
i915_gem_object_unpin(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
inteldrm_verify_inactive(dev_priv, __FILE__, __LINE__);
KASSERT(obj_priv->pin_count >= 1);
@@ -346,7 +346,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_i915_gem_pin *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret = 0;
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
@@ -355,7 +355,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,
DRM_LOCK();
drm_hold_object(obj);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
if (i915_obj_purgeable(obj_priv)) {
printf("%s: pinning purgeable object\n", __func__);
ret = EINVAL;
@@ -388,7 +388,7 @@ i915_gem_unpin_ioctl(struct drm_device *dev, void *data,
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_i915_gem_pin *args = data;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
struct drm_obj *obj;
int ret = 0;
@@ -399,7 +399,7 @@ i915_gem_unpin_ioctl(struct drm_device *dev, void *data,
DRM_LOCK();
drm_hold_object(obj);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
if (obj_priv->user_pin_count == 0) {
ret = EINVAL;
goto out;
@@ -423,7 +423,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_i915_gem_busy *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret = 0;
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
@@ -433,7 +433,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
return (EBADF);
}
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
args->busy = inteldrm_is_active(obj_priv);
if (args->busy) {
/*
@@ -484,7 +484,7 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
{
struct drm_i915_gem_madvise *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int need, ret = 0;
switch (args->madv) {
@@ -503,7 +503,7 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
return (EBADF);
drm_hold_object(obj);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
/* invalid to madvise on a pinned BO */
if (obj_priv->pin_count) {
@@ -707,7 +707,7 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_i915_gem_pread *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
char *vaddr;
bus_space_handle_t bsh;
bus_size_t bsize;
@@ -737,7 +737,7 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
if (ret)
goto unpin;
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
offset = obj_priv->gtt_offset + args->offset;
bsize = round_page(offset + args->size) - trunc_page(offset);
@@ -777,7 +777,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_i915_gem_pwrite *args = data;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
char *vaddr;
bus_space_handle_t bsh;
bus_size_t bsize;
@@ -797,7 +797,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
goto out;
}
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
if (obj_priv->phys_obj) {
ret = i915_gem_phys_pwrite(dev, obj_priv, args, file_priv);
@@ -812,7 +812,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
if (ret)
goto unpin;
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
offset = obj_priv->gtt_offset + args->offset;
bsize = round_page(offset + args->size) - trunc_page(offset);
@@ -892,7 +892,7 @@ i915_gem_mmap_gtt(struct drm_file *file, struct drm_device *dev,
uint32_t handle, uint64_t *mmap_offset)
{
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
struct drm_local_map *map;
voff_t offset;
vsize_t end, nsize;
@@ -907,7 +907,7 @@ i915_gem_mmap_gtt(struct drm_file *file, struct drm_device *dev,
/* Since we are doing purely uvm-related operations here we do
* not need to hold the object, a reference alone is sufficient
*/
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
/* Check size. Also ensure that the object is not purgeable */
if (offset > obj->size || i915_obj_purgeable(obj_priv)) {
@@ -971,7 +971,7 @@ i915_gem_object_flush_gpu_write_domain(struct drm_obj *obj, int pipelined,
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
u_int32_t seqno;
int ret = 0;
@@ -1012,7 +1012,7 @@ i915_gem_object_set_to_gtt_domain(struct drm_obj *obj, int write,
{
struct drm_device *dev = (struct drm_device *)obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret;
DRM_ASSERT_HELD(obj);
@@ -1135,7 +1135,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_obj *obj, int write,
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret;
DRM_ASSERT_HELD(obj);
@@ -1198,7 +1198,7 @@ i915_gem_get_gtt_alignment(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
bus_size_t start, i;
/*
@@ -1235,7 +1235,7 @@ i915_gem_object_bind_to_gtt(struct drm_obj *obj, bus_size_t alignment,
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret;
DRM_ASSERT_HELD(obj);
@@ -1324,7 +1324,7 @@ i915_gem_object_unbind(struct drm_obj *obj, int interruptible)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret = 0;
DRM_ASSERT_HELD(obj);
@@ -1376,7 +1376,7 @@ i915_gem_object_unbind(struct drm_obj *obj, int interruptible)
atomic_sub(obj->size, &dev->gtt_memory);
/* Remove ourselves from any LRU list if present. */
- i915_list_remove((struct inteldrm_obj *)obj);
+ i915_list_remove((struct drm_i915_gem_object *)obj);
if (i915_obj_purgeable(obj_priv))
inteldrm_purge_obj(obj);
@@ -1394,7 +1394,7 @@ i915_gem_object_wait_rendering(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int ret;
/* wait for queued rendering so we know it's flushed and bo is idle */
@@ -1411,7 +1411,7 @@ i915_gem_object_move_to_active(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
struct inteldrm_fence *reg;
u_int32_t seqno = dev_priv->mm.next_gem_seqno;
@@ -1441,7 +1441,7 @@ i915_gem_object_move_off_active(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
struct inteldrm_fence *reg;
MUTEX_ASSERT_LOCKED(&dev_priv->list_lock);
@@ -1480,7 +1480,7 @@ i915_gem_object_move_to_inactive_locked(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
MUTEX_ASSERT_LOCKED(&dev_priv->list_lock);
DRM_OBJ_ASSERT_LOCKED(obj);
@@ -1672,7 +1672,7 @@ sandybridge_write_fence_reg(struct inteldrm_fence *reg)
struct drm_obj *obj = reg->obj;
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int regnum = obj_priv->fence_reg;
u_int64_t val;
@@ -1694,7 +1694,7 @@ i965_write_fence_reg(struct inteldrm_fence *reg)
struct drm_obj *obj = reg->obj;
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int regnum = obj_priv->fence_reg;
u_int64_t val;
@@ -1715,7 +1715,7 @@ i915_write_fence_reg(struct inteldrm_fence *reg)
struct drm_obj *obj = reg->obj;
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
bus_size_t fence_reg;
u_int32_t val;
u_int32_t pitch_val;
@@ -1766,7 +1766,7 @@ i830_write_fence_reg(struct inteldrm_fence *reg)
struct drm_obj *obj = reg->obj;
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
int regnum = obj_priv->fence_reg;
u_int32_t pitch_val, val;
@@ -1798,7 +1798,7 @@ i915_gem_object_put_fence_reg(struct drm_obj *obj, int interruptible)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
struct inteldrm_fence *reg;
int ret;
@@ -1870,7 +1870,7 @@ i915_gem_object_get_fence(struct drm_obj *obj,
int
i915_gem_init_object(struct drm_obj *obj)
{
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
/*
* We've just allocated pages from the kernel,
@@ -1926,10 +1926,8 @@ kfree_obj:
// i915_gem_free_phys_object
// i915_gem_free_all_phys_object
-#define base obj
-
void i915_gem_detach_phys_object(struct drm_device *dev,
- struct inteldrm_obj *obj)
+ struct drm_i915_gem_object *obj)
{
char *vaddr;
int i;
@@ -1964,7 +1962,7 @@ void i915_gem_detach_phys_object(struct drm_device *dev,
int
i915_gem_attach_phys_object(struct drm_device *dev,
- struct inteldrm_obj *obj, int id, int align)
+ struct drm_i915_gem_object *obj, int id, int align)
{
drm_i915_private_t *dev_priv = dev->dev_private;
int ret = 0;
@@ -2021,7 +2019,7 @@ i915_gem_attach_phys_object(struct drm_device *dev,
int
i915_gem_phys_pwrite(struct drm_device *dev,
- struct inteldrm_obj *obj,
+ struct drm_i915_gem_object *obj,
struct drm_i915_gem_pwrite *args,
struct drm_file *file_priv)
{
diff --git a/sys/dev/pci/drm/i915_gem_evict.c b/sys/dev/pci/drm/i915_gem_evict.c
index 99f6cef0c29..321155d0456 100644
--- a/sys/dev/pci/drm/i915_gem_evict.c
+++ b/sys/dev/pci/drm/i915_gem_evict.c
@@ -61,7 +61,7 @@ i915_gem_evict_something(struct inteldrm_softc *dev_priv, size_t min_size,
{
struct drm_obj *obj;
struct inteldrm_request *request;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
u_int32_t seqno;
int ret = 0, write_domain = 0;
@@ -73,7 +73,7 @@ i915_gem_evict_something(struct inteldrm_softc *dev_priv, size_t min_size,
*/
obj = i915_gem_find_inactive_object(dev_priv, min_size);
if (obj != NULL) {
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
/* find inactive object returns the object with a
* reference for us, and held
*/
@@ -112,7 +112,7 @@ i915_gem_evict_something(struct inteldrm_softc *dev_priv, size_t min_size,
*/
mtx_enter(&dev_priv->list_lock);
TAILQ_FOREACH(obj_priv, &dev_priv->mm.flushing_list, list) {
- obj = &obj_priv->obj;
+ obj = &obj_priv->base;
if (obj->size >= min_size) {
write_domain = obj->write_domain;
break;
@@ -178,7 +178,7 @@ i915_gem_evict_everything(struct inteldrm_softc *dev_priv, int interruptible)
int
i915_gem_evict_inactive(struct inteldrm_softc *dev_priv, int interruptible)
{
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret = 0;
mtx_enter(&dev_priv->list_lock);
@@ -189,12 +189,12 @@ i915_gem_evict_inactive(struct inteldrm_softc *dev_priv, int interruptible)
break;
}
/* reference it so that we can frob it outside the lock */
- drm_ref(&obj_priv->obj.uobj);
+ drm_ref(&obj_priv->base.uobj);
mtx_leave(&dev_priv->list_lock);
- drm_hold_object(&obj_priv->obj);
- ret = i915_gem_object_unbind(&obj_priv->obj, interruptible);
- drm_unhold_and_unref(&obj_priv->obj);
+ drm_hold_object(&obj_priv->base);
+ ret = i915_gem_object_unbind(&obj_priv->base, interruptible);
+ drm_unhold_and_unref(&obj_priv->base);
mtx_enter(&dev_priv->list_lock);
if (ret)
diff --git a/sys/dev/pci/drm/i915_gem_execbuffer.c b/sys/dev/pci/drm/i915_gem_execbuffer.c
index 6b1b39ebe5d..1e4f127cf6b 100644
--- a/sys/dev/pci/drm/i915_gem_execbuffer.c
+++ b/sys/dev/pci/drm/i915_gem_execbuffer.c
@@ -171,7 +171,7 @@ i915_gem_object_set_to_gpu_domain(struct drm_obj *obj)
{
struct drm_device *dev = obj->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
u_int32_t invalidate_domains = 0;
u_int32_t flush_domains = 0;
@@ -265,7 +265,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
struct drm_i915_gem_execbuffer2 *args = data;
struct drm_i915_gem_exec_object2 *exec_list = NULL;
struct drm_i915_gem_relocation_entry *relocs = NULL;
- struct inteldrm_obj *obj_priv, *batch_obj_priv;
+ struct drm_i915_gem_object *obj_priv, *batch_obj_priv;
struct drm_obj **object_list = NULL;
struct drm_obj *batch_obj, *obj;
size_t oflow;
@@ -411,7 +411,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
* command.
*/
batch_obj = object_list[args->buffer_count - 1];
- batch_obj_priv = (struct inteldrm_obj *)batch_obj;
+ batch_obj_priv = (struct drm_i915_gem_object *)batch_obj;
if (args->batch_start_offset + args->batch_len > batch_obj->size ||
batch_obj->pending_write_domain) {
ret = EINVAL;
@@ -450,7 +450,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
mtx_enter(&dev_priv->list_lock);
for (i = 0; i < args->buffer_count; i++) {
obj = object_list[i];
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
drm_lock_obj(obj);
obj->write_domain = obj->pending_write_domain;
diff --git a/sys/dev/pci/drm/i915_gem_tiling.c b/sys/dev/pci/drm/i915_gem_tiling.c
index 53726a3afbf..8aaf879c63a 100644
--- a/sys/dev/pci/drm/i915_gem_tiling.c
+++ b/sys/dev/pci/drm/i915_gem_tiling.c
@@ -112,13 +112,13 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
struct drm_i915_gem_set_tiling *args = data;
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int ret = 0;
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
if (obj == NULL)
return (EBADF);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
drm_hold_object(obj);
if (obj_priv->pin_count != 0) {
@@ -180,13 +180,13 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
struct drm_i915_gem_get_tiling *args = data;
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
if (obj == NULL)
return (EBADF);
drm_hold_object(obj);
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
args->tiling_mode = obj_priv->tiling_mode;
switch (obj_priv->tiling_mode) {
diff --git a/sys/dev/pci/drm/intel_display.c b/sys/dev/pci/drm/intel_display.c
index d5d867add20..56d7c3f602b 100644
--- a/sys/dev/pci/drm/intel_display.c
+++ b/sys/dev/pci/drm/intel_display.c
@@ -281,7 +281,7 @@ int intel_crtc_cursor_move(struct drm_crtc *, int, int);
void intel_crtc_gamma_set(struct drm_crtc *, u16 *, u16 *, u16 *, uint32_t,
uint32_t);
int intel_framebuffer_create(struct drm_device *,
- struct drm_mode_fb_cmd2 *, struct inteldrm_obj *,
+ struct drm_mode_fb_cmd2 *, struct drm_i915_gem_object *,
struct drm_framebuffer **);
u32 intel_framebuffer_pitch_for_width(int, int);
u32 intel_framebuffer_size_for_mode(struct drm_display_mode *, int);
@@ -1847,7 +1847,7 @@ i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
- struct inteldrm_obj *obj = intel_fb->obj;
+ struct drm_i915_gem_object *obj = intel_fb->obj;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int cfb_pitch;
int plane, i;
@@ -1899,7 +1899,7 @@ g4x_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
- struct inteldrm_obj *obj = intel_fb->obj;
+ struct drm_i915_gem_object *obj = intel_fb->obj;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int plane = intel_crtc->plane == 0 ? DPFC_CTL_PLANEA : DPFC_CTL_PLANEB;
unsigned long stall_watermark = 200;
@@ -1972,7 +1972,7 @@ ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
- struct inteldrm_obj *obj = intel_fb->obj;
+ struct drm_i915_gem_object *obj = intel_fb->obj;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int plane = intel_crtc->plane == 0 ? DPFC_CTL_PLANEA : DPFC_CTL_PLANEB;
unsigned long stall_watermark = 200;
@@ -2187,7 +2187,7 @@ intel_update_fbc(struct drm_device *dev)
struct intel_crtc *intel_crtc;
struct drm_framebuffer *fb;
struct intel_framebuffer *intel_fb;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
int enable_fbc;
DRM_DEBUG_KMS("\n");
@@ -2330,7 +2330,7 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_obj *obj,
struct intel_ring_buffer *pipelined)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj_priv = (struct inteldrm_obj *)obj;
+ struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
u32 alignment;
int ret;
@@ -2399,7 +2399,7 @@ i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb, int x,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_framebuffer *intel_fb;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
int plane = intel_crtc->plane;
unsigned long Start, Offset;
u32 dspcntr;
@@ -2473,7 +2473,7 @@ ironlake_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb, int x,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_framebuffer *intel_fb;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
int plane = intel_crtc->plane;
unsigned long Start, Offset;
u32 dspcntr;
@@ -2574,7 +2574,7 @@ intel_finish_fb(struct drm_framebuffer *old_fb)
printf("%s stub\n", __func__);
return EINVAL;
#ifdef notyet
- struct inteldrm_obj *obj = to_intel_framebuffer(old_fb)->obj;
+ struct drm_i915_gem_object *obj = to_intel_framebuffer(old_fb)->obj;
struct drm_device *dev = obj->base.dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
bool was_interruptible = dev_priv->mm.interruptible;
@@ -2614,7 +2614,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
struct inteldrm_softc *dev_priv = dev->dev_private;
#endif
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
struct drm_obj *obj;
int ret;
@@ -3275,7 +3275,7 @@ intel_clear_scanline_wait(struct drm_device *dev)
void
intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
{
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
struct inteldrm_softc *dev_priv;
struct drm_device *dev;
@@ -6912,7 +6912,7 @@ intel_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file,
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
uint32_t addr;
int ret;
@@ -6936,7 +6936,7 @@ intel_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file,
obj = drm_gem_object_lookup(dev, file, handle);
if (obj == NULL)
return -ENOENT;
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
if (obj->size < width * height * 4) {
DRM_ERROR("buffer is to small\n");
@@ -7086,7 +7086,7 @@ static struct drm_display_mode load_detect_mode = {
int
intel_framebuffer_create(struct drm_device *dev,
- struct drm_mode_fb_cmd2 *mode_cmd, struct inteldrm_obj *obj_priv,
+ struct drm_mode_fb_cmd2 *mode_cmd, struct drm_i915_gem_object *obj_priv,
struct drm_framebuffer **res)
{
struct intel_framebuffer *intel_fb;
@@ -7095,7 +7095,7 @@ intel_framebuffer_create(struct drm_device *dev,
intel_fb = malloc(sizeof(*intel_fb), M_DRM, M_WAITOK | M_ZERO);
ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj_priv);
if (ret) {
- drm_unref(&obj_priv->obj.uobj);
+ drm_unref(&obj_priv->base.uobj);
free(intel_fb, M_DRM);
return (ret);
}
@@ -7126,7 +7126,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev,
printf("%s stub\n", __func__);
return EINVAL;
#ifdef notyet
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
struct drm_mode_fb_cmd2 mode_cmd;
obj = i915_gem_alloc_object(dev,
@@ -7152,7 +7152,7 @@ mode_fits_in_fbdev(struct drm_device *dev,
return 0;
#ifdef notyet
struct inteldrm_softc *dev_priv = dev->dev_private;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
struct drm_framebuffer *fb;
if (dev_priv->fbdev == NULL) {
@@ -7617,7 +7617,7 @@ intel_idle_update(void *arg, int pending)
* clock frequency.
*/
void
-intel_mark_busy(struct drm_device *dev, struct inteldrm_obj *obj)
+intel_mark_busy(struct drm_device *dev, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_crtc *crtc = NULL;
@@ -7709,7 +7709,7 @@ do_intel_finish_page_flip(struct drm_device *dev, struct drm_crtc *crtc)
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_unpin_work *work;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
struct drm_pending_vblank_event *e;
struct timeval tnow, tvbl;
@@ -7813,7 +7813,7 @@ intel_prepare_page_flip(struct drm_device *dev, int plane)
#ifdef notyet
int
intel_gen2_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -7853,7 +7853,7 @@ out:
int
intel_gen3_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -7891,7 +7891,7 @@ out:
int
intel_gen4_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -7929,7 +7929,7 @@ out:
int
intel_gen6_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -7971,7 +7971,7 @@ out:
*/
int
intel_gen7_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -7997,7 +7997,7 @@ out:
int
intel_default_queue_flip(struct drm_device *dev, struct drm_crtc *crtc,
- struct drm_framebuffer *fb, struct inteldrm_obj *obj)
+ struct drm_framebuffer *fb, struct drm_i915_gem_object *obj)
{
return -ENODEV;
}
@@ -8010,7 +8010,7 @@ intel_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
struct drm_device *dev = crtc->dev;
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_framebuffer *intel_fb;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
struct drm_obj *obj, *work_obj;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_unpin_work *work;
@@ -8428,7 +8428,7 @@ intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
drm_framebuffer_cleanup(fb);
- drm_gem_object_unreference_unlocked(&intel_fb->obj->obj);
+ drm_gem_object_unreference_unlocked(&intel_fb->obj->base);
free(intel_fb, M_DRM);
}
@@ -8438,9 +8438,9 @@ intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
struct drm_file *file, unsigned int *handle)
{
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
- struct inteldrm_obj *obj = intel_fb->obj;
+ struct drm_i915_gem_object *obj = intel_fb->obj;
- return drm_handle_create(file, &obj->obj, handle);
+ return drm_handle_create(file, &obj->base, handle);
}
static const struct drm_framebuffer_funcs intel_fb_funcs = {
@@ -8451,7 +8451,7 @@ static const struct drm_framebuffer_funcs intel_fb_funcs = {
int
intel_framebuffer_init(struct drm_device *dev,
struct intel_framebuffer *intel_fb, struct drm_mode_fb_cmd2 *mode_cmd,
- struct inteldrm_obj *obj)
+ struct drm_i915_gem_object *obj)
{
int ret;
@@ -8498,15 +8498,14 @@ intel_user_framebuffer_create(struct drm_device *dev,
struct drm_file *filp, struct drm_mode_fb_cmd2 *mode_cmd,
struct drm_framebuffer **res)
{
- struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj;
- obj = drm_gem_object_lookup(dev, filp, mode_cmd->handles[0]);
- if (obj == NULL)
+ obj = to_intel_bo(drm_gem_object_lookup(dev, filp,
+ mode_cmd->handles[0]));
+ if (&obj->base == NULL)
return (-ENOENT);
- obj_priv = (struct inteldrm_obj *)obj;
- return (intel_framebuffer_create(dev, mode_cmd, obj_priv, res));
+ return (intel_framebuffer_create(dev, mode_cmd, obj, res));
}
static const struct drm_mode_config_funcs intel_mode_funcs = {
@@ -8515,10 +8514,10 @@ static const struct drm_mode_config_funcs intel_mode_funcs = {
};
#ifdef notyet
-struct inteldrm_obj *
+struct drm_i915_gem_object *
intel_alloc_context_page(struct drm_device *dev)
{
- struct inteldrm_obj *ctx;
+ struct drm_i915_gem_object *ctx;
int ret;
// DRM_LOCK_ASSERT(dev);
diff --git a/sys/dev/pci/drm/intel_drv.h b/sys/dev/pci/drm/intel_drv.h
index 73d2210e485..2b3d5928fc2 100644
--- a/sys/dev/pci/drm/intel_drv.h
+++ b/sys/dev/pci/drm/intel_drv.h
@@ -108,7 +108,7 @@ intel_mode_get_pixel_multiplier(const struct drm_display_mode *mode)
struct intel_framebuffer {
struct drm_framebuffer base;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
};
struct intel_fbdev {
@@ -146,7 +146,7 @@ struct intel_crtc {
struct intel_unpin_work *unpin_work;
int fdi_lanes;
- struct inteldrm_obj *cursor_bo;
+ struct drm_i915_gem_object *cursor_bo;
uint32_t cursor_addr;
int16_t cursor_x, cursor_y;
int16_t cursor_width, cursor_height;
@@ -160,13 +160,13 @@ struct intel_crtc {
struct intel_plane {
struct drm_plane base;
enum pipe pipe;
- struct inteldrm_obj *obj;
+ struct drm_i915_gem_object *obj;
bool primary_disabled;
int max_downscale;
u32 lut_r[1024], lut_g[1024], lut_b[1024];
void (*update_plane)(struct drm_plane *plane,
struct drm_framebuffer *fb,
- struct inteldrm_obj *obj,
+ struct drm_i915_gem_object *obj,
int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h,
uint32_t x, uint32_t y,
@@ -256,8 +256,8 @@ intel_get_crtc_for_plane(struct drm_device *dev, int plane)
struct intel_unpin_work {
// struct task task;
struct drm_device *dev;
- struct inteldrm_obj *old_fb_obj;
- struct inteldrm_obj *pending_flip_obj;
+ struct drm_i915_gem_object *old_fb_obj;
+ struct drm_i915_gem_object *pending_flip_obj;
struct drm_pending_vblank_event *event;
int pending;
bool enable_stall_check;
@@ -285,7 +285,7 @@ extern bool intel_sdvo_init(struct drm_device *dev, int output_device);
extern void intel_dvo_init(struct drm_device *dev);
extern void intel_tv_init(struct drm_device *dev);
extern void intel_mark_busy(struct drm_device *dev,
- struct inteldrm_obj *obj);
+ struct drm_i915_gem_object *obj);
extern bool intel_lvds_init(struct drm_device *dev);
extern void intel_dp_init(struct drm_device *dev, int dp_reg);
void
@@ -367,7 +367,7 @@ extern void intel_unpin_fb_obj(struct drm_obj *obj);
extern int intel_framebuffer_init(struct drm_device *dev,
struct intel_framebuffer *ifb,
struct drm_mode_fb_cmd2 *mode_cmd,
- struct inteldrm_obj *obj);
+ struct drm_i915_gem_object *obj);
extern int intel_fbdev_init(struct drm_device *dev);
extern void intel_fbdev_fini(struct drm_device *dev);
diff --git a/sys/dev/pci/drm/intel_fb.c b/sys/dev/pci/drm/intel_fb.c
index e80acf58a4c..5f9a44a175c 100644
--- a/sys/dev/pci/drm/intel_fb.c
+++ b/sys/dev/pci/drm/intel_fb.c
@@ -50,7 +50,7 @@ intelfb_create(struct intel_fbdev *ifbdev,
struct drm_framebuffer *fb;
struct drm_mode_fb_cmd2 mode_cmd;
struct drm_obj *obj;
- struct inteldrm_obj *obj_priv;
+ struct drm_i915_gem_object *obj_priv;
int size, ret;
/* we don't do packed 24bpp */
@@ -93,7 +93,7 @@ intelfb_create(struct intel_fbdev *ifbdev,
info->par = ifbdev;
#endif
- obj_priv = (struct inteldrm_obj *)obj;
+ obj_priv = (struct drm_i915_gem_object *)obj;
ret = intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, obj_priv);
if (ret)
goto out_unpin;
diff --git a/sys/dev/pci/drm/intel_overlay.c b/sys/dev/pci/drm/intel_overlay.c
index 9233ef61290..1c5010ecf69 100644
--- a/sys/dev/pci/drm/intel_overlay.c
+++ b/sys/dev/pci/drm/intel_overlay.c
@@ -172,8 +172,8 @@ struct overlay_registers {
struct intel_overlay {
struct drm_device *dev;
struct intel_crtc *crtc;
- struct inteldrm_obj *vid_bo;
- struct inteldrm_obj *old_vid_bo;
+ struct drm_i915_gem_object *vid_bo;
+ struct drm_i915_gem_object *old_vid_bo;
int active;
int pfit_active;
u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */
@@ -182,7 +182,7 @@ struct intel_overlay {
u32 old_xscale, old_yscale;
/* register access */
u32 flip_addr;
- struct inteldrm_obj *reg_bo;
+ struct drm_i915_gem_object *reg_bo;
/* flip handling */
uint32_t last_flip_req;
void (*flip_tail)(struct intel_overlay *);
@@ -217,7 +217,7 @@ int packed_width_bytes(u32, short);
int uv_hsubsampling(u32);
int uv_vsubsampling(u32);
int intel_overlay_do_put_image(struct intel_overlay *,
- struct inteldrm_obj *, struct put_image_params *);
+ struct drm_i915_gem_object *, struct put_image_params *);
int check_overlay_possible_on_crtc(struct intel_overlay *,
struct intel_crtc *);
void update_pfit_vscale_ratio(struct intel_overlay *);
@@ -225,7 +225,8 @@ int check_overlay_dst(struct intel_overlay *,
struct drm_intel_overlay_put_image *);
int check_overlay_scaling(struct put_image_params *);
int check_overlay_src(struct drm_device *,
- struct drm_intel_overlay_put_image *, struct inteldrm_obj *);
+ struct drm_intel_overlay_put_image *,
+ struct drm_i915_gem_object *);
int intel_panel_fitter_pipe(struct drm_device *);
void update_reg_attrs(struct intel_overlay *, struct overlay_registers *);
bool check_gamma_bounds(u32, u32);
@@ -451,7 +452,7 @@ intel_overlay_continue(struct intel_overlay *overlay,
void
intel_overlay_release_old_vid_tail(struct intel_overlay *overlay)
{
- struct inteldrm_obj *obj_priv = overlay->old_vid_bo;
+ struct drm_i915_gem_object *obj_priv = overlay->old_vid_bo;
struct drm_obj *obj = (struct drm_obj *)obj_priv;
i915_gem_object_unpin(obj);
@@ -463,7 +464,7 @@ intel_overlay_release_old_vid_tail(struct intel_overlay *overlay)
void
intel_overlay_off_tail(struct intel_overlay *overlay)
{
- struct inteldrm_obj *obj_priv = overlay->vid_bo;
+ struct drm_i915_gem_object *obj_priv = overlay->vid_bo;
struct drm_obj *obj = (struct drm_obj *)obj_priv;
/* never have the overlay hw on without showing a frame */
@@ -849,7 +850,7 @@ max_u32(u32 a, u32 b)
int
intel_overlay_do_put_image(struct intel_overlay *overlay,
- struct inteldrm_obj *new_bo_priv, struct put_image_params *params)
+ struct drm_i915_gem_object *new_bo_priv, struct put_image_params *params)
{
struct inteldrm_softc *dev_priv;
struct drm_obj *new_bo = (struct drm_obj *)new_bo_priv;
@@ -944,7 +945,7 @@ intel_overlay_do_put_image(struct intel_overlay *overlay,
goto out_unpin;
overlay->old_vid_bo = overlay->vid_bo;
- overlay->vid_bo = (struct inteldrm_obj *)new_bo;
+ overlay->vid_bo = (struct drm_i915_gem_object *)new_bo;
return 0;
@@ -1062,7 +1063,8 @@ check_overlay_scaling(struct put_image_params *rec)
int
check_overlay_src(struct drm_device *dev,
- struct drm_intel_overlay_put_image *rec, struct inteldrm_obj *new_bo_priv)
+ struct drm_intel_overlay_put_image *rec,
+ struct drm_i915_gem_object *new_bo_priv)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct drm_obj *new_bo = (struct drm_obj *)new_bo_priv;
@@ -1210,7 +1212,7 @@ intel_overlay_put_image(struct drm_device *dev, void *data,
struct intel_overlay *overlay;
struct drm_mode_object *drmmode_obj;
struct intel_crtc *crtc;
- struct inteldrm_obj *new_bo_priv;
+ struct drm_i915_gem_object *new_bo_priv;
struct drm_obj *new_bo;
struct put_image_params *params;
int ret;
@@ -1251,7 +1253,7 @@ intel_overlay_put_image(struct drm_device *dev, void *data,
new_bo = drm_gem_object_lookup(dev, file_priv, put_image_rec->bo_handle);
- new_bo_priv = (struct inteldrm_obj *)new_bo;
+ new_bo_priv = (struct drm_i915_gem_object *)new_bo;
mtx_enter(&dev->mode_config.mutex);
DRM_LOCK();
@@ -1502,7 +1504,7 @@ intel_setup_overlay(struct drm_device *dev)
{
struct inteldrm_softc *dev_priv = dev->dev_private;
struct intel_overlay *overlay;
- struct inteldrm_obj *reg_bo_priv;
+ struct drm_i915_gem_object *reg_bo_priv;
struct drm_obj *reg_bo;
struct overlay_registers *regs;
int ret;
@@ -1518,7 +1520,7 @@ intel_setup_overlay(struct drm_device *dev)
overlay->dev = dev;
reg_bo = drm_gem_object_alloc(dev, PAGE_SIZE);
- reg_bo_priv = (struct inteldrm_obj *)reg_bo;
+ reg_bo_priv = (struct drm_i915_gem_object *)reg_bo;
if (!reg_bo_priv)
goto out_free;
diff --git a/sys/dev/pci/drm/intel_sprite.c b/sys/dev/pci/drm/intel_sprite.c
index ee7c488cc0e..e9c33785c08 100644
--- a/sys/dev/pci/drm/intel_sprite.c
+++ b/sys/dev/pci/drm/intel_sprite.c
@@ -54,16 +54,16 @@ int intel_update_plane(struct drm_plane *, struct drm_crtc *,
int intel_sprite_disable_plane(struct drm_plane *);
void intel_destroy_plane(struct drm_plane *);
void ivb_update_plane(struct drm_plane *, struct drm_framebuffer *,
- struct inteldrm_obj *, int, int, unsigned int, unsigned int,
- uint32_t, uint32_t, uint32_t, uint32_t);
+ struct drm_i915_gem_object *, int, int, unsigned int,
+ unsigned int, uint32_t, uint32_t, uint32_t, uint32_t);
void snb_update_plane(struct drm_plane *, struct drm_framebuffer *,
- struct inteldrm_obj *, int, int, unsigned int, unsigned int,
- uint32_t, uint32_t, uint32_t, uint32_t);
+ struct drm_i915_gem_object *, int, int, unsigned int,
+ unsigned int, uint32_t, uint32_t, uint32_t, uint32_t);
void intel_disable_primary(struct drm_crtc *);
void
ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
- struct inteldrm_obj *obj, int crtc_x, int crtc_y,
+ struct drm_i915_gem_object *obj, int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h, uint32_t x, uint32_t y,
uint32_t src_w, uint32_t src_h)
{
@@ -233,7 +233,7 @@ ivb_get_colorkey(struct drm_plane *plane, struct drm_intel_sprite_colorkey *key)
void
snb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
- struct inteldrm_obj *obj, int crtc_x, int crtc_y,
+ struct drm_i915_gem_object *obj, int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h, uint32_t x, uint32_t y,
uint32_t src_w, uint32_t src_h)
{
@@ -420,7 +420,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_plane *intel_plane = to_intel_plane(plane);
struct intel_framebuffer *intel_fb;
- struct inteldrm_obj *obj_priv, *old_obj_priv;
+ struct drm_i915_gem_object *obj_priv, *old_obj_priv;
struct drm_obj *obj, *old_obj;
int pipe = intel_plane->pipe;
int ret = 0;