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
1971f04e
Commit
1971f04e
authored
Aug 19, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/dmaobj: reject unsupported parent types instead of half-succeeding
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
9456f7d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
+8
-5
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
+8
-5
No files found.
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
View file @
1971f04e
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
*/
*/
#include <core/gpuobj.h>
#include <core/gpuobj.h>
#include <core/class.h>
#include <subdev/fb.h>
#include <subdev/fb.h>
#include <subdev/vm/nv04.h>
#include <subdev/vm/nv04.h>
...
@@ -118,16 +119,18 @@ nv04_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -118,16 +119,18 @@ nv04_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
return
ret
;
switch
(
nv_mclass
(
parent
))
{
switch
(
nv_mclass
(
parent
))
{
case
0x006b
:
case
NV_DEVICE_CLASS
:
case
0x006e
:
break
;
case
0x176e
:
case
NV03_CHANNEL_DMA_CLASS
:
case
0x406e
:
case
NV10_CHANNEL_DMA_CLASS
:
case
NV17_CHANNEL_DMA_CLASS
:
case
NV40_CHANNEL_DMA_CLASS
:
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
nouveau_object_ref
(
NULL
,
pobject
);
nouveau_object_ref
(
NULL
,
pobject
);
*
pobject
=
nv_object
(
gpuobj
);
*
pobject
=
nv_object
(
gpuobj
);
break
;
break
;
default:
default:
break
;
return
-
EINVAL
;
}
}
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
View file @
1971f04e
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
*/
*/
#include <core/gpuobj.h>
#include <core/gpuobj.h>
#include <core/class.h>
#include <subdev/fb.h>
#include <subdev/fb.h>
#include <engine/dmaobj.h>
#include <engine/dmaobj.h>
...
@@ -109,16 +110,18 @@ nv50_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -109,16 +110,18 @@ nv50_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
return
ret
;
switch
(
nv_mclass
(
parent
))
{
switch
(
nv_mclass
(
parent
))
{
case
0x506e
:
case
NV_DEVICE_CLASS
:
case
0x506f
:
break
;
case
0x826e
:
case
NV50_CHANNEL_DMA_CLASS
:
case
0x826f
:
case
NV84_CHANNEL_DMA_CLASS
:
case
NV50_CHANNEL_IND_CLASS
:
case
NV84_CHANNEL_IND_CLASS
:
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
nouveau_object_ref
(
NULL
,
pobject
);
nouveau_object_ref
(
NULL
,
pobject
);
*
pobject
=
nv_object
(
gpuobj
);
*
pobject
=
nv_object
(
gpuobj
);
break
;
break
;
default:
default:
break
;
return
-
EINVAL
;
}
}
return
ret
;
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