From cf8aef9c9684fec4bdc6b8356ee89e59822eab99 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Fri, 26 Jan 2018 22:34:59 +0530 Subject: Platform/ARM/VExpress: refine the check for DVI support The base models could have different values for the revision ID field in the System ID register. Base models do not have support for DVI and so the revision ID field should also be masked out when checking for the presence of DVI support. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Abraham Reviewed-by: Leif Lindholm [Reworded adjacent code comments.] Signed-off-by: Leif Lindholm Acked-by: Ard Biesheuvel --- .../Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Platform/ARM') diff --git a/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c index 3f3ceb3d2f..18b7ef5cf5 100644 --- a/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c +++ b/Platform/ARM/VExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c @@ -259,12 +259,12 @@ LcdPlatformSetMode ( } // The FVP foundation model does not have an LCD. - // On the FVP models the GIC variant in encoded in bits [15:12]. + // On the FVP models, the build variant is encoded in bits [15:12]. // Note: The DVI Mode is not modelled by RTSM or FVP models. SysId = MmioRead32 (ARM_VE_SYS_ID_REG); if (SysId != ARM_RTSM_SYS_ID) { - // Take out the FVP GIC variant to reduce the permutations. - SysId &= ~ARM_FVP_SYS_ID_VARIANT_MASK; + // Ignore build variant and revision. + SysId &= ~(ARM_FVP_SYS_ID_VARIANT_MASK | ARM_FVP_SYS_ID_REV_MASK); if (SysId != ARM_FVP_BASE_BOARD_SYS_ID) { // Set the DVI into the new mode Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode); -- cgit v1.2.3