Message ID | 20230921122641.RFT.v2.2.I20cb02bafa7c2368e4bd579df0716eb62a3a21bf@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5212033vqi; Thu, 21 Sep 2023 16:45:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfvEuQAjHBbmTPHGHaU3NFHjMEHBrxsoOTQ6AHbnoNj6VQ2jlS4yOfJ8DZvfBZAru9UoLJ X-Received: by 2002:a17:902:ec8c:b0:1c3:dbad:52d4 with SMTP id x12-20020a170902ec8c00b001c3dbad52d4mr7811565plg.33.1695339902352; Thu, 21 Sep 2023 16:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695339902; cv=none; d=google.com; s=arc-20160816; b=kocwwpzEhr8LG1cWF1M9bfBvo3WIuotny2WkFq0kVybI74AcOB37/VQ4ik7C+V67DJ UMCoMbt4nqVQ6D+pfBTlWpIhfODYhU/tYHLNX5VFsULM8Jn3g8rlRUoiqmdp79v7bFmP thEItNbrWfUSgK2+8W02iYFyu56Dh5SXIfUyESrtzYa8lW5DQmn+NLRwkIgHWPDWQetV puysjtyYtkj3Jlo3mwztDGdk8WIfNQQz1ty6EfqZUxqfumPnt4Y6QCXPrg3Y2zMJjirT DvjQVaccq8Cw2xt4dyIhkFeqvfLxSkSmdRSNJGgN3Okm2qw3I0eu5Tg7nCQB+oMfansF reMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hhxODKU/1KHUMb12P9tKCTdkzqsk+8BNlEjNG+/jd3Y=; fh=5Q9VEH+RUtwJr/4AX2+Mkyj3ZpwwjS2k+q43QZ1fN8A=; b=SaDfZ7diqGlVgdZi979uPzqcd/93f59VXcm3qc1eL3maqgx8moI42ZV3m68KSc6dg3 O3VzskVPR/4eeqii6wnY1gXuKYDHAn5vqzxgUsD5dzMLrsJ7gw9K+CF9h36bANE+cIk5 xse457kzhle+zmf1FAucwovv4HlTIUp1plk9CjIL/iWGdH7olemzO4sQyE5DeuAROGUH 8aktgXJ9DArkrY73ivQhkklZEB7hU7kBCggvMO7qsBJAXjS1zvdj9qTOKzQjUz8erR6J PEepEXjd/oF5YZkhs4PM/imNunV4aZodtel6x2Gtd+2xYL9UdFujFN/2punNOUz/k6zN 7zEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="GrwNN/9h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id m19-20020a170902c45300b001bbd0450af8si2263066plm.187.2023.09.21.16.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 16:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="GrwNN/9h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3CED5801BF68; Thu, 21 Sep 2023 12:44:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbjIUTnr (ORCPT <rfc822;ruipengqi7@gmail.com> + 28 others); Thu, 21 Sep 2023 15:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230426AbjIUTnd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 21 Sep 2023 15:43:33 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25650F83A for <linux-kernel@vger.kernel.org>; Thu, 21 Sep 2023 12:28:21 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c434c33ec0so10965925ad.3 for <linux-kernel@vger.kernel.org>; Thu, 21 Sep 2023 12:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695324500; x=1695929300; darn=vger.kernel.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=hhxODKU/1KHUMb12P9tKCTdkzqsk+8BNlEjNG+/jd3Y=; b=GrwNN/9hLscrK5fqkYez9DZBtBVh34oZ6q0evGTfUa1qjTjmOcYN0UJAL3gZ6d2vSa CjcMjsHkcTphgVmkMNtXoRuO/UJoOf1jKTBqR3DuYv2zhUvzbpIGx4Q4eNLiHhQji4/R y9DdgJMyGB2G+OqMNNjTWbHisHm1Afe7RZQ0s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695324500; x=1695929300; 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=hhxODKU/1KHUMb12P9tKCTdkzqsk+8BNlEjNG+/jd3Y=; b=dJ61kzsFP248DWtpGFGEQdmrJpRk8HCrd6aaUlMTsadnOsKNn5AIlkQuuPsB/HOgNx zpExoZcP3ryEwgSxEPemOF+iLIDH87gsciUTId3rXpM3vBM8naJW51XXhu2vdBQGedlq eyI99d6dpsWGk9dHN3iHh5/IpX+T3tMkfkYf0qqKfwbZ5uZH8OLyK4AV/py70TCjcG3d FFCDbRxSjNt3lyfjhQrddx63hr67zGMZ5L46DRaNKYFxGykOmw0x9jaxqkjwMKGUsVKR hbqWwbHa/59P4ufvmHop2aFpjsxIMk0VJebucmEJFWohnwkCS2xIpSxbfOaKKohXtj+Q Uu9A== X-Gm-Message-State: AOJu0YwFurivhnnGR8qeDCJIP4PKiaOvhUepLmnbW9x13nT7EG5sSsUH Effdk0DJc6z51789C0ycfu1eYA== X-Received: by 2002:a17:902:6ac8:b0:1bb:1523:b311 with SMTP id i8-20020a1709026ac800b001bb1523b311mr5075598plt.41.1695324500459; Thu, 21 Sep 2023 12:28:20 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:e6ed:6d49:f262:8041]) by smtp.gmail.com with ESMTPSA id w8-20020a1709029a8800b001b9f032bb3dsm1892875plp.3.2023.09.21.12.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 12:28:19 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: dri-devel@lists.freedesktop.org, Maxime Ripard <mripard@kernel.org> Cc: Douglas Anderson <dianders@chromium.org>, airlied@gmail.com, anitha.chrisanthus@intel.com, daniel@ffwll.ch, edmund.j.dea@intel.com, linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 02/12] drm/kmb: Call drm_atomic_helper_shutdown() at shutdown time Date: Thu, 21 Sep 2023 12:26:45 -0700 Message-ID: <20230921122641.RFT.v2.2.I20cb02bafa7c2368e4bd579df0716eb62a3a21bf@changeid> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog In-Reply-To: <20230921192749.1542462-1-dianders@chromium.org> References: <20230921192749.1542462-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:44:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777692733073025489 X-GMAIL-MSGID: 1777692733073025489 |
Series |
drm: call drm_atomic_helper_shutdown() at the right times
|
|
Commit Message
Doug Anderson
Sept. 21, 2023, 7:26 p.m. UTC
Based on grepping through the source code this driver appears 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. Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> --- This commit is only compile-time tested. (no changes since v1) drivers/gpu/drm/kmb/kmb_drv.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c index 24035b53441c..af9bd34fefc0 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b/drivers/gpu/drm/kmb/kmb_drv.c @@ -476,6 +476,11 @@ static int kmb_remove(struct platform_device *pdev) return 0; } +static void kmb_shutdown(struct platform_device *pdev) +{ + drm_atomic_helper_shutdown(platform_get_drvdata(pdev)); +} + static int kmb_probe(struct platform_device *pdev) { struct device *dev = get_device(&pdev->dev); @@ -622,6 +627,7 @@ static SIMPLE_DEV_PM_OPS(kmb_pm_ops, kmb_pm_suspend, kmb_pm_resume); static struct platform_driver kmb_platform_driver = { .probe = kmb_probe, .remove = kmb_remove, + .shutdown = kmb_shutdown, .driver = { .name = "kmb-drm", .pm = &kmb_pm_ops,