Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d24796a4
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d24796a4
编写于
9月 23, 2015
作者:
G
Gerd Hoffmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virtio-gpu: add page flip support
Signed-off-by:
N
Gerd Hoffmann
<
kraxel@redhat.com
>
上级
f3380a30
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
3 deletion
+46
-3
drivers/gpu/drm/virtio/virtgpu_display.c
drivers/gpu/drm/virtio/virtgpu_display.c
+46
-3
未找到文件。
drivers/gpu/drm/virtio/virtgpu_display.c
浏览文件 @
d24796a4
...
...
@@ -125,6 +125,51 @@ static int virtio_gpu_crtc_cursor_move(struct drm_crtc *crtc,
return
0
;
}
static
int
virtio_gpu_page_flip
(
struct
drm_crtc
*
crtc
,
struct
drm_framebuffer
*
fb
,
struct
drm_pending_vblank_event
*
event
,
uint32_t
flags
)
{
struct
virtio_gpu_device
*
vgdev
=
crtc
->
dev
->
dev_private
;
struct
virtio_gpu_output
*
output
=
container_of
(
crtc
,
struct
virtio_gpu_output
,
crtc
);
struct
drm_plane
*
plane
=
crtc
->
primary
;
struct
virtio_gpu_framebuffer
*
vgfb
;
struct
virtio_gpu_object
*
bo
;
unsigned
long
irqflags
;
uint32_t
handle
;
plane
->
fb
=
fb
;
vgfb
=
to_virtio_gpu_framebuffer
(
plane
->
fb
);
bo
=
gem_to_virtio_gpu_obj
(
vgfb
->
obj
);
handle
=
bo
->
hw_res_handle
;
DRM_DEBUG
(
"handle 0x%x%s, crtc %dx%d
\n
"
,
handle
,
bo
->
dumb
?
", dumb"
:
""
,
crtc
->
mode
.
hdisplay
,
crtc
->
mode
.
vdisplay
);
if
(
bo
->
dumb
)
{
virtio_gpu_cmd_transfer_to_host_2d
(
vgdev
,
handle
,
0
,
cpu_to_le32
(
crtc
->
mode
.
hdisplay
),
cpu_to_le32
(
crtc
->
mode
.
vdisplay
),
0
,
0
,
NULL
);
}
virtio_gpu_cmd_set_scanout
(
vgdev
,
output
->
index
,
handle
,
crtc
->
mode
.
hdisplay
,
crtc
->
mode
.
vdisplay
,
0
,
0
);
virtio_gpu_cmd_resource_flush
(
vgdev
,
handle
,
0
,
0
,
crtc
->
mode
.
hdisplay
,
crtc
->
mode
.
vdisplay
);
if
(
event
)
{
spin_lock_irqsave
(
&
crtc
->
dev
->
event_lock
,
irqflags
);
drm_send_vblank_event
(
crtc
->
dev
,
-
1
,
event
);
spin_unlock_irqrestore
(
&
crtc
->
dev
->
event_lock
,
irqflags
);
}
return
0
;
}
static
const
struct
drm_crtc_funcs
virtio_gpu_crtc_funcs
=
{
.
cursor_set2
=
virtio_gpu_crtc_cursor_set
,
.
cursor_move
=
virtio_gpu_crtc_cursor_move
,
...
...
@@ -132,9 +177,7 @@ static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
.
set_config
=
drm_atomic_helper_set_config
,
.
destroy
=
drm_crtc_cleanup
,
#if 0 /* not (yet) working without vblank support according to docs */
.page_flip = drm_atomic_helper_page_flip,
#endif
.
page_flip
=
virtio_gpu_page_flip
,
.
reset
=
drm_atomic_helper_crtc_reset
,
.
atomic_duplicate_state
=
drm_atomic_helper_crtc_duplicate_state
,
.
atomic_destroy_state
=
drm_atomic_helper_crtc_destroy_state
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录