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
45143cb5
Commit
45143cb5
authored
Jun 07, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50-nvc0: explicitly map fbcon fb into channel vm
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
fd2871af
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
drivers/gpu/drm/nouveau/nouveau_fb.h
drivers/gpu/drm/nouveau/nouveau_fb.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
+11
-0
drivers/gpu/drm/nouveau/nv50_fbcon.c
drivers/gpu/drm/nouveau/nv50_fbcon.c
+5
-5
drivers/gpu/drm/nouveau/nvc0_fbcon.c
drivers/gpu/drm/nouveau/nvc0_fbcon.c
+5
-5
No files found.
drivers/gpu/drm/nouveau/nouveau_fb.h
View file @
45143cb5
...
...
@@ -30,6 +30,7 @@
struct
nouveau_framebuffer
{
struct
drm_framebuffer
base
;
struct
nouveau_bo
*
nvbo
;
struct
nouveau_vma
vma
;
u32
r_dma
;
u32
r_format
;
u32
r_pitch
;
...
...
drivers/gpu/drm/nouveau/nouveau_fbcon.c
View file @
45143cb5
...
...
@@ -279,6 +279,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
struct
fb_info
*
info
;
struct
drm_framebuffer
*
fb
;
struct
nouveau_framebuffer
*
nouveau_fb
;
struct
nouveau_channel
*
chan
;
struct
nouveau_bo
*
nvbo
;
struct
drm_mode_fb_cmd
mode_cmd
;
struct
pci_dev
*
pdev
=
dev
->
pdev
;
...
...
@@ -318,6 +319,15 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
goto
out
;
}
chan
=
nouveau_nofbaccel
?
NULL
:
dev_priv
->
channel
;
if
(
chan
&&
dev_priv
->
card_type
>=
NV_50
)
{
ret
=
nouveau_bo_vma_add
(
nvbo
,
chan
->
vm
,
&
nfbdev
->
nouveau_fb
.
vma
);
if
(
ret
)
{
NV_ERROR
(
dev
,
"failed to map fb into chan: %d
\n
"
,
ret
);
chan
=
NULL
;
}
}
mutex_lock
(
&
dev
->
struct_mutex
);
info
=
framebuffer_alloc
(
0
,
device
);
...
...
@@ -448,6 +458,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *nfbdev)
if
(
nouveau_fb
->
nvbo
)
{
nouveau_bo_unmap
(
nouveau_fb
->
nvbo
);
nouveau_bo_vma_del
(
nouveau_fb
->
nvbo
,
&
nouveau_fb
->
vma
);
drm_gem_object_unreference_unlocked
(
nouveau_fb
->
nvbo
->
gem
);
nouveau_fb
->
nvbo
=
NULL
;
}
...
...
drivers/gpu/drm/nouveau/nv50_fbcon.c
View file @
45143cb5
...
...
@@ -159,7 +159,7 @@ nv50_fbcon_accel_init(struct fb_info *info)
struct
drm_device
*
dev
=
nfbdev
->
dev
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_channel
*
chan
=
dev_priv
->
channel
;
struct
nouveau_
bo
*
nvbo
=
nfbdev
->
nouveau_fb
.
nvbo
;
struct
nouveau_
framebuffer
*
fb
=
&
nfbdev
->
nouveau_fb
;
int
ret
,
format
;
switch
(
info
->
var
.
bits_per_pixel
)
{
...
...
@@ -247,8 +247,8 @@ nv50_fbcon_accel_init(struct fb_info *info)
OUT_RING
(
chan
,
info
->
fix
.
line_length
);
OUT_RING
(
chan
,
info
->
var
.
xres_virtual
);
OUT_RING
(
chan
,
info
->
var
.
yres_virtual
);
OUT_RING
(
chan
,
upper_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
upper_32_bits
(
fb
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
fb
->
vma
.
offset
));
BEGIN_RING
(
chan
,
NvSub2D
,
0x0230
,
2
);
OUT_RING
(
chan
,
format
);
OUT_RING
(
chan
,
1
);
...
...
@@ -256,8 +256,8 @@ nv50_fbcon_accel_init(struct fb_info *info)
OUT_RING
(
chan
,
info
->
fix
.
line_length
);
OUT_RING
(
chan
,
info
->
var
.
xres_virtual
);
OUT_RING
(
chan
,
info
->
var
.
yres_virtual
);
OUT_RING
(
chan
,
upper_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
upper_32_bits
(
fb
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
fb
->
vma
.
offset
));
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvc0_fbcon.c
View file @
45143cb5
...
...
@@ -159,7 +159,7 @@ nvc0_fbcon_accel_init(struct fb_info *info)
struct
drm_device
*
dev
=
nfbdev
->
dev
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_channel
*
chan
=
dev_priv
->
channel
;
struct
nouveau_
bo
*
nvbo
=
nfbdev
->
nouveau_fb
.
nvbo
;
struct
nouveau_
framebuffer
*
fb
=
&
nfbdev
->
nouveau_fb
;
int
ret
,
format
;
ret
=
nouveau_gpuobj_gr_new
(
chan
,
0x902d
,
0x902d
);
...
...
@@ -249,8 +249,8 @@ nvc0_fbcon_accel_init(struct fb_info *info)
OUT_RING
(
chan
,
info
->
fix
.
line_length
);
OUT_RING
(
chan
,
info
->
var
.
xres_virtual
);
OUT_RING
(
chan
,
info
->
var
.
yres_virtual
);
OUT_RING
(
chan
,
upper_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
upper_32_bits
(
fb
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
fb
->
vma
.
offset
));
BEGIN_NVC0
(
chan
,
2
,
NvSub2D
,
0x0230
,
10
);
OUT_RING
(
chan
,
format
);
OUT_RING
(
chan
,
1
);
...
...
@@ -260,8 +260,8 @@ nvc0_fbcon_accel_init(struct fb_info *info)
OUT_RING
(
chan
,
info
->
fix
.
line_length
);
OUT_RING
(
chan
,
info
->
var
.
xres_virtual
);
OUT_RING
(
chan
,
info
->
var
.
yres_virtual
);
OUT_RING
(
chan
,
upper_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
nvbo
->
vma
.
offset
));
OUT_RING
(
chan
,
upper_32_bits
(
fb
->
vma
.
offset
));
OUT_RING
(
chan
,
lower_32_bits
(
fb
->
vma
.
offset
));
FIRE_RING
(
chan
);
return
0
;
...
...
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