linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: Sean Paul <seanpaul@chromium.org>, robdclark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, David Heidelberg <david@ixit.cz>
Subject: [PATCH] drm/msm/dsi: do not use unintialized kms
Date: Tue,  6 Jul 2021 01:14:46 +0200	[thread overview]
Message-ID: <20210705231446.315526-1-david@ixit.cz> (raw)

Without this patch boot ends at NULL ptr exception at msm_dsi_manager_setup_encoder
on devices like Nexus 7 with MDP4 version 4.4.

Fixes: 5d0e97dc8c4c ("drm/msm/dsi: Move setup_encoder to modeset_init")

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 4ebfedc4a9ac..8114612b34b0 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -230,7 +230,7 @@ void msm_dsi_manager_setup_encoder(int id)
 	struct msm_kms *kms = priv->kms;
 	struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi);
 
-	if (encoder && kms->funcs->set_encoder_mode)
+	if (encoder && kms && kms->funcs->set_encoder_mode)
 		kms->funcs->set_encoder_mode(kms, encoder,
 					     dsi_mgr_is_cmd_mode(msm_dsi));
 }
-- 
2.30.2


                 reply	other threads:[~2021-07-05 23:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210705231446.315526-1-david@ixit.cz \
    --to=david@ixit.cz \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).