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
0b718733
Commit
0b718733
authored
Jun 07, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50-nvc0: explicitly map notifier bo into channel vm
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
45143cb5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
+12
-2
drivers/gpu/drm/nouveau/nvc0_fbcon.c
drivers/gpu/drm/nouveau/nvc0_fbcon.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
0b718733
...
...
@@ -249,6 +249,7 @@ struct nouveau_channel {
/* Notifier memory */
struct
nouveau_bo
*
notifier_bo
;
struct
nouveau_vma
notifier_vma
;
struct
drm_mm
notifier_heap
;
/* PFIFO context */
...
...
drivers/gpu/drm/nouveau/nouveau_notifier.c
View file @
0b718733
...
...
@@ -34,6 +34,7 @@ int
nouveau_notifier_init_channel
(
struct
nouveau_channel
*
chan
)
{
struct
drm_device
*
dev
=
chan
->
dev
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_bo
*
ntfy
=
NULL
;
uint32_t
flags
,
ttmpl
;
int
ret
;
...
...
@@ -58,14 +59,22 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
if
(
ret
)
goto
out_err
;
if
(
dev_priv
->
card_type
>=
NV_50
)
{
ret
=
nouveau_bo_vma_add
(
ntfy
,
chan
->
vm
,
&
chan
->
notifier_vma
);
if
(
ret
)
goto
out_err
;
}
ret
=
drm_mm_init
(
&
chan
->
notifier_heap
,
0
,
ntfy
->
bo
.
mem
.
size
);
if
(
ret
)
goto
out_err
;
chan
->
notifier_bo
=
ntfy
;
out_err:
if
(
ret
)
if
(
ret
)
{
nouveau_bo_vma_del
(
ntfy
,
&
chan
->
notifier_vma
);
drm_gem_object_unreference_unlocked
(
ntfy
->
gem
);
}
return
ret
;
}
...
...
@@ -78,6 +87,7 @@ nouveau_notifier_takedown_channel(struct nouveau_channel *chan)
if
(
!
chan
->
notifier_bo
)
return
;
nouveau_bo_vma_del
(
chan
->
notifier_bo
,
&
chan
->
notifier_vma
);
nouveau_bo_unmap
(
chan
->
notifier_bo
);
mutex_lock
(
&
dev
->
struct_mutex
);
nouveau_bo_unpin
(
chan
->
notifier_bo
);
...
...
@@ -125,7 +135,7 @@ nouveau_notifier_alloc(struct nouveau_channel *chan, uint32_t handle,
offset
=
chan
->
notifier_bo
->
bo
.
offset
;
}
else
{
target
=
NV_MEM_TARGET_VM
;
offset
=
chan
->
notifier_
bo
->
vma
.
offset
;
offset
=
chan
->
notifier_vma
.
offset
;
}
offset
+=
mem
->
start
;
...
...
drivers/gpu/drm/nouveau/nvc0_fbcon.c
View file @
0b718733
...
...
@@ -203,8 +203,8 @@ nvc0_fbcon_accel_init(struct fb_info *info)
BEGIN_NVC0
(
chan
,
2
,
NvSub2D
,
0x0000
,
1
);
OUT_RING
(
chan
,
0x0000902d
);
BEGIN_NVC0
(
chan
,
2
,
NvSub2D
,
0x0104
,
2
);
OUT_RING
(
chan
,
upper_32_bits
(
chan
->
notifier_
bo
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
chan
->
notifier_
bo
->
vma
.
offset
));
OUT_RING
(
chan
,
upper_32_bits
(
chan
->
notifier_vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
chan
->
notifier_vma
.
offset
));
BEGIN_NVC0
(
chan
,
2
,
NvSub2D
,
0x0290
,
1
);
OUT_RING
(
chan
,
0
);
BEGIN_NVC0
(
chan
,
2
,
NvSub2D
,
0x0888
,
1
);
...
...
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