From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B041CA100C for ; Tue, 5 Sep 2023 21:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aNVXupEoFxCb0aTPoPO8+45/hW2/efGnI8ZFqOUOf5g=; b=orv7zV66ib9URX 9lOLRaxQpLjmiK/sqd0CjewOFH6Vecm7PUc1pwMPWq3I6ngg8dXTsyKgXp8WH58RjFuPLowazyEKg zdv/osabguWR/m92Cr7wqvSieC44MfMtiqVwZAiJIYOMDPgTYkE1r3s6VbGlnJglLYBx5W8ccjrjD sOEmToAOHBU7/KpCI5iY/b8jZCEHLlUsWCqUQYU4i7hQ6Fj3bwVUEhPSUNjaknMlIIklB9j0WLkc4 vAqniEikq1J7ucPh7vCRmIjr5Sa6ekV4BgxMNiZtn1XqudXf4HME9RKdOpk283fFGbmryD8EBuwU8 jqGf/pdjYjM7UQoM9gGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qddFT-006jNc-2a; Tue, 05 Sep 2023 21:06:11 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qddFO-006jMw-2o for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2023 21:06:10 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9a5e1812378so462857766b.2 for ; Tue, 05 Sep 2023 14:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693947965; x=1694552765; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9XU7m3iUIhB2czTwQI5E0tsG1IdXbWVa4A+CGA62kvw=; b=puhvSQyDl/h00NemtyWbHBNIkFh6MZmY0+cpfWPkQYRMr81jEGWMbSxj42g3ieDDoA 13mcPurchy11b8nyUlfHS4muHrnmHa+QsYMZ5RcTx/6LBW2Eg7pa7O62yzZlR4D6DR8M MhFIpjsIbHRvOca017HDYFC9OeooUuslGOXIgEwgrFAIwqr5gzpbQWr194Zabdgv42tw nDusOjR4/+cJiLS6OklmmYGd+SVVUppDRALoZoiIJ/SFG8OPzwmpLzBV9DaaFfFFEx4w X/y6bpiuEcAP6iYRmEMT37bu1VL0w1nhEEy1m7Eh6VMwQg2kkaeN9V54Z3g1KIFCwxe6 Z1HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693947965; x=1694552765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9XU7m3iUIhB2czTwQI5E0tsG1IdXbWVa4A+CGA62kvw=; b=e/3NjyAf5lnint/Z1n/25f40aM1A6xTY9GN3e/RGiM11G6NKebmCylpSHzm26Nnb04 SuEE4LaCcUEaCTEWCllBWZ+clNyAXyDKyA3sM+GmYAZvY/WjGFHQxwOBgNGWBli6thqJ 8oKIYrC7MXG/hbkeAb+lVyAXMmn7AnVK4XwarLJB5KwtbUny7XvSbAxxCN44Zd4igUvS VFWvihd9ZgQ872TnL+uGAFCqtxs+tYawlZXVJFWwrJXGJOWxZrzb2/JAtpR1RIMuTDqK 8V+TLS3C6vocuCWCzhN+bVZ+4VR/ZaARsvI/cSHxBMkFeAzzGG3CvYN0zi5cbfBjVzqE 2pkw== X-Gm-Message-State: AOJu0Yza3HxSFGEgfHOFP/EvA8ZlaFRuJ3ILLTNCox2+xp3LXmSISVJo +DPda8jvUiu8RnexIgvi4Iw= X-Google-Smtp-Source: AGHT+IGkmh9tp77O9jdKZ4K1pCktyBByW4OQ7/rwivCx3acTMVK4FoRmIlgULCUgqm2i5B0cQ60LGg== X-Received: by 2002:a17:907:762a:b0:9a1:bb8f:17d7 with SMTP id jy10-20020a170907762a00b009a1bb8f17d7mr692400ejc.12.1693947964868; Tue, 05 Sep 2023 14:06:04 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id kt8-20020a170906aac800b0099df2ddfc37sm8025574ejb.165.2023.09.05.14.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 14:06:04 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: dri-devel@lists.freedesktop.org, Maxime Ripard , Douglas Anderson Subject: Re: [RFT PATCH 2/6] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers Date: Tue, 05 Sep 2023 23:06:00 +0200 Message-ID: <5970528.lOV4Wx5bFT@jernej-laptop> In-Reply-To: <20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid> References: <20230901234015.566018-1-dianders@chromium.org> <20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230905_140606_933423_540B8C48 X-CRM114-Status: GOOD ( 27.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, xinliang.liu@linaro.org, tomi.valkeinen@ideasonboard.com, linus.walleij@linaro.org, liviu.dudau@arm.com, linux-hyperv@vger.kernel.org, stefan@agner.ch, Douglas Anderson , wens@csie.org, jstultz@google.com, kraxel@redhat.com, airlied@gmail.com, sumit.semwal@linaro.org, yongqin.liu@linaro.org, samuel@sholland.org, sam@ravnborg.org, javierm@redhat.com, drawat.floss@gmail.com, kong.kongxinwei@hisilicon.com, alain.volmat@foss.st.com, linux-sunxi@lists.linux.dev, suijingfeng@loongson.cn, tzimmermann@suse.de, alison.wang@nxp.com, airlied@redhat.com, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, jfalempe@redhat.com, bbrezillon@kernel.org, linux-kernel@vger.kernel.org, christian.koenig@amd.com, paul.kocialkowski@bootlin.com, spice-devel@lists.freedesktop.org, daniel@ffwll.ch, alexander.deucher@amd.com, tiantao6@hisilicon.com, claudiu.beznea@microchip.com, zackr@vmware.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne sobota, 02. september 2023 ob 01:39:53 CEST je Douglas Anderson napisal(a): > 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 > Signed-off-by: Douglas Anderson > --- > This commit is only compile-time tested. > > Note that checkpatch yells that "drivers/gpu/drm/tiny/cirrus.c" is > marked as 'obsolete', but it seems silly not to include the fix if > it's already been written. If someone wants me to take that out, > though, I can. > > drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 9 +++++++++ > drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 7 +++++++ > drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 1 + > drivers/gpu/drm/arm/hdlcd_drv.c | 6 ++++++ > drivers/gpu/drm/arm/malidp_drv.c | 6 ++++++ > drivers/gpu/drm/ast/ast_drv.c | 6 ++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 6 ++++++ > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 8 ++++++++ > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 ++++++ > drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 6 ++++++ > drivers/gpu/drm/logicvc/logicvc_drm.c | 9 +++++++++ > drivers/gpu/drm/loongson/lsdc_drv.c | 6 ++++++ > drivers/gpu/drm/mcde/mcde_drv.c | 9 +++++++++ > drivers/gpu/drm/omapdrm/omap_drv.c | 8 ++++++++ > drivers/gpu/drm/qxl/qxl_drv.c | 7 +++++++ > drivers/gpu/drm/sti/sti_drv.c | 7 +++++++ > drivers/gpu/drm/sun4i/sun4i_drv.c | 6 ++++++ For sun4i: Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Best regards, Jernej > drivers/gpu/drm/tiny/bochs.c | 6 ++++++ > drivers/gpu/drm/tiny/cirrus.c | 6 ++++++ > 19 files changed, 125 insertions(+) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel