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
938c40ed
Commit
938c40ed
authored
Oct 12, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: use interruptible waits during pushbuf validation
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
08cd3d43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+19
-12
No files found.
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
938c40ed
...
@@ -299,13 +299,14 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
...
@@ -299,13 +299,14 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
ret
=
ttm_bo_reserve
(
&
nvbo
->
bo
,
fals
e
,
false
,
true
,
sequence
);
ret
=
ttm_bo_reserve
(
&
nvbo
->
bo
,
tru
e
,
false
,
true
,
sequence
);
if
(
ret
)
{
if
(
ret
)
{
validate_fini
(
op
,
NULL
);
validate_fini
(
op
,
NULL
);
if
(
ret
==
-
EAGAIN
)
if
(
unlikely
(
ret
==
-
EAGAIN
)
)
ret
=
ttm_bo_wait_unreserved
(
&
nvbo
->
bo
,
fals
e
);
ret
=
ttm_bo_wait_unreserved
(
&
nvbo
->
bo
,
tru
e
);
drm_gem_object_unreference_unlocked
(
gem
);
drm_gem_object_unreference_unlocked
(
gem
);
if
(
ret
)
{
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"fail reserve
\n
"
);
NV_ERROR
(
dev
,
"fail reserve
\n
"
);
return
ret
;
return
ret
;
}
}
...
@@ -365,9 +366,10 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
...
@@ -365,9 +366,10 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
nvbo
->
channel
=
(
b
->
read_domains
&
(
1
<<
31
))
?
NULL
:
chan
;
nvbo
->
channel
=
(
b
->
read_domains
&
(
1
<<
31
))
?
NULL
:
chan
;
ret
=
ttm_bo_validate
(
&
nvbo
->
bo
,
&
nvbo
->
placement
,
ret
=
ttm_bo_validate
(
&
nvbo
->
bo
,
&
nvbo
->
placement
,
fals
e
,
false
,
false
);
tru
e
,
false
,
false
);
nvbo
->
channel
=
NULL
;
nvbo
->
channel
=
NULL
;
if
(
unlikely
(
ret
))
{
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"fail ttm_validate
\n
"
);
NV_ERROR
(
dev
,
"fail ttm_validate
\n
"
);
return
ret
;
return
ret
;
}
}
...
@@ -420,12 +422,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
...
@@ -420,12 +422,14 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret
=
validate_init
(
chan
,
file_priv
,
pbbo
,
nr_buffers
,
op
);
ret
=
validate_init
(
chan
,
file_priv
,
pbbo
,
nr_buffers
,
op
);
if
(
unlikely
(
ret
))
{
if
(
unlikely
(
ret
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"validate_init
\n
"
);
NV_ERROR
(
dev
,
"validate_init
\n
"
);
return
ret
;
return
ret
;
}
}
ret
=
validate_list
(
chan
,
&
op
->
vram_list
,
pbbo
,
user_buffers
);
ret
=
validate_list
(
chan
,
&
op
->
vram_list
,
pbbo
,
user_buffers
);
if
(
unlikely
(
ret
<
0
))
{
if
(
unlikely
(
ret
<
0
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"validate vram_list
\n
"
);
NV_ERROR
(
dev
,
"validate vram_list
\n
"
);
validate_fini
(
op
,
NULL
);
validate_fini
(
op
,
NULL
);
return
ret
;
return
ret
;
...
@@ -434,6 +438,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
...
@@ -434,6 +438,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret
=
validate_list
(
chan
,
&
op
->
gart_list
,
pbbo
,
user_buffers
);
ret
=
validate_list
(
chan
,
&
op
->
gart_list
,
pbbo
,
user_buffers
);
if
(
unlikely
(
ret
<
0
))
{
if
(
unlikely
(
ret
<
0
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"validate gart_list
\n
"
);
NV_ERROR
(
dev
,
"validate gart_list
\n
"
);
validate_fini
(
op
,
NULL
);
validate_fini
(
op
,
NULL
);
return
ret
;
return
ret
;
...
@@ -442,6 +447,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
...
@@ -442,6 +447,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
ret
=
validate_list
(
chan
,
&
op
->
both_list
,
pbbo
,
user_buffers
);
ret
=
validate_list
(
chan
,
&
op
->
both_list
,
pbbo
,
user_buffers
);
if
(
unlikely
(
ret
<
0
))
{
if
(
unlikely
(
ret
<
0
))
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"validate both_list
\n
"
);
NV_ERROR
(
dev
,
"validate both_list
\n
"
);
validate_fini
(
op
,
NULL
);
validate_fini
(
op
,
NULL
);
return
ret
;
return
ret
;
...
@@ -628,6 +634,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
...
@@ -628,6 +634,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
ret
=
nouveau_gem_pushbuf_validate
(
chan
,
file_priv
,
bo
,
req
->
buffers
,
ret
=
nouveau_gem_pushbuf_validate
(
chan
,
file_priv
,
bo
,
req
->
buffers
,
req
->
nr_buffers
,
&
op
,
&
do_reloc
);
req
->
nr_buffers
,
&
op
,
&
do_reloc
);
if
(
ret
)
{
if
(
ret
)
{
if
(
ret
!=
-
ERESTARTSYS
)
NV_ERROR
(
dev
,
"validate: %d
\n
"
,
ret
);
NV_ERROR
(
dev
,
"validate: %d
\n
"
,
ret
);
goto
out
;
goto
out
;
}
}
...
...
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