Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
6cef37f0
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6cef37f0
编写于
11月 11, 2021
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcConsoleLib: Fixed `ProvideConsoleGop` not disabling blit-only modes
This resolves verbose output issues on ASUS Z690F.
上级
80257ddb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
54 addition
and
17 deletion
+54
-17
Changelog.md
Changelog.md
+1
-0
Library/OcConsoleLib/ConsoleGop.c
Library/OcConsoleLib/ConsoleGop.c
+53
-17
未找到文件。
Changelog.md
浏览文件 @
6cef37f0
...
...
@@ -5,6 +5,7 @@ OpenCore Changelog
-
Added automatic scaling factor detection
-
Explicitly restricted
`ResizeAppleGpuBars`
to 0 and -1
-
Fixed OpenCanopy long labels fade-out over graphics background
-
Fixed
`ProvideConsoleGop`
not disabling blit-only modes (e.g. on Z690)
#### v0.7.5
-
Revised OpenLinuxBoot documentation
...
...
Library/OcConsoleLib/ConsoleGop.c
浏览文件 @
6cef37f0
...
...
@@ -47,16 +47,20 @@ ConsoleHandleProtocol (
Status
=
mGop
.
OriginalHandleProtocol
(
Handle
,
Protocol
,
Interface
);
if
(
Status
!=
EFI_UNSUPPORTED
)
{
if
(
Status
!=
EFI_UNSUPPORTED
&&
EFI_ERROR
(
Status
)
)
{
return
Status
;
}
if
(
CompareGuid
(
&
gEfiGraphicsOutputProtocolGuid
,
Protocol
))
{
if
(
mGop
.
ConsoleGop
!=
NULL
)
{
*
Interface
=
mGop
.
ConsoleGop
;
return
EFI_SUCCESS
;
}
}
else
if
(
CompareGuid
(
&
gEfiUgaDrawProtocolGuid
,
Protocol
))
{
if
(
mGop
.
ConsoleGop
!=
NULL
&&
CompareGuid
(
&
gEfiGraphicsOutputProtocolGuid
,
Protocol
))
{
*
Interface
=
mGop
.
ConsoleGop
;
return
EFI_SUCCESS
;
}
if
(
!
EFI_ERROR
(
Status
))
{
return
Status
;
}
if
(
CompareGuid
(
&
gEfiUgaDrawProtocolGuid
,
Protocol
))
{
//
// EfiBoot from 10.4 can only use UgaDraw protocol.
//
...
...
@@ -110,20 +114,30 @@ OcProvideConsoleGop (
(
UINT32
)
OriginalGop
->
Mode
->
MaxMode
));
//
// This is not the case on MacPro5,1 with Mac EFI incompatible GPU.
// Here we need to uninstall ConOut GOP in favour of GPU GOP.
//
if
(
OriginalGop
->
Mode
->
MaxMode
>
0
)
{
if
(
OriginalGop
->
Mode
->
Info
->
PixelFormat
==
PixelBltOnly
)
{
//
// ASUS Z690F has GOP aggregator on console handle with blit only
// formats. This GOP obviously does not work on macOS, so we need
// to uninstall it, but only when we have an alternative.
//
DEBUG
((
DEBUG_INFO
,
"OCC: Looking for GOP replacement due to blit-only GOP
\n
"
));
}
else
if
(
OriginalGop
->
Mode
->
MaxMode
==
0
)
{
//
// No modes on MacPro5,1 with Mac EFI incompatible GPU.
// Here we need to uninstall ConOut GOP in favour of GPU GOP.
//
DEBUG
((
DEBUG_INFO
,
"OCC: Looking for GOP replacement due to invalid mode count
\n
"
));
}
else
{
mGop
.
ConsoleGop
=
OriginalGop
;
return
EFI_ALREADY_STARTED
;
}
DEBUG
((
DEBUG_INFO
,
"OCC: Looking for GOP replacement due to invalid mode count
\n
"
));
Status
=
gBS
->
LocateHandleBuffer
(
ByProtocol
,
&
gEfiGraphicsOutputProtocolGuid
,
...
...
@@ -152,6 +166,28 @@ OcProvideConsoleGop (
DEBUG
((
DEBUG_INFO
,
"OCC: Alternative GOP status is - %r
\n
"
,
Status
));
FreePool
(
HandleBuffer
);
if
(
!
EFI_ERROR
(
Status
)
&&
OriginalGop
->
Mode
->
Info
->
PixelFormat
==
PixelBltOnly
)
{
if
((
UINT32
)
Gop
->
Mode
->
Info
->
PixelFormat
>=
PixelBltOnly
)
{
Status
=
EFI_NOT_FOUND
;
}
DEBUG
((
DEBUG_INFO
,
"OCC: Checking alternative GOP mode %u - %r
\n
"
,
Gop
->
Mode
->
Info
->
PixelFormat
,
Status
));
//
// We cannot uninstall this GOP as ASUS will reinstall it.
// Hook HandleProtocol instead.
//
if
(
!
EFI_ERROR
(
Status
))
{
mGop
.
ConsoleGop
=
Gop
;
return
EFI_SUCCESS
;
}
}
if
(
!
EFI_ERROR
(
Status
))
{
gBS
->
UninstallProtocolInterface
(
gST
->
ConsoleOutHandle
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录