gem.h (de2d1822f9489268e0707b2d188dd789d5effd08) gem.h (d339386c9ffa69d20fcc34f3636dea80ea71818c)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/**************************************************************************
3 * Copyright (c) 2014 Patrik Jakobsson
4 * All Rights Reserved.
5 *
6 **************************************************************************/
7
8#ifndef _GEM_H
9#define _GEM_H
10
11#include <linux/kernel.h>
12
13#include <drm/drm_gem.h>
14
15struct drm_device;
16
1/* SPDX-License-Identifier: GPL-2.0-only */
2/**************************************************************************
3 * Copyright (c) 2014 Patrik Jakobsson
4 * All Rights Reserved.
5 *
6 **************************************************************************/
7
8#ifndef _GEM_H
9#define _GEM_H
10
11#include <linux/kernel.h>
12
13#include <drm/drm_gem.h>
14
15struct drm_device;
16
17/*
18 * PSB GEM object
19 */
20
17struct psb_gem_object {
18 struct drm_gem_object base;
19
20 struct resource resource; /* GTT resource for our allocation */
21 u32 offset; /* GTT offset of our object */
22 int in_gart; /* Currently in the GART (ref ct) */
23 bool stolen; /* Backed from stolen RAM */
24 bool mmapping; /* Is mmappable */

--- 6 unchanged lines hidden (view full) ---

31}
32
33struct psb_gem_object *
34psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen, u32 align);
35
36int psb_gem_pin(struct psb_gem_object *pobj);
37void psb_gem_unpin(struct psb_gem_object *pobj);
38
21struct psb_gem_object {
22 struct drm_gem_object base;
23
24 struct resource resource; /* GTT resource for our allocation */
25 u32 offset; /* GTT offset of our object */
26 int in_gart; /* Currently in the GART (ref ct) */
27 bool stolen; /* Backed from stolen RAM */
28 bool mmapping; /* Is mmappable */

--- 6 unchanged lines hidden (view full) ---

35}
36
37struct psb_gem_object *
38psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen, u32 align);
39
40int psb_gem_pin(struct psb_gem_object *pobj);
41void psb_gem_unpin(struct psb_gem_object *pobj);
42
43/*
44 * Memory management
45 */
46
47int psb_gem_mm_init(struct drm_device *dev);
48void psb_gem_mm_fini(struct drm_device *dev);
49int psb_gem_mm_resume(struct drm_device *dev);
50
39#endif
51#endif