From: Marc Zyngier <maz@kernel.org>
To: Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
kernel-team@android.com, dri-devel@lists.freedesktop.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] drm/meson: Module removal fixes
Date: Mon, 16 Nov 2020 20:07:40 +0000 [thread overview]
Message-ID: <20201116200744.495826-1-maz@kernel.org> (raw)
Hi all,
Having recently moved over to a top-of-the-tree u-boot on one of my
VIM3L systems in order to benefit from unrelated improvements
(automatic PCIe detection, EFI...), I faced the issue that my kernel
would hang like this:
[ OK ] Finished Helper to synchronize boot up for ifupdown.
[ OK ] Started Rule-based Manager for Device Events and Files.
[ 7.114516] VDDCPU: supplied by regulator-dummy
[ OK ] Found device /dev/ttyAML0.
[ 7.146862] meson-drm ff900000.vpu: Queued 2 outputs on vpu
[ 7.169630] fb0: switching to meson-drm-fb from simple
[ 7.169944] Console: switching to colour dummy device 80x25
[ 7.179250] meson-drm ff900000.vpu: CVBS Output connector not available
and that's it.
After some poking around, I figured out that it is in the
meson-dw-hdmi module that the CPU was hanging...
Reverting to the kernel DT instead of u-boot's papered over it
somehow, but it turned out that removing the module (modprobe -r)
resulted in a firework. And for every issue I was fixing, another
followed. Much fun for a rainy Monday in the basement!
I ended up with the following 4 patches, which solve all my problems:
I can now boot with the u-boot provided DT, and the hdmi and DRM
drivers can be removed and re-inserted at will.
The first patch is a straightforward use-after-free, causing a NULL
pointer dereference. Moving things around fixes it.
The second patch shows that I have no clue about the DRM subsystem
whatsoever. I mimicked what my Rockchip systems are doing, and the two
warnings disappeared. It can't completely be wrong (famous last
words...).
The third patch fixes a *very* common issue with regulators (I've
fixed at least 3 drivers with a similar issue). I guess the devm
subsystem needs to grow a new helper at some point.
The last patch finally fixes the issue I was seeing: the HDMI driver
hangs when accessing a register with clocks disabled, which they are
on module removal. It also fixes my u-boot booting for similar
reasons, I guess.
I went as far as reaching out for a HDMI cable and verifying that I
was getting a working display. Total dedication.
Feedback much appreciated.
M.
Marc Zyngier (4):
drm/meson: Free RDMA resources after tearing down DRM
drm/meson: Unbind all connectors on module removal
drm/meson: dw-hdmi: Register a callback to disable the regulator
drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the
TOP registers
drivers/gpu/drm/meson/meson_drv.c | 12 +++++++-----
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
--
2.28.0
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-amlogic@lists.infradead.org, kernel-team@android.com,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 0/4] drm/meson: Module removal fixes
Date: Mon, 16 Nov 2020 20:07:40 +0000 [thread overview]
Message-ID: <20201116200744.495826-1-maz@kernel.org> (raw)
Hi all,
Having recently moved over to a top-of-the-tree u-boot on one of my
VIM3L systems in order to benefit from unrelated improvements
(automatic PCIe detection, EFI...), I faced the issue that my kernel
would hang like this:
[ OK ] Finished Helper to synchronize boot up for ifupdown.
[ OK ] Started Rule-based Manager for Device Events and Files.
[ 7.114516] VDDCPU: supplied by regulator-dummy
[ OK ] Found device /dev/ttyAML0.
[ 7.146862] meson-drm ff900000.vpu: Queued 2 outputs on vpu
[ 7.169630] fb0: switching to meson-drm-fb from simple
[ 7.169944] Console: switching to colour dummy device 80x25
[ 7.179250] meson-drm ff900000.vpu: CVBS Output connector not available
and that's it.
After some poking around, I figured out that it is in the
meson-dw-hdmi module that the CPU was hanging...
Reverting to the kernel DT instead of u-boot's papered over it
somehow, but it turned out that removing the module (modprobe -r)
resulted in a firework. And for every issue I was fixing, another
followed. Much fun for a rainy Monday in the basement!
I ended up with the following 4 patches, which solve all my problems:
I can now boot with the u-boot provided DT, and the hdmi and DRM
drivers can be removed and re-inserted at will.
The first patch is a straightforward use-after-free, causing a NULL
pointer dereference. Moving things around fixes it.
The second patch shows that I have no clue about the DRM subsystem
whatsoever. I mimicked what my Rockchip systems are doing, and the two
warnings disappeared. It can't completely be wrong (famous last
words...).
The third patch fixes a *very* common issue with regulators (I've
fixed at least 3 drivers with a similar issue). I guess the devm
subsystem needs to grow a new helper at some point.
The last patch finally fixes the issue I was seeing: the HDMI driver
hangs when accessing a register with clocks disabled, which they are
on module removal. It also fixes my u-boot booting for similar
reasons, I guess.
I went as far as reaching out for a HDMI cable and verifying that I
was getting a working display. Total dedication.
Feedback much appreciated.
M.
Marc Zyngier (4):
drm/meson: Free RDMA resources after tearing down DRM
drm/meson: Unbind all connectors on module removal
drm/meson: dw-hdmi: Register a callback to disable the regulator
drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the
TOP registers
drivers/gpu/drm/meson/meson_drv.c | 12 +++++++-----
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
--
2.28.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-amlogic@lists.infradead.org, kernel-team@android.com,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 0/4] drm/meson: Module removal fixes
Date: Mon, 16 Nov 2020 20:07:40 +0000 [thread overview]
Message-ID: <20201116200744.495826-1-maz@kernel.org> (raw)
Hi all,
Having recently moved over to a top-of-the-tree u-boot on one of my
VIM3L systems in order to benefit from unrelated improvements
(automatic PCIe detection, EFI...), I faced the issue that my kernel
would hang like this:
[ OK ] Finished Helper to synchronize boot up for ifupdown.
[ OK ] Started Rule-based Manager for Device Events and Files.
[ 7.114516] VDDCPU: supplied by regulator-dummy
[ OK ] Found device /dev/ttyAML0.
[ 7.146862] meson-drm ff900000.vpu: Queued 2 outputs on vpu
[ 7.169630] fb0: switching to meson-drm-fb from simple
[ 7.169944] Console: switching to colour dummy device 80x25
[ 7.179250] meson-drm ff900000.vpu: CVBS Output connector not available
and that's it.
After some poking around, I figured out that it is in the
meson-dw-hdmi module that the CPU was hanging...
Reverting to the kernel DT instead of u-boot's papered over it
somehow, but it turned out that removing the module (modprobe -r)
resulted in a firework. And for every issue I was fixing, another
followed. Much fun for a rainy Monday in the basement!
I ended up with the following 4 patches, which solve all my problems:
I can now boot with the u-boot provided DT, and the hdmi and DRM
drivers can be removed and re-inserted at will.
The first patch is a straightforward use-after-free, causing a NULL
pointer dereference. Moving things around fixes it.
The second patch shows that I have no clue about the DRM subsystem
whatsoever. I mimicked what my Rockchip systems are doing, and the two
warnings disappeared. It can't completely be wrong (famous last
words...).
The third patch fixes a *very* common issue with regulators (I've
fixed at least 3 drivers with a similar issue). I guess the devm
subsystem needs to grow a new helper at some point.
The last patch finally fixes the issue I was seeing: the HDMI driver
hangs when accessing a register with clocks disabled, which they are
on module removal. It also fixes my u-boot booting for similar
reasons, I guess.
I went as far as reaching out for a HDMI cable and verifying that I
was getting a working display. Total dedication.
Feedback much appreciated.
M.
Marc Zyngier (4):
drm/meson: Free RDMA resources after tearing down DRM
drm/meson: Unbind all connectors on module removal
drm/meson: dw-hdmi: Register a callback to disable the regulator
drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the
TOP registers
drivers/gpu/drm/meson/meson_drv.c | 12 +++++++-----
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
--
2.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-amlogic@lists.infradead.org, kernel-team@android.com,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 0/4] drm/meson: Module removal fixes
Date: Mon, 16 Nov 2020 20:07:40 +0000 [thread overview]
Message-ID: <20201116200744.495826-1-maz@kernel.org> (raw)
Hi all,
Having recently moved over to a top-of-the-tree u-boot on one of my
VIM3L systems in order to benefit from unrelated improvements
(automatic PCIe detection, EFI...), I faced the issue that my kernel
would hang like this:
[ OK ] Finished Helper to synchronize boot up for ifupdown.
[ OK ] Started Rule-based Manager for Device Events and Files.
[ 7.114516] VDDCPU: supplied by regulator-dummy
[ OK ] Found device /dev/ttyAML0.
[ 7.146862] meson-drm ff900000.vpu: Queued 2 outputs on vpu
[ 7.169630] fb0: switching to meson-drm-fb from simple
[ 7.169944] Console: switching to colour dummy device 80x25
[ 7.179250] meson-drm ff900000.vpu: CVBS Output connector not available
and that's it.
After some poking around, I figured out that it is in the
meson-dw-hdmi module that the CPU was hanging...
Reverting to the kernel DT instead of u-boot's papered over it
somehow, but it turned out that removing the module (modprobe -r)
resulted in a firework. And for every issue I was fixing, another
followed. Much fun for a rainy Monday in the basement!
I ended up with the following 4 patches, which solve all my problems:
I can now boot with the u-boot provided DT, and the hdmi and DRM
drivers can be removed and re-inserted at will.
The first patch is a straightforward use-after-free, causing a NULL
pointer dereference. Moving things around fixes it.
The second patch shows that I have no clue about the DRM subsystem
whatsoever. I mimicked what my Rockchip systems are doing, and the two
warnings disappeared. It can't completely be wrong (famous last
words...).
The third patch fixes a *very* common issue with regulators (I've
fixed at least 3 drivers with a similar issue). I guess the devm
subsystem needs to grow a new helper at some point.
The last patch finally fixes the issue I was seeing: the HDMI driver
hangs when accessing a register with clocks disabled, which they are
on module removal. It also fixes my u-boot booting for similar
reasons, I guess.
I went as far as reaching out for a HDMI cable and verifying that I
was getting a working display. Total dedication.
Feedback much appreciated.
M.
Marc Zyngier (4):
drm/meson: Free RDMA resources after tearing down DRM
drm/meson: Unbind all connectors on module removal
drm/meson: dw-hdmi: Register a callback to disable the regulator
drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the
TOP registers
drivers/gpu/drm/meson/meson_drv.c | 12 +++++++-----
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 +++++++++++--
2 files changed, 18 insertions(+), 7 deletions(-)
--
2.28.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2020-11-16 20:08 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 20:07 Marc Zyngier [this message]
2020-11-16 20:07 ` [PATCH 0/4] drm/meson: Module removal fixes Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` [PATCH 1/4] drm/meson: Free RDMA resources after tearing down DRM Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-17 8:51 ` Neil Armstrong
2020-11-17 8:51 ` Neil Armstrong
2020-11-17 8:51 ` Neil Armstrong
2020-11-17 8:51 ` Neil Armstrong
2020-11-16 20:07 ` [PATCH 2/4] drm/meson: Unbind all connectors on module removal Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-17 8:53 ` Neil Armstrong
2020-11-17 8:53 ` Neil Armstrong
2020-11-17 8:53 ` Neil Armstrong
2020-11-17 8:53 ` Neil Armstrong
2020-11-16 20:07 ` [PATCH 3/4] drm/meson: dw-hdmi: Register a callback to disable the regulator Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-17 8:55 ` Neil Armstrong
2020-11-17 8:55 ` Neil Armstrong
2020-11-17 8:55 ` Neil Armstrong
2020-11-17 8:55 ` Neil Armstrong
2020-11-16 20:07 ` [PATCH 4/4] drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-16 20:07 ` Marc Zyngier
2020-11-17 8:56 ` Neil Armstrong
2020-11-17 8:56 ` Neil Armstrong
2020-11-17 8:56 ` Neil Armstrong
2020-11-17 8:56 ` Neil Armstrong
2020-11-17 8:49 ` [PATCH 0/4] drm/meson: Module removal fixes Neil Armstrong
2020-11-17 8:49 ` Neil Armstrong
2020-11-17 8:49 ` Neil Armstrong
2020-11-17 8:49 ` Neil Armstrong
2020-11-17 9:19 ` Marc Zyngier
2020-11-17 9:19 ` Marc Zyngier
2020-11-17 9:19 ` Marc Zyngier
2020-11-17 9:19 ` Marc Zyngier
2020-11-17 9:46 ` Neil Armstrong
2020-11-17 9:46 ` Neil Armstrong
2020-11-17 9:46 ` Neil Armstrong
2020-11-17 9:46 ` Neil Armstrong
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=20201116200744.495826-1-maz@kernel.org \
--to=maz@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jbrunet@baylibre.com \
--cc=kernel-team@android.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.