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
4d326469
Commit
4d326469
authored
Dec 11, 2018
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fault: remove manual mapping of fault buffers into BAR2
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
1786bf56
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
17 deletions
+10
-17
drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
+5
-10
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp100.c
+2
-4
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
+2
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fault/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/fault/priv.h
+1
-1
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c
View file @
4d326469
...
...
@@ -23,8 +23,6 @@
#include <core/memory.h>
#include <core/notify.h>
#include <subdev/bar.h>
#include <subdev/mmu.h>
static
void
nvkm_fault_ntfy_fini
(
struct
nvkm_event
*
event
,
int
type
,
int
index
)
...
...
@@ -91,7 +89,6 @@ nvkm_fault_oneinit_buffer(struct nvkm_fault *fault, int id)
{
struct
nvkm_subdev
*
subdev
=
&
fault
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_vmm
*
bar2
=
nvkm_bar_bar2_vmm
(
device
);
struct
nvkm_fault_buffer
*
buffer
;
int
ret
;
...
...
@@ -110,12 +107,12 @@ nvkm_fault_oneinit_buffer(struct nvkm_fault *fault, int id)
if
(
ret
)
return
ret
;
ret
=
nvkm_vmm_get
(
bar2
,
12
,
nvkm_memory_size
(
buffer
->
mem
),
&
buffer
->
vma
);
if
(
ret
)
return
ret
;
/* Pin fault buffer in BAR2. */
buffer
->
addr
=
nvkm_memory_bar2
(
buffer
->
mem
);
if
(
buffer
->
addr
==
~
0ULL
)
return
-
EFAULT
;
return
nvkm_memory_map
(
buffer
->
mem
,
0
,
bar2
,
buffer
->
vma
,
NULL
,
0
)
;
return
0
;
}
static
int
...
...
@@ -146,7 +143,6 @@ nvkm_fault_oneinit(struct nvkm_subdev *subdev)
static
void
*
nvkm_fault_dtor
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_vmm
*
bar2
=
nvkm_bar_bar2_vmm
(
subdev
->
device
);
struct
nvkm_fault
*
fault
=
nvkm_fault
(
subdev
);
int
i
;
...
...
@@ -154,7 +150,6 @@ nvkm_fault_dtor(struct nvkm_subdev *subdev)
for
(
i
=
0
;
i
<
fault
->
buffer_nr
;
i
++
)
{
if
(
fault
->
buffer
[
i
])
{
nvkm_vmm_put
(
bar2
,
&
fault
->
buffer
[
i
]
->
vma
);
nvkm_memory_unref
(
&
fault
->
buffer
[
i
]
->
mem
);
kfree
(
fault
->
buffer
[
i
]);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp100.c
View file @
4d326469
...
...
@@ -21,8 +21,6 @@
*/
#include "priv.h"
#include <subdev/mmu.h>
static
void
gp100_fault_buffer_fini
(
struct
nvkm_fault_buffer
*
buffer
)
{
...
...
@@ -34,8 +32,8 @@ static void
gp100_fault_buffer_init
(
struct
nvkm_fault_buffer
*
buffer
)
{
struct
nvkm_device
*
device
=
buffer
->
fault
->
subdev
.
device
;
nvkm_wr32
(
device
,
0x002a74
,
upper_32_bits
(
buffer
->
vma
->
addr
));
nvkm_wr32
(
device
,
0x002a70
,
lower_32_bits
(
buffer
->
vma
->
addr
));
nvkm_wr32
(
device
,
0x002a74
,
upper_32_bits
(
buffer
->
addr
));
nvkm_wr32
(
device
,
0x002a70
,
lower_32_bits
(
buffer
->
addr
));
nvkm_mask
(
device
,
0x002a70
,
0x00000001
,
0x00000001
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
View file @
4d326469
...
...
@@ -88,8 +88,8 @@ gv100_fault_buffer_init(struct nvkm_fault_buffer *buffer)
const
u32
foff
=
buffer
->
id
*
0x14
;
nvkm_mask
(
device
,
0x100e34
+
foff
,
0xc0000000
,
0x40000000
);
nvkm_wr32
(
device
,
0x100e28
+
foff
,
upper_32_bits
(
buffer
->
vma
->
addr
));
nvkm_wr32
(
device
,
0x100e24
+
foff
,
lower_32_bits
(
buffer
->
vma
->
addr
));
nvkm_wr32
(
device
,
0x100e28
+
foff
,
upper_32_bits
(
buffer
->
addr
));
nvkm_wr32
(
device
,
0x100e24
+
foff
,
lower_32_bits
(
buffer
->
addr
));
nvkm_mask
(
device
,
0x100e34
+
foff
,
0x80000000
,
0x80000000
);
nvkm_mask
(
device
,
0x100a2c
,
intr
,
intr
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fault/priv.h
View file @
4d326469
...
...
@@ -13,7 +13,7 @@ struct nvkm_fault_buffer {
int
id
;
int
entries
;
struct
nvkm_memory
*
mem
;
struct
nvkm_vma
*
vma
;
u64
addr
;
};
int
nvkm_fault_new_
(
const
struct
nvkm_fault_func
*
,
struct
nvkm_device
*
,
...
...
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