[coreboot-gerrit] Change in libgfxinit[master]: gma config_helpers: Pass the modeline only to Validate_Config()
Nico Huber (Code Review)
gerrit at coreboot.org
Mon Jan 8 13:32:44 CET 2018
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/23163
Change subject: gma config_helpers: Pass the modeline only to Validate_Config()
......................................................................
gma config_helpers: Pass the modeline only to Validate_Config()
Validate_Config() had the full `Port_Config` as parameter, though we
only accessed the modeline. Make that explicit so we can also call it
when we don't have the full config available.
Change-Id: Ia4620d1ffa1a3cd098d721d84f2453f2dc19da2a
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M common/hw-gfx-gma-config_helpers.adb
M common/hw-gfx-gma-config_helpers.ads
M common/hw-gfx-gma.adb
3 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/63/23163/1
diff --git a/common/hw-gfx-gma-config_helpers.adb b/common/hw-gfx-gma-config_helpers.adb
index f2b4ef6..5e5be5d 100644
--- a/common/hw-gfx-gma-config_helpers.adb
+++ b/common/hw-gfx-gma-config_helpers.adb
@@ -181,9 +181,9 @@
-- Validates that a given configuration should work with
-- a given framebuffer.
function Validate_Config
- (FB : Framebuffer_Type;
- Port_Cfg : Port_Config;
- Pipe : Pipe_Index)
+ (FB : Framebuffer_Type;
+ Mode : Mode_Type;
+ Pipe : Pipe_Index)
return Boolean
is
begin
@@ -197,11 +197,11 @@
-- Plane_Control)
-- 90 degree rotations are only supported with Y-tiling
return
- ((Rotated_Width (FB) = Port_Cfg.Mode.H_Visible and
- Rotated_Height (FB) = Port_Cfg.Mode.V_Visible) or
+ ((Rotated_Width (FB) = Mode.H_Visible and
+ Rotated_Height (FB) = Mode.V_Visible) or
(Rotated_Width (FB) <= Config.Maximum_Scalable_Width (Pipe) and
- Rotated_Width (FB) <= Port_Cfg.Mode.H_Visible and
- Rotated_Height (FB) <= Port_Cfg.Mode.V_Visible)) and
+ Rotated_Width (FB) <= Mode.H_Visible and
+ Rotated_Height (FB) <= Mode.V_Visible)) and
(FB.Offset /= VGA_PLANE_FRAMEBUFFER_OFFSET or Pipe = Primary) and
(FB.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET or
(FB.BPC = 8 and Valid_Stride (FB) and
diff --git a/common/hw-gfx-gma-config_helpers.ads b/common/hw-gfx-gma-config_helpers.ads
index 1dc2390..4853634 100644
--- a/common/hw-gfx-gma-config_helpers.ads
+++ b/common/hw-gfx-gma-config_helpers.ads
@@ -40,15 +40,15 @@
use type HW.Pos32;
pragma Warnings (GNAT, On, """Integer_32"" is already use-visible *");
function Validate_Config
- (FB : Framebuffer_Type;
- Port_Cfg : Port_Config;
- Pipe : Pipe_Index)
+ (FB : Framebuffer_Type;
+ Mode : Mode_Type;
+ Pipe : Pipe_Index)
return Boolean
with
Post =>
(if Validate_Config'Result then
- Rotated_Width (FB) <= Port_Cfg.Mode.H_Visible and
- Rotated_Height (FB) <= Port_Cfg.Mode.V_Visible and
+ Rotated_Width (FB) <= Mode.H_Visible and
+ Rotated_Height (FB) <= Mode.V_Visible and
(FB.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET or
FB.Height + FB.Start_Y <= FB.V_Stride));
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 420c1a3..ab15c84 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -109,7 +109,7 @@
if Success then
Success := Config_Helpers.Validate_Config
- (Pipe_Cfg.Framebuffer, Port_Cfg, Pipe);
+ (Pipe_Cfg.Framebuffer, Port_Cfg.Mode, Pipe);
end if;
if Success then
--
To view, visit https://review.coreboot.org/23163
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4620d1ffa1a3cd098d721d84f2453f2dc19da2a
Gerrit-Change-Number: 23163
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180108/fe14b538/attachment-0001.html>
More information about the coreboot-gerrit
mailing list