[coreboot-gerrit] Change in libgfxinit[master]: gma ddi: Move conditionally used Program_Buffer_Translations()
Nico Huber (Code Review)
gerrit at coreboot.org
Tue May 15 23:52:18 CEST 2018
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/26305
Change subject: gma ddi: Move conditionally used Program_Buffer_Translations()
......................................................................
gma ddi: Move conditionally used Program_Buffer_Translations()
When compiled for Broxton, Buffers.Translations() is a stub and GCC 8
correctly identifies the use of unitialized fields. However, it can't
see that it's never called in that case. Draw the definition of
Program_Buffer_Translations() inside the respective `if` to make that
clear.
Change-Id: I8edbb8ac9249d76465d1cd07526fb6eeef0618e1
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
1 file changed, 21 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/05/26305/1
diff --git a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
index b6d7284..88f2b22 100644
--- a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
+++ b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
@@ -296,29 +296,32 @@
----------------------------------------------------------------------------
- procedure Program_Buffer_Translations (Port : Digital_Port)
- is
- Buffer_Translations : Buf_Trans_Array;
- begin
- Buffers.Translations (Buffer_Translations, Port);
- for I in Buf_Trans_Range loop
- Registers.Write
- (Register => DDI_Regs (Port).BUF_TRANS (I),
- Value => Buffer_Translations (I));
- end loop;
- end Program_Buffer_Translations;
-
procedure Initialize
is
Iboost_Value : constant Word32 := 1;
begin
if Config.Has_DDI_Buffer_Trans then
- for Port in Digital_Port range DIGI_A .. Config.Last_Digital_Port loop
- Program_Buffer_Translations (Port);
- end loop;
- if Config.Is_FDI_Port (Analog) then
- Program_Buffer_Translations (DIGI_E);
- end if;
+ declare
+ procedure Program_Buffer_Translations (Port : Digital_Port)
+ is
+ Buffer_Translations : Buf_Trans_Array;
+ begin
+ Buffers.Translations (Buffer_Translations, Port);
+ for I in Buf_Trans_Range loop
+ Registers.Write
+ (Register => DDI_Regs (Port).BUF_TRANS (I),
+ Value => Buffer_Translations (I));
+ end loop;
+ end Program_Buffer_Translations;
+ begin
+ for Port in Digital_Port range DIGI_A .. Config.Last_Digital_Port
+ loop
+ Program_Buffer_Translations (Port);
+ end loop;
+ if Config.Is_FDI_Port (Analog) then
+ Program_Buffer_Translations (DIGI_E);
+ end if;
+ end;
end if;
if Config.Has_Iboost_Config then
--
To view, visit https://review.coreboot.org/26305
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: I8edbb8ac9249d76465d1cd07526fb6eeef0618e1
Gerrit-Change-Number: 26305
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/20180515/77d92ada/attachment-0001.html>
More information about the coreboot-gerrit
mailing list