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
nexedi
linux
Commits
53003941
Commit
53003941
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/core: remove last printks
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
9ad97ede
Changes
50
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
294 additions
and
514 deletions
+294
-514
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/debug.h
drivers/gpu/drm/nouveau/include/nvkm/core/debug.h
+1
-8
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/namedb.h
drivers/gpu/drm/nouveau/include/nvkm/core/namedb.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
+2
-10
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/core/printk.h
drivers/gpu/drm/nouveau/include/nvkm/core/printk.h
+0
-29
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
+1
-2
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
+1
-2
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+0
-3
drivers/gpu/drm/nouveau/nvkm/core/Kbuild
drivers/gpu/drm/nouveau/nvkm/core/Kbuild
+0
-1
drivers/gpu/drm/nouveau/nvkm/core/client.c
drivers/gpu/drm/nouveau/nvkm/core/client.c
+15
-13
drivers/gpu/drm/nouveau/nvkm/core/engctx.c
drivers/gpu/drm/nouveau/nvkm/core/engctx.c
+6
-6
drivers/gpu/drm/nouveau/nvkm/core/engine.c
drivers/gpu/drm/nouveau/nvkm/core/engine.c
+6
-3
drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
+1
-3
drivers/gpu/drm/nouveau/nvkm/core/handle.c
drivers/gpu/drm/nouveau/nvkm/core/handle.c
+1
-2
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
+52
-50
drivers/gpu/drm/nouveau/nvkm/core/object.c
drivers/gpu/drm/nouveau/nvkm/core/object.c
+10
-82
drivers/gpu/drm/nouveau/nvkm/core/option.c
drivers/gpu/drm/nouveau/nvkm/core/option.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/core/printk.c
drivers/gpu/drm/nouveau/nvkm/core/printk.c
+0
-103
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+5
-4
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+8
-9
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
+11
-11
drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c
+8
-8
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf110.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigf110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigf110.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
+6
-5
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
+35
-34
drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c
+3
-3
drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c
+3
-3
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/base.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/base.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
+4
-3
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
+4
-3
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
+9
-9
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+5
-5
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
+9
-9
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
+21
-21
No files found.
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
View file @
53003941
...
...
@@ -20,8 +20,7 @@ static inline struct nvkm_client *
nv_client
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_CLIENT_CLASS
)))
nv_assert
(
"BAD CAST -> NvClient, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_CLIENT_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/debug.h
View file @
53003941
#ifndef __NVKM_DEBUG_H__
#define __NVKM_DEBUG_H__
extern
int
nv_info_debug_level
;
#define NV_DBG_FATAL 0
#define NV_DBG_ERROR 1
#define NV_DBG_WARN 2
#define NV_DBG_INFO
nv_info_debug_level
#define NV_DBG_INFO
3
#define NV_DBG_DEBUG 4
#define NV_DBG_TRACE 5
#define NV_DBG_PARANOIA 6
#define NV_DBG_SPAM 7
#define NV_DBG_INFO_NORMAL 3
#define NV_DBG_INFO_SILENT NV_DBG_DEBUG
#define nv_debug_level(a) nv_info_debug_level = NV_DBG_INFO_##a
#endif
drivers/gpu/drm/nouveau/include/nvkm/core/engctx.h
View file @
53003941
...
...
@@ -19,8 +19,7 @@ static inline struct nvkm_engctx *
nv_engctx
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_ENGCTX_CLASS
)))
nv_assert
(
"BAD CAST -> NvEngCtx, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_ENGCTX_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
View file @
53003941
...
...
@@ -21,8 +21,7 @@ static inline struct nvkm_engine *
nv_engine
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_ENGINE_CLASS
)))
nv_assert
(
"BAD CAST -> NvEngine, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_ENGINE_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h
View file @
53003941
...
...
@@ -24,8 +24,7 @@ static inline struct nvkm_gpuobj *
nv_gpuobj
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_GPUOBJ_CLASS
)))
nv_assert
(
"BAD CAST -> NvGpuObj, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_GPUOBJ_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/namedb.h
View file @
53003941
...
...
@@ -13,8 +13,7 @@ static inline struct nvkm_namedb *
nv_namedb
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_NAMEDB_CLASS
)))
nv_assert
(
"BAD CAST -> NvNameDB, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_NAMEDB_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
View file @
53003941
#ifndef __NVKM_OBJECT_H__
#define __NVKM_OBJECT_H__
#include <core/os.h>
#include <core/
printk
.h>
#include <core/
debug
.h>
#define NV_PARENT_CLASS 0x80000000
#define NV_NAMEDB_CLASS 0x40000000
...
...
@@ -32,8 +32,7 @@ nv_object(void *obj)
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
likely
(
obj
))
{
struct
nvkm_object
*
object
=
obj
;
if
(
unlikely
(
object
->
_magic
!=
NVKM_OBJECT_MAGIC
))
nv_assert
(
"BAD CAST -> NvObject, invalid magic"
);
BUG_ON
(
object
->
_magic
!=
NVKM_OBJECT_MAGIC
);
}
#endif
return
obj
;
...
...
@@ -112,7 +111,6 @@ int nvkm_object_ctor(struct nvkm_object *, struct nvkm_object *,
void
nvkm_object_ref
(
struct
nvkm_object
*
,
struct
nvkm_object
**
);
int
nvkm_object_inc
(
struct
nvkm_object
*
);
int
nvkm_object_dec
(
struct
nvkm_object
*
,
bool
suspend
);
void
nvkm_object_debug
(
void
);
static
inline
int
nv_exec
(
void
*
obj
,
u32
mthd
,
void
*
data
,
u32
size
)
...
...
@@ -138,7 +136,6 @@ static inline u8
nv_ro08
(
void
*
obj
,
u64
addr
)
{
u8
data
=
nv_ofuncs
(
obj
)
->
rd08
(
obj
,
addr
);
nv_spam
(
obj
,
"nv_ro08 0x%08llx 0x%02x
\n
"
,
addr
,
data
);
return
data
;
}
...
...
@@ -146,7 +143,6 @@ static inline u16
nv_ro16
(
void
*
obj
,
u64
addr
)
{
u16
data
=
nv_ofuncs
(
obj
)
->
rd16
(
obj
,
addr
);
nv_spam
(
obj
,
"nv_ro16 0x%08llx 0x%04x
\n
"
,
addr
,
data
);
return
data
;
}
...
...
@@ -154,28 +150,24 @@ static inline u32
nv_ro32
(
void
*
obj
,
u64
addr
)
{
u32
data
=
nv_ofuncs
(
obj
)
->
rd32
(
obj
,
addr
);
nv_spam
(
obj
,
"nv_ro32 0x%08llx 0x%08x
\n
"
,
addr
,
data
);
return
data
;
}
static
inline
void
nv_wo08
(
void
*
obj
,
u64
addr
,
u8
data
)
{
nv_spam
(
obj
,
"nv_wo08 0x%08llx 0x%02x
\n
"
,
addr
,
data
);
nv_ofuncs
(
obj
)
->
wr08
(
obj
,
addr
,
data
);
}
static
inline
void
nv_wo16
(
void
*
obj
,
u64
addr
,
u16
data
)
{
nv_spam
(
obj
,
"nv_wo16 0x%08llx 0x%04x
\n
"
,
addr
,
data
);
nv_ofuncs
(
obj
)
->
wr16
(
obj
,
addr
,
data
);
}
static
inline
void
nv_wo32
(
void
*
obj
,
u64
addr
,
u32
data
)
{
nv_spam
(
obj
,
"nv_wo32 0x%08llx 0x%08x
\n
"
,
addr
,
data
);
nv_ofuncs
(
obj
)
->
wr32
(
obj
,
addr
,
data
);
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
View file @
53003941
...
...
@@ -27,8 +27,7 @@ static inline struct nvkm_parent *
nv_parent
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
(
nv_iclass
(
obj
,
NV_PARENT_CLASS
))))
nv_assert
(
"BAD CAST -> NvParent, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
(
nv_iclass
(
obj
,
NV_PARENT_CLASS
)));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/printk.h
deleted
100644 → 0
View file @
9ad97ede
#ifndef __NVKM_PRINTK_H__
#define __NVKM_PRINTK_H__
#include <core/os.h>
#include <core/debug.h>
struct
nvkm_object
;
void
__printf
(
3
,
4
)
nv_printk_
(
struct
nvkm_object
*
,
int
,
const
char
*
,
...);
#define nv_printk(o,l,f,a...) do { \
if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \
nv_printk_(nv_object(o), NV_DBG_##l, f, ##a); \
} while(0)
#define nv_fatal(o,f,a...) nv_printk((o), FATAL, f, ##a)
#define nv_error(o,f,a...) nv_printk((o), ERROR, f, ##a)
#define nv_warn(o,f,a...) nv_printk((o), WARN, f, ##a)
#define nv_info(o,f,a...) nv_printk((o), INFO, f, ##a)
#define nv_debug(o,f,a...) nv_printk((o), DEBUG, f, ##a)
#define nv_trace(o,f,a...) nv_printk((o), TRACE, f, ##a)
#define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a)
#define nv_ioctl(o,f,a...) nv_trace(nvkm_client(o), "ioctl: "f, ##a)
#define nv_assert(f,a...) do { \
if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \
nv_printk_(NULL, NV_DBG_FATAL, f "\n", ##a); \
BUG_ON(1); \
} while(0)
#endif
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
View file @
53003941
...
...
@@ -22,8 +22,7 @@ static inline struct nvkm_subdev *
nv_subdev
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_SUBDEV_CLASS
)))
nv_assert
(
"BAD CAST -> NvSubDev, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_SUBDEV_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
View file @
53003941
...
...
@@ -14,8 +14,7 @@ static inline struct nvkm_instobj *
nv_memobj
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
nv_iclass
(
obj
,
NV_MEMOBJ_CLASS
)))
nv_assert
(
"BAD CAST -> NvMemObj, %08x"
,
nv_hclass
(
obj
));
BUG_ON
(
!
nv_iclass
(
obj
,
NV_MEMOBJ_CLASS
));
#endif
return
obj
;
}
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
View file @
53003941
...
...
@@ -538,7 +538,6 @@ nouveau_drm_device_remove(struct drm_device *dev)
drm_put_dev
(
dev
);
nvkm_object_ref
(
NULL
,
&
device
);
nvkm_object_debug
();
}
static
void
...
...
@@ -731,7 +730,6 @@ nouveau_pmops_runtime_suspend(struct device *dev)
return
-
EBUSY
;
}
nv_debug_level
(
SILENT
);
drm_kms_helper_poll_disable
(
drm_dev
);
vga_switcheroo_set_dynamic_switch
(
pdev
,
VGA_SWITCHEROO_OFF
);
nouveau_switcheroo_optimus_dsm
();
...
...
@@ -768,7 +766,6 @@ nouveau_pmops_runtime_resume(struct device *dev)
nvif_mask
(
device
,
0x88488
,
(
1
<<
25
),
(
1
<<
25
));
vga_switcheroo_set_dynamic_switch
(
pdev
,
VGA_SWITCHEROO_ON
);
drm_dev
->
switch_power_state
=
DRM_SWITCH_POWER_ON
;
nv_debug_level
(
NORMAL
);
return
ret
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/core/Kbuild
View file @
53003941
...
...
@@ -12,6 +12,5 @@ nvkm-y += nvkm/core/notify.o
nvkm-y += nvkm/core/object.o
nvkm-y += nvkm/core/option.o
nvkm-y += nvkm/core/parent.o
nvkm-y += nvkm/core/printk.o
nvkm-y += nvkm/core/ramht.o
nvkm-y += nvkm/core/subdev.o
drivers/gpu/drm/nouveau/nvkm/core/client.c
View file @
53003941
...
...
@@ -111,11 +111,11 @@ nvkm_client_notify_new(struct nvkm_object *object,
if
(
!
notify
)
return
-
ENOMEM
;
nv
_ioctl
(
clien
t
,
"notify new size %d
\n
"
,
size
);
nv
if_ioctl
(
objec
t
,
"notify new size %d
\n
"
,
size
);
if
(
nvif_unpack
(
req
->
v0
,
0
,
0
,
true
))
{
nv
_ioctl
(
clien
t
,
"notify new vers %d reply %d route %02x "
"token %llx
\n
"
,
req
->
v0
.
version
,
req
->
v0
.
reply
,
req
->
v0
.
route
,
req
->
v0
.
token
);
nv
if_ioctl
(
objec
t
,
"notify new vers %d reply %d route %02x "
"token %llx
\n
"
,
req
->
v0
.
version
,
req
->
v0
.
reply
,
req
->
v0
.
route
,
req
->
v0
.
token
);
notify
->
version
=
req
->
v0
.
version
;
notify
->
size
=
sizeof
(
notify
->
rep
.
v0
);
notify
->
rep
.
v0
.
version
=
req
->
v0
.
version
;
...
...
@@ -146,10 +146,10 @@ nvkm_client_mthd_devlist(struct nvkm_object *object, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"client devlist size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"client devlist size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"client devlist vers %d count %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
count
);
nv
if
_ioctl
(
object
,
"client devlist vers %d count %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
count
);
if
(
size
==
sizeof
(
args
->
v0
.
device
[
0
])
*
args
->
v0
.
count
)
{
ret
=
nvkm_device_list
(
args
->
v0
.
device
,
args
->
v0
.
count
);
if
(
ret
>=
0
)
{
...
...
@@ -233,25 +233,27 @@ nvkm_client_create_(const char *name, u64 devname, const char *cfg,
int
nvkm_client_init
(
struct
nvkm_client
*
client
)
{
struct
nvkm_object
*
object
=
&
client
->
namedb
.
parent
.
object
;
int
ret
;
nv
_debug
(
clien
t
,
"init running
\n
"
);
nv
if_trace
(
objec
t
,
"init running
\n
"
);
ret
=
nvkm_handle_init
(
client
->
root
);
nv
_debug
(
clien
t
,
"init completed with %d
\n
"
,
ret
);
nv
if_trace
(
objec
t
,
"init completed with %d
\n
"
,
ret
);
return
ret
;
}
int
nvkm_client_fini
(
struct
nvkm_client
*
client
,
bool
suspend
)
{
struct
nvkm_object
*
object
=
&
client
->
namedb
.
parent
.
object
;
const
char
*
name
[
2
]
=
{
"fini"
,
"suspend"
};
int
ret
,
i
;
nv
_debug
(
clien
t
,
"%s running
\n
"
,
name
[
suspend
]);
nv
_debug
(
clien
t
,
"%s notify
\n
"
,
name
[
suspend
]);
nv
if_trace
(
objec
t
,
"%s running
\n
"
,
name
[
suspend
]);
nv
if_trace
(
objec
t
,
"%s notify
\n
"
,
name
[
suspend
]);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
client
->
notify
);
i
++
)
nvkm_client_notify_put
(
client
,
i
);
nv
_debug
(
clien
t
,
"%s object
\n
"
,
name
[
suspend
]);
nv
if_trace
(
objec
t
,
"%s object
\n
"
,
name
[
suspend
]);
ret
=
nvkm_handle_fini
(
client
->
root
,
suspend
);
nv
_debug
(
clien
t
,
"%s completed with %d
\n
"
,
name
[
suspend
],
ret
);
nv
if_trace
(
objec
t
,
"%s completed with %d
\n
"
,
name
[
suspend
],
ret
);
return
ret
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/core/engctx.c
View file @
53003941
...
...
@@ -143,12 +143,12 @@ nvkm_engctx_init(struct nvkm_engctx *engctx)
}
if
(
ret
)
{
nv
_error
(
parent
,
"failed to attach %s context, %d
\n
"
,
subdev
->
name
,
ret
);
nv
km_error
(
pardev
,
"failed to attach %s context, %d
\n
"
,
subdev
->
name
,
ret
);
return
ret
;
}
nv
_debug
(
parent
,
"attached %s context
\n
"
,
subdev
->
name
);
nv
km_trace
(
pardev
,
"attached %s context
\n
"
,
subdev
->
name
);
return
0
;
}
...
...
@@ -170,12 +170,12 @@ nvkm_engctx_fini(struct nvkm_engctx *engctx, bool suspend)
}
if
(
ret
)
{
nv
_error
(
parent
,
"failed to detach %s context, %d
\n
"
,
subdev
->
name
,
ret
);
nv
km_error
(
pardev
,
"failed to detach %s context, %d
\n
"
,
subdev
->
name
,
ret
);
return
ret
;
}
nv
_debug
(
parent
,
"detached %s context
\n
"
,
subdev
->
name
);
nv
km_trace
(
pardev
,
"detached %s context
\n
"
,
subdev
->
name
);
return
nvkm_gpuobj_fini
(
&
engctx
->
gpuobj
,
suspend
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/core/engine.c
View file @
53003941
...
...
@@ -55,16 +55,19 @@ nvkm_engine_create_(struct nvkm_object *parent, struct nvkm_object *engobj,
if
(
device
->
disable_mask
&
(
1ULL
<<
engidx
))
{
if
(
!
nvkm_boolopt
(
device
->
cfgopt
,
iname
,
false
))
{
nv_debug
(
engine
,
"engine disabled by hw/fw
\n
"
);
nvkm_debug
(
&
engine
->
subdev
,
"engine disabled by hw/fw
\n
"
);
return
-
ENODEV
;
}
nv_warn
(
engine
,
"ignoring hw/fw engine disable
\n
"
);
nvkm_warn
(
&
engine
->
subdev
,
"ignoring hw/fw engine disable
\n
"
);
}
if
(
!
nvkm_boolopt
(
device
->
cfgopt
,
iname
,
enable
))
{
if
(
!
enable
)
nv_warn
(
engine
,
"disabled, %s=1 to enable
\n
"
,
iname
);
nvkm_warn
(
&
engine
->
subdev
,
"disabled, %s=1 to enable
\n
"
,
iname
);
return
-
ENODEV
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
View file @
53003941
...
...
@@ -69,10 +69,8 @@ nvkm_gpuobj_create_(struct nvkm_object *parent, struct nvkm_object *engine,
pargpu
=
pargpu
->
parent
;
}
if
(
unlikely
(
pargpu
==
NULL
))
{
nv_error
(
parent
,
"no gpuobj heap
\n
"
);
if
(
WARN_ON
(
pargpu
==
NULL
))
return
-
EINVAL
;
}
addr
=
nv_gpuobj
(
pargpu
)
->
addr
;
heap
=
&
nv_gpuobj
(
pargpu
)
->
heap
;
...
...
drivers/gpu/drm/nouveau/nvkm/core/handle.c
View file @
53003941
...
...
@@ -25,9 +25,8 @@
#include <core/client.h>
#define hprintk(h,l,f,a...) do { \
struct nvkm_client *c = nvkm_client((h)->object); \
struct nvkm_handle *p = (h)->parent; u32 n = p ? p->name : ~0; \
nv
_printk((c), l, "0x%08x:0x%08x "f, n, (h)->name, ##a);
\
nv
if_printk((h)->object, l, INFO, "0x%08x:0x%08x "f, n, (h)->name, ##a);
\
} while(0)
int
...
...
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
View file @
53003941
...
...
@@ -39,9 +39,9 @@ nvkm_ioctl_nop(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"nop size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"nop size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nv_ioctl
(
object
,
"nop
\n
"
);
nv
if
_ioctl
(
object
,
"nop
\n
"
);
}
return
ret
;
...
...
@@ -57,14 +57,14 @@ nvkm_ioctl_sclass(struct nvkm_handle *handle, void *data, u32 size)
int
ret
;
if
(
!
nv_iclass
(
object
,
NV_PARENT_CLASS
))
{
nv_debug
(
object
,
"cannot have children (sclass)
\n
"
);
nv
if
_debug
(
object
,
"cannot have children (sclass)
\n
"
);
return
-
ENODEV
;
}
nv_ioctl
(
object
,
"sclass size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"sclass size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"sclass vers %d count %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
count
);
nv
if
_ioctl
(
object
,
"sclass vers %d count %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
count
);
if
(
size
==
args
->
v0
.
count
*
sizeof
(
args
->
v0
.
oclass
[
0
]))
{
ret
=
nvkm_parent_lclass
(
object
,
args
->
v0
.
oclass
,
args
->
v0
.
count
);
...
...
@@ -95,20 +95,20 @@ nvkm_ioctl_new(struct nvkm_handle *handle, void *data, u32 size)
u32
_handle
,
_oclass
;
int
ret
;
nv
_ioctl
(
clien
t
,
"new size %d
\n
"
,
size
);
nv
if_ioctl
(
handle
->
objec
t
,
"new size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
_handle
=
args
->
v0
.
handle
;
_oclass
=
args
->
v0
.
oclass
;
}
else
return
ret
;
nv
_ioctl
(
clien
t
,
"new vers %d handle %08x class %08x "
"route %02x token %llx
\n
"
,
args
->
v0
.
version
,
_handle
,
_oclass
,
args
->
v0
.
route
,
args
->
v0
.
token
);
nv
if_ioctl
(
handle
->
objec
t
,
"new vers %d handle %08x class %08x "
"route %02x token %llx
\n
"
,
args
->
v0
.
version
,
_handle
,
_oclass
,
args
->
v0
.
route
,
args
->
v0
.
token
);
if
(
!
nv_iclass
(
handle
->
object
,
NV_PARENT_CLASS
))
{
nv_debug
(
handle
->
object
,
"cannot have children (ctor)
\n
"
);
nv
if
_debug
(
handle
->
object
,
"cannot have children (ctor)
\n
"
);
ret
=
-
ENODEV
;
goto
fail_class
;
}
...
...
@@ -118,7 +118,7 @@ nvkm_ioctl_new(struct nvkm_handle *handle, void *data, u32 size)
/* check that parent supports the requested subclass */
ret
=
nvkm_parent_sclass
(
&
parent
->
object
,
_oclass
,
&
engine
,
&
oclass
);
if
(
ret
)
{
nv
_debug
(
paren
t
,
"illegal class 0x%04x
\n
"
,
_oclass
);
nv
if_debug
(
&
parent
->
objec
t
,
"illegal class 0x%04x
\n
"
,
_oclass
);
goto
fail_class
;
}
...
...
@@ -188,9 +188,9 @@ nvkm_ioctl_del(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"delete size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"delete size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nv_ioctl
(
object
,
"delete
\n
"
);
nv
if
_ioctl
(
object
,
"delete
\n
"
);
nvkm_handle_fini
(
handle
,
false
);
nvkm_handle_destroy
(
handle
);
}
...
...
@@ -208,10 +208,10 @@ nvkm_ioctl_mthd(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"mthd size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"mthd size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"mthd vers %d mthd %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
);
nv
if
_ioctl
(
object
,
"mthd vers %d mthd %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
);
if
(
ret
=
-
ENODEV
,
ofuncs
->
mthd
)
ret
=
ofuncs
->
mthd
(
object
,
args
->
v0
.
method
,
data
,
size
);
}
...
...
@@ -230,10 +230,10 @@ nvkm_ioctl_rd(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"rd size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"rd size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"rd vers %d size %d addr %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
size
,
args
->
v0
.
addr
);
nv
if
_ioctl
(
object
,
"rd vers %d size %d addr %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
size
,
args
->
v0
.
addr
);
switch
(
args
->
v0
.
size
)
{
case
1
:
if
(
ret
=
-
ENODEV
,
ofuncs
->
rd08
)
{
...
...
@@ -272,11 +272,12 @@ nvkm_ioctl_wr(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"wr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"wr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"wr vers %d size %d addr %016llx data %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
size
,
args
->
v0
.
addr
,
args
->
v0
.
data
);
nvif_ioctl
(
object
,
"wr vers %d size %d addr %016llx data %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
size
,
args
->
v0
.
addr
,
args
->
v0
.
data
);
switch
(
args
->
v0
.
size
)
{
case
1
:
if
(
ret
=
-
ENODEV
,
ofuncs
->
wr08
)
{
...
...
@@ -315,9 +316,9 @@ nvkm_ioctl_map(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"map size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"map size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"map vers %d
\n
"
,
args
->
v0
.
version
);
nv
if
_ioctl
(
object
,
"map vers %d
\n
"
,
args
->
v0
.
version
);
if
(
ret
=
-
ENODEV
,
ofuncs
->
map
)
{
ret
=
ofuncs
->
map
(
object
,
&
args
->
v0
.
handle
,
&
args
->
v0
.
length
);
...
...
@@ -336,9 +337,9 @@ nvkm_ioctl_unmap(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"unmap size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"unmap size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nv_ioctl
(
object
,
"unmap
\n
"
);
nv
if
_ioctl
(
object
,
"unmap
\n
"
);
}
return
ret
;
...
...
@@ -355,10 +356,10 @@ nvkm_ioctl_ntfy_new(struct nvkm_handle *handle, void *data, u32 size)
struct
nvkm_event
*
event
;
int
ret
;
nv_ioctl
(
object
,
"ntfy new size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"ntfy new size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"ntfy new vers %d event %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
event
);
nv
if
_ioctl
(
object
,
"ntfy new vers %d event %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
event
);
if
(
ret
=
-
ENODEV
,
ofuncs
->
ntfy
)
ret
=
ofuncs
->
ntfy
(
object
,
args
->
v0
.
event
,
&
event
);
if
(
ret
==
0
)
{
...
...
@@ -383,10 +384,10 @@ nvkm_ioctl_ntfy_del(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"ntfy del size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"ntfy del size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"ntfy del vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
nv
if
_ioctl
(
object
,
"ntfy del vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
ret
=
nvkm_client_notify_del
(
client
,
args
->
v0
.
index
);
}
...
...
@@ -403,10 +404,10 @@ nvkm_ioctl_ntfy_get(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"ntfy get size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"ntfy get size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"ntfy get vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
nv
if
_ioctl
(
object
,
"ntfy get vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
ret
=
nvkm_client_notify_get
(
client
,
args
->
v0
.
index
);
}
...
...
@@ -423,10 +424,10 @@ nvkm_ioctl_ntfy_put(struct nvkm_handle *handle, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"ntfy put size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"ntfy put size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"ntfy put vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
nv
if
_ioctl
(
object
,
"ntfy put vers %d index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
index
);
ret
=
nvkm_client_notify_put
(
client
,
args
->
v0
.
index
);
}
...
...
@@ -463,15 +464,15 @@ nvkm_ioctl_path(struct nvkm_handle *parent, u32 type, u32 nr, u32 *path,
int
ret
;
while
((
object
=
parent
->
object
),
nr
--
)
{
nv_ioctl
(
object
,
"path 0x%08x
\n
"
,
path
[
nr
]);
nv
if
_ioctl
(
object
,
"path 0x%08x
\n
"
,
path
[
nr
]);
if
(
!
nv_iclass
(
object
,
NV_PARENT_CLASS
))
{
nv_debug
(
object
,
"cannot have children (path)
\n
"
);
nv
if
_debug
(
object
,
"cannot have children (path)
\n
"
);
return
-
EINVAL
;
}
if
(
!
(
namedb
=
(
void
*
)
nv_pclass
(
object
,
NV_NAMEDB_CLASS
))
||
!
(
handle
=
nvkm_namedb_get
(
namedb
,
path
[
nr
])))
{
nv_debug
(
object
,
"handle 0x%08x not found
\n
"
,
path
[
nr
]);
nv
if
_debug
(
object
,
"handle 0x%08x not found
\n
"
,
path
[
nr
]);
return
-
ENOENT
;
}
nvkm_namedb_put
(
handle
);
...
...
@@ -479,7 +480,7 @@ nvkm_ioctl_path(struct nvkm_handle *parent, u32 type, u32 nr, u32 *path,
}
if
(
owner
!=
NVIF_IOCTL_V0_OWNER_ANY
&&
owner
!=
handle
->
route
)
{
nv_ioctl
(
object
,
"object route != owner
\n
"
);
nv
if
_ioctl
(
object
,
"object route != owner
\n
"
);
return
-
EACCES
;
}
*
route
=
handle
->
route
;
...
...
@@ -497,25 +498,26 @@ int
nvkm_ioctl
(
struct
nvkm_client
*
client
,
bool
supervisor
,
void
*
data
,
u32
size
,
void
**
hack
)
{
struct
nvkm_object
*
object
=
&
client
->
namedb
.
parent
.
object
;
union
{
struct
nvif_ioctl_v0
v0
;
}
*
args
=
data
;
int
ret
;
client
->
super
=
supervisor
;
nv
_ioctl
(
clien
t
,
"size %d
\n
"
,
size
);
nv
if_ioctl
(
objec
t
,
"size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv
_ioctl
(
clien
t
,
"vers %d type %02x path %d owner %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
type
,
args
->
v0
.
path_nr
,
args
->
v0
.
owner
);
nv
if_ioctl
(
objec
t
,
"vers %d type %02x path %d owner %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
type
,
args
->
v0
.
path_nr
,
args
->
v0
.
owner
);
ret
=
nvkm_ioctl_path
(
client
->
root
,
args
->
v0
.
type
,
args
->
v0
.
path_nr
,
args
->
v0
.
path
,
data
,
size
,
args
->
v0
.
owner
,
&
args
->
v0
.
route
,
&
args
->
v0
.
token
);
}
nv
_ioctl
(
clien
t
,
"return %d
\n
"
,
ret
);
nv
if_ioctl
(
objec
t
,
"return %d
\n
"
,
ret
);
if
(
hack
)
{
*
hack
=
client
->
data
;
client
->
data
=
NULL
;
...
...
drivers/gpu/drm/nouveau/nvkm/core/object.c
View file @
53003941
...
...
@@ -24,11 +24,6 @@
#include <core/object.h>
#include <core/engine.h>
#ifdef NVKM_OBJECT_MAGIC
static
struct
list_head
_objlist
=
LIST_HEAD_INIT
(
_objlist
);
static
DEFINE_SPINLOCK
(
_objlist_lock
);
#endif
int
nvkm_object_create_
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
u32
pclass
,
...
...
@@ -49,9 +44,6 @@ nvkm_object_create_(struct nvkm_object *parent, struct nvkm_object *engine,
#ifdef NVKM_OBJECT_MAGIC
object
->
_magic
=
NVKM_OBJECT_MAGIC
;
spin_lock
(
&
_objlist_lock
);
list_add
(
&
object
->
list
,
&
_objlist
);
spin_unlock
(
&
_objlist_lock
);
#endif
return
0
;
}
...
...
@@ -69,11 +61,6 @@ _nvkm_object_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
void
nvkm_object_destroy
(
struct
nvkm_object
*
object
)
{
#ifdef NVKM_OBJECT_MAGIC
spin_lock
(
&
_objlist_lock
);
list_del
(
&
object
->
list
);
spin_unlock
(
&
_objlist_lock
);
#endif
nvkm_object_ref
(
NULL
,
(
struct
nvkm_object
**
)
&
object
->
engine
);
nvkm_object_ref
(
NULL
,
&
object
->
parent
);
kfree
(
object
);
...
...
@@ -111,11 +98,6 @@ nvkm_object_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
ret
=
ofuncs
->
ctor
(
parent
,
engine
,
oclass
,
data
,
size
,
&
object
);
*
pobject
=
object
;
if
(
ret
<
0
)
{
if
(
ret
!=
-
ENODEV
)
{
nv_error
(
parent
,
"failed to create 0x%08x, %d
\n
"
,
oclass
->
handle
,
ret
);
}
if
(
object
)
{
ofuncs
->
dtor
(
object
);
*
pobject
=
NULL
;
...
...
@@ -125,7 +107,6 @@ nvkm_object_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
}
if
(
ret
==
0
)
{
nv_trace
(
object
,
"created
\n
"
);
atomic_set
(
&
object
->
refcount
,
1
);
}
...
...
@@ -135,7 +116,6 @@ nvkm_object_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
static
void
nvkm_object_dtor
(
struct
nvkm_object
*
object
)
{
nv_trace
(
object
,
"destroying
\n
"
);
nv_ofuncs
(
object
)
->
dtor
(
object
);
}
...
...
@@ -144,12 +124,10 @@ nvkm_object_ref(struct nvkm_object *obj, struct nvkm_object **ref)
{
if
(
obj
)
{
atomic_inc
(
&
obj
->
refcount
);
nv_trace
(
obj
,
"inc() == %d
\n
"
,
atomic_read
(
&
obj
->
refcount
));
}
if
(
*
ref
)
{
int
dead
=
atomic_dec_and_test
(
&
(
*
ref
)
->
refcount
);
nv_trace
(
*
ref
,
"dec() == %d
\n
"
,
atomic_read
(
&
(
*
ref
)
->
refcount
));
if
(
dead
)
nvkm_object_dtor
(
*
ref
);
}
...
...
@@ -163,37 +141,28 @@ nvkm_object_inc(struct nvkm_object *object)
int
ref
=
atomic_add_return
(
1
,
&
object
->
usecount
);
int
ret
;
nv_trace
(
object
,
"use(+1) == %d
\n
"
,
atomic_read
(
&
object
->
usecount
));
if
(
ref
!=
1
)
return
0
;
nv_trace
(
object
,
"initialising...
\n
"
);
if
(
object
->
parent
)
{
ret
=
nvkm_object_inc
(
object
->
parent
);
if
(
ret
)
{
nv_error
(
object
,
"parent failed, %d
\n
"
,
ret
);
if
(
ret
)
goto
fail_parent
;
}
}
if
(
object
->
engine
)
{
mutex_lock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
ret
=
nvkm_object_inc
(
&
object
->
engine
->
subdev
.
object
);
mutex_unlock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
if
(
ret
)
{
nv_error
(
object
,
"engine failed, %d
\n
"
,
ret
);
if
(
ret
)
goto
fail_engine
;
}
}
ret
=
nv_ofuncs
(
object
)
->
init
(
object
);
atomic_set
(
&
object
->
usecount
,
1
);
if
(
ret
)
{
nv_error
(
object
,
"init failed, %d
\n
"
,
ret
);
if
(
ret
)
goto
fail_self
;
}
nv_trace
(
object
,
"initialised
\n
"
);
return
0
;
fail_self:
...
...
@@ -213,14 +182,8 @@ nvkm_object_inc(struct nvkm_object *object)
static
int
nvkm_object_decf
(
struct
nvkm_object
*
object
)
{
int
ret
;
nv_trace
(
object
,
"stopping...
\n
"
);
ret
=
nv_ofuncs
(
object
)
->
fini
(
object
,
false
);
nv_ofuncs
(
object
)
->
fini
(
object
,
false
);
atomic_set
(
&
object
->
usecount
,
0
);
if
(
ret
)
nv_warn
(
object
,
"failed fini, %d
\n
"
,
ret
);
if
(
object
->
engine
)
{
mutex_lock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
...
...
@@ -231,58 +194,44 @@ nvkm_object_decf(struct nvkm_object *object)
if
(
object
->
parent
)
nvkm_object_dec
(
object
->
parent
,
false
);
nv_trace
(
object
,
"stopped
\n
"
);
return
0
;
}
static
int
nvkm_object_decs
(
struct
nvkm_object
*
object
)
{
int
ret
,
rret
;
nv_trace
(
object
,
"suspending...
\n
"
);
int
ret
;
ret
=
nv_ofuncs
(
object
)
->
fini
(
object
,
true
);
atomic_set
(
&
object
->
usecount
,
0
);
if
(
ret
)
{
nv_error
(
object
,
"failed suspend, %d
\n
"
,
ret
);
if
(
ret
)
return
ret
;
}
if
(
object
->
engine
)
{
mutex_lock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
ret
=
nvkm_object_dec
(
&
object
->
engine
->
subdev
.
object
,
true
);
mutex_unlock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
if
(
ret
)
{
nv_warn
(
object
,
"engine failed suspend, %d
\n
"
,
ret
);
if
(
ret
)
goto
fail_engine
;
}
}
if
(
object
->
parent
)
{
ret
=
nvkm_object_dec
(
object
->
parent
,
true
);
if
(
ret
)
{
nv_warn
(
object
,
"parent failed suspend, %d
\n
"
,
ret
);
if
(
ret
)
goto
fail_parent
;
}
}
nv_trace
(
object
,
"suspended
\n
"
);
return
0
;
fail_parent:
if
(
object
->
engine
)
{
mutex_lock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
rret
=
nvkm_object_inc
(
&
object
->
engine
->
subdev
.
object
);
nvkm_object_inc
(
&
object
->
engine
->
subdev
.
object
);
mutex_unlock
(
&
nv_subdev
(
object
->
engine
)
->
mutex
);
if
(
rret
)
nv_fatal
(
object
,
"engine failed to reinit, %d
\n
"
,
rret
);
}
fail_engine:
rret
=
nv_ofuncs
(
object
)
->
init
(
object
);
if
(
rret
)
nv_fatal
(
object
,
"failed to reinit, %d
\n
"
,
rret
);
nv_ofuncs
(
object
)
->
init
(
object
);
return
ret
;
}
...
...
@@ -293,8 +242,6 @@ nvkm_object_dec(struct nvkm_object *object, bool suspend)
int
ref
=
atomic_add_return
(
-
1
,
&
object
->
usecount
);
int
ret
;
nv_trace
(
object
,
"use(-1) == %d
\n
"
,
atomic_read
(
&
object
->
usecount
));
if
(
ref
==
0
)
{
if
(
suspend
)
ret
=
nvkm_object_decs
(
object
);
...
...
@@ -309,22 +256,3 @@ nvkm_object_dec(struct nvkm_object *object, bool suspend)
return
0
;
}
void
nvkm_object_debug
(
void
)
{
#ifdef NVKM_OBJECT_MAGIC
struct
nvkm_object
*
object
;
if
(
!
list_empty
(
&
_objlist
))
{
nv_fatal
(
NULL
,
"*******************************************
\n
"
);
nv_fatal
(
NULL
,
"* AIIIII! object(s) still exist!!!
\n
"
);
nv_fatal
(
NULL
,
"*******************************************
\n
"
);
list_for_each_entry
(
object
,
&
_objlist
,
list
)
{
nv_fatal
(
object
,
"%p/%p/%d/%d
\n
"
,
object
->
parent
,
object
->
engine
,
atomic_read
(
&
object
->
refcount
),
atomic_read
(
&
object
->
usecount
));
}
}
#endif
}
drivers/gpu/drm/nouveau/nvkm/core/option.c
View file @
53003941
...
...
@@ -95,7 +95,7 @@ nvkm_dbgopt(const char *optstr, const char *sub)
else
if
(
!
strncasecmpz
(
optstr
,
"warn"
,
len
))
level
=
NV_DBG_WARN
;
else
if
(
!
strncasecmpz
(
optstr
,
"info"
,
len
))
level
=
NV_DBG_INFO
_NORMAL
;
level
=
NV_DBG_INFO
;
else
if
(
!
strncasecmpz
(
optstr
,
"debug"
,
len
))
level
=
NV_DBG_DEBUG
;
else
if
(
!
strncasecmpz
(
optstr
,
"trace"
,
len
))
...
...
drivers/gpu/drm/nouveau/nvkm/core/printk.c
deleted
100644 → 0
View file @
9ad97ede
/*
* Copyright 2012 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs
*/
#include <core/printk.h>
#include <core/client.h>
#include <core/device.h>
int
nv_info_debug_level
=
NV_DBG_INFO_NORMAL
;
void
nv_printk_
(
struct
nvkm_object
*
object
,
int
level
,
const
char
*
fmt
,
...)
{
static
const
char
name
[]
=
{
'!'
,
'E'
,
'W'
,
' '
,
'D'
,
'T'
,
'P'
,
'S'
};
const
char
*
pfx
;
char
mfmt
[
256
];
va_list
args
;
switch
(
level
)
{
case
NV_DBG_FATAL
:
pfx
=
KERN_CRIT
;
break
;
case
NV_DBG_ERROR
:
pfx
=
KERN_ERR
;
break
;
case
NV_DBG_WARN
:
pfx
=
KERN_WARNING
;
break
;
case
NV_DBG_INFO_NORMAL
:
pfx
=
KERN_INFO
;
break
;
case
NV_DBG_DEBUG
:
case
NV_DBG_PARANOIA
:
case
NV_DBG_TRACE
:
case
NV_DBG_SPAM
:
default:
pfx
=
KERN_DEBUG
;
break
;
}
if
(
object
&&
!
nv_iclass
(
object
,
NV_CLIENT_CLASS
))
{
struct
nvkm_object
*
device
;
struct
nvkm_object
*
subdev
;
char
obuf
[
64
],
*
ofmt
=
""
;
if
(
object
->
engine
==
NULL
)
{
subdev
=
object
;
while
(
subdev
&&
!
nv_iclass
(
subdev
,
NV_SUBDEV_CLASS
))
subdev
=
subdev
->
parent
;
}
else
{
subdev
=
&
object
->
engine
->
subdev
.
object
;
}
device
=
subdev
;
if
(
device
->
parent
)
device
=
device
->
parent
;
if
(
object
!=
subdev
)
{
snprintf
(
obuf
,
sizeof
(
obuf
),
"[0x%08x]"
,
nv_hclass
(
object
));
ofmt
=
obuf
;
}
if
(
level
>
nv_subdev
(
subdev
)
->
debug
)
return
;
snprintf
(
mfmt
,
sizeof
(
mfmt
),
"%snouveau %c[%8s][%s]%s %s"
,
pfx
,
name
[
level
],
nv_subdev
(
subdev
)
->
name
,
nv_device
(
device
)
->
name
,
ofmt
,
fmt
);
}
else
if
(
object
&&
nv_iclass
(
object
,
NV_CLIENT_CLASS
))
{
if
(
level
>
nv_client
(
object
)
->
debug
)
return
;
snprintf
(
mfmt
,
sizeof
(
mfmt
),
"%snouveau %c[%8s] %s"
,
pfx
,
name
[
level
],
nv_client
(
object
)
->
name
,
fmt
);
}
else
{
snprintf
(
mfmt
,
sizeof
(
mfmt
),
"%snouveau: %s"
,
pfx
,
fmt
);
}
va_start
(
args
,
fmt
);
vprintk
(
mfmt
,
args
);
va_end
(
args
);
}
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
View file @
53003941
...
...
@@ -37,11 +37,12 @@ nvkm_subdev(void *obj, int idx)
}
void
nvkm_subdev_reset
(
struct
nvkm_object
*
subdev
)
nvkm_subdev_reset
(
struct
nvkm_object
*
obj
)
{
nv_trace
(
subdev
,
"resetting...
\n
"
);
nv_ofuncs
(
subdev
)
->
fini
(
subdev
,
false
);
nv_debug
(
subdev
,
"reset
\n
"
);
struct
nvkm_subdev
*
subdev
=
container_of
(
obj
,
typeof
(
*
subdev
),
object
);
nvkm_trace
(
subdev
,
"resetting...
\n
"
);
nv_ofuncs
(
subdev
)
->
fini
(
&
subdev
->
object
,
false
);
nvkm_trace
(
subdev
,
"reset
\n
"
);
}
int
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
View file @
53003941
...
...
@@ -87,9 +87,9 @@ nvkm_devobj_info(struct nvkm_object *object, void *data, u32 size)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"device info size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"device info size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"device info vers %d
\n
"
,
args
->
v0
.
version
);
nv
if
_ioctl
(
object
,
"device info vers %d
\n
"
,
args
->
v0
.
version
);
}
else
return
ret
;
...
...
@@ -294,12 +294,12 @@ nvkm_devobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
void
__iomem
*
map
;
int
ret
,
i
,
c
;
nv_ioctl
(
parent
,
"create device size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create device size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create device v%d device %016llx "
"disable %016llx debug0 %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
device
,
args
->
v0
.
disable
,
args
->
v0
.
debug0
);
nv
if
_ioctl
(
parent
,
"create device v%d device %016llx "
"disable %016llx debug0 %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
device
,
args
->
v0
.
disable
,
args
->
v0
.
debug0
);
}
else
return
ret
;
...
...
@@ -567,8 +567,7 @@ nv_device(void *obj)
device
=
device
->
parent
;
}
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
if
(
unlikely
(
!
device
))
nv_assert
(
"BAD CAST -> NvDevice, 0x%08x
\n
"
,
nv_hclass
(
obj
));
BUG_ON
(
!
device
);
#endif
return
(
void
*
)
device
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
View file @
53003941
...
...
@@ -39,10 +39,10 @@ nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size)
struct
nvkm_clk
*
clk
=
nvkm_clk
(
object
);
int
ret
;
nv_ioctl
(
object
,
"control pstate info size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"control pstate info size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"control pstate info vers %d
\n
"
,
args
->
v0
.
version
);
nv
if
_ioctl
(
object
,
"control pstate info vers %d
\n
"
,
args
->
v0
.
version
);
}
else
return
ret
;
...
...
@@ -77,11 +77,11 @@ nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size)
u32
lo
,
hi
;
int
ret
;
nv_ioctl
(
object
,
"control pstate attr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"control pstate attr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"control pstate attr vers %d state %d "
"index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
index
);
nv
if
_ioctl
(
object
,
"control pstate attr vers %d state %d "
"index %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
index
);
if
(
!
clk
)
return
-
ENODEV
;
if
(
args
->
v0
.
state
<
NVIF_CONTROL_PSTATE_ATTR_V0_STATE_CURRENT
)
...
...
@@ -145,11 +145,11 @@ nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size)
struct
nvkm_clk
*
clk
=
nvkm_clk
(
object
);
int
ret
;
nv_ioctl
(
object
,
"control pstate user size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"control pstate user size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"control pstate user vers %d ustate %d "
"pwrsrc %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
ustate
,
args
->
v0
.
pwrsrc
);
nv
if
_ioctl
(
object
,
"control pstate user vers %d ustate %d "
"pwrsrc %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
ustate
,
args
->
v0
.
pwrsrc
);
if
(
!
clk
)
return
-
ENODEV
;
}
else
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c
View file @
53003941
...
...
@@ -41,12 +41,12 @@ nv50_dac_power(NV50_DISP_MTHD_V1)
u32
stat
;
int
ret
;
nv_ioctl
(
object
,
"disp dac pwr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp dac pwr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp dac pwr vers %d state %d data %d "
"vsync %d hsync %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
data
,
args
->
v0
.
vsync
,
args
->
v0
.
hsync
);
nv
if
_ioctl
(
object
,
"disp dac pwr vers %d state %d data %d "
"vsync %d hsync %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
data
,
args
->
v0
.
vsync
,
args
->
v0
.
hsync
);
stat
=
0x00000040
*
!
args
->
v0
.
state
;
stat
|=
0x00000010
*
!
args
->
v0
.
data
;
stat
|=
0x00000004
*
!
args
->
v0
.
vsync
;
...
...
@@ -78,10 +78,10 @@ nv50_dac_sense(NV50_DISP_MTHD_V1)
u32
loadval
;
int
ret
;
nv_ioctl
(
object
,
"disp dac load size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp dac load size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp dac load vers %d data %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
data
);
nv
if
_ioctl
(
object
,
"disp dac load vers %d data %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
data
);
if
(
args
->
v0
.
data
&
0xfff00000
)
return
-
EINVAL
;
loadval
=
args
->
v0
.
data
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf110.c
View file @
53003941
...
...
@@ -669,9 +669,10 @@ gf110_disp_main_scanoutpos(NV50_DISP_MTHD_V0)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
nvif_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
args
->
v0
.
vblanke
=
(
blanke
&
0xffff0000
)
>>
16
;
args
->
v0
.
hblanke
=
(
blanke
&
0x0000ffff
);
args
->
v0
.
vblanks
=
(
blanks
&
0xffff0000
)
>>
16
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf110.c
View file @
53003941
...
...
@@ -43,9 +43,10 @@ gf110_hda_eld(NV50_DISP_MTHD_V1)
const
u32
hoff
=
head
*
0x800
;
int
ret
,
i
;
nv_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"disp sor hda eld vers %d
\n
"
,
args
->
v0
.
version
);
nvif_ioctl
(
object
,
"disp sor hda eld vers %d
\n
"
,
args
->
v0
.
version
);
if
(
size
>
0x60
)
return
-
E2BIG
;
}
else
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
View file @
53003941
...
...
@@ -40,9 +40,10 @@ gt215_hda_eld(NV50_DISP_MTHD_V1)
const
u32
soff
=
outp
->
or
*
0x800
;
int
ret
,
i
;
nv_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"disp sor hda eld vers %d
\n
"
,
args
->
v0
.
version
);
nvif_ioctl
(
object
,
"disp sor hda eld vers %d
\n
"
,
args
->
v0
.
version
);
if
(
size
>
0x60
)
return
-
E2BIG
;
}
else
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c
View file @
53003941
...
...
@@ -39,12 +39,12 @@ g84_hdmi_ctrl(NV50_DISP_MTHD_V1)
u32
ctrl
;
int
ret
;
nv_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
if
(
args
->
v0
.
max_ac_packet
>
0x1f
||
args
->
v0
.
rekey
>
0x7f
)
return
-
EINVAL
;
ctrl
=
0x40000000
*
!!
args
->
v0
.
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigf110.c
View file @
53003941
...
...
@@ -39,12 +39,12 @@ gf110_hdmi_ctrl(NV50_DISP_MTHD_V1)
u32
ctrl
;
int
ret
;
nv_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
if
(
args
->
v0
.
max_ac_packet
>
0x1f
||
args
->
v0
.
rekey
>
0x7f
)
return
-
EINVAL
;
ctrl
=
0x40000000
*
!!
args
->
v0
.
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c
View file @
53003941
...
...
@@ -40,12 +40,12 @@ gk104_hdmi_ctrl(NV50_DISP_MTHD_V1)
u32
ctrl
;
int
ret
;
nv_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
if
(
args
->
v0
.
max_ac_packet
>
0x1f
||
args
->
v0
.
rekey
>
0x7f
)
return
-
EINVAL
;
ctrl
=
0x40000000
*
!!
args
->
v0
.
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c
View file @
53003941
...
...
@@ -40,12 +40,12 @@ gt215_hdmi_ctrl(NV50_DISP_MTHD_V1)
u32
ctrl
;
int
ret
;
nv_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
nv
if
_ioctl
(
object
,
"disp sor hdmi ctrl vers %d state %d "
"max_ac_packet %d rekey %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
max_ac_packet
,
args
->
v0
.
rekey
);
if
(
args
->
v0
.
max_ac_packet
>
0x1f
||
args
->
v0
.
rekey
>
0x7f
)
return
-
EINVAL
;
ctrl
=
0x40000000
*
!!
args
->
v0
.
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
View file @
53003941
...
...
@@ -40,9 +40,10 @@ nv04_disp_scanoutpos(struct nvkm_object *object, struct nvkm_disp *disp,
u32
line
;
int
ret
;
nv_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
nvif_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
args
->
v0
.
vblanks
=
nvkm_rd32
(
device
,
0x680800
+
hoff
)
&
0xffff
;
args
->
v0
.
vtotal
=
nvkm_rd32
(
device
,
0x680804
+
hoff
)
&
0xffff
;
args
->
v0
.
vblanke
=
args
->
v0
.
vtotal
-
1
;
...
...
@@ -79,10 +80,10 @@ nv04_disp_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
struct
nvkm_disp
*
disp
=
(
void
*
)
object
->
engine
;
int
head
,
ret
;
nv_ioctl
(
object
,
"disp mthd size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp mthd size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"disp mthd vers %d mthd %02x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
,
args
->
v0
.
head
);
nv
if
_ioctl
(
object
,
"disp mthd vers %d mthd %02x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
,
args
->
v0
.
head
);
mthd
=
args
->
v0
.
method
;
head
=
args
->
v0
.
head
;
}
else
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
View file @
53003941
...
...
@@ -510,11 +510,11 @@ nv50_disp_core_ctor(struct nvkm_object *parent,
struct
nv50_disp_dmac
*
mast
;
int
ret
;
nv_ioctl
(
parent
,
"create disp core channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create disp core channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create disp core channel dma vers %d "
"pushbuf %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
);
nv
if
_ioctl
(
parent
,
"create disp core channel dma vers %d "
"pushbuf %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
);
}
else
return
ret
;
...
...
@@ -679,11 +679,11 @@ nv50_disp_base_ctor(struct nvkm_object *parent,
struct
nv50_disp_dmac
*
dmac
;
int
ret
;
nv_ioctl
(
parent
,
"create disp base channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create disp base channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create disp base channel dma vers %d "
"pushbuf %08x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
head
);
nv
if
_ioctl
(
parent
,
"create disp base channel dma vers %d "
"pushbuf %08x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
head
);
if
(
args
->
v0
.
head
>
disp
->
head
.
nr
)
return
-
EINVAL
;
}
else
...
...
@@ -769,11 +769,11 @@ nv50_disp_ovly_ctor(struct nvkm_object *parent,
struct
nv50_disp_dmac
*
dmac
;
int
ret
;
nv_ioctl
(
parent
,
"create disp overlay channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create disp overlay channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create disp overlay channel dma vers %d "
"pushbuf %08x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
head
);
nv
if
_ioctl
(
parent
,
"create disp overlay channel dma vers %d "
"pushbuf %08x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
head
);
if
(
args
->
v0
.
head
>
disp
->
head
.
nr
)
return
-
EINVAL
;
}
else
...
...
@@ -903,10 +903,10 @@ nv50_disp_oimm_ctor(struct nvkm_object *parent,
struct
nv50_disp_pioc
*
pioc
;
int
ret
;
nv_ioctl
(
parent
,
"create disp overlay size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create disp overlay size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create disp overlay vers %d head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
head
);
nv
if
_ioctl
(
parent
,
"create disp overlay vers %d head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
head
);
if
(
args
->
v0
.
head
>
disp
->
head
.
nr
)
return
-
EINVAL
;
}
else
...
...
@@ -951,10 +951,10 @@ nv50_disp_curs_ctor(struct nvkm_object *parent,
struct
nv50_disp_pioc
*
pioc
;
int
ret
;
nv_ioctl
(
parent
,
"create disp cursor size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create disp cursor size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create disp cursor vers %d head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
head
);
nv
if
_ioctl
(
parent
,
"create disp cursor vers %d head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
head
);
if
(
args
->
v0
.
head
>
disp
->
head
.
nr
)
return
-
EINVAL
;
}
else
...
...
@@ -998,9 +998,10 @@ nv50_disp_main_scanoutpos(NV50_DISP_MTHD_V0)
}
*
args
=
data
;
int
ret
;
nv_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp scanoutpos size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
nvif_ioctl
(
object
,
"disp scanoutpos vers %d
\n
"
,
args
->
v0
.
version
);
args
->
v0
.
vblanke
=
(
blanke
&
0xffff0000
)
>>
16
;
args
->
v0
.
hblanke
=
(
blanke
&
0x0000ffff
);
args
->
v0
.
vblanks
=
(
blanks
&
0xffff0000
)
>>
16
;
...
...
@@ -1036,18 +1037,18 @@ nv50_disp_main_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
if
(
mthd
!=
NV50_DISP_MTHD
)
return
-
EINVAL
;
nv_ioctl
(
object
,
"disp mthd size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp mthd size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
object
,
"disp mthd vers %d mthd %02x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
,
args
->
v0
.
head
);
nv
if
_ioctl
(
object
,
"disp mthd vers %d mthd %02x head %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
method
,
args
->
v0
.
head
);
mthd
=
args
->
v0
.
method
;
head
=
args
->
v0
.
head
;
}
else
if
(
nvif_unpack
(
args
->
v1
,
1
,
1
,
true
))
{
nv_ioctl
(
object
,
"disp mthd vers %d mthd %02x "
"type %04x mask %04x
\n
"
,
args
->
v1
.
version
,
args
->
v1
.
method
,
args
->
v1
.
hasht
,
args
->
v1
.
hashm
);
nv
if
_ioctl
(
object
,
"disp mthd vers %d mthd %02x "
"type %04x mask %04x
\n
"
,
args
->
v1
.
version
,
args
->
v1
.
method
,
args
->
v1
.
hasht
,
args
->
v1
.
hashm
);
mthd
=
args
->
v1
.
method
;
type
=
args
->
v1
.
hasht
;
mask
=
args
->
v1
.
hashm
;
...
...
@@ -1096,11 +1097,11 @@ nv50_disp_main_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
union
{
struct
nv50_disp_sor_lvds_script_v0
v0
;
}
*
args
=
data
;
nv_ioctl
(
object
,
"disp sor lvds script size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor lvds script size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor lvds script "
"vers %d name %04x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
script
);
nv
if
_ioctl
(
object
,
"disp sor lvds script "
"vers %d name %04x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
script
);
disp
->
sor
.
lvdsconf
=
args
->
v0
.
script
;
return
0
;
}
else
...
...
@@ -1112,10 +1113,10 @@ nv50_disp_main_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
union
{
struct
nv50_disp_sor_dp_pwr_v0
v0
;
}
*
args
=
data
;
nv_ioctl
(
object
,
"disp sor dp pwr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor dp pwr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor dp pwr vers %d state %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
);
nv
if
_ioctl
(
object
,
"disp sor dp pwr vers %d state %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
);
if
(
args
->
v0
.
state
==
0
)
{
nvkm_notify_put
(
&
outpdp
->
irq
);
((
struct
nvkm_output_dp_impl
*
)
nv_oclass
(
outp
))
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/piornv50.c
View file @
53003941
...
...
@@ -152,10 +152,10 @@ nv50_pior_power(NV50_DISP_MTHD_V1)
u32
ctrl
,
type
;
int
ret
;
nv_ioctl
(
object
,
"disp pior pwr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp pior pwr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp pior pwr vers %d state %d type %x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
type
);
nv
if
_ioctl
(
object
,
"disp pior pwr vers %d state %d type %x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
,
args
->
v0
.
type
);
if
(
args
->
v0
.
type
>
0x0f
)
return
-
EINVAL
;
ctrl
=
!!
args
->
v0
.
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c
View file @
53003941
...
...
@@ -41,10 +41,10 @@ nv50_sor_power(NV50_DISP_MTHD_V1)
u32
stat
;
int
ret
;
nv_ioctl
(
object
,
"disp sor pwr size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"disp sor pwr size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"disp sor pwr vers %d state %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
);
nv
if
_ioctl
(
object
,
"disp sor pwr vers %d state %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
);
stat
=
!!
args
->
v0
.
state
;
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/base.c
View file @
53003941
...
...
@@ -75,12 +75,12 @@ nvkm_dmaobj_create_(struct nvkm_object *parent,
if
(
ret
)
return
ret
;
nv_ioctl
(
parent
,
"create dma size %d
\n
"
,
*
psize
);
nv
if
_ioctl
(
parent
,
"create dma size %d
\n
"
,
*
psize
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
true
))
{
nv_ioctl
(
parent
,
"create dma vers %d target %d access %d "
"start %016llx limit %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
target
,
args
->
v0
.
access
,
args
->
v0
.
start
,
args
->
v0
.
limit
);
nv
if
_ioctl
(
parent
,
"create dma vers %d target %d access %d "
"start %016llx limit %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
target
,
args
->
v0
.
access
,
args
->
v0
.
start
,
args
->
v0
.
limit
);
dmaobj
->
target
=
args
->
v0
.
target
;
dmaobj
->
access
=
args
->
v0
.
access
;
dmaobj
->
start
=
args
->
v0
.
start
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
View file @
53003941
...
...
@@ -88,10 +88,11 @@ gf100_dmaobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
args
=
data
;
nv_ioctl
(
parent
,
"create gf100 dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create gf100 dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create gf100 dma vers %d priv %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
priv
,
args
->
v0
.
kind
);
nvif_ioctl
(
parent
,
"create gf100 dma vers %d priv %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
priv
,
args
->
v0
.
kind
);
kind
=
args
->
v0
.
kind
;
user
=
args
->
v0
.
priv
;
unkn
=
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
View file @
53003941
...
...
@@ -93,10 +93,11 @@ gf110_dmaobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
args
=
data
;
nv_ioctl
(
parent
,
"create gf110 dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create gf110 dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create gf100 dma vers %d page %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
page
,
args
->
v0
.
kind
);
nvif_ioctl
(
parent
,
"create gf100 dma vers %d page %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
page
,
args
->
v0
.
kind
);
kind
=
args
->
v0
.
kind
;
page
=
args
->
v0
.
page
;
}
else
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
View file @
53003941
...
...
@@ -100,12 +100,12 @@ nv50_dmaobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
args
=
data
;
nv_ioctl
(
parent
,
"create nv50 dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create nv50 dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create nv50 dma vers %d priv %d part %d "
"comp %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
priv
,
args
->
v0
.
part
,
args
->
v0
.
comp
,
args
->
v0
.
kind
);
nv
if
_ioctl
(
parent
,
"create nv50 dma vers %d priv %d part %d "
"comp %d kind %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
priv
,
args
->
v0
.
part
,
args
->
v0
.
comp
,
args
->
v0
.
kind
);
user
=
args
->
v0
.
priv
;
part
=
args
->
v0
.
part
;
comp
=
args
->
v0
.
comp
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c
View file @
53003941
...
...
@@ -176,11 +176,11 @@ g84_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nv50_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
@@ -250,12 +250,12 @@ g84_fifo_chan_ctor_ind(struct nvkm_object *parent, struct nvkm_object *engine,
u64
ioffset
,
ilength
;
int
ret
;
nv_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
View file @
53003941
...
...
@@ -199,12 +199,12 @@ gf100_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
u64
usermem
,
ioffset
,
ilength
;
int
ret
,
i
;
nv_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
View file @
53003941
...
...
@@ -240,12 +240,12 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
u64
usermem
,
ioffset
,
ilength
;
int
ret
,
i
;
nv_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x engine %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
,
args
->
v0
.
engine
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x engine %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
,
args
->
v0
.
engine
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
View file @
53003941
...
...
@@ -118,11 +118,11 @@ nv04_fifo_chan_ctor(struct nvkm_object *parent,
struct
nv04_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c
View file @
53003941
...
...
@@ -62,11 +62,11 @@ nv10_fifo_chan_ctor(struct nvkm_object *parent,
struct
nv04_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c
View file @
53003941
...
...
@@ -67,11 +67,11 @@ nv17_fifo_chan_ctor(struct nvkm_object *parent,
struct
nv04_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
View file @
53003941
...
...
@@ -186,11 +186,11 @@ nv40_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nv04_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c
View file @
53003941
...
...
@@ -204,11 +204,11 @@ nv50_fifo_chan_ctor_dma(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nv50_fifo_chan
*
chan
;
int
ret
;
nv_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel dma size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
nv
if
_ioctl
(
parent
,
"create channel dma vers %d pushbuf %08x "
"offset %016llx
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
offset
);
}
else
return
ret
;
...
...
@@ -266,12 +266,12 @@ nv50_fifo_chan_ctor_ind(struct nvkm_object *parent, struct nvkm_object *engine,
u64
ioffset
,
ilength
;
int
ret
;
nv_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
nv
if
_ioctl
(
parent
,
"create channel gpfifo vers %d pushbuf %08x "
"ioffset %016llx ilength %08x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
pushbuf
,
args
->
v0
.
ioffset
,
args
->
v0
.
ilength
);
}
else
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
View file @
53003941
...
...
@@ -212,9 +212,9 @@ nvkm_perfdom_init(struct nvkm_object *object, void *data, u32 size)
struct
nvkm_perfdom
*
dom
=
(
void
*
)
object
;
int
ret
,
i
;
nv_ioctl
(
object
,
"perfdom init size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfdom init size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nv_ioctl
(
object
,
"perfdom init
\n
"
);
nv
if
_ioctl
(
object
,
"perfdom init
\n
"
);
}
else
return
ret
;
...
...
@@ -242,9 +242,9 @@ nvkm_perfdom_sample(struct nvkm_object *object, void *data, u32 size)
struct
nvkm_perfdom
*
dom
;
int
ret
;
nv_ioctl
(
object
,
"perfdom sample size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfdom sample size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nv_ioctl
(
object
,
"perfdom sample
\n
"
);
nv
if
_ioctl
(
object
,
"perfdom sample
\n
"
);
}
else
return
ret
;
pm
->
sequence
++
;
...
...
@@ -266,9 +266,9 @@ nvkm_perfdom_read(struct nvkm_object *object, void *data, u32 size)
struct
nvkm_perfdom
*
dom
=
(
void
*
)
object
;
int
ret
,
i
;
nv_ioctl
(
object
,
"perfdom read size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfdom read size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"perfdom read vers %d
\n
"
,
args
->
v0
.
version
);
nv
if
_ioctl
(
object
,
"perfdom read vers %d
\n
"
,
args
->
v0
.
version
);
}
else
return
ret
;
...
...
@@ -367,10 +367,10 @@ nvkm_perfdom_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
int
c
,
s
,
m
;
int
ret
;
nv_ioctl
(
parent
,
"create perfdom size %d
\n
"
,
size
);
nv
if
_ioctl
(
parent
,
"create perfdom size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
parent
,
"create perfdom vers %d dom %d mode %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
mode
);
nv
if
_ioctl
(
parent
,
"create perfdom vers %d dom %d mode %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
mode
);
}
else
return
ret
;
...
...
@@ -438,10 +438,10 @@ nvkm_perfmon_mthd_query_domain(struct nvkm_object *object, void *data, u32 size)
u8
domain_nr
;
int
di
,
ret
;
nv_ioctl
(
object
,
"perfmon query domain size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfmon query domain size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"perfmon domain vers %d iter %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
iter
);
nv
if
_ioctl
(
object
,
"perfmon domain vers %d iter %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
iter
);
di
=
(
args
->
v0
.
iter
&
0xff
)
-
1
;
}
else
return
ret
;
...
...
@@ -487,11 +487,11 @@ nvkm_perfmon_mthd_query_signal(struct nvkm_object *object, void *data, u32 size)
const
bool
raw
=
nvkm_boolopt
(
device
->
cfgopt
,
"NvPmUnnamed"
,
all
);
int
ret
,
si
;
nv_ioctl
(
object
,
"perfmon query signal size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfmon query signal size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"perfmon query signal vers %d dom %d iter %04x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
iter
);
nv
if
_ioctl
(
object
,
"perfmon query signal vers %d dom %d iter %04x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
iter
);
si
=
(
args
->
v0
.
iter
&
0xffff
)
-
1
;
}
else
return
ret
;
...
...
@@ -538,12 +538,12 @@ nvkm_perfmon_mthd_query_source(struct nvkm_object *object, void *data, u32 size)
u8
source_nr
=
0
;
int
si
,
ret
;
nv_ioctl
(
object
,
"perfmon query source size %d
\n
"
,
size
);
nv
if
_ioctl
(
object
,
"perfmon query source size %d
\n
"
,
size
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nv_ioctl
(
object
,
"perfmon source vers %d dom %d sig %02x iter %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
signal
,
args
->
v0
.
iter
);
nv
if
_ioctl
(
object
,
"perfmon source vers %d dom %d sig %02x iter %02x
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
domain
,
args
->
v0
.
signal
,
args
->
v0
.
iter
);
si
=
(
args
->
v0
.
iter
&
0xff
)
-
1
;
}
else
return
ret
;
...
...
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