mirror of https://gitee.com/openkylin/linux.git
drm/nouveau/core: remove some left-over pieces from the porting process
Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
b10f20d590
commit
c4837d2794
|
@ -2,11 +2,9 @@
|
|||
#define __NOUVEAU_GPUOBJ_H__
|
||||
|
||||
#include <core/object.h>
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
#include <core/device.h>
|
||||
#include <core/parent.h>
|
||||
#include <core/mm.h>
|
||||
#endif
|
||||
|
||||
struct nouveau_vma;
|
||||
struct nouveau_vm;
|
||||
|
@ -24,14 +22,8 @@ struct nouveau_gpuobj {
|
|||
u32 flags;
|
||||
u64 addr;
|
||||
u32 size;
|
||||
|
||||
/*XXX*/
|
||||
struct drm_device *dev;
|
||||
u32 engine;
|
||||
u32 class;
|
||||
};
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
static inline struct nouveau_gpuobj *
|
||||
nv_gpuobj(void *obj)
|
||||
{
|
||||
|
@ -63,7 +55,6 @@ int nouveau_gpuobj_map(struct nouveau_gpuobj *, u32 acc, struct nouveau_vma *);
|
|||
int nouveau_gpuobj_map_vm(struct nouveau_gpuobj *, struct nouveau_vm *,
|
||||
u32 access, struct nouveau_vma *);
|
||||
void nouveau_gpuobj_unmap(struct nouveau_vma *);
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
nouveau_gpuobj_ref(struct nouveau_gpuobj *obj, struct nouveau_gpuobj **ref)
|
||||
|
@ -71,12 +62,10 @@ nouveau_gpuobj_ref(struct nouveau_gpuobj *obj, struct nouveau_gpuobj **ref)
|
|||
nouveau_object_ref(&obj->base, (struct nouveau_object **)ref);
|
||||
}
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
void _nouveau_gpuobj_dtor(struct nouveau_object *);
|
||||
int _nouveau_gpuobj_init(struct nouveau_object *);
|
||||
int _nouveau_gpuobj_fini(struct nouveau_object *, bool);
|
||||
u32 _nouveau_gpuobj_rd32(struct nouveau_object *, u32);
|
||||
void _nouveau_gpuobj_wr32(struct nouveau_object *, u32, u32);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef __NOUVEAU_FB_H__
|
||||
#define __NOUVEAU_FB_H__
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
#include <core/subdev.h>
|
||||
#include <core/device.h>
|
||||
#endif
|
||||
#include <core/mm.h>
|
||||
|
||||
#include <subdev/vm.h>
|
||||
|
@ -50,7 +48,6 @@ struct nouveau_fb_tile {
|
|||
u32 zcomp;
|
||||
};
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
struct nouveau_fb {
|
||||
struct nouveau_subdev base;
|
||||
|
||||
|
@ -133,6 +130,5 @@ void nv30_fb_tile_fini(struct nouveau_fb *, int i, struct nouveau_fb_tile *);
|
|||
|
||||
void nv50_fb_vram_del(struct nouveau_fb *, struct nouveau_mem **);
|
||||
void nv50_fb_trap(struct nouveau_fb *, int display);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,14 +25,11 @@
|
|||
#ifndef __NOUVEAU_VM_H__
|
||||
#define __NOUVEAU_VM_H__
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
#include <core/object.h>
|
||||
#include <core/subdev.h>
|
||||
#include <core/device.h>
|
||||
#endif
|
||||
#include <core/mm.h>
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
struct nouveau_vm_pgt {
|
||||
struct nouveau_gpuobj *obj[2];
|
||||
u32 refcount[2];
|
||||
|
@ -42,7 +39,6 @@ struct nouveau_vm_pgd {
|
|||
struct list_head head;
|
||||
struct nouveau_gpuobj *obj;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct nouveau_gpuobj;
|
||||
struct nouveau_mem;
|
||||
|
@ -69,7 +65,6 @@ struct nouveau_vm {
|
|||
u32 lpde;
|
||||
};
|
||||
|
||||
#ifndef XXX_THIS_IS_A_HACK
|
||||
struct nouveau_vmmgr {
|
||||
struct nouveau_subdev base;
|
||||
|
||||
|
@ -129,7 +124,6 @@ int nouveau_vm_create(struct nouveau_vmmgr *, u64 offset, u64 length,
|
|||
u64 mm_offset, u32 block, struct nouveau_vm **);
|
||||
int nouveau_vm_new(struct nouveau_device *, u64 offset, u64 length,
|
||||
u64 mm_offset, struct nouveau_vm **);
|
||||
#endif
|
||||
int nouveau_vm_ref(struct nouveau_vm *, struct nouveau_vm **,
|
||||
struct nouveau_gpuobj *pgd);
|
||||
int nouveau_vm_get(struct nouveau_vm *, u64 size, u32 page_shift,
|
||||
|
|
Loading…
Reference in New Issue