From d2511cbe2ffaa0e57535865786f7130221823e26 Mon Sep 17 00:00:00 2001 From: Christopher Braga Date: Fri, 28 Aug 2020 15:51:40 -0400 Subject: [PATCH] disp: msm: dsi: handle invalid and dummy panel IDs from DTSI For Demura continuous splash hand-off, the DTB must already have a definition for a demura panel ID. This is necessary as ABL currently only updates this node and will not add it in if missing. Introduce special handling to identify a panel ID of 0 as a dummy node, and set all invalid cases to the panel id ~0x0. Change-Id: I70315c1b32cce9bcd2f6142515f2355a489d470b Signed-off-by: Christopher Braga --- msm/dsi/dsi_display.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 64b095b4f0..5a9703d4d2 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -622,7 +622,7 @@ static void dsi_display_parse_demura_data(struct dsi_display *display) { int rc = 0; - display->panel_id = 0; + display->panel_id = ~0x0; if (display->fw) { DSI_INFO("FW definition unsupported for Demura panel data\n"); return; @@ -630,10 +630,14 @@ static void dsi_display_parse_demura_data(struct dsi_display *display) rc = of_property_read_u64(display->pdev->dev.of_node, "qcom,demura-panel-id", &display->panel_id); - if (rc) + if (rc) { DSI_INFO("No panel ID is present for this display\n"); - else + } else if (!display->panel_id) { + DSI_INFO("Dummy panel ID node present for this display\n"); + display->panel_id = ~0x0; + } else { DSI_INFO("panel id found: %lx\n", display->panel_id); + } } static void dsi_display_parse_te_data(struct dsi_display *display)