Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
22382bb9
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
22382bb9
编写于
10月 16, 2014
作者:
G
Gerd Hoffmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move hw cursor pos from cirrus to vga
上级
b9fd11b8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
16 deletion
+17
-16
hw/display/cirrus_vga.c
hw/display/cirrus_vga.c
+15
-16
hw/display/vga_int.h
hw/display/vga_int.h
+2
-0
未找到文件。
hw/display/cirrus_vga.c
浏览文件 @
22382bb9
...
...
@@ -202,8 +202,6 @@ typedef struct CirrusVGAState {
uint32_t
cirrus_bank_base
[
2
];
uint32_t
cirrus_bank_limit
[
2
];
uint8_t
cirrus_hidden_palette
[
48
];
uint32_t
hw_cursor_x
;
uint32_t
hw_cursor_y
;
int
cirrus_blt_pixelwidth
;
int
cirrus_blt_width
;
int
cirrus_blt_height
;
...
...
@@ -1328,7 +1326,7 @@ static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val)
case
0xd0
:
case
0xf0
:
// Graphics Cursor X
s
->
vga
.
sr
[
0x10
]
=
val
;
s
->
hw_cursor_x
=
(
val
<<
3
)
|
(
s
->
vga
.
sr_index
>>
5
);
s
->
vga
.
hw_cursor_x
=
(
val
<<
3
)
|
(
s
->
vga
.
sr_index
>>
5
);
break
;
case
0x11
:
case
0x31
:
...
...
@@ -1339,7 +1337,7 @@ static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val)
case
0xd1
:
case
0xf1
:
// Graphics Cursor Y
s
->
vga
.
sr
[
0x11
]
=
val
;
s
->
hw_cursor_y
=
(
val
<<
3
)
|
(
s
->
vga
.
sr_index
>>
5
);
s
->
vga
.
hw_cursor_y
=
(
val
<<
3
)
|
(
s
->
vga
.
sr_index
>>
5
);
break
;
case
0x07
:
// Extended Sequencer Mode
cirrus_update_memory_access
(
s
);
...
...
@@ -2195,14 +2193,14 @@ static void cirrus_cursor_invalidate(VGACommonState *s1)
}
/* invalidate last cursor and new cursor if any change */
if
(
s
->
last_hw_cursor_size
!=
size
||
s
->
last_hw_cursor_x
!=
s
->
hw_cursor_x
||
s
->
last_hw_cursor_y
!=
s
->
hw_cursor_y
)
{
s
->
last_hw_cursor_x
!=
s
->
vga
.
hw_cursor_x
||
s
->
last_hw_cursor_y
!=
s
->
vga
.
hw_cursor_y
)
{
invalidate_cursor1
(
s
);
s
->
last_hw_cursor_size
=
size
;
s
->
last_hw_cursor_x
=
s
->
hw_cursor_x
;
s
->
last_hw_cursor_y
=
s
->
hw_cursor_y
;
s
->
last_hw_cursor_x
=
s
->
vga
.
hw_cursor_x
;
s
->
last_hw_cursor_y
=
s
->
vga
.
hw_cursor_y
;
/* compute the real cursor min and max y */
cirrus_cursor_compute_yrange
(
s
);
invalidate_cursor1
(
s
);
...
...
@@ -2259,14 +2257,15 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
}
else
{
h
=
32
;
}
if
(
scr_y
<
s
->
hw_cursor_y
||
scr_y
>=
(
s
->
hw_cursor_y
+
h
))
if
(
scr_y
<
s
->
vga
.
hw_cursor_y
||
scr_y
>=
(
s
->
vga
.
hw_cursor_y
+
h
))
{
return
;
}
src
=
s
->
vga
.
vram_ptr
+
s
->
real_vram_size
-
16
*
1024
;
if
(
s
->
vga
.
sr
[
0x12
]
&
CIRRUS_CURSOR_LARGE
)
{
src
+=
(
s
->
vga
.
sr
[
0x13
]
&
0x3c
)
*
256
;
src
+=
(
scr_y
-
s
->
hw_cursor_y
)
*
16
;
src
+=
(
scr_y
-
s
->
vga
.
hw_cursor_y
)
*
16
;
poffset
=
8
;
content
=
((
uint32_t
*
)
src
)[
0
]
|
((
uint32_t
*
)
src
)[
1
]
|
...
...
@@ -2274,7 +2273,7 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
((
uint32_t
*
)
src
)[
3
];
}
else
{
src
+=
(
s
->
vga
.
sr
[
0x13
]
&
0x3f
)
*
256
;
src
+=
(
scr_y
-
s
->
hw_cursor_y
)
*
4
;
src
+=
(
scr_y
-
s
->
vga
.
hw_cursor_y
)
*
4
;
poffset
=
128
;
...
...
@@ -2286,10 +2285,10 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
return
;
w
=
h
;
x1
=
s
->
hw_cursor_x
;
x1
=
s
->
vga
.
hw_cursor_x
;
if
(
x1
>=
s
->
vga
.
last_scr_width
)
return
;
x2
=
s
->
hw_cursor_x
+
w
;
x2
=
s
->
vga
.
hw_cursor_x
+
w
;
if
(
x2
>
s
->
vga
.
last_scr_width
)
x2
=
s
->
vga
.
last_scr_width
;
w
=
x2
-
x1
;
...
...
@@ -2778,8 +2777,8 @@ static const VMStateDescription vmstate_cirrus_vga = {
VMSTATE_INT32
(
vga
.
bank_offset
,
CirrusVGAState
),
VMSTATE_UINT8
(
cirrus_hidden_dac_lockindex
,
CirrusVGAState
),
VMSTATE_UINT8
(
cirrus_hidden_dac_data
,
CirrusVGAState
),
VMSTATE_UINT32
(
hw_cursor_x
,
CirrusVGAState
),
VMSTATE_UINT32
(
hw_cursor_y
,
CirrusVGAState
),
VMSTATE_UINT32
(
vga
.
hw_cursor_x
,
CirrusVGAState
),
VMSTATE_UINT32
(
vga
.
hw_cursor_y
,
CirrusVGAState
),
/* XXX: we do not save the bitblt state - we assume we do not save
the state when the blitter is active */
VMSTATE_END_OF_LIST
()
...
...
hw/display/vga_int.h
浏览文件 @
22382bb9
...
...
@@ -163,6 +163,8 @@ typedef struct VGACommonState {
bool
default_endian_fb
;
/* hardware mouse cursor support */
uint32_t
invalidated_y_table
[
VGA_MAX_HEIGHT
/
32
];
uint32_t
hw_cursor_x
;
uint32_t
hw_cursor_y
;
void
(
*
cursor_invalidate
)(
struct
VGACommonState
*
s
);
void
(
*
cursor_draw_line
)(
struct
VGACommonState
*
s
,
uint8_t
*
d
,
int
y
);
/* tell for each page if it has been updated since the last time */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录