mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Douglas Anderson <dianders@chromium.org>,
	dri-devel@lists.freedesktop.org,
	Maxime Ripard <mripard@kernel.org>
Cc: airlied@gmail.com, airlied@redhat.com, alain.volmat@foss.st.com,
	alexander.deucher@amd.com, alexandre.belloni@bootlin.com,
	alison.wang@nxp.com, bbrezillon@kernel.org,
	christian.koenig@amd.com, claudiu.beznea@microchip.com,
	daniel@ffwll.ch, drawat.floss@gmail.com, javierm@redhat.com,
	jernej.skrabec@gmail.com, jfalempe@redhat.com,
	jstultz@google.com, kong.kongxinwei@hisilicon.com,
	kraxel@redhat.com, linus.walleij@linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sunxi@lists.linux.dev, liviu.dudau@arm.com,
	nicolas.ferre@microchip.com, paul.kocialkowski@bootlin.com,
	sam@ravnborg.org, samuel@sholland.org,
	spice-devel@lists.freedesktop.org, stefan@agner.ch,
	suijingfeng@loongson.cn, sumit.semwal@linaro.org,
	tiantao6@hisilicon.com, tzimmermann@suse.de,
	virtualization@lists.linux-foundation.org, wens@csie.org,
	xinliang.liu@linaro.org, yongqin.liu@linaro.org,
	zackr@vmware.com
Subject: Re: [RFT PATCH 2/6] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers
Date: Tue, 19 Sep 2023 10:31:05 +0300	[thread overview]
Message-ID: <06ac6d3b-e82e-dd25-ab21-90db76f3a5fd@ideasonboard.com> (raw)
In-Reply-To: <20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid>

On 02/09/2023 02:39, Douglas Anderson wrote:
> Based on grepping through the source code these drivers appear to be
> missing a call to drm_atomic_helper_shutdown() at system shutdown
> time. Among other things, this means that if a panel is in use that it
> won't be cleanly powered off at system shutdown time.
> 
> The fact that we should call drm_atomic_helper_shutdown() in the case
> of OS shutdown/restart comes straight out of the kernel doc "driver
> instance overview" in drm_drv.c.
> 
> All of the drivers in this patch were fairly straightforward to fix
> since they already had a call to drm_atomic_helper_shutdown() at
> remove/unbind time but were just lacking one at system shutdown. The
> only hitch is that some of these drivers use the component model to
> register/unregister their DRM devices. The shutdown callback is part
> of the original device. The typical solution here, based on how other
> DRM drivers do this, is to keep track of whether the device is bound
> based on drvdata. In most cases the drvdata is the drm_device, so we
> can just make sure it is NULL when the device is not bound. In some
> drivers, this required minor code changes. To make things simpler,
> drm_atomic_helper_shutdown() has been modified to consider a NULL
> drm_device as a noop in the patch ("drm/atomic-helper:
> drm_atomic_helper_shutdown(NULL) should be a noop").
> 
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

For omapdrm:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

  Tomi


  parent reply	other threads:[~2023-09-19  7:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 23:39 [RFT PATCH 0/6] drm: drm-misc drivers call drm_atomic_helper_shutdown() at the right times Douglas Anderson
2023-09-01 23:39 ` [RFT PATCH 1/6] drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop Douglas Anderson
2023-09-04  7:55   ` Maxime Ripard
2023-09-05 21:14     ` Doug Anderson
2023-09-13 18:19       ` Doug Anderson
2023-09-01 23:39 ` [RFT PATCH 2/6] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers Douglas Anderson
2023-09-04  7:58   ` Maxime Ripard
2023-09-05 21:06   ` Jernej Škrabec
2023-09-15  9:11   ` suijingfeng
2023-09-15 13:44     ` Doug Anderson
2023-09-15 14:02       ` suijingfeng
2023-09-19  7:31   ` Tomi Valkeinen [this message]
2023-09-21 18:46   ` Doug Anderson
2023-09-01 23:39 ` [RFT PATCH 3/6] drm/vc4: Call drm_atomic_helper_shutdown() at shutdown time Douglas Anderson
2023-09-04  7:58   ` Maxime Ripard
2023-09-21 18:46   ` Doug Anderson
2023-09-01 23:39 ` [RFT PATCH 4/6] drm/ssd130x: Call drm_atomic_helper_shutdown() at remove time Douglas Anderson
2023-09-04  7:59   ` Maxime Ripard
2023-09-21 18:47   ` Doug Anderson
2023-09-01 23:39 ` [RFT PATCH 5/6] drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers Douglas Anderson
2023-09-04  8:00   ` Maxime Ripard
2023-09-19  7:09   ` Tomi Valkeinen
2023-09-21 18:48   ` Doug Anderson
2023-09-01 23:39 ` [RFT PATCH 6/6] drm/hisilicon/kirin: Call drm_atomic_helper_shutdown() at shutdown/unbind time Douglas Anderson
2023-09-04  8:00   ` Maxime Ripard
2023-09-21 18:48   ` Doug Anderson
2023-09-13 18:31 ` [RFT PATCH 0/6] drm: drm-misc drivers call drm_atomic_helper_shutdown() at the right times Doug Anderson

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=06ac6d3b-e82e-dd25-ab21-90db76f3a5fd@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alison.wang@nxp.com \
    --cc=bbrezillon@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jfalempe@redhat.com \
    --cc=jstultz@google.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=liviu.dudau@arm.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=sam@ravnborg.org \
    --cc=samuel@sholland.org \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=stefan@agner.ch \
    --cc=suijingfeng@loongson.cn \
    --cc=sumit.semwal@linaro.org \
    --cc=tiantao6@hisilicon.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wens@csie.org \
    --cc=xinliang.liu@linaro.org \
    --cc=yongqin.liu@linaro.org \
    --cc=zackr@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®