Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
R128
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Ermine
R128
Commits
7f507624
Commit
7f507624
authored
7 years ago
by
Ben Skeggs
Browse files
Options
Downloads
Patches
Plain Diff
drm/nouveau: determine memory class for each client
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
832ca2ac
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/gpu/drm/nouveau/nouveau_drm.c
+16
-0
16 additions, 0 deletions
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
1 addition, 0 deletions
drivers/gpu/drm/nouveau/nouveau_drv.h
with
17 additions
and
0 deletions
drivers/gpu/drm/nouveau/nouveau_drm.c
+
16
−
0
View file @
7f507624
...
...
@@ -127,6 +127,13 @@ static int
nouveau_cli_init
(
struct
nouveau_drm
*
drm
,
const
char
*
sname
,
struct
nouveau_cli
*
cli
)
{
static
const
struct
nvif_mclass
mems
[]
=
{
{
NVIF_CLASS_MEM_GF100
,
-
1
},
{
NVIF_CLASS_MEM_NV50
,
-
1
},
{
NVIF_CLASS_MEM_NV04
,
-
1
},
{}
};
static
const
struct
nvif_mclass
mmus
[]
=
{
{
NVIF_CLASS_MMU_GF100
,
-
1
},
...
...
@@ -201,11 +208,20 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname,
goto
done
;
}
ret
=
nvif_mclass
(
&
cli
->
mmu
.
object
,
mems
);
if
(
ret
<
0
)
{
NV_ERROR
(
drm
,
"No supported MEM class
\n
"
);
goto
done
;
}
cli
->
mem
=
&
mems
[
ret
];
if
(
1
)
{
cli
->
vm
=
cli
->
vmm
.
vm
;
nvxx_client
(
&
cli
->
base
)
->
vm
=
cli
->
vm
;
}
return
0
;
done:
if
(
ret
)
nouveau_cli_fini
(
cli
);
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/nouveau_drv.h
+
1
−
0
View file @
7f507624
...
...
@@ -95,6 +95,7 @@ struct nouveau_cli {
struct
nvif_device
device
;
struct
nvif_mmu
mmu
;
struct
nouveau_vmm
vmm
;
const
struct
nvif_mclass
*
mem
;
struct
nvkm_vm
*
vm
;
struct
list_head
head
;
...
...
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