All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH v3 0/4] omapdrm: Fix runtime PM issues at module load and unload time
Date: Sat, 10 Nov 2018 13:16:50 +0200	[thread overview]
Message-ID: <20181110111654.4387-1-laurent.pinchart@ideasonboard.com> (raw)

Hello,

This series fixes crashes in the omapdss driver at both load and unload
time, due to runtime PM problems related to probe deferral. The bugs got
introduced in v4.20-rc, this should thus be considered as v4.20 fixes.

At the core of the problem comes commit 27d624527d99 ("drm/omap: dss:
Acquire next dssdev at probe time") which can cause probe deferral for
the DSS when the encoder and panel modules are not loaded yet. As the
omapdss module contains drivers for the DSS and all its children, this
results in the internal encoders being probed before the DSS. Missing
runtime PM handling around register access then caused imprecise
external aborts.

Patch 1/4 moves population of the DSS children from arch code to the
omapdss driver. This prevents the DSS children from being probed before
the DSS. The change can be considered as a workaround in the sense that
runtime PM of the DSS children should operate correctly even when the
DSS probe fail. However, given that reducing the amount of arch code is
an improvement in itself, I believe the solution to be acceptable.

Patches 2/4 and 3/4 then ensure that the HDMI4 and DSI devices are
active at bind and probe time respectively, in order to access hardware
registers there.

Patch 4/4 finally fixes the internal encoders crash in their runtime PM
handlers by moving DISPC runtime PM state management to omapdrm. This is
the biggest change compared to v3 that went for a less intrusive (in my
opinion at least) workaround. As Tomi and Tony were in favour of a real
fix instead of a workaround, I gave the RFC fix more testing on
Beagleboard, Pandaboard and AM57xx EVM and concluded it should be safe.

Patch 1/4 touches both the mach-omap2 and omapdss, and has been acked by
Tony to be merged through the DRM tree.

Laurent Pinchart (4):
  drm/omap: Populate DSS children in omapdss driver
  drm/omap: hdmi4: Ensure the device is active during bind
  drm/omap: dsi: Ensure the device is active during probe
  drm/omap: Move DISPC runtime PM handling to omapdrm

 arch/arm/mach-omap2/display.c       | 111 +++++++++++++---------------
 drivers/gpu/drm/omapdrm/dss/dsi.c   |  14 ++--
 drivers/gpu/drm/omapdrm/dss/dss.c   |  11 ++-
 drivers/gpu/drm/omapdrm/dss/hdmi4.c |  37 +++-------
 drivers/gpu/drm/omapdrm/dss/hdmi5.c |  27 -------
 drivers/gpu/drm/omapdrm/dss/venc.c  |   7 --
 drivers/gpu/drm/omapdrm/omap_crtc.c |   6 ++
 7 files changed, 83 insertions(+), 130 deletions(-)

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-11-10 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 11:16 Laurent Pinchart [this message]
2018-11-10 11:16 ` [PATCH v3 1/4] drm/omap: Populate DSS children in omapdss driver Laurent Pinchart
2018-11-11  0:45   ` Sebastian Reichel
2018-11-10 11:16 ` [PATCH v3 2/4] drm/omap: hdmi4: Ensure the device is active during bind Laurent Pinchart
2018-11-11  0:48   ` Sebastian Reichel
2018-11-10 11:16 ` [PATCH v3 3/4] drm/omap: dsi: Ensure the device is active during probe Laurent Pinchart
2018-11-11  0:48   ` Sebastian Reichel
2018-11-10 11:16 ` [PATCH v3 4/4] drm/omap: Move DISPC runtime PM handling to omapdrm Laurent Pinchart
2018-11-11  1:45   ` Sebastian Reichel
2018-11-12 10:05 ` [PATCH v3 0/4] omapdrm: Fix runtime PM issues at module load and unload time Tomi Valkeinen

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=20181110111654.4387-1-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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.