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
3c502639
Commit
3c502639
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: switch to vmm limit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
96da0bcd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.c
+5
-7
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/nouveau_chan.c
View file @
3c502639
...
...
@@ -107,7 +107,6 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
u32
size
,
struct
nouveau_channel
**
pchan
)
{
struct
nouveau_cli
*
cli
=
(
void
*
)
device
->
object
.
client
;
struct
nvkm_mmu
*
mmu
=
nvxx_mmu
(
device
);
struct
nv_dma_v0
args
=
{};
struct
nouveau_channel
*
chan
;
u32
target
;
...
...
@@ -156,7 +155,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
args
.
target
=
NV_DMA_V0_TARGET_VM
;
args
.
access
=
NV_DMA_V0_ACCESS_VM
;
args
.
start
=
0
;
args
.
limit
=
cli
->
vm
->
mmu
->
limit
-
1
;
args
.
limit
=
cli
->
vm
m
.
vmm
.
limit
-
1
;
chan
->
push
.
addr
=
chan
->
push
.
vma
->
addr
;
}
else
...
...
@@ -188,7 +187,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
args
.
target
=
NV_DMA_V0_TARGET_VM
;
args
.
access
=
NV_DMA_V0_ACCESS_RDWR
;
args
.
start
=
0
;
args
.
limit
=
mmu
->
limit
-
1
;
args
.
limit
=
cli
->
vmm
.
vmm
.
limit
-
1
;
}
}
...
...
@@ -317,7 +316,6 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
struct
nvif_device
*
device
=
chan
->
device
;
struct
nouveau_cli
*
cli
=
(
void
*
)
chan
->
user
.
client
;
struct
nouveau_drm
*
drm
=
chan
->
drm
;
struct
nvkm_mmu
*
mmu
=
nvxx_mmu
(
device
);
struct
nv_dma_v0
args
=
{};
int
ret
,
i
;
...
...
@@ -342,7 +340,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
args
.
target
=
NV_DMA_V0_TARGET_VM
;
args
.
access
=
NV_DMA_V0_ACCESS_VM
;
args
.
start
=
0
;
args
.
limit
=
cli
->
vm
->
mmu
->
limit
-
1
;
args
.
limit
=
cli
->
vm
m
.
vmm
.
limit
-
1
;
}
else
{
args
.
target
=
NV_DMA_V0_TARGET_VRAM
;
args
.
access
=
NV_DMA_V0_ACCESS_RDWR
;
...
...
@@ -359,7 +357,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
args
.
target
=
NV_DMA_V0_TARGET_VM
;
args
.
access
=
NV_DMA_V0_ACCESS_VM
;
args
.
start
=
0
;
args
.
limit
=
cli
->
vm
->
mmu
->
limit
-
1
;
args
.
limit
=
cli
->
vm
m
.
vmm
.
limit
-
1
;
}
else
if
(
chan
->
drm
->
agp
.
bridge
)
{
args
.
target
=
NV_DMA_V0_TARGET_AGP
;
...
...
@@ -371,7 +369,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
args
.
target
=
NV_DMA_V0_TARGET_VM
;
args
.
access
=
NV_DMA_V0_ACCESS_RDWR
;
args
.
start
=
0
;
args
.
limit
=
mmu
->
limit
-
1
;
args
.
limit
=
cli
->
vmm
.
vmm
.
limit
-
1
;
}
ret
=
nvif_object_init
(
&
chan
->
user
,
gart
,
NV_DMA_IN_MEMORY
,
...
...
drivers/gpu/drm/nouveau/nouveau_ttm.c
View file @
3c502639
...
...
@@ -323,7 +323,7 @@ nouveau_ttm_init(struct nouveau_drm *drm)
/* GART init */
if
(
!
drm
->
agp
.
bridge
)
{
drm
->
gem
.
gart_available
=
nvxx_mmu
(
&
drm
->
client
.
device
)
->
limit
;
drm
->
gem
.
gart_available
=
drm
->
client
.
vmm
.
vmm
.
limit
;
}
else
{
drm
->
gem
.
gart_available
=
drm
->
agp
.
size
;
}
...
...
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