Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
493f189d
Commit
493f189d
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/object: store object type data outside of handle
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a1e88736
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
+3
-3
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/core/object.c
drivers/gpu/drm/nouveau/nvkm/core/object.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
View file @
493f189d
...
...
@@ -4,7 +4,7 @@
#include <subdev/mmu.h>
#define NV_ENGCTX_(eng,var) (
NV_ENGCTX_CLASS |
((var) << 8) | (eng))
#define NV_ENGCTX_(eng,var) (((var) << 8) | (eng))
#define NV_ENGCTX(name,var) NV_ENGCTX_(NVDEV_ENGINE_##name, (var))
struct
nvkm_engctx
{
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
View file @
493f189d
...
...
@@ -2,7 +2,7 @@
#define __NVKM_ENGINE_H__
#include <core/subdev.h>
#define NV_ENGINE_(eng,var) (
NV_ENGINE_CLASS |
((var) << 8) | (eng))
#define NV_ENGINE_(eng,var) (((var) << 8) | (eng))
#define NV_ENGINE(name,var) NV_ENGINE_(NVDEV_ENGINE_##name, (var))
struct
nvkm_engine
{
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
View file @
493f189d
...
...
@@ -11,10 +11,10 @@
#define NV_MEMOBJ_CLASS 0x04000000
#define NV_GPUOBJ_CLASS 0x02000000
#define NV_ENGCTX_CLASS 0x01000000
#define NV_OBJECT_CLASS 0x0000ffff
struct
nvkm_object
{
struct
nvkm_oclass
*
oclass
;
u32
pclass
;
struct
nvkm_object
*
parent
;
struct
nvkm_engine
*
engine
;
atomic_t
refcount
;
...
...
@@ -70,8 +70,8 @@ struct nvkm_oclass {
#define nv_oclass(o) nv_object(o)->oclass
#define nv_hclass(o) nv_oclass(o)->handle
#define nv_iclass(o,i) (nv_
hclass(o)
& (i))
#define nv_mclass(o) nv_
iclass(o, NV_OBJECT_CLASS)
#define nv_iclass(o,i) (nv_
object(o)->pclass
& (i))
#define nv_mclass(o) nv_
oclass(o)->handle
static
inline
struct
nvkm_object
*
nv_pclass
(
struct
nvkm_object
*
parent
,
u32
oclass
)
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
View file @
493f189d
...
...
@@ -2,7 +2,7 @@
#define __NVKM_SUBDEV_H__
#include <core/object.h>
#define NV_SUBDEV_(sub,var) (
NV_SUBDEV_CLASS |
((var) << 8) | (sub))
#define NV_SUBDEV_(sub,var) (((var) << 8) | (sub))
#define NV_SUBDEV(name,var) NV_SUBDEV_(NVDEV_SUBDEV_##name, (var))
struct
nvkm_subdev
{
...
...
drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
View file @
493f189d
...
...
@@ -50,7 +50,7 @@ struct nvkm_fifo_base {
};
#define nvkm_fifo_context_create(p,e,c,g,s,a,f,d) \
nvkm_gpuobj_create((p), (e), (c),
0
, (g), (s), (a), (f), (d))
nvkm_gpuobj_create((p), (e), (c),
NV_ENGCTX_CLASS
, (g), (s), (a), (f), (d))
#define nvkm_fifo_context_destroy(p) \
nvkm_gpuobj_destroy(&(p)->gpuobj)
#define nvkm_fifo_context_init(p) \
...
...
drivers/gpu/drm/nouveau/nvkm/core/object.c
View file @
493f189d
...
...
@@ -107,7 +107,7 @@ nvkm_object_create_(struct nvkm_object *parent, struct nvkm_object *engine,
nvkm_object_ref
(
parent
,
&
object
->
parent
);
nvkm_object_ref
(
engine
,
(
struct
nvkm_object
**
)
&
object
->
engine
);
object
->
oclass
=
oclass
;
object
->
oclass
->
handle
|
=
pclass
;
object
->
pclass
=
pclass
;
atomic_set
(
&
object
->
refcount
,
1
);
atomic_set
(
&
object
->
usecount
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment