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
792067e0
Commit
792067e0
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: remove unnecessary use of ttm_mem_type_manager::priv
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a48296ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
+3
-13
No files found.
drivers/gpu/drm/nouveau/nouveau_ttm.c
View file @
792067e0
...
...
@@ -35,16 +35,12 @@
static
int
nouveau_vram_manager_init
(
struct
ttm_mem_type_manager
*
man
,
unsigned
long
psize
)
{
struct
nouveau_drm
*
drm
=
nouveau_bdev
(
man
->
bdev
);
struct
nvkm_fb
*
fb
=
nvxx_fb
(
&
drm
->
client
.
device
);
man
->
priv
=
fb
;
return
0
;
}
static
int
nouveau_vram_manager_fini
(
struct
ttm_mem_type_manager
*
man
)
{
man
->
priv
=
NULL
;
return
0
;
}
...
...
@@ -193,20 +189,12 @@ const struct ttm_mem_type_manager_func nouveau_gart_manager = {
static
int
nv04_gart_manager_init
(
struct
ttm_mem_type_manager
*
man
,
unsigned
long
psize
)
{
struct
nouveau_drm
*
drm
=
nouveau_bdev
(
man
->
bdev
);
struct
nvkm_mmu
*
mmu
=
nvxx_mmu
(
&
drm
->
client
.
device
);
struct
nvkm_vm
*
vm
=
NULL
;
nvkm_vm_ref
(
mmu
->
vmm
,
&
vm
,
NULL
);
man
->
priv
=
vm
;
return
0
;
}
static
int
nv04_gart_manager_fini
(
struct
ttm_mem_type_manager
*
man
)
{
struct
nvkm_vm
*
vm
=
man
->
priv
;
nvkm_vm_ref
(
NULL
,
&
vm
,
NULL
);
man
->
priv
=
NULL
;
return
0
;
}
...
...
@@ -226,6 +214,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
const
struct
ttm_place
*
place
,
struct
ttm_mem_reg
*
reg
)
{
struct
nouveau_drm
*
drm
=
nouveau_bdev
(
man
->
bdev
);
struct
nvkm_mmu
*
mmu
=
nvxx_mmu
(
&
drm
->
client
.
device
);
struct
nvkm_mem
*
node
;
int
ret
;
...
...
@@ -235,7 +225,7 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
node
->
page_shift
=
12
;
ret
=
nvkm_vm_get
(
m
an
->
priv
,
reg
->
num_pages
<<
12
,
node
->
page_shift
,
ret
=
nvkm_vm_get
(
m
mu
->
vmm
,
reg
->
num_pages
<<
12
,
node
->
page_shift
,
NV_MEM_ACCESS_RW
,
&
node
->
vma
[
0
]);
if
(
ret
)
{
if
(
ret
==
-
ENOSPC
)
{
...
...
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