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
9ad97ede
Commit
9ad97ede
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: use dev_* for logging
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
9e3911e5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
47 deletions
+55
-47
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_abi16.c
+1
-1
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+4
-3
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.c
+4
-4
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+10
-8
drivers/gpu/drm/nouveau/nouveau_drm.h
drivers/gpu/drm/nouveau/nouveau_drm.h
+9
-4
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+26
-26
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/nouveau_abi16.c
View file @
9ad97ede
...
...
@@ -217,7 +217,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
getparam
->
value
=
gr
->
units
?
gr
->
units
(
gr
)
:
0
;
break
;
default:
NV_PRINTK
(
d
ebu
g
,
cli
,
"unknown parameter %lld
\n
"
,
getparam
->
param
);
NV_PRINTK
(
d
b
g
,
cli
,
"unknown parameter %lld
\n
"
,
getparam
->
param
);
return
-
EINVAL
;
}
...
...
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
9ad97ede
...
...
@@ -1891,11 +1891,12 @@ parse_dcb_table(struct drm_device *dev, struct nvbios *bios)
idx
=
-
1
;
while
((
conn
=
olddcb_conn
(
dev
,
++
idx
)))
{
if
(
conn
[
0
]
!=
0xff
)
{
NV_INFO
(
drm
,
"DCB conn %02d: "
,
idx
);
if
(
olddcb_conntab
(
dev
)[
3
]
<
4
)
pr_cont
(
"%04x
\n
"
,
ROM16
(
conn
[
0
]));
NV_INFO
(
drm
,
"DCB conn %02d: %04x
\n
"
,
idx
,
ROM16
(
conn
[
0
]));
else
pr_cont
(
"%08x
\n
"
,
ROM32
(
conn
[
0
]));
NV_INFO
(
drm
,
"DCB conn %02d: %08x
\n
"
,
idx
,
ROM32
(
conn
[
0
]));
}
}
dcb_fake_connectors
(
bios
);
...
...
drivers/gpu/drm/nouveau/nouveau_chan.c
View file @
9ad97ede
...
...
@@ -53,7 +53,7 @@ nouveau_channel_idle(struct nouveau_channel *chan)
}
if
(
ret
)
NV_PRINTK
(
err
or
,
cli
,
"failed to idle channel 0x%08x [%s]
\n
"
,
NV_PRINTK
(
err
,
cli
,
"failed to idle channel 0x%08x [%s]
\n
"
,
chan
->
object
->
handle
,
nvxx_client
(
&
cli
->
base
)
->
name
);
return
ret
;
}
...
...
@@ -405,17 +405,17 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
ret
=
nouveau_channel_ind
(
drm
,
device
,
handle
,
arg0
,
pchan
);
if
(
ret
)
{
NV_PRINTK
(
d
ebu
g
,
cli
,
"ib channel create, %d
\n
"
,
ret
);
NV_PRINTK
(
d
b
g
,
cli
,
"ib channel create, %d
\n
"
,
ret
);
ret
=
nouveau_channel_dma
(
drm
,
device
,
handle
,
pchan
);
if
(
ret
)
{
NV_PRINTK
(
d
ebu
g
,
cli
,
"dma channel create, %d
\n
"
,
ret
);
NV_PRINTK
(
d
b
g
,
cli
,
"dma channel create, %d
\n
"
,
ret
);
goto
done
;
}
}
ret
=
nouveau_channel_init
(
*
pchan
,
arg0
,
arg1
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"channel failed to initialise, %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"channel failed to initialise, %d
\n
"
,
ret
);
nouveau_channel_del
(
pchan
);
}
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
View file @
9ad97ede
...
...
@@ -105,14 +105,18 @@ nouveau_name(struct drm_device *dev)
}
static
int
nouveau_cli_create
(
u64
name
,
const
char
*
sname
,
nouveau_cli_create
(
struct
drm_device
*
dev
,
const
char
*
sname
,
int
size
,
void
**
pcli
)
{
struct
nouveau_cli
*
cli
=
*
pcli
=
kzalloc
(
size
,
GFP_KERNEL
);
int
ret
;
if
(
cli
)
{
int
ret
=
nvif_client_init
(
NULL
,
NULL
,
sname
,
name
,
nouveau_config
,
nouveau_debug
,
&
cli
->
base
);
snprintf
(
cli
->
name
,
sizeof
(
cli
->
name
),
"%s"
,
sname
);
cli
->
dev
=
dev
;
ret
=
nvif_client_init
(
NULL
,
NULL
,
cli
->
name
,
nouveau_name
(
dev
),
nouveau_config
,
nouveau_debug
,
&
cli
->
base
);
if
(
ret
==
0
)
{
mutex_init
(
&
cli
->
mutex
);
usif_client_init
(
cli
);
...
...
@@ -375,8 +379,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
struct
nouveau_drm
*
drm
;
int
ret
;
ret
=
nouveau_cli_create
(
nouveau_name
(
dev
),
"DRM"
,
sizeof
(
*
drm
),
(
void
**
)
&
drm
);
ret
=
nouveau_cli_create
(
dev
,
"DRM"
,
sizeof
(
*
drm
),
(
void
**
)
&
drm
);
if
(
ret
)
return
ret
;
...
...
@@ -826,8 +829,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
get_task_comm
(
tmpname
,
current
);
snprintf
(
name
,
sizeof
(
name
),
"%s[%d]"
,
tmpname
,
pid_nr
(
fpriv
->
pid
));
ret
=
nouveau_cli_create
(
nouveau_name
(
dev
),
name
,
sizeof
(
*
cli
),
(
void
**
)
&
cli
);
ret
=
nouveau_cli_create
(
dev
,
name
,
sizeof
(
*
cli
),
(
void
**
)
&
cli
);
if
(
ret
)
goto
out_suspend
;
...
...
drivers/gpu/drm/nouveau/nouveau_drm.h
View file @
9ad97ede
...
...
@@ -88,6 +88,8 @@ struct nouveau_cli {
void
*
abi16
;
struct
list_head
objects
;
struct
list_head
notifys
;
char
name
[
32
];
struct
drm_device
*
dev
;
};
static
inline
struct
nouveau_cli
*
...
...
@@ -189,13 +191,16 @@ void nouveau_drm_device_remove(struct drm_device *dev);
#define NV_PRINTK(l,c,f,a...) do { \
struct nouveau_cli *_cli = (c); \
nv_##l(_cli->base.base.priv, f, ##a);
\
dev_##l(_cli->dev->dev, "%s: "f, _cli->name, ##a);
\
} while(0)
#define NV_FATAL(drm,f,a...) NV_PRINTK(
fatal
, &(drm)->client, f, ##a)
#define NV_ERROR(drm,f,a...) NV_PRINTK(err
or
, &(drm)->client, f, ##a)
#define NV_FATAL(drm,f,a...) NV_PRINTK(
crit
, &(drm)->client, f, ##a)
#define NV_ERROR(drm,f,a...) NV_PRINTK(err, &(drm)->client, f, ##a)
#define NV_WARN(drm,f,a...) NV_PRINTK(warn, &(drm)->client, f, ##a)
#define NV_INFO(drm,f,a...) NV_PRINTK(info, &(drm)->client, f, ##a)
#define NV_DEBUG(drm,f,a...) NV_PRINTK(debug, &(drm)->client, f, ##a)
#define NV_DEBUG(drm,f,a...) do { \
if (unlikely(drm_debug & DRM_UT_DRIVER)) \
NV_PRINTK(info, &(drm)->client, f, ##a); \
} while(0)
extern
int
nouveau_modeset
;
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
9ad97ede
...
...
@@ -260,7 +260,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
int
ret
=
0
;
if
(
!
fb
->
memtype_valid
(
fb
,
req
->
info
.
tile_flags
))
{
NV_PRINTK
(
err
or
,
cli
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
NV_PRINTK
(
err
,
cli
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
return
-
EINVAL
;
}
...
...
@@ -376,7 +376,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
ww_acquire_init
(
&
op
->
ticket
,
&
reservation_ww_class
);
retry:
if
(
++
trycnt
>
100000
)
{
NV_PRINTK
(
err
or
,
cli
,
"%s failed and gave up.
\n
"
,
__func__
);
NV_PRINTK
(
err
,
cli
,
"%s failed and gave up.
\n
"
,
__func__
);
return
-
EINVAL
;
}
...
...
@@ -387,7 +387,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
gem
=
drm_gem_object_lookup
(
dev
,
file_priv
,
b
->
handle
);
if
(
!
gem
)
{
NV_PRINTK
(
err
or
,
cli
,
"Unknown handle 0x%08x
\n
"
,
b
->
handle
);
NV_PRINTK
(
err
,
cli
,
"Unknown handle 0x%08x
\n
"
,
b
->
handle
);
ret
=
-
ENOENT
;
break
;
}
...
...
@@ -399,7 +399,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
}
if
(
nvbo
->
reserved_by
&&
nvbo
->
reserved_by
==
file_priv
)
{
NV_PRINTK
(
err
or
,
cli
,
"multiple instances of buffer %d on "
NV_PRINTK
(
err
,
cli
,
"multiple instances of buffer %d on "
"validation list
\n
"
,
b
->
handle
);
drm_gem_object_unreference_unlocked
(
gem
);
ret
=
-
EINVAL
;
...
...
@@ -420,7 +420,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
}
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"fail reserve
\n
"
);
NV_PRINTK
(
err
,
cli
,
"fail reserve
\n
"
);
break
;
}
}
...
...
@@ -438,7 +438,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
if
(
b
->
valid_domains
&
NOUVEAU_GEM_DOMAIN_GART
)
list_add_tail
(
&
nvbo
->
entry
,
&
gart_list
);
else
{
NV_PRINTK
(
err
or
,
cli
,
"invalid valid domains: 0x%08x
\n
"
,
NV_PRINTK
(
err
,
cli
,
"invalid valid domains: 0x%08x
\n
"
,
b
->
valid_domains
);
list_add_tail
(
&
nvbo
->
entry
,
&
both_list
);
ret
=
-
EINVAL
;
...
...
@@ -476,21 +476,21 @@ validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli,
b
->
write_domains
,
b
->
valid_domains
);
if
(
unlikely
(
ret
))
{
NV_PRINTK
(
err
or
,
cli
,
"fail set_domain
\n
"
);
NV_PRINTK
(
err
,
cli
,
"fail set_domain
\n
"
);
return
ret
;
}
ret
=
nouveau_bo_validate
(
nvbo
,
true
,
false
);
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"fail ttm_validate
\n
"
);
NV_PRINTK
(
err
,
cli
,
"fail ttm_validate
\n
"
);
return
ret
;
}
ret
=
nouveau_fence_sync
(
nvbo
,
chan
,
!!
b
->
write_domains
,
true
);
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"fail post-validate sync
\n
"
);
NV_PRINTK
(
err
,
cli
,
"fail post-validate sync
\n
"
);
return
ret
;
}
...
...
@@ -537,14 +537,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret
=
validate_init
(
chan
,
file_priv
,
pbbo
,
nr_buffers
,
op
);
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"validate_init
\n
"
);
NV_PRINTK
(
err
,
cli
,
"validate_init
\n
"
);
return
ret
;
}
ret
=
validate_list
(
chan
,
cli
,
&
op
->
list
,
pbbo
,
user_buffers
);
if
(
unlikely
(
ret
<
0
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"validating bo list
\n
"
);
NV_PRINTK
(
err
,
cli
,
"validating bo list
\n
"
);
validate_fini
(
op
,
NULL
,
NULL
);
return
ret
;
}
...
...
@@ -600,7 +600,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
uint32_t
data
;
if
(
unlikely
(
r
->
bo_index
>
req
->
nr_buffers
))
{
NV_PRINTK
(
err
or
,
cli
,
"reloc bo index invalid
\n
"
);
NV_PRINTK
(
err
,
cli
,
"reloc bo index invalid
\n
"
);
ret
=
-
EINVAL
;
break
;
}
...
...
@@ -610,7 +610,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
continue
;
if
(
unlikely
(
r
->
reloc_bo_index
>
req
->
nr_buffers
))
{
NV_PRINTK
(
err
or
,
cli
,
"reloc container bo index invalid
\n
"
);
NV_PRINTK
(
err
,
cli
,
"reloc container bo index invalid
\n
"
);
ret
=
-
EINVAL
;
break
;
}
...
...
@@ -618,7 +618,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
if
(
unlikely
(
r
->
reloc_bo_offset
+
4
>
nvbo
->
bo
.
mem
.
num_pages
<<
PAGE_SHIFT
))
{
NV_PRINTK
(
err
or
,
cli
,
"reloc outside of bo
\n
"
);
NV_PRINTK
(
err
,
cli
,
"reloc outside of bo
\n
"
);
ret
=
-
EINVAL
;
break
;
}
...
...
@@ -627,7 +627,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
ret
=
ttm_bo_kmap
(
&
nvbo
->
bo
,
0
,
nvbo
->
bo
.
mem
.
num_pages
,
&
nvbo
->
kmap
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"failed kmap for reloc
\n
"
);
NV_PRINTK
(
err
,
cli
,
"failed kmap for reloc
\n
"
);
break
;
}
nvbo
->
validate_mapped
=
true
;
...
...
@@ -650,7 +650,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
ret
=
ttm_bo_wait
(
&
nvbo
->
bo
,
true
,
false
,
false
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"reloc wait_idle failed: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"reloc wait_idle failed: %d
\n
"
,
ret
);
break
;
}
...
...
@@ -696,19 +696,19 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
goto
out_next
;
if
(
unlikely
(
req
->
nr_push
>
NOUVEAU_GEM_MAX_PUSH
))
{
NV_PRINTK
(
err
or
,
cli
,
"pushbuf push count exceeds limit: %d max %d
\n
"
,
NV_PRINTK
(
err
,
cli
,
"pushbuf push count exceeds limit: %d max %d
\n
"
,
req
->
nr_push
,
NOUVEAU_GEM_MAX_PUSH
);
return
nouveau_abi16_put
(
abi16
,
-
EINVAL
);
}
if
(
unlikely
(
req
->
nr_buffers
>
NOUVEAU_GEM_MAX_BUFFERS
))
{
NV_PRINTK
(
err
or
,
cli
,
"pushbuf bo count exceeds limit: %d max %d
\n
"
,
NV_PRINTK
(
err
,
cli
,
"pushbuf bo count exceeds limit: %d max %d
\n
"
,
req
->
nr_buffers
,
NOUVEAU_GEM_MAX_BUFFERS
);
return
nouveau_abi16_put
(
abi16
,
-
EINVAL
);
}
if
(
unlikely
(
req
->
nr_relocs
>
NOUVEAU_GEM_MAX_RELOCS
))
{
NV_PRINTK
(
err
or
,
cli
,
"pushbuf reloc count exceeds limit: %d max %d
\n
"
,
NV_PRINTK
(
err
,
cli
,
"pushbuf reloc count exceeds limit: %d max %d
\n
"
,
req
->
nr_relocs
,
NOUVEAU_GEM_MAX_RELOCS
);
return
nouveau_abi16_put
(
abi16
,
-
EINVAL
);
}
...
...
@@ -726,7 +726,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
/* Ensure all push buffers are on validate list */
for
(
i
=
0
;
i
<
req
->
nr_push
;
i
++
)
{
if
(
push
[
i
].
bo_index
>=
req
->
nr_buffers
)
{
NV_PRINTK
(
err
or
,
cli
,
"push %d buffer not in list
\n
"
,
i
);
NV_PRINTK
(
err
,
cli
,
"push %d buffer not in list
\n
"
,
i
);
ret
=
-
EINVAL
;
goto
out_prevalid
;
}
...
...
@@ -737,7 +737,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
req
->
nr_buffers
,
&
op
,
&
do_reloc
);
if
(
ret
)
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_PRINTK
(
err
or
,
cli
,
"validate: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"validate: %d
\n
"
,
ret
);
goto
out_prevalid
;
}
...
...
@@ -745,7 +745,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if
(
do_reloc
)
{
ret
=
nouveau_gem_pushbuf_reloc_apply
(
cli
,
req
,
bo
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"reloc apply: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"reloc apply: %d
\n
"
,
ret
);
goto
out
;
}
}
...
...
@@ -753,7 +753,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if
(
chan
->
dma
.
ib_max
)
{
ret
=
nouveau_dma_wait
(
chan
,
req
->
nr_push
+
1
,
16
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"nv50cal_space: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"nv50cal_space: %d
\n
"
,
ret
);
goto
out
;
}
...
...
@@ -768,7 +768,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if
(
drm
->
device
.
info
.
chipset
>=
0x25
)
{
ret
=
RING_SPACE
(
chan
,
req
->
nr_push
*
2
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"cal_space: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"cal_space: %d
\n
"
,
ret
);
goto
out
;
}
...
...
@@ -782,7 +782,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
}
else
{
ret
=
RING_SPACE
(
chan
,
req
->
nr_push
*
(
2
+
NOUVEAU_DMA_SKIPS
));
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"jmp_space: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"jmp_space: %d
\n
"
,
ret
);
goto
out
;
}
...
...
@@ -820,7 +820,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
ret
=
nouveau_fence_new
(
chan
,
false
,
&
fence
);
if
(
ret
)
{
NV_PRINTK
(
err
or
,
cli
,
"error fencing pushbuf: %d
\n
"
,
ret
);
NV_PRINTK
(
err
,
cli
,
"error fencing pushbuf: %d
\n
"
,
ret
);
WIND_RING
(
chan
);
goto
out
;
}
...
...
drivers/gpu/drm/nouveau/nv50_display.c
View file @
9ad97ede
...
...
@@ -426,7 +426,7 @@ evo_wait(void *evoc, int nr)
break
;
)
<
0
)
{
mutex_unlock
(
&
dmac
->
lock
);
nv_error
(
nvxx_object
(
&
dmac
->
base
.
user
),
"
channel stalled
\n
"
);
printk
(
KERN_ERR
"nouveau: evo
channel stalled
\n
"
);
return
NULL
;
}
...
...
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