]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
ArmPlatformPkg/ArmVExpressPkg: Add support for ARM Versatile Express A9x4 Model
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / PL111LcdArmVExpressLib / PL111LcdArmVExpress.c
index cd8680cd45e6cafac18829af7de17e159eac0ef5..31a3549f13a7d1cbb5d8768e5dc5af79cf9f4ca3 100644 (file)
@@ -234,11 +234,15 @@ LcdPlatformSetMode (
     return Status;\r
   }\r
 \r
-  // Set the DVI into the new mode\r
-  Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);\r
-  if (EFI_ERROR(Status)) {\r
-    ASSERT_EFI_ERROR (Status);\r
-    return Status;\r
+  // On the ARM Versatile Express Model (RTSM) the value of the SysId is equal to 0x225F500.\r
+  // Note: The DVI Mode is not modelled on RTSM\r
+  if (MmioRead32 (ARM_VE_SYS_ID_REG) != 0x225F500) {\r
+    // Set the DVI into the new mode\r
+    Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);\r
+    if (EFI_ERROR(Status)) {\r
+      ASSERT_EFI_ERROR (Status);\r
+      return Status;\r
+    }\r
   }\r
 \r
   // Set the multiplexer\r