[Intel-gfx] [i-g-t PATCH 01/10] tools/intel_lid: use local register definition

Jani Nikula jani.nikula at intel.com
Mon Aug 28 12:19:53 UTC 2017


This makes the future intel_vbt_decode refactoring easier.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tools/intel_lid.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/intel_lid.c b/tools/intel_lid.c
index 0703e2e1e14e..37c6ba5e443f 100644
--- a/tools/intel_lid.c
+++ b/tools/intel_lid.c
@@ -39,9 +39,10 @@
 
 #include "intel_io.h"
 #include "intel_reg.h"
-#include "intel_bios.h"
 #include "intel_chipset.h"
 
+#define SWF14_LID_STATUS_CLOSED	(1<<29) /* 0 here means open */
+
 enum lid_status {
 	LID_UNKNOWN = -1,
 	LID_OPEN,
@@ -125,7 +126,7 @@ int main(int argc, char **argv)
 
 		printf("Intel LVDS Lid status:\n");
 		printf("\tSWF14(0x%x) : %s\n", swf14,
-		       swf14 & SWF14_LID_SWITCH_EN ? "close" : "open");
+		       swf14 & SWF14_LID_STATUS_CLOSED ? "close" : "open");
 
 		acpi_lid = i830_lvds_acpi_lid_state();
 		switch (acpi_lid) {
-- 
2.11.0



More information about the Intel-gfx mailing list