From 3ced5287f2f9fe0904dce377e0bf5720df8c1a53 Mon Sep 17 00:00:00 2001 From: xuxinxiong Date: Fri, 26 Mar 2021 22:53:35 +0800 Subject: [PATCH] mb/google/kukui: fix the issue of getting error panel_id Current get panel_id is over sku_id() >> 4, but sku_id is combined with wfc_id/lcm_id/sku_id, so the panel_id value is wfc_id << 4 | lcm_id() in fact. When wfc_id is not 0, the panel_id will be wrong. So only get the low 4 bits for the panel_id. BUG=b:183779755 BRANCH=kukui TEST=emerge-kukui Change-Id: I63e0c8a2719462a9b979afe52a27c78b9fc804e8 Signed-off-by: Tao Xia Reviewed-on: https://review.coreboot.org/c/coreboot/+/51853 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin Reviewed-by: Yu-Ping Wu --- src/mainboard/google/kukui/mainboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index fbdf63320c..893d94db43 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -124,7 +124,7 @@ struct panel_description *get_panel_from_cbfs(struct panel_description *desc) static struct panel_description *get_active_panel(void) { /* TODO(hungte) Create a dedicated panel_id() in board_id.c */ - int panel_id = sku_id() >> 4; + int panel_id = sku_id() >> 4 & 0x0F; struct panel_description *panel = get_panel_description(panel_id); if (!panel) {