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
a6704788
Commit
a6704788
authored
Feb 16, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50: simplify bo moves now that they're all through the vm
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d550c41e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
21 deletions
+15
-21
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.c
+9
-17
drivers/gpu/drm/nouveau/nouveau_dma.c
drivers/gpu/drm/nouveau/nouveau_dma.c
+6
-4
No files found.
drivers/gpu/drm/nouveau/nouveau_bo.c
View file @
a6704788
...
...
@@ -497,15 +497,6 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan,
return
ret
;
}
static
inline
uint32_t
nouveau_bo_mem_ctxdma
(
struct
ttm_buffer_object
*
bo
,
struct
nouveau_channel
*
chan
,
struct
ttm_mem_reg
*
mem
)
{
if
(
mem
->
mem_type
==
TTM_PL_TT
)
return
chan
->
gart_handle
;
return
chan
->
vram_handle
;
}
static
int
nvc0_bo_move_m2mf
(
struct
nouveau_channel
*
chan
,
struct
ttm_buffer_object
*
bo
,
struct
ttm_mem_reg
*
old_mem
,
struct
ttm_mem_reg
*
new_mem
)
...
...
@@ -579,14 +570,6 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
else
dst_offset
+=
dev_priv
->
gart_info
.
aper_base
;
ret
=
RING_SPACE
(
chan
,
3
);
if
(
ret
)
return
ret
;
BEGIN_RING
(
chan
,
NvSubM2MF
,
0x0184
,
2
);
OUT_RING
(
chan
,
nouveau_bo_mem_ctxdma
(
bo
,
chan
,
old_mem
));
OUT_RING
(
chan
,
nouveau_bo_mem_ctxdma
(
bo
,
chan
,
new_mem
));
while
(
length
)
{
u32
amount
,
stride
,
height
;
...
...
@@ -666,6 +649,15 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
return
0
;
}
static
inline
uint32_t
nouveau_bo_mem_ctxdma
(
struct
ttm_buffer_object
*
bo
,
struct
nouveau_channel
*
chan
,
struct
ttm_mem_reg
*
mem
)
{
if
(
mem
->
mem_type
==
TTM_PL_TT
)
return
chan
->
gart_handle
;
return
chan
->
vram_handle
;
}
static
int
nv04_bo_move_m2mf
(
struct
nouveau_channel
*
chan
,
struct
ttm_buffer_object
*
bo
,
struct
ttm_mem_reg
*
old_mem
,
struct
ttm_mem_reg
*
new_mem
)
...
...
drivers/gpu/drm/nouveau/nouveau_dma.c
View file @
a6704788
...
...
@@ -96,13 +96,15 @@ nouveau_dma_init(struct nouveau_channel *chan)
OUT_RING
(
chan
,
0
);
/* Initialise NV_MEMORY_TO_MEMORY_FORMAT */
ret
=
RING_SPACE
(
chan
,
4
);
ret
=
RING_SPACE
(
chan
,
6
);
if
(
ret
)
return
ret
;
BEGIN_RING
(
chan
,
NvSubM2MF
,
NV_MEMORY_TO_MEMORY_FORMAT_NAME
,
1
);
OUT_RING
(
chan
,
NvM2MF
);
BEGIN_RING
(
chan
,
NvSubM2MF
,
NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY
,
1
);
OUT_RING
(
chan
,
NvNotify0
);
OUT_RING
(
chan
,
NvM2MF
);
BEGIN_RING
(
chan
,
NvSubM2MF
,
NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY
,
3
);
OUT_RING
(
chan
,
NvNotify0
);
OUT_RING
(
chan
,
chan
->
vram_handle
);
OUT_RING
(
chan
,
chan
->
gart_handle
);
/* Sit back and pray the channel works.. */
FIRE_RING
(
chan
);
...
...
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