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
3376ee37
Commit
3376ee37
authored
Nov 12, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvd0/disp: add support for page flipping
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
4acd4293
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
267 additions
and
65 deletions
+267
-65
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+4
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+4
-0
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_object.c
+15
-10
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+1
-1
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+243
-53
No files found.
drivers/gpu/drm/nouveau/nouveau_display.c
View file @
3376ee37
...
...
@@ -466,6 +466,9 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
/* Emit a page flip */
if
(
dev_priv
->
card_type
>=
NV_50
)
{
if
(
dev_priv
->
card_type
>=
NV_D0
)
ret
=
nvd0_display_flip_next
(
crtc
,
fb
,
chan
,
0
);
else
ret
=
nv50_display_flip_next
(
crtc
,
fb
,
chan
);
if
(
ret
)
{
nouveau_channel_put
(
&
chan
);
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
3376ee37
...
...
@@ -1353,6 +1353,10 @@ extern int nvd0_display_create(struct drm_device *);
extern
void
nvd0_display_destroy
(
struct
drm_device
*
);
extern
int
nvd0_display_init
(
struct
drm_device
*
);
extern
void
nvd0_display_fini
(
struct
drm_device
*
);
struct
nouveau_bo
*
nvd0_display_crtc_sema
(
struct
drm_device
*
,
int
crtc
);
void
nvd0_display_flip_stop
(
struct
drm_crtc
*
);
int
nvd0_display_flip_next
(
struct
drm_crtc
*
,
struct
drm_framebuffer
*
,
struct
nouveau_channel
*
,
u32
swap_interval
);
/* nv04_crtc.c */
extern
int
nv04_crtc_create
(
struct
drm_device
*
,
int
index
);
...
...
drivers/gpu/drm/nouveau/nouveau_object.c
View file @
3376ee37
...
...
@@ -723,14 +723,14 @@ nvc0_gpuobj_channel_init(struct nouveau_channel *chan, struct nouveau_vm *vm)
nv_wo32
(
chan
->
ramin
,
0x020c
,
0x000000ff
);
/* map display semaphore buffers into channel's vm */
for
(
i
=
0
;
i
<
dev
->
mode_config
.
num_crtc
;
i
++
)
{
struct
nouveau_bo
*
bo
;
if
(
dev_priv
->
card_type
>=
NV_D0
)
return
0
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
struct
nv50_display_crtc
*
dispc
=
&
nv50_display
(
dev
)
->
crtc
[
i
];
bo
=
nvd0_display_crtc_sema
(
dev
,
i
);
else
bo
=
nv50_display
(
dev
)
->
crtc
[
i
].
sem
.
bo
;
ret
=
nouveau_bo_vma_add
(
dispc
->
sem
.
bo
,
chan
->
vm
,
&
chan
->
dispc_vma
[
i
]);
ret
=
nouveau_bo_vma_add
(
bo
,
chan
->
vm
,
&
chan
->
dispc_vma
[
i
]);
if
(
ret
)
return
ret
;
}
...
...
@@ -879,9 +879,14 @@ nouveau_gpuobj_channel_takedown(struct nouveau_channel *chan)
NV_DEBUG
(
dev
,
"ch%d
\n
"
,
chan
->
id
);
if
(
dev_priv
->
card_type
>=
NV_50
&&
dev_priv
->
card_type
<=
NV_C0
)
{
if
(
dev_priv
->
card_type
>=
NV_D0
)
{
for
(
i
=
0
;
i
<
dev
->
mode_config
.
num_crtc
;
i
++
)
{
struct
nouveau_bo
*
bo
=
nvd0_display_crtc_sema
(
dev
,
i
);
nouveau_bo_vma_del
(
bo
,
&
chan
->
dispc_vma
[
i
]);
}
}
else
if
(
dev_priv
->
card_type
>=
NV_50
)
{
struct
nv50_display
*
disp
=
nv50_display
(
dev
);
for
(
i
=
0
;
i
<
dev
->
mode_config
.
num_crtc
;
i
++
)
{
struct
nv50_display_crtc
*
dispc
=
&
disp
->
crtc
[
i
];
nouveau_bo_vma_del
(
dispc
->
sem
.
bo
,
&
chan
->
dispc_vma
[
i
]);
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
3376ee37
...
...
@@ -1244,7 +1244,7 @@ int nouveau_ioctl_getparam(struct drm_device *dev, void *data,
getparam
->
value
=
1
;
break
;
case
NOUVEAU_GETPARAM_HAS_PAGEFLIP
:
getparam
->
value
=
dev_priv
->
card_type
<
NV_D0
;
getparam
->
value
=
1
;
break
;
case
NOUVEAU_GETPARAM_GRAPH_UNITS
:
/* NV40 and NV50 versions are quite different, but register
...
...
drivers/gpu/drm/nouveau/nvd0_display.c
View file @
3376ee37
This diff is collapsed.
Click to expand it.
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