Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1cb9469e
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1cb9469e
编写于
10月 25, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50/disp: fix scaling of doublescan modes
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
616a5f57
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
15 deletion
+18
-15
drivers/gpu/drm/nouveau/nv50_crtc.c
drivers/gpu/drm/nouveau/nv50_crtc.c
+18
-15
未找到文件。
drivers/gpu/drm/nouveau/nv50_crtc.c
浏览文件 @
1cb9469e
...
...
@@ -195,7 +195,8 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
struct
drm_crtc
*
crtc
=
&
nv_crtc
->
base
;
struct
drm_device
*
dev
=
crtc
->
dev
;
struct
nouveau_channel
*
evo
=
nv50_display
(
dev
)
->
master
;
struct
drm_display_mode
*
mode
=
&
crtc
->
mode
;
struct
drm_display_mode
*
umode
=
&
crtc
->
mode
;
struct
drm_display_mode
*
omode
;
int
scaling_mode
,
ret
;
u32
ctrl
=
0
,
oX
,
oY
;
...
...
@@ -212,13 +213,15 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
/* start off at the resolution we programmed the crtc for, this
* effectively handles NONE/FULL scaling
*/
if
(
scaling_mode
!=
DRM_MODE_SCALE_NONE
)
{
oX
=
nv_connector
->
native_mode
->
hdisplay
;
oY
=
nv_connector
->
native_mode
->
vdisplay
;
}
else
{
oX
=
mode
->
hdisplay
;
oY
=
mode
->
vdisplay
;
}
if
(
scaling_mode
!=
DRM_MODE_SCALE_NONE
)
omode
=
nv_connector
->
native_mode
;
else
omode
=
umode
;
oX
=
omode
->
hdisplay
;
oY
=
omode
->
vdisplay
;
if
(
omode
->
flags
&
DRM_MODE_FLAG_DBLSCAN
)
oY
*=
2
;
/* add overscan compensation if necessary, will keep the aspect
* ratio the same as the backend mode unless overridden by the
...
...
@@ -248,15 +251,15 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
*/
switch
(
scaling_mode
)
{
case
DRM_MODE_SCALE_CENTER
:
oX
=
min
((
u32
)
mode
->
hdisplay
,
oX
);
oY
=
min
((
u32
)
mode
->
vdisplay
,
oY
);
oX
=
min
((
u32
)
u
mode
->
hdisplay
,
oX
);
oY
=
min
((
u32
)
u
mode
->
vdisplay
,
oY
);
/* fall-through */
case
DRM_MODE_SCALE_ASPECT
:
if
(
oY
<
oX
)
{
u32
aspect
=
(
mode
->
hdisplay
<<
19
)
/
mode
->
vdisplay
;
u32
aspect
=
(
umode
->
hdisplay
<<
19
)
/
u
mode
->
vdisplay
;
oX
=
((
oY
*
aspect
)
+
(
aspect
/
2
))
>>
19
;
}
else
{
u32
aspect
=
(
mode
->
vdisplay
<<
19
)
/
mode
->
hdisplay
;
u32
aspect
=
(
umode
->
vdisplay
<<
19
)
/
u
mode
->
hdisplay
;
oY
=
((
oX
*
aspect
)
+
(
aspect
/
2
))
>>
19
;
}
break
;
...
...
@@ -264,9 +267,9 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
break
;
}
if
(
mode
->
hdisplay
!=
oX
||
mode
->
vdisplay
!=
oY
||
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
||
mode
->
flags
&
DRM_MODE_FLAG_DBLSCAN
)
if
(
umode
->
hdisplay
!=
oX
||
u
mode
->
vdisplay
!=
oY
||
u
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
||
u
mode
->
flags
&
DRM_MODE_FLAG_DBLSCAN
)
ctrl
|=
NV50_EVO_CRTC_SCALE_CTRL_ACTIVE
;
ret
=
RING_SPACE
(
evo
,
5
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录