From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Manivannan Sadhasivam <mani@kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Liwei Cai <cailiwei@hisilicon.com>,
Xinliang Liu <xinliang.liu@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sam Ravnborg <sam@ravnborg.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Chen Feng <puck.chen@hisilicon.com>
Subject: [PATCH 3/3] drm: hikey9xxx: Fix null pointer crash on reboot
Date: Thu, 20 Aug 2020 03:41:00 +0000 [thread overview]
Message-ID: <20200820034100.128062-2-john.stultz@linaro.org> (raw)
In-Reply-To: <20200820034100.128062-1-john.stultz@linaro.org>
This is against Mauro's tree here:
https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master/
On reboot we see the following crash:
[ 608.746787] Unable to handle kernel read from unreadable memory at virtual address 00000000000000a8
...
[ 608.822101] CPU: 3 PID: 234 Comm: kworker/3:2 Not tainted 5.8.0-00183-g03481a190c60-dirty #32
[ 608.830626] Hardware name: HiKey960 (DT)
[ 608.834571] Workqueue: events drm_mode_rmfb_work_fn
[ 608.839454] pstate: 80400005 (Nzcv daif +PAN -UAO BTYPE=--)
[ 608.845031] pc : drm_gem_fb_get_obj+0x10/0x28
[ 608.849390] lr : drm_fb_cma_get_gem_obj+0x10/0x20
[ 608.854093] sp : ffffffc012f63b10
[ 608.857404] x29: ffffffc012f63b10 x28: ffffff8212282e00
[ 608.862716] x27: 0000000000000000 x26: ffffff8217501800
[ 608.868027] x25: 0000000000000000 x24: ffffffc012f63d60
[ 608.873339] x23: 0000000000000001 x22: ffffff8217504080
[ 608.878652] x21: ffffffc0119b9000 x20: ffffff8212282e00
[ 608.883963] x19: ffffff82175047c0 x18: ffffffffffffffff
[ 608.889275] x17: ffffff8219c97708 x16: ffffff8219c97728
[ 608.894586] x15: ffffffc0119b9d08 x14: 0000000000000000
[ 608.899898] x13: 0000000000000000 x12: 0000000000000000
[ 608.905209] x11: 0000003c00000000 x10: 0000046500000441
[ 608.910519] x9 : ffffffc0119b9d08 x8 : ffffffc011bf7000
[ 608.915830] x7 : 0000000000000898 x6 : ffffff8217504080
[ 608.921142] x5 : ffffff8212282e00 x4 : ffffffc0111935e0
[ 608.926454] x3 : 0000000000000000 x2 : ffffffc0119b9d08
[ 608.931764] x1 : 0000000000000000 x0 : 0000000000000000
[ 608.937079] Call trace:
[ 608.939531] drm_gem_fb_get_obj+0x10/0x28
[ 608.943547] hisi_fb_pan_display+0x50/0x1f8
[ 608.947736] dss_plane_atomic_update+0x10/0x20
[ 608.952183] drm_atomic_helper_commit_planes+0xe0/0x228
[ 608.957412] drm_atomic_helper_commit_tail+0x34/0x80
[ 608.962377] commit_tail+0x150/0x180
[ 608.965955] drm_atomic_helper_commit+0x164/0x178
[ 608.970665] drm_atomic_commit+0x4c/0x60
[ 608.974591] drm_framebuffer_remove+0x3f4/0x440
[ 608.979123] drm_mode_rmfb_work_fn+0x48/0x68
[ 608.983398] process_one_work+0x1ec/0x4b0
[ 608.987408] worker_thread+0x208/0x478
[ 608.991160] kthread+0x140/0x150
[ 608.994390] ret_from_fork+0x10/0x30
[ 608.997972] Code: d503233f 71000c3f 540000a8 8b214c01 (f9405420)
[ 609.004069] ---[ end trace a837c42fc434e1a4 ]---
Which is due to the plane->state->fb value being null.
Fix this with a solution used in a different version of this
patch series.
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Cc: Liwei Cai <cailiwei@hisilicon.com>
Cc: Xinliang Liu <xinliang.liu@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chen Feng <puck.chen@hisilicon.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
index f2e99c766927..7adbd924bec2 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
@@ -702,6 +702,13 @@ static int dss_plane_atomic_check(struct drm_plane *plane,
static void dss_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
+ struct drm_plane_state *state = plane->state;
+
+ if (!state->fb) {
+ state->visible = false;
+ return;
+ }
+
hisi_fb_pan_display(plane);
}
--
2.17.1
next prev parent reply other threads:[~2020-08-20 3:41 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 11:45 [PATCH 00/49] DRM driver for Hikey 970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 01/49] staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 02/49] staging: hikey9xx/gpu: port it to work with Kernel v4.9 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 03/49] staging: hikey9xx/gpu: solve tearing issue of display Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 04/49] staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 05/49] staging: hikey9xx/gpu: add support to hikey970 HDMI and panel Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 06/49] staging: hikey9xx/gpu: Solve SR Cannot Display Problems Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 07/49] staging: hikey9xx/gpu: Solve HDMI compatibility Problem Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 08/49] staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 09/49] staging: hikey9xx/gpu: Solve SR test reset problem " Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 10/49] staging: hikey9xx/gpu: add debug prints for this driver Mauro Carvalho Chehab
2020-08-21 20:17 ` Joe Perches
2020-08-19 11:45 ` [PATCH 11/49] staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 12/49] staging: hikey9xx/gpu: get rid of adv7535 fork Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 13/49] staging: hikey9xx/gpu: rename the Kirin9xx namespace Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 14/49] staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 15/49] staging: hikey9xx/gpu: get rid of some ifdefs Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 16/49] staging: hikey9xx/gpu: rename the config option for Kirin970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 17/49] staging: hikey9xx/gpu: change the includes to reflect upstream Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 18/49] staging: hikey9xx/gpu: port driver to upstream kAPIs Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 19/49] staging: hikey9xx/gpu: add a copy of set_reg() function there Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 20/49] staging: hikey9xx/gpu: get rid of ION headers Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 21/49] staging: hikey9xx/gpu: add support for using a reserved CMA memory Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 22/49] staging: hikey9xx/gpu: cleanup encoder attach logic Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 23/49] staging: hikey9xx/gpu: Change the logic which sets the burst mode Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 24/49] staging: hikey9xx/gpu: fix the DRM setting logic Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 25/49] staging: hikey9xx/gpu: do some code cleanups Mauro Carvalho Chehab
2020-08-20 1:53 ` John Stultz
2020-08-20 8:23 ` Mauro Carvalho Chehab
2020-08-21 20:12 ` John Stultz
2020-08-19 11:45 ` [PATCH 26/49] staging: hikey9xx/gpu: use default GEM_CMA fops Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 27/49] staging: hikey9xx/gpu: place vblank enable/disable at the right place Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 28/49] staging: hikey9xx/gpu: remove an uneeded hack Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 29/49] staging: hikey9xx/gpu: add a possible implementation for atomic_disable Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 30/49] staging: hikey9xx/gpu: register connector Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 31/49] staging: hikey9xx/gpu: fix driver name Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 32/49] staging: hikey9xx/gpu: get rid of iommu_format Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 33/49] staging: hikey9xx/gpu: re-work the mode validation code Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 34/49] staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 35/49] staging: hikey9xx/gpu: add SPMI headers Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 36/49] staging: hikey9xx/gpu: solve most coding style issues Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 37/49] staging: hikey9xx/gpu: don't use iommu code Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 38/49] staging: hikey9xx/gpu: add kirin9xx driver to the building system Mauro Carvalho Chehab
2020-08-19 15:30 ` Randy Dunlap
2020-08-19 11:46 ` [PATCH 39/49] staging: hikey9xx/gpu: get rid of typedefs Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 40/49] staging: hikey9xx/gpu: get rid of input/output macros Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 41/49] staging: hikey9xx/gpu: get rid of some unused data Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 42/49] staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 43/49] staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 44/49] dts: hisilicon: hi3670.dtsi: add I2C settings Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 45/49] dts: hikey970-pinctrl.dtsi: add missing pinctrl settings Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 46/49] dt: hisilicon: add support for the PMIC found on Hikey 970 Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 47/49] dts: add support for Hikey 970 DRM Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 48/49] staging: hikey9xx/gpu: drop kirin9xx_pwm Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 49/49] dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Mauro Carvalho Chehab
2020-08-19 21:02 ` Sam Ravnborg
2020-08-19 22:36 ` Rob Herring
2020-08-19 15:21 ` [PATCH 00/49] DRM driver for Hikey 970 Sam Ravnborg
2020-08-19 15:30 ` Laurent Pinchart
2020-08-19 19:52 ` John Stultz
2020-08-20 7:03 ` Mauro Carvalho Chehab
2020-08-20 10:02 ` Laurent Pinchart
2020-08-24 19:29 ` Dave Airlie
2020-08-25 11:30 ` Mauro Carvalho Chehab
2020-08-25 11:38 ` Laurent Pinchart
2020-08-25 12:31 ` Daniel Stone
2020-08-26 14:44 ` Nicolas Dufresne
2020-08-19 15:40 ` Mauro Carvalho Chehab
2020-08-19 17:35 ` Sam Ravnborg
2020-08-20 14:06 ` Mauro Carvalho Chehab
2020-08-20 14:48 ` Sam Ravnborg
2020-08-20 15:13 ` Mauro Carvalho Chehab
2020-08-20 15:36 ` Sam Ravnborg
2020-08-21 13:37 ` Mauro Carvalho Chehab
2020-08-21 13:58 ` Mauro Carvalho Chehab
2020-08-21 15:55 ` Sam Ravnborg
2020-08-24 16:02 ` Mauro Carvalho Chehab
2020-08-24 18:45 ` Sam Ravnborg
2020-08-24 21:10 ` Sam Ravnborg
2020-08-24 21:24 ` Sam Ravnborg
2020-08-25 18:11 ` Sam Ravnborg
2020-08-25 20:21 ` Sam Ravnborg
2020-08-21 14:41 ` Mauro Carvalho Chehab
2020-08-21 15:56 ` Sam Ravnborg
2020-08-24 16:06 ` Mauro Carvalho Chehab
2020-08-19 20:48 ` Sam Ravnborg
2020-08-20 7:21 ` Michel Dänzer
2020-08-20 7:21 ` Mauro Carvalho Chehab
2020-08-21 16:09 ` Joe Perches
2020-08-19 21:13 ` John Stultz
2020-08-19 21:25 ` Sam Ravnborg
2020-08-20 6:40 ` Mauro Carvalho Chehab
2020-08-20 6:34 ` Mauro Carvalho Chehab
2020-08-19 21:36 ` John Stultz
2020-08-20 2:01 ` John Stultz
2020-08-20 3:28 ` John Stultz
2020-08-20 7:48 ` Mauro Carvalho Chehab
2020-08-24 6:49 ` Mauro Carvalho Chehab
2020-08-24 13:18 ` Mauro Carvalho Chehab
2020-08-20 8:04 ` Mauro Carvalho Chehab
2020-08-20 3:39 ` [PATCH 1/3] drm: hikey9xx: Fix inconsistent compat string John Stultz
2020-08-20 3:40 ` [PATCH 2/3] drm: kirin9xxx: Add additional color formats John Stultz
2020-08-20 3:41 ` John Stultz [this message]
2020-08-20 3:56 ` [PATCH 4/3] drm: hikey9xx: remove wait for VACTIVE IRQ John Stultz
2020-08-20 9:04 ` [PATCH 1/3] drm: hikey9xx: Fix inconsistent compat string Mauro Carvalho Chehab
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=20200820034100.128062-2-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=cailiwei@hisilicon.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=puck.chen@hisilicon.com \
--cc=sam@ravnborg.org \
--cc=sumit.semwal@linaro.org \
--cc=xinliang.liu@linaro.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).