Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jan.koester
Linux
Commits
1971f04e
Commit
1971f04e
authored
12 years ago
by
Ben Skeggs
Browse files
Options
Downloads
Patches
Plain Diff
drm/nouveau/dmaobj: reject unsupported parent types instead of half-succeeding
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
9456f7d1
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
+8
-5
8 additions, 5 deletions
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
+8
-5
8 additions, 5 deletions
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
with
16 additions
and
10 deletions
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv04.c
+
8
−
5
View file @
1971f04e
...
...
@@ -23,6 +23,7 @@
*/
#include
<core/gpuobj.h>
#include
<core/class.h>
#include
<subdev/fb.h>
#include
<subdev/vm/nv04.h>
...
...
@@ -118,16 +119,18 @@ nv04_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
switch
(
nv_mclass
(
parent
))
{
case
0x006b
:
case
0x006e
:
case
0x176e
:
case
0x406e
:
case
NV_DEVICE_CLASS
:
break
;
case
NV03_CHANNEL_DMA_CLASS
:
case
NV10_CHANNEL_DMA_CLASS
:
case
NV17_CHANNEL_DMA_CLASS
:
case
NV40_CHANNEL_DMA_CLASS
:
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
nouveau_object_ref
(
NULL
,
pobject
);
*
pobject
=
nv_object
(
gpuobj
);
break
;
default:
b
re
ak
;
re
turn
-
EINVAL
;
}
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/core/engine/dmaobj/nv50.c
+
8
−
5
View file @
1971f04e
...
...
@@ -23,6 +23,7 @@
*/
#include
<core/gpuobj.h>
#include
<core/class.h>
#include
<subdev/fb.h>
#include
<engine/dmaobj.h>
...
...
@@ -109,16 +110,18 @@ nv50_dmaobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
switch
(
nv_mclass
(
parent
))
{
case
0x506e
:
case
0x506f
:
case
0x826e
:
case
0x826f
:
case
NV_DEVICE_CLASS
:
break
;
case
NV50_CHANNEL_DMA_CLASS
:
case
NV84_CHANNEL_DMA_CLASS
:
case
NV50_CHANNEL_IND_CLASS
:
case
NV84_CHANNEL_IND_CLASS
:
ret
=
dmaeng
->
bind
(
dmaeng
,
*
pobject
,
&
dmaobj
->
base
,
&
gpuobj
);
nouveau_object_ref
(
NULL
,
pobject
);
*
pobject
=
nv_object
(
gpuobj
);
break
;
default:
b
re
ak
;
re
turn
-
EINVAL
;
}
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment