From patchwork Tue Dec 28 17:51:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 528839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C44BC433F5 for ; Tue, 28 Dec 2021 17:52:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235961AbhL1RwB (ORCPT ); Tue, 28 Dec 2021 12:52:01 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:19291 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233327AbhL1RwB (ORCPT ); Tue, 28 Dec 2021 12:52:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1640713921; x=1672249921; h=from:to:cc:subject:date:message-id:mime-version; bh=p5aoJUtY2MxiLh6DtCr2LYCPqB6DS9ptQNq1/Jmbc1s=; b=qIe14lRRnDhwbeOXwrub5VPz5oP2PnP8ibV/S6cloeeDHVEro1Htjiy5 ol/hmCGwq9SNDFCX94UvUSgW2rxdP4HfuxgoBr+0/ncXQ8nsksLV8d5i4 UM3fT9fmPX7F7kwsINs/9Db7V8XTb18kSzVS6L4wGStoiqIuJGuQSo/1/ 8=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 28 Dec 2021 09:52:01 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2021 09:52:00 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 28 Dec 2021 09:51:59 -0800 Received: from khsieh-linux1.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 28 Dec 2021 09:51:59 -0800 From: Kuogee Hsieh To: , , , , , , , , CC: , , , , , , , Subject: [PATCH] drm/msm/dp: populate connector of struct dp_panel Date: Tue, 28 Dec 2021 09:51:48 -0800 Message-ID: <1640713908-7453-1-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There is kernel crashed happen due to unable to handle kernel NULL pointer dereference of dp_panel->connector while running DP link layer compliance test case 4.2.2.6 (EDIDCorruption Detection). This patch will fixed the problem by populating connector of dp_panel. Fixes: 7948fe12d47 ("drm/msm/dp: return correct edid checksum after corrupted edid checksum read") Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_panel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c index 71db10c..6a938a2 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -197,6 +197,8 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel, kfree(dp_panel->edid); dp_panel->edid = NULL; + dp_panel->connector = connector; + dp_panel->edid = drm_get_edid(connector, &panel->aux->ddc); if (!dp_panel->edid) {