From patchwork Sun Jul 28 11:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814981 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43B9B21105; Sun, 28 Jul 2024 11:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167025; cv=none; b=V/M6Zm4XTn06e6p8l0psA73EDLz4rIzX6VwHbFs5V/3F8w/lbyp5Yb33b3Qrg6YwvhkPoF0haDE/muBbhzONPG+LWz0L55TCiIaUeuOjRUOKXf+uxt7fqP20HZT8nHF1VDQSmvZ8UwJNOo1kU3eD1VAUoE7Ad7Xn9X2m0cEWpJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167025; c=relaxed/simple; bh=BnouMhDpvxyN4mNec6xULKIPx0ZJaDqbAqdgxv75Ylk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Obki5/7nunZWzMwDrVp6grz/cL84MlLM7pM9Vz997IvuhcV53ApX6FpZI66uiB9BHsEy/uxQDWX0DjW9ZqHiXX1yfYDR5OHbhwPb6fwPSKqGwSAlmR1TlKEHJaA2qtaLTqUsY14WVLMCOzklMXHghWvxuaiGrmZ+aIwXWoHaW7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=QVaxeNA8; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="QVaxeNA8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722166990; x=1722771790; i=wahrenst@gmx.net; bh=5K5kBAdZCWeAsANsjCXXlgQc+q/qI1OkuEhMl0S3/Ys=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QVaxeNA8glaMedGkqwJdzoQdFmy60h9oEHd+j8ZQXDknrUgEgsk1RxU5fDrvPTma XpT7tg6/VoEAThfg6Q5CTw7jw0lsaj4g5U2+NsSVvaeqLSpqtRoXv+AmBWa5bV6Md Lg9EvRHa1sirsh9i7Nk3PSk7oik8KOJFMKuWZTxUXSPDDdNSU6DvAm5ymmP8buXze 7q2PQ1nwL0EAl6W5tDWLeGpf8pacRTCzIAAxh4FN7StCzOJz+BDdVHLiYI4zO2SQB o4zZzw+CKPJ8y8VnSGPxFvHoIlnmNEvmPSYwaCMd9SGI8qPt9VQQWCIkarrWDMmvD fkwOKHEDy1poP7UsmQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1poA-1saEA22Pua-00AZgY; Sun, 28 Jul 2024 13:43:10 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 01/16] firmware: raspberrypi: Improve timeout warning Date: Sun, 28 Jul 2024 13:41:45 +0200 Message-Id: <20240728114200.75559-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:FVA7jnUYemg65bMAN/KzrSjeUZ7AIaT5urGSfhIox8kocVwgT2/ hh458humeGIY15HoUPJuOHuKer7xspVDz2r2LAKAfyEv1BoOW46hwaLFIFQwNw/07F6+xOw mBz189fmXQ5hGReyTveqQq8SOtVAh4zvRizne3aSe+wq61N+bv+Em3NA/vrzpYsGA1JOoIU 9t/V7UjaYw88aDrvu1YxQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:vccvTtuL2Z4=;Ona6kUu/3UswlH5eKiIBueW/r4Y BSZW0yIqmScj8IABKZA2mHIvKMVVQmMetWaxD+Q4CQOAMXirv3HDRFS2/PC0Oh+Ny4Y/4sSMo fBuvXYF2gdz9mICoLrZqOwuJcytkRpAgYHy03CzMHJfZM5577gyanz4RjkYRjj/BBMCbTSp4A j1iSwg0kfbLDrtaMGM0D9RiJU9v5/rzoqKXv4s3EMLkw0dLNF40JyGB5wiMN68J7PHsaiAqOR kgSm1V1/TN3ejUE6VnZqyUU5B8jRekuSmIYEAijH56MwNJy35e46zk8MLwyNfUVz+C9AGeOoy nDzEJU+AnwrDSDsxnSOPOuRfzdjOzW2PSDvmOvH3iBxo7Vg+J1+L2SEapxvAxRg19uUOcKG/Q ZUHA0Z3Tv9gAOjv99QhR2uE733tnO+7L/l/afzGo/eG1Ro5+ldtd/tcAkkgn7lJBmwmcNV4R3 gBNQE3kABrlE3MnxqRxiyvLi+LFh9UFAKU1x4q6+BII7/P5mjrEYWRW9mzfEjiOJucAgAQtNL TCGRTHZ4QT5GxcCKp/KPVdue7lB+l4IcYbJ6r9ZJEYrN3pMzUZMRdC0JjAB8lmmANB7iWrdvK P4+TLXiunHl1RZ/nxq2ilajPvUSEZ4KcGmx7YkNAwP/SaGwPSxpOYxnpSxtpzkqdHaYtbIo9N /qSWujAvC39FpWiqp3caDigDKfMj0xRY1nMKzGLqgW9mLolHKuZ6J/WH/ezlRFgtSs8/IDwLc gdahJV1U4XH0lkTHgI3zAihBfQY/MZeOWTiC/h2dT1DIxWokXdsKfDS7OPJ6R5NpkgQ/nxuUG C/nPfrr9oT+au5fPnBfCob9Q== Recent work on raspberry-power driver showed that even the stacktrace on firmware property timeout doesn't provide enough information. So add the first tag name to the warning to be in line with a status error. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/firmware/raspberrypi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index ac34876a97f8..18cc34987108 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -62,7 +62,6 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) ret = 0; } else { ret = -ETIMEDOUT; - WARN_ONCE(1, "Firmware transaction timeout"); } } else { dev_err(fw->cl.dev, "mbox_send_message returned %d\n", ret); @@ -125,6 +124,8 @@ int rpi_firmware_property_list(struct rpi_firmware *fw, dev_err(fw->cl.dev, "Request 0x%08x returned status 0x%08x\n", buf[2], buf[1]); ret = -EINVAL; + } else if (ret == -ETIMEDOUT) { + WARN_ONCE(1, "Firmware transaction 0x%08x timeout", buf[2]); } dma_free_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), buf, bus_addr); From patchwork Sun Jul 28 11:41:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815230 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA26B37708; Sun, 28 Jul 2024 11:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167082; cv=none; b=iuPIidzYDn8UGjajlFk2oFDeX4EnJqOTuTgD8UM+CuE0U2JLfylbPVrR+QiOl9Cc4GlYHlx7xFUz9fPgsLPmDCOuxgBmfzn7IscijkXl85y9beVcqa4lMlEn81389zkM7iZnNszkwmEt12WCr+DUJqrSFTBMZZTjIV1jq64hzPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167082; c=relaxed/simple; bh=wY20nfRBuENskS9j1MKl9esl/9d+REWM+u8BeV3PCjU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iiezJdUglP8cuoukaW6QV+EyBgCyI8b2bAkSdRDKkrM+tU5GDKIqK4r85l4yPNGj5Mbx1T346etwF4UIF2F9FDFe0pC0sIDJLou+FCnTGYCLN1hFa8/uMQ9hKJ4eYVwK5TNy2gGLsC2aoGnup3tATKQTIPAKZdY83tbIz+Egs/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=Qksm5P3p; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="Qksm5P3p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167052; x=1722771852; i=wahrenst@gmx.net; bh=IbGjewfMVvYXbrFbwzubZ45vd9Gh3tFpLWbhBJeYuoI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Qksm5P3p5CRNNdes+g/NL3jPU3p0HnphU3o6RslsQNc6xdp27JbMo4YFDMPvZEPp 1npoVNRq8Ut84Q/9FW3e9K2LYWLKf9NuClS9noeFFCDzIx7gP67rQD1y3m52hMc6m qU9CoBFhmrcJeevpkGpCl5+KoovkMajx+0XYLEoL44FFmyk+kyJWN6JAHZU9j+Us0 xGJYNwpUFNoQBBwn3zqVMQhcr1RtLU+PpMIkW7GLuPJJx0gsfB0K+brveI5BCYVGO xbRESKLXnLysz60odoVdsOgsQoSOi+3SqYSmxnDKRVC0cycwthJI1lh32sS/rTl30 MypypdLKkzA9dQgv1g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTzay-1sgJoM2ID4-00L8m9; Sun, 28 Jul 2024 13:44:12 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 02/16] mailbox: bcm2835: Fix timeout during suspend mode Date: Sun, 28 Jul 2024 13:41:46 +0200 Message-Id: <20240728114200.75559-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:8gHlvy2cq7q0FmBdgqfBmCudv2v+AkQkTrbr6+v+4cawgLMRiP7 I6WYfRp6lfU706qmZLWTww4siOukAG7n+jA1FU86+qu98d+U9UMGhdlkyDy7QS5icxFNBoQ NOzJmBmCDlN8gyXryRU/xNOovaw4p4zCkJorOxMb2ZmVx52i6MHgBiBiZH9NahfdXKsFV0r 17NLGKp4+sax2g19ulL0g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:GvHpumZq+Q4=;f1hgc09s2ZL1zFiR+ZdW9uLpm4l Dl83J93DYLWs2cENUpRtKq+92lalmUjF3cfldUv8D4vwexvokVVZ3v6vub5l2CHu/uBNi4VFb 96xBHlgEsRFrqqd/JeuZ4hzsMPoVDxAou+zwdUcAaDEVML83SSj6WxSAjHamY1O4rYbC9Z1zW GpxHei+/kzjv0e1FZduakzXVqURdsOmNfpi1iUyoGaxkpYnQNjI1XTveoVXdMv2uLpvu0a2sE 3El1GFJxlm4u+xubtnZjY/AMTFqZwMgbrxX5K3KD1H+FiQ15ikaeHqbZctW9tFkPoJFBarEBu snVeFD4taEcrRtuBBjVqWNz9y0RTdO4KaXutvq8CkNCi51MwERHOOV2GNbm8Sa7Q37F1veRuu 0Uo88LrN1eQGeC/5KYpDHEhJVdPCsVNzUpr+hBh++B84KxXpogaSvoGl0MSv3thaBu/HrQd1b Vii8/RcP0dviPTwenY9KkZbIrP6BX/LTh1fktdIR1zwWb6AMZMPc83cJLRyo0vtFdBhBomTBj ffpmoGVvjwUQOrtX7CV75+i5wMIQ28WR5w+8vrJMIo74GxUKUZbjU+JiwE1KM/BgrUPSNzSRG 1ssfhtEEh6NFmL6xXeosAaRnjmvZDpl96wCWIGFbyfQ6d7bWS/cXvr7irUcL8Bjbn9u5pwJri RwfZjiZyu4SlzmsNfq6IcPb8E7AZaoLstB2zer8eQTeXyrS7+v+LaIdHT5LFFzhTa2VZ6ygXa KYC1VR/M+gHjWUHy2roAegzM2+2sZkrRahiQCY1BE4oB4r5B3/D29UlpWOwvBvydCwzxG98wr EoDivwl3aXoYFWu89mq048AA== During noirq suspend phase the Raspberry Pi power driver suffer of firmware property timeouts. The reason is that the IRQ of the underlying BCM2835 mailbox is disabled and rpi_firmware_property_list() will always run into a timeout [1]. Since the VideoCore side isn't consider as a wakeup source, set the IRQF_NO_SUSPEND flag for the mailbox IRQ in order to keep it enabled during suspend-resume cycle. [1] PM: late suspend of devices complete after 1.754 msecs WARNING: CPU: 0 PID: 438 at drivers/firmware/raspberrypi.c:128 rpi_firmware_property_list+0x204/0x22c Firmware transaction 0x00028001 timeout Modules linked in: CPU: 0 PID: 438 Comm: bash Tainted: G C 6.9.3-dirty #17 Hardware name: BCM2835 Call trace: unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x34/0x44 dump_stack_lvl from __warn+0x88/0xec __warn from warn_slowpath_fmt+0x7c/0xb0 warn_slowpath_fmt from rpi_firmware_property_list+0x204/0x22c rpi_firmware_property_list from rpi_firmware_property+0x68/0x8c rpi_firmware_property from rpi_firmware_set_power+0x54/0xc0 rpi_firmware_set_power from _genpd_power_off+0xe4/0x148 _genpd_power_off from genpd_sync_power_off+0x7c/0x11c genpd_sync_power_off from genpd_finish_suspend+0xcc/0xe0 genpd_finish_suspend from dpm_run_callback+0x78/0xd0 dpm_run_callback from device_suspend_noirq+0xc0/0x238 device_suspend_noirq from dpm_suspend_noirq+0xb0/0x168 dpm_suspend_noirq from suspend_devices_and_enter+0x1b8/0x5ac suspend_devices_and_enter from pm_suspend+0x254/0x2e4 pm_suspend from state_store+0xa8/0xd4 state_store from kernfs_fop_write_iter+0x154/0x1a0 kernfs_fop_write_iter from vfs_write+0x12c/0x184 vfs_write from ksys_write+0x78/0xc0 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xcc93dfa8 to 0xcc93dff0) [...] PM: noirq suspend of devices complete after 3095.584 msecs Link: https://github.com/raspberrypi/firmware/issues/1894 Fixes: 0bae6af6d704 ("mailbox: Enable BCM2835 mailbox support") Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/mailbox/bcm2835-mailbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c index fbfd0202047c..ea12fb8d2401 100644 --- a/drivers/mailbox/bcm2835-mailbox.c +++ b/drivers/mailbox/bcm2835-mailbox.c @@ -145,7 +145,8 @@ static int bcm2835_mbox_probe(struct platform_device *pdev) spin_lock_init(&mbox->lock); ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0), - bcm2835_mbox_irq, 0, dev_name(dev), mbox); + bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev), + mbox); if (ret) { dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n", ret); From patchwork Sun Jul 28 11:41:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814980 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A34033612D; Sun, 28 Jul 2024 11:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167148; cv=none; b=J1zES183+Sf9I6VAv9L0MLrFPq6NmcnBoGVVsgvhfawjWfoqTUj2+YNY8BCy7/1oyjJMXnOOxvtu1z+Xt1kSNaTF08mF2XbqAWWinacBDzN1MmmDUUiwSoVj995dai/VxTVYWyPCZGGJ0GXGl6xV232PA4d+POoTrub4onN+riQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167148; c=relaxed/simple; bh=ISxvk9rwuZkzXR9ajw4RF54PD3mU7vO9Bu+n4+PU2l0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lf1KPmhs0X+1omMkrOGmViQEUEJoOZasBGCaT5dvNFKgixFtQxN7bt2fsNwGuuErpjuGXOpNXlaWQwC3t4ITwHQ8dXdrRLQwRgFbi9kDhRNvfR4incmyDYU4S5Z+GSojc+5FFj0yCd7zTaAUJJUsXLpddyn3zMsMgre6DxR8fJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=Xu5kWRqV; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="Xu5kWRqV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167115; x=1722771915; i=wahrenst@gmx.net; bh=4q82fafFyhWuE8D9fKAnSbhAEbmOAflZeVN6dmlZRD0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Xu5kWRqVwRMEHm/f8hCDK1d+uoV2kYeXxQv8i9nSnyXZfHNWFFcUhtvRmypUy3+i WupDtA3vBAqyx7dlVQDHQ9dInJSmfOmYyI6hLBBT3xcCAuvbNSonBHVBxWxyz2vU8 CBxfxJTqgs/L1B91WKf8of3Mxbbba5zbH9CFeGsqUe38mtEi6tbeHORu9o1sng5j8 6rLdGvCEYg6f/Lbkh47qmwH0fOCtTCWE4LGx14jTDCQrtIt934dTBaa0sdZ6SfbOE 0AlfOHKBzJ8MeonceBt1D/LE9MTYqSrckUGZ+ezRG4x/vQaE5gRsjvhaMi1mNjlCV nuFyjM0qgyERE0Baqg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbivG-1rzVnY3Ecw-00laEe; Sun, 28 Jul 2024 13:45:14 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 03/16] pmdomain: raspberrypi-power: Adjust packet definition Date: Sun, 28 Jul 2024 13:41:47 +0200 Message-Id: <20240728114200.75559-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:ww2ImHiANw1KUG0kC6NCMNYw2JJ6/w2TlLV8iCX0cp1WhqnY1gf Lrt7Rel1WCNivDng91th4RxlDGK+MD84bbpqap26he9//LsKj8FW02IehVq7aIM7RY1iuQd 5HxfVCxyLYAZflwkRNBYrC7kl0sMXN6RZClcV2ykSweCLdnMcrZtHDg1BiC88GRPcaQxwv4 iKPV35Fj2K4jIbxgLcw4g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:xHBFILp2AVM=;AtBau9kAHDzAQN2vi/Rlk8IGZWV HgOSGiCxZyBnPoCAlxISFVgPBz4nxSq8OgmABAa56QPjAFV41F/7zbdYbcOdX7pDcpPz4noVk VIz2j7OsZJyAdhfoPPDcUTfT79NqmuCsn4Rz4k39rSIb+WQaggJLNgd8l+V9sxVtwhv1UBfjQ klXTFlTEHhh43Fu1lMDa2TsOCU0ffl3sSurCuLLfmb8jBe3Yz5RH2bAh/GB93DqNnpzYTa/rs GaS5DOcIuEaB3M0QKAWhPVaoj0BMuan8fTJKJIm841XXARfe2kOAUXcMvtnwS2d7aw3wX0POb inEwmjYM7EVFTIWZdsAvBj7w1L+jT3k1fIOnGFJitBe/RbumOGuxtRx+3ZHOA/TrwxRoK55JR CZdyQzLMxsxg51fctS9EbO8Kf/zt2Lcx8Z1AOXmmKLkjMNEfKjw3Kz2jnvAN0NarF9AUpsbxU S2BYtUj6VblFqAKhYpM2TdYLnwTHeqBKFsoL4qrNNO6XLaFezRc4W7pCX9VWBLaq0mIgMJHLx IPjQp/NoLL8lGLUlo80cxqU+Id6dJlcCrFaWZHN2ro1dDBYTgyLPhNJd0sWdJM47QFarEUQf3 chte7qnERjYvtg98tk7rvr6ayaS21nsuex3SHfOLU3QZJiJDBdYakBWG5k3o5nUl4LYR07wmE zWWHCJNtTm37OfQM//ty6qfLLiD6PSu6kTUv0k+Py27HAqbL9W7CfY2/nc/MeI2v0a8Q8/4qL 0VHWMOe+qhaP5wIavkG6eaM8V72d65aa+EK7dsYcLXTqlNaugjzqnw1D6Ts+PTs63XAhvzb24 Y7s9H8wvrvMMjvWUUPaTDyow== According to the official Mailbox property interface the second part of RPI_FIRMWARE_SET_POWER_STATE ( and so on ...) is named state because it represent u32 flags and just the lowest bit is for on/off. So rename it to align with documentation and prepare the driver for further changes. Link: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/pmdomain/bcm/raspberrypi-power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.34.1 diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b/drivers/pmdomain/bcm/raspberrypi-power.c index 06196ebfe03b..39d9a52200c3 100644 --- a/drivers/pmdomain/bcm/raspberrypi-power.c +++ b/drivers/pmdomain/bcm/raspberrypi-power.c @@ -41,7 +41,7 @@ struct rpi_power_domains { */ struct rpi_power_domain_packet { u32 domain; - u32 on; + u32 state; }; /* @@ -53,7 +53,7 @@ static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on) struct rpi_power_domain_packet packet; packet.domain = rpi_domain->domain; - packet.on = on; + packet.state = on; return rpi_firmware_property(rpi_domain->fw, rpi_domain->old_interface ? RPI_FIRMWARE_SET_POWER_STATE : @@ -142,13 +142,13 @@ rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains) int ret; packet.domain = RPI_POWER_DOMAIN_ARM; - packet.on = ~0; + packet.state = ~0; ret = rpi_firmware_property(rpi_domains->fw, RPI_FIRMWARE_GET_DOMAIN_STATE, &packet, sizeof(packet)); - return ret == 0 && packet.on != ~0; + return ret == 0 && packet.state != ~0; } static int rpi_power_probe(struct platform_device *pdev) From patchwork Sun Jul 28 11:41:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815229 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 306853EA9B; Sun, 28 Jul 2024 11:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167207; cv=none; b=fMOmjyCEmCWbOQjeTAnVWNMMAU9I329JPO2wNd1mz1nLpjmszKiSKFWOhV/VFuOF/VQ9JsrkkBwgedV17aaSzd2ffXNcXVtC6mmrmkcCvPHNGfi5O9rPg8f4pYjOV01djYq6IkY9CkQdq/M7cQKaLBaftyR4Fh4Gzs4QJghSv4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167207; c=relaxed/simple; bh=qFY3vfMoKE10Rq8poh3ATZDeos6UriTblK0RtIhr9ac=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YwFJs4vkNNAxjieuxHp9UMrP1JBnEbr7zxnmq9gt7QRRlWkPYDoH8GNLmwRc3UEiuNFCH2ob1oxLxTkVmd05IZwEIPMp11M3j+1+Z+2UKK9ru3BW8h+aFixynpZqo//5shlZiNpYTyGmEPIIh2k4HNnappR3Qx/TS90u9Ud1rCY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=mR3VAOxX; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="mR3VAOxX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167177; x=1722771977; i=wahrenst@gmx.net; bh=MUjx857aVJb3m/BIq/jv+muXKfBK4aj/UlImOJhlQl0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=mR3VAOxXChhr2y7LUN+ckfBTyxpKYXrD+ni2xc2ekwneT+3Nxrve25RRfRAQseNg iUxkajNMtobvAhjbZJ1avjqGnNz0V8sd4ruz/mucpDTeIIpWKEZ9PfK95sWEbM+Jh bXWfezMbI1klArtufPyqG8jrw5q0GQXMJGDl6378a7zyyydP14l5iQoKJAjz4YTGu fZH+0veWGv+PdlBFltGuMwkxMpIPp1X6HFqd3yp+sxUlyVSpMlEe+XWnhiV30ZHEX uKvcTyoNeEF1qcFnyNPoSrgJ8YrGHsJvT+54b1fHQtrU4xWVy4bm/Ot4szevozmEl XpOTbWm1eTzML45r6A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmULr-1rqPsW0GtF-00dMDw; Sun, 28 Jul 2024 13:46:17 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 04/16] pmdomain: raspberrypi-power: Add logging to rpi_firmware_set_power Date: Sun, 28 Jul 2024 13:41:48 +0200 Message-Id: <20240728114200.75559-5-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:4Eq85eFpyWQtoeOdYaR/mTT65Ogz1QD7be1K3QBHel9skaxonHe OTAXpGmln6oRRCUb9/Rjlq7p4feQmQFbl/SAJNdc6K3tBfH/XwL5ySYhaCKHVJ8AMka+AEC naQazZaWITnN7A+4GI63w6/SbHKS+wDSJIyDfA+yD6aBDfPaPGJzhTyiTMuWA4FtsIBZsI4 wk5HudZs94o39xgwnJGjA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:03uvZQHg528=;rz4aTT//fenmms3Woof0gGSTyw+ lUV/3KaQ/BCAmeLvITzlwih6WwNbnrcURhbeg4m5FWFK2r6jDeedK9NBm3xZ/XGX3FIl8VS1D mrGK8YDTI1IGBE4pvS7kGT5U0WimMZiFIoKqyp0Z00slHWDIjE8Ze+MJoH7Spm5Ms/r0fXcZM njL62H6glutmu73XxUXlygIHZ5Nce3blNtbeK8uWtrkIx2e8StH0bSqFVGpoxmBZ4k5XLBbOS aiD96Py/08eaEmpcqj7DAxWB0KGepe3cwQrDUh70IC7xmqmfi07vNtb1pv/Pfrh8KRiqgLnLO n1HfV7C2zZzxocir3JTxbBiRIELTDi7yV5Z2HKpHbb2uCRLjypFi0iAqYlMuAvDLDKgFJ8ng3 In1BfsCXLUodpIXQz0MoO5Aeox1SQ58C+cyKk7pBQV32iIZWtET/OK8zZxYiDHXXzvz/h6HY3 9yEA8LpP0IukjoVdd9hAGjzDLvXI8YZ5dWL5OHVSOyywPJwgRTuZ91av9AJCQClXp0KHfwMtZ /FPHJy9UTtdRf6hls9swB3PZPRltlLoxijv4xnPGgYhGJU31d+WozfpGMZsCI2xmwLlmbv57S B7mfxwkQd/fTc4j9/wHGjIBemKIS+G2yxIYFv3ebtTWwZGrlnyAvInGQMCCLH3+7kFBOejscA AvfEfw7SmEYERxHS4uRAfqCeV0UwXOgsb/HqKRdnfjJyDzprpf0a/qlXGGiDnOm63T7SPizDV Y4QorlDonW3GAamN3z5HYbnOF9c+P3Gy23RND8UT+gVc7qtzMA0yHhx22uyuFlG8OB1pCRItU wyj+ZF+XipA3X6ye5dQDm2mg== The Raspberry Pi power driver heavily relies on the logging of the underlying firmware driver. This results in disadvantages like unspecific error messages or limited debugging options. So implement the logging for the most important function rpi_firmware_set_power. Signed-off-by: Stefan Wahren --- drivers/pmdomain/bcm/raspberrypi-power.c | 34 ++++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) -- 2.34.1 diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b/drivers/pmdomain/bcm/raspberrypi-power.c index 39d9a52200c3..fadedfc9c645 100644 --- a/drivers/pmdomain/bcm/raspberrypi-power.c +++ b/drivers/pmdomain/bcm/raspberrypi-power.c @@ -48,33 +48,39 @@ struct rpi_power_domain_packet { * Asks the firmware to enable or disable power on a specific power * domain. */ -static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on) +static int rpi_firmware_set_power(struct generic_pm_domain *domain, bool on) { + struct rpi_power_domain *rpi_domain = + container_of(domain, struct rpi_power_domain, base); + bool old_interface = rpi_domain->old_interface; struct rpi_power_domain_packet packet; + int ret; packet.domain = rpi_domain->domain; packet.state = on; - return rpi_firmware_property(rpi_domain->fw, - rpi_domain->old_interface ? - RPI_FIRMWARE_SET_POWER_STATE : - RPI_FIRMWARE_SET_DOMAIN_STATE, - &packet, sizeof(packet)); + + ret = rpi_firmware_property(rpi_domain->fw, old_interface ? + RPI_FIRMWARE_SET_POWER_STATE : + RPI_FIRMWARE_SET_DOMAIN_STATE, + &packet, sizeof(packet)); + if (ret) + dev_err(&domain->dev, "Failed to set %s to %u (%d)\n", + old_interface ? "power" : "domain", on, ret); + else + dev_dbg(&domain->dev, "Set %s to %u\n", + old_interface ? "power" : "domain", on); + + return ret; } static int rpi_domain_off(struct generic_pm_domain *domain) { - struct rpi_power_domain *rpi_domain = - container_of(domain, struct rpi_power_domain, base); - - return rpi_firmware_set_power(rpi_domain, false); + return rpi_firmware_set_power(domain, false); } static int rpi_domain_on(struct generic_pm_domain *domain) { - struct rpi_power_domain *rpi_domain = - container_of(domain, struct rpi_power_domain, base); - - return rpi_firmware_set_power(rpi_domain, true); + return rpi_firmware_set_power(domain, true); } static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains, From patchwork Sun Jul 28 11:41:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814979 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 148A136AF5; Sun, 28 Jul 2024 11:47:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167271; cv=none; b=YVksqOUC1as2nrCur1YQsw4r+858nsqroLu6LkHjxeawNwHxQh8/kmB9JYSTAkwi2EPoxNJbZOvItzayqfSVOnnmDYxQe/W/y6Fg08uYux5Jc8a9td9m0eL6wtzlbOxvw9lnMHsp5S/q79rppu6aeegBQDKo0Whb0NEvkDgMEcc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167271; c=relaxed/simple; bh=6xoLpsXzOCm1NIKce12YQPVL1qV9P5mY+Vl/bb71wH8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lIAUP6nKbCq4+NsgQ4g7sGJ6bI4t77YNQdZNN0jDvye5IwpkavVBj4g6AYCMELXvrO1h00o9jfyuH4RBFzBHo1UWD3F/aB79xqsiCAPYGq8UQQtTSYD4+/a0l6ZVQPChCIpN+9XV1c/RDGps89y26bSup0/5BVkxnOcLpgaqqcQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=sj0ErC+W; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="sj0ErC+W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167242; x=1722772042; i=wahrenst@gmx.net; bh=VnHoX9D2vL8DbaLHX2BeVUbFhgz21D+r3BRC2GixxA0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=sj0ErC+WiDTXyb91zzTGbdMkY4+j7x8wsYN1DYvyXWOhqRUspyfTYKsD6gdFIy1/ 2DT8/wE6VN+Wb3WJURRusuFiFJtBx1FQGjcoA69xSE+YKNS2vAKMjR5Sepmcodd6P uMLjq0hYPYAaOXa67S3uxH6YgINEDm5txsBR5rsTuDxUDvqVZjrp6eOmrjLmQNYFJ bZCtyi5XiUKHrxm26R3AOZwwSs6cz+4+WvYOQR2JjGqzulgC5TrJtQxvoVxqibNvO 2BcyhTpYasmBSJKmy+KBhliftjDuEyJ1d/4eqvtwelbT70D4TonxTncwZmMtMZoqt UkVcKX7aSm/f54lG5A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQ5rU-1su7b82TWi-00RARj; Sun, 28 Jul 2024 13:47:22 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 05/16] pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP Date: Sun, 28 Jul 2024 13:41:49 +0200 Message-Id: <20240728114200.75559-6-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:uxKiXd6jwZWgXWEH6uC64rVTfCngHxgdOvyVH/WF2293Y1bqd/J g0oFNZ2i9C3d7IgzUd1/GQbUeBVl+bFscd2h8xXnAqiFtovevQWuF2o1xsy95bDQUAjzYfc NqPM0YMADF+60LN54UAeqLlk8l/3vhRAnjJ/Cvn0c5pK/ZRpowh9lsb0g9Rh6F70Kvj8L5/ O5SZE8lUiQfDIVymrwAFg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ArETKKCQMyY=;dvGBSb/ARqZJQh44PUvPLFN88Dz 6286irfK1ua0GW/CPFUMEEtBfcnPP6439cdsVyS4X8VZNxWdQf3daRG0IBNf+/VrThWdt9UH0 hME1MX7KMFM+qanVUZ9EO/G5wnetgpmW9JITOS7b9ErDPJTz2ZELa4E16k0IpeMhuvYvZssIl xTpukwUofmY3Ai3gCSxmg7e0P02XOVzgFa7eD9XHFuPMdpF1JBe0eYUKuiYaW68o3k3Rcd1U+ /VnoZ6TkPL4y8ImsPVdID6TQrevZLAS++vjvMuQpePAPg5MJkPHIBP8fyUp5grriyyTBzglhI K0e6YWPuG1dgvE9/bvQyWl3lYYgCXSqsnGmyUv6yVv5sjPdl0ixgoqkxAkpoG6bTSeJlDxygv nAYzho/evO5HE5Gs5E29d2ZBCOGtQakjvAo6w2oTF4zamZRRWuF7jPrOzhZILHMbLdNI0ZOPi Fe2rQ8nioA1Hp05/1MmninLBNCyzjDP82VuuosOw37nwbSGv8iCjubRHgFr0j+I/OEADvvnH2 9lST4dpKySB6NiXgv5OGLrltD4SCmhWZpADU6phJguPK0wOGBbu9Kxf4VUM4grNOQKPgP5pu6 C3g4T2E7Sr5X6A5mRi7dz0Lx3MFzbCoqzqT4ZoJfEmC1S56zecorxVacJt3Nfo3iXwHkYqEdR rfJHgeaUya0dJykXiEpbG41RcGEMCrqHG1QDH8Ir3N7zznZOf0sEKSiFsDwPnOm66Lvp5H4Bm gJozeZ0Pt8Sn5x0kr4SLKoxcodWTnPannGfRlc1wk9+2KtSJa33b5l2Da8BO+3/X7V1Btxb6M bfOBGVw3w8snLEOlRirJlJEw== Set flag GENPD_FLAG_ACTIVE_WAKEUP to rpi_power genpd, then when a device is set as wakeup source using device_set_wakeup_enable, the power domain could be kept on to make sure the device could wakeup the system. Signed-off-by: Stefan Wahren --- drivers/pmdomain/bcm/raspberrypi-power.c | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b/drivers/pmdomain/bcm/raspberrypi-power.c index fadedfc9c645..b87ea7adb7be 100644 --- a/drivers/pmdomain/bcm/raspberrypi-power.c +++ b/drivers/pmdomain/bcm/raspberrypi-power.c @@ -91,6 +91,7 @@ static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains, dom->fw = rpi_domains->fw; dom->base.name = name; + dom->base.flags = GENPD_FLAG_ACTIVE_WAKEUP; dom->base.power_on = rpi_domain_on; dom->base.power_off = rpi_domain_off; From patchwork Sun Jul 28 11:41:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815228 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CCCEEAD0; Sun, 28 Jul 2024 11:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167343; cv=none; b=UsnX+JTbhpCKH49n9ACN/dAndjANiZe0+SEWau5BW5XOzYSp8p+pFv/bS8roryKcrpuyoy3PXoZquyPr3piLfINhFX520lPoT9ojvd7MabEZE93aVvslkE8419KQs2ci+IM5YXsQ4VQXdRUTPB3oHSWezc0lokzT0hodUwfpXHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167343; c=relaxed/simple; bh=hdQGsNecjIHD7iUbTioH/2x92C9Kxuj8Xzwr06S7fiI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=absbbUww25HKf86pRGZC0Ff2uNztks+om0GYWPxJG2gZ5R7TfmZGOjfs3k5XrwEPj3q1DB2gBzS59bUJFaTuWg25TaxElGZVFHdNVziIF0vQ36HfDphWZeijHGcJmCjgpM9nnbMhKDeI5PY77nIWKY74Hn0TjfIqJBE30OiGymM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=Bf4mnsNp; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="Bf4mnsNp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167305; x=1722772105; i=wahrenst@gmx.net; bh=+RSO60HpkoAR0KgK8nLHKjh1dUUkKYc0+NfSi30ZRwM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=Bf4mnsNpb7eas1zVdSt9O0PprDA5z01alB4vNWXihMPMCU38BakZXxnHECelpiMH 2kjmYl6h0EaS/ssuLHE7d0J+GP3K/zMjoguo4RvevFn9e9b83XiIVIZ+MInXhwIih Wd9xYe3MJbWoCLqzOgdOSUSAXu3LdndrC3EqMuxGRyJVg6K/P+yGgPOvbTrfxHSvy Gk3+d2av7WZheuE+llGET9W0drR73RISvn9qlMD7CbEkrMju48ifHNK4O2/JNQpGz NdGyM2vmJcFWrGKGTUB2mFb5JHYTIXrnATKDvnvWUAa2bc/5Uk77NamxVQ5QBjL8J UZ+DIh/ESW78Ms62KQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBUqF-1sQ2qN3JSp-008ATd; Sun, 28 Jul 2024 13:48:24 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 06/16] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get Date: Sun, 28 Jul 2024 13:41:50 +0200 Message-Id: <20240728114200.75559-7-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:L7OrAzJpv8XxwcKtjfsgVpdvZhEK3mZJ0zOlR3NCxGwCNbbV5LC 8cqO/xoX4g564Y7hTk0eAm3PoETG0D8w2dBEDeMSYKCeSCR4sini4theANuPxmpissjbvgY jszIeE9YldH+vBI4cyfjzh3g8NavBM+EZf1cTEcZUKng2IT+dSN04cUnsyTbc2fRUJOO2UF iYy/6Tvbb9HwH9/EQQlhw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:AkUL9GoOT/M=;JWUAOx/K56tKZf3lNCIdFDNa411 a3BJlA29z65QTlZp1VV7P5OecrH6EtgTs1QxhRirqH4yJftA6EmHaaTHgUH1o+QPmMQR9TIws b3Zmc0y5k8N6Gy5ES9SRCwlLtKDaFPAVIknJYBQWwu1wGf4uHywl0ZU3VFLVyl3uVfDQxVw6j 39PM6AuDu61lclmaWdJQ3z5mI0MhYC9TH8NmLzJkGq/oO9zrxYBtSk5RVs/n29fhSb/TU2Irh vW1n7S8IS9+eChB5CwueQsuiRE8PFKppR3/uSS07BSz7yGjuYcecTyRdh77H7r1NiWo9OF5Yi L3bOSbZdFcfprp99zfJQFb+6zZlGkLkh1zN+H0qJLR2OfkWjPlsgVF7AkTRHXKLQRiv9oIhDw os3dq717Z8lWQIFAr+qpUQbzui2gVBHQunPls36WvmJSyExoAF4KlZBo2Huc85bQTuyrR4txO swquAlNSMF6WqyNvZomeQBUMn9dum7M5FBDpTJ8qjRQzOPkW1jiz4nm08TQCegAu6YT8XpIIN NZED1j48KVunaXFZ+GZgpjuvFeH8ByJaXFn0Y/Xgt6QXbg9KcdXcERtfGARga82IOOpc8ov1m bc7PYRUhLmHLsUtU7UVNrE1r44KqlwYaXeTWpavkUOJQQsF58zrqCp2dBbj1cVb6LZwEOEEwA 6OyC7xLwMDZ6ImFtaafim3/QNkz3JTHjV61GvujcQNdfuDyAdOyDsxI0dvRySdPA7nGosuHKB gLBxcSxjiXDuEzeooJ4ejojkXxyORJMtruh04uHvHwd27G3V1rjL6r77gXKz010FmQPrskNTq zzJYpbdp+9cfeMKeTZnl+Sag== The commit 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") introduced the necessary power management handling to avoid register access while controller is powered down. Unfortunately it just print a warning if pm_runtime_resume_and_get() fails and proceed anyway. This could happen during suspend to idle. So we must assume it is unsafe to access the HDMI register. So bail out properly. Fixes: 0f5251339eda ("drm/vc4: hdmi: Make sure the controller is powered in detect") Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal Acked-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index d57c4a5948c8..cb424604484f 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -429,6 +429,7 @@ static int vc4_hdmi_connector_detect_ctx(struct drm_connector *connector, { struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector); enum drm_connector_status status = connector_status_disconnected; + int ret; /* * NOTE: This function should really take vc4_hdmi->mutex, but @@ -441,7 +442,12 @@ static int vc4_hdmi_connector_detect_ctx(struct drm_connector *connector, * the lock for now. */ - WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); + ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev); + if (ret) { + drm_err_once(connector->dev, "Failed to retain HDMI power domain: %d\n", + ret); + return connector_status_unknown; + } if (vc4_hdmi->hpd_gpio) { if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) From patchwork Sun Jul 28 11:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814978 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18C2BEAD0; Sun, 28 Jul 2024 11:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167398; cv=none; b=I/I42X/Iu9zR93EmdSsDvfxUxspQcWNcARYze1tUJZH84+bPmyN/uP5h+eEd0jtaO6PF7JaYDtdrLY8ez9N+XHMyq8F/oYPdrMs4MX1GS4AYp0ianQKYDHYHtb8psiKjjFiXNIL2RhUg+PaQWjtSnjXh8zhBNmoGnnX0n57+whk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167398; c=relaxed/simple; bh=IvvZYkRVo7HsOM27VFPnLBRe2awKgpMBY8coBlyrg9c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=gAZyJnOX2ooMGISmqRcrBRbykeuyQ6Fw4B+Ga3f/emSBgT2bUu21JDo0JuAlD8fMwNX/X1/kDt36RQs1z//dsaGbCzbZU0L9pDOEz82J3knMMr1SYAt5LPKvYqqXCH7aV63V88lTHc7z0RwnjOHsPkQY4Q8SoqTSDhDcThQzip0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=udsa8Jj+; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="udsa8Jj+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167367; x=1722772167; i=wahrenst@gmx.net; bh=OETJHmfg+IWvFND21ujMzZHxRiMCnLCfIId2t3sSrIg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=udsa8Jj+28VThN+3NYpI5mox1aOpLd3tOFq6vvErU+IKWg3eU4In3VWcGA39WD9q gobMZdgOT9XH2LL2Gd+6oFfOzTe+XhmvzINk93WmsGqsUstiKSpiS+N7ma61nReQg 6X8cRyNdTNXkOmHdMyiAr/aE7DjChhLbOAYcrPs5pVthjPQPDOF+p1vqJwqoFs31A qPHPL8SWFeJUSDXdlNYQMerxcrXEu6S4QjCDG/wVKLRtzasKfR+RFVYfIvhwhhvNG h3M4D6Gko/+w1AzenSiV0qiXaqJ7NMqGEEXMebqbJ0DCRrv2sSnNRlcVg6msVEKZh gcSBtz4+pmeyaeiVzA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MD9XF-1sPTpX42Tp-005QPg; Sun, 28 Jul 2024 13:49:27 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 07/16] drm/vc4: Get the rid of DRM_ERROR() Date: Sun, 28 Jul 2024 13:41:51 +0200 Message-Id: <20240728114200.75559-8-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:vlufmZmc7VbhfuNGl348AU8Y5F8QKWnubU+/zgbZggrclMUpJJc lOLT9OuPFYx3fn9O6TUrW99FN8igt25huLm5BtuQLdd1eLjw58eo2rl6tdQft+gqGIyq9yk MtLfTHLb2kMZD/9SPCGcLQ5BtnaNoLA8PEPLustqrU3gokx4W9GIHRdXUvCEZf3Wc80IXY8 6cIodOdFU2E9UbWthKp6w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BN5VOCnUPuw=;ITwlB/4noWGJ9ry9vRvmLfFqC1g UN8jhElyCzmYlYIOoMY3fbZcmkB0jipuuMDwhc4weUI7Obj7vED5ivUQUxhQl+MKxwBftveeL t4hfwcTBfCbjmiZfGKy/R+QVN4wvDmljvkiCLmDMqf86A0ZmVwzvt66OGeX0vqkFutXmyD/oL zuW3SXKMP+gCiJJJs7AYNKoM5r6OYv6oSpQn0xFQvnuhxjfz0rUftX01btSXUEhymq1/5WNT+ ic7fUTLznbD6Jptg8AAk/zBkWdc0zt0pKTy3xkYsOWuZ1SGfMGIJLT72iLoE2jsu/JVRtGkG+ iCTOuMvFyN9v0+XlsHJcLwG/d/eEqsQPEuwZ/lsWGUpgAZjScAEXg0+kPntgqAOCM0r0rqLdS 9Xq2D3H487Zo6aOH0z7yvAA5f7JIw+opTf3sQvNtr7Tve6Kd6F1k2j8H2r5ANfPgbiV5/GECE kyNQGvvgjtFSe3yMv3iVpY8ktj2ucfQ2egaMSD5NW7VbLBNEiXumNnoyDCqR4La1lGse8m0SC ZIEA7ot+bPszEMRqrDYmdLguN22BFTV0js9sKOpQ7AX3hMAeeyPrZlT34k4pdLoF/0qktZpNe CBCjHftU45pSZVdoh8m8C/w6ERAy2dJA7GxW1VUqgqtC9MLLr3XUfvBU/1807eWTCwyaqydUk gljtudyLMaM7gL9Bl8p4rLRP2JXPhpJSImATJeybpPvoP145/Oi0dT5UQy7xt4GP24fzD+yfp LvgKsq4QUbYTh1H2GFy0/wJe1vPSUJt+SNYIlZsJOR4zETf6POCQ0z9a7D+oQJTlpn8iacSby WGKK9b3X8zY1hbKDvv4TOxaQ== DRM_ERROR() has been deprecated in favor of pr_err(). However, we should prefer to use drm_err() whenever possible so we get device- specific output with the error message. In error case of kcalloc, we can simply drop DRM_ERROR(), because kcalloc already logs errors. Suggested-by: Maíra Canal Signed-off-by: Stefan Wahren Reviewed-by: Maxime Ripard Reviewed-by: Maíra Canal --- drivers/gpu/drm/vc4/vc4_bo.c | 14 ++++++------ drivers/gpu/drm/vc4/vc4_dpi.c | 14 ++++++------ drivers/gpu/drm/vc4/vc4_dsi.c | 32 ++++++++++++++------------ drivers/gpu/drm/vc4/vc4_gem.c | 11 +++++---- drivers/gpu/drm/vc4/vc4_hdmi.c | 36 +++++++++++++++--------------- drivers/gpu/drm/vc4/vc4_hvs.c | 4 ++-- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 6 ++--- drivers/gpu/drm/vc4/vc4_validate.c | 8 +++---- drivers/gpu/drm/vc4/vc4_vec.c | 10 ++++----- 10 files changed, 70 insertions(+), 67 deletions(-) -- 2.34.1 diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 86d629e45307..952953b4cdf8 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -469,7 +469,7 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, if (IS_ERR(dma_obj)) { struct drm_printer p = drm_info_printer(vc4->base.dev); - DRM_ERROR("Failed to allocate from GEM DMA helper:\n"); + drm_err(dev, "Failed to allocate from GEM DMA helper:\n"); vc4_bo_stats_print(&p, vc4); return ERR_PTR(-ENOMEM); } @@ -702,7 +702,7 @@ static struct dma_buf *vc4_prime_export(struct drm_gem_object *obj, int flags) */ ret = vc4_bo_inc_usecnt(bo); if (ret) { - DRM_ERROR("Failed to increment BO usecnt\n"); + drm_err(obj->dev, "Failed to increment BO usecnt\n"); return ERR_PTR(ret); } @@ -1050,10 +1050,10 @@ static void vc4_bo_cache_destroy(struct drm_device *dev, void *unused) for (i = 0; i < vc4->num_labels; i++) { if (vc4->bo_labels[i].num_allocated) { - DRM_ERROR("Destroying BO cache with %d %s " - "BOs still allocated\n", - vc4->bo_labels[i].num_allocated, - vc4->bo_labels[i].name); + drm_err(dev, "Destroying BO cache with %d %s " + "BOs still allocated\n", + vc4->bo_labels[i].num_allocated, + vc4->bo_labels[i].name); } if (is_user_label(i)) @@ -1083,7 +1083,7 @@ int vc4_label_bo_ioctl(struct drm_device *dev, void *data, gem_obj = drm_gem_object_lookup(file_priv, args->handle); if (!gem_obj) { - DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); + drm_err(dev, "Failed to look up GEM BO %d\n", args->handle); kfree(name); return -ENOENT; } diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 39152e755a13..688bfddbfb8f 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -199,8 +199,8 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) DPI_FORMAT); break; default: - DRM_ERROR("Unknown media bus format %d\n", - bus_format); + drm_err(dev, "Unknown media bus format %d\n", + bus_format); break; } } @@ -236,11 +236,11 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) ret = clk_set_rate(dpi->pixel_clock, mode->clock * 1000); if (ret) - DRM_ERROR("Failed to set clock rate: %d\n", ret); + drm_err(dev, "Failed to set clock rate: %d\n", ret); ret = clk_prepare_enable(dpi->pixel_clock); if (ret) - DRM_ERROR("Failed to set clock rate: %d\n", ret); + drm_err(dev, "Failed to set clock rate: %d\n", ret); drm_dev_exit(idx); } @@ -339,7 +339,7 @@ static int vc4_dpi_bind(struct device *dev, struct device *master, void *data) if (IS_ERR(dpi->core_clock)) { ret = PTR_ERR(dpi->core_clock); if (ret != -EPROBE_DEFER) - DRM_ERROR("Failed to get core clock: %d\n", ret); + drm_err(drm, "Failed to get core clock: %d\n", ret); return ret; } @@ -347,13 +347,13 @@ static int vc4_dpi_bind(struct device *dev, struct device *master, void *data) if (IS_ERR(dpi->pixel_clock)) { ret = PTR_ERR(dpi->pixel_clock); if (ret != -EPROBE_DEFER) - DRM_ERROR("Failed to get pixel clock: %d\n", ret); + drm_err(drm, "Failed to get pixel clock: %d\n", ret); return ret; } ret = clk_prepare_enable(dpi->core_clock); if (ret) { - DRM_ERROR("Failed to turn on core clock: %d\n", ret); + drm_err(drm, "Failed to turn on core clock: %d\n", ret); return ret; } diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 46f6c4ce61c5..b5f61da199c9 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -613,6 +613,7 @@ struct vc4_dsi { static inline void dsi_dma_workaround_write(struct vc4_dsi *dsi, u32 offset, u32 val) { + struct drm_device *drm = dsi->bridge.dev; struct dma_chan *chan = dsi->reg_dma_chan; struct dma_async_tx_descriptor *tx; dma_cookie_t cookie; @@ -633,19 +634,19 @@ dsi_dma_workaround_write(struct vc4_dsi *dsi, u32 offset, u32 val) dsi->reg_dma_paddr, 4, 0); if (!tx) { - DRM_ERROR("Failed to set up DMA register write\n"); + drm_err(drm, "Failed to set up DMA register write\n"); return; } cookie = tx->tx_submit(tx); ret = dma_submit_error(cookie); if (ret) { - DRM_ERROR("Failed to submit DMA: %d\n", ret); + drm_err(drm, "Failed to submit DMA: %d\n", ret); return; } ret = dma_sync_wait(chan, cookie); if (ret) - DRM_ERROR("Failed to wait for DMA: %d\n", ret); + drm_err(drm, "Failed to wait for DMA: %d\n", ret); } #define DSI_READ(offset) \ @@ -893,7 +894,7 @@ static void vc4_dsi_bridge_pre_enable(struct drm_bridge *bridge, ret = pm_runtime_resume_and_get(dev); if (ret) { - DRM_ERROR("Failed to runtime PM enable on DSI%d\n", dsi->variant->port); + drm_err(bridge->dev, "Failed to runtime PM enable on DSI%d\n", dsi->variant->port); return; } @@ -986,13 +987,14 @@ static void vc4_dsi_bridge_pre_enable(struct drm_bridge *bridge, ret = clk_prepare_enable(dsi->escape_clock); if (ret) { - DRM_ERROR("Failed to turn on DSI escape clock: %d\n", ret); + drm_err(bridge->dev, "Failed to turn on DSI escape clock: %d\n", + ret); return; } ret = clk_prepare_enable(dsi->pll_phy_clock); if (ret) { - DRM_ERROR("Failed to turn on DSI PLL: %d\n", ret); + drm_err(bridge->dev, "Failed to turn on DSI PLL: %d\n", ret); return; } @@ -1014,7 +1016,7 @@ static void vc4_dsi_bridge_pre_enable(struct drm_bridge *bridge, ret = clk_prepare_enable(dsi->pixel_clock); if (ret) { - DRM_ERROR("Failed to turn on DSI pixel clock: %d\n", ret); + drm_err(bridge->dev, "Failed to turn on DSI pixel clock: %d\n", ret); return; } @@ -1172,6 +1174,7 @@ static ssize_t vc4_dsi_host_transfer(struct mipi_dsi_host *host, const struct mipi_dsi_msg *msg) { struct vc4_dsi *dsi = host_to_dsi(host); + struct drm_device *drm = dsi->bridge.dev; struct mipi_dsi_packet packet; u32 pkth = 0, pktc = 0; int i, ret; @@ -1303,8 +1306,8 @@ static ssize_t vc4_dsi_host_transfer(struct mipi_dsi_host *host, DSI_RXPKT1H_BC_PARAM); if (rxlen != msg->rx_len) { - DRM_ERROR("DSI returned %db, expecting %db\n", - rxlen, (int)msg->rx_len); + drm_err(drm, "DSI returned %db, expecting %db\n", + rxlen, (int)msg->rx_len); ret = -ENXIO; goto reset_fifo_and_return; } @@ -1326,7 +1329,7 @@ static ssize_t vc4_dsi_host_transfer(struct mipi_dsi_host *host, return ret; reset_fifo_and_return: - DRM_ERROR("DSI transfer failed, resetting: %d\n", ret); + drm_err(drm, "DSI transfer failed, resetting: %d\n", ret); DSI_PORT_WRITE(TXPKT1C, DSI_PORT_READ(TXPKT1C) & ~DSI_TXPKT1C_CMD_EN); udelay(1); @@ -1468,7 +1471,8 @@ static void dsi_handle_error(struct vc4_dsi *dsi, if (!(stat & bit)) return; - DRM_ERROR("DSI%d: %s error\n", dsi->variant->port, type); + drm_err(dsi->bridge.dev, "DSI%d: %s error\n", dsi->variant->port, + type); *ret = IRQ_HANDLED; } @@ -1687,7 +1691,7 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) &dsi->reg_dma_paddr, GFP_KERNEL); if (!dsi->reg_dma_mem) { - DRM_ERROR("Failed to get DMA memory\n"); + drm_err(drm, "Failed to get DMA memory\n"); return -ENOMEM; } @@ -1702,8 +1706,8 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) if (IS_ERR(dsi->reg_dma_chan)) { ret = PTR_ERR(dsi->reg_dma_chan); if (ret != -EPROBE_DEFER) - DRM_ERROR("Failed to get DMA channel: %d\n", - ret); + drm_err(drm, "Failed to get DMA channel: %d\n", + ret); return ret; } diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 03648f954985..f12d572287f0 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -832,8 +832,8 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) */ temp = kvmalloc_array(temp_size, 1, GFP_KERNEL); if (!temp) { - DRM_ERROR("Failed to allocate storage for copying " - "in bin/render CLs.\n"); + drm_err(dev, "Failed to allocate storage for copying " + "in bin/render CLs.\n"); ret = -ENOMEM; goto fail; } @@ -866,7 +866,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) bo = vc4_bo_create(dev, exec_size, true, VC4_BO_TYPE_BCL); if (IS_ERR(bo)) { - DRM_ERROR("Couldn't allocate BO for binning\n"); + drm_err(dev, "Couldn't allocate BO for binning\n"); ret = PTR_ERR(bo); goto fail; } @@ -1153,10 +1153,9 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void *data, } exec = kcalloc(1, sizeof(*exec), GFP_KERNEL); - if (!exec) { - DRM_ERROR("malloc failure on exec struct\n"); + if (!exec) return -ENOMEM; - } + exec->dev = vc4; ret = vc4_v3d_pm_get(vc4); diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index cb424604484f..6611ab7c26a6 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -704,7 +704,7 @@ static int vc4_hdmi_write_infoframe(struct drm_connector *connector, ret = vc4_hdmi_stop_packet(vc4_hdmi, type, true); if (ret) { - DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret); + drm_err(drm, "Failed to wait for infoframe to go idle: %d\n", ret); goto out; } @@ -740,7 +740,7 @@ static int vc4_hdmi_write_infoframe(struct drm_connector *connector, ret = wait_for((HDMI_READ(HDMI_RAM_PACKET_STATUS) & BIT(packet_id)), 100); if (ret) - DRM_ERROR("Failed to wait for infoframe to start: %d\n", ret); + drm_err(drm, "Failed to wait for infoframe to start: %d\n", ret); out: drm_dev_exit(idx); @@ -901,7 +901,7 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder, ret = pm_runtime_put(&vc4_hdmi->pdev->dev); if (ret < 0) - DRM_ERROR("Failed to release power domain: %d\n", ret); + drm_err(drm, "Failed to release power domain: %d\n", ret); drm_dev_exit(idx); @@ -1443,7 +1443,7 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev); if (ret < 0) { - DRM_ERROR("Failed to retain power domain: %d\n", ret); + drm_err(drm, "Failed to retain power domain: %d\n", ret); goto err_dev_exit; } @@ -1468,19 +1468,19 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, div_u64(tmds_char_rate, 100) * 101); ret = clk_set_min_rate(vc4_hdmi->hsm_clock, hsm_rate); if (ret) { - DRM_ERROR("Failed to set HSM clock rate: %d\n", ret); + drm_err(drm, "Failed to set HSM clock rate: %d\n", ret); goto err_put_runtime_pm; } ret = clk_set_rate(vc4_hdmi->pixel_clock, tmds_char_rate); if (ret) { - DRM_ERROR("Failed to set pixel clock rate: %d\n", ret); + drm_err(drm, "Failed to set pixel clock rate: %d\n", ret); goto err_put_runtime_pm; } ret = clk_prepare_enable(vc4_hdmi->pixel_clock); if (ret) { - DRM_ERROR("Failed to turn on pixel clock: %d\n", ret); + drm_err(drm, "Failed to turn on pixel clock: %d\n", ret); goto err_put_runtime_pm; } @@ -1496,13 +1496,13 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, bvb_rate); if (ret) { - DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret); + drm_err(drm, "Failed to set pixel bvb clock rate: %d\n", ret); goto err_disable_pixel_clock; } ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock); if (ret) { - DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret); + drm_err(drm, "Failed to turn on pixel bvb clock: %d\n", ret); goto err_disable_pixel_clock; } @@ -2951,13 +2951,13 @@ static int vc4_hdmi_init_resources(struct drm_device *drm, if (IS_ERR(vc4_hdmi->pixel_clock)) { ret = PTR_ERR(vc4_hdmi->pixel_clock); if (ret != -EPROBE_DEFER) - DRM_ERROR("Failed to get pixel clock\n"); + drm_err(drm, "Failed to get pixel clock\n"); return ret; } vc4_hdmi->hsm_clock = devm_clk_get(dev, "hdmi"); if (IS_ERR(vc4_hdmi->hsm_clock)) { - DRM_ERROR("Failed to get HDMI state machine clock\n"); + drm_err(drm, "Failed to get HDMI state machine clock\n"); return PTR_ERR(vc4_hdmi->hsm_clock); } vc4_hdmi->audio_clock = vc4_hdmi->hsm_clock; @@ -3041,31 +3041,31 @@ static int vc5_hdmi_init_resources(struct drm_device *drm, vc4_hdmi->hsm_clock = devm_clk_get(dev, "hdmi"); if (IS_ERR(vc4_hdmi->hsm_clock)) { - DRM_ERROR("Failed to get HDMI state machine clock\n"); + drm_err(drm, "Failed to get HDMI state machine clock\n"); return PTR_ERR(vc4_hdmi->hsm_clock); } vc4_hdmi->pixel_bvb_clock = devm_clk_get(dev, "bvb"); if (IS_ERR(vc4_hdmi->pixel_bvb_clock)) { - DRM_ERROR("Failed to get pixel bvb clock\n"); + drm_err(drm, "Failed to get pixel bvb clock\n"); return PTR_ERR(vc4_hdmi->pixel_bvb_clock); } vc4_hdmi->audio_clock = devm_clk_get(dev, "audio"); if (IS_ERR(vc4_hdmi->audio_clock)) { - DRM_ERROR("Failed to get audio clock\n"); + drm_err(drm, "Failed to get audio clock\n"); return PTR_ERR(vc4_hdmi->audio_clock); } vc4_hdmi->cec_clock = devm_clk_get(dev, "cec"); if (IS_ERR(vc4_hdmi->cec_clock)) { - DRM_ERROR("Failed to get CEC clock\n"); + drm_err(drm, "Failed to get CEC clock\n"); return PTR_ERR(vc4_hdmi->cec_clock); } vc4_hdmi->reset = devm_reset_control_get(dev, NULL); if (IS_ERR(vc4_hdmi->reset)) { - DRM_ERROR("Failed to get HDMI reset line\n"); + drm_err(drm, "Failed to get HDMI reset line\n"); return PTR_ERR(vc4_hdmi->reset); } @@ -3221,14 +3221,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) ddc_node = of_parse_phandle(dev->of_node, "ddc", 0); if (!ddc_node) { - DRM_ERROR("Failed to find ddc node in device tree\n"); + drm_err(drm, "Failed to find ddc node in device tree\n"); return -ENODEV; } vc4_hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node); of_node_put(ddc_node); if (!vc4_hdmi->ddc) { - DRM_DEBUG("Failed to get ddc i2c adapter by node\n"); + drm_err(drm, "Failed to get ddc i2c adapter by node\n"); return -EPROBE_DEFER; } diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c index 04af672caacb..3f13ff692c28 100644 --- a/drivers/gpu/drm/vc4/vc4_hvs.c +++ b/drivers/gpu/drm/vc4/vc4_hvs.c @@ -191,8 +191,8 @@ static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, ret = drm_mm_insert_node(&hvs->dlist_mm, space, VC4_KERNEL_DWORDS); if (ret) { - DRM_ERROR("Failed to allocate space for filter kernel: %d\n", - ret); + drm_err(&hvs->vc4->base, "Failed to allocate space for filter kernel: %d\n", + ret); return ret; } diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c index 563b3dfeb9b9..ef93d8e22a35 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -76,7 +76,7 @@ vc4_overflow_mem_work(struct work_struct *work) bin_bo_slot = vc4_v3d_get_bin_slot(vc4); if (bin_bo_slot < 0) { - DRM_ERROR("Couldn't allocate binner overflow mem\n"); + drm_err(&vc4->base, "Couldn't allocate binner overflow mem\n"); goto complete; } diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 04ac7805e6d5..1ede508a67d3 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -471,8 +471,8 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) return ret; if (V3D_READ(V3D_IDENT0) != V3D_EXPECTED_IDENT0) { - DRM_ERROR("V3D_IDENT0 read 0x%08x instead of 0x%08x\n", - V3D_READ(V3D_IDENT0), V3D_EXPECTED_IDENT0); + drm_err(drm, "V3D_IDENT0 read 0x%08x instead of 0x%08x\n", + V3D_READ(V3D_IDENT0), V3D_EXPECTED_IDENT0); ret = -EINVAL; goto err_put_runtime_pm; } @@ -485,7 +485,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) ret = vc4_irq_install(drm, vc4->irq); if (ret) { - DRM_ERROR("Failed to install IRQ handler\n"); + drm_err(drm, "Failed to install IRQ handler\n"); goto err_put_runtime_pm; } diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c index 7dff3ca5af6b..5474a36c5c9d 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -65,7 +65,7 @@ utile_width(int cpp) case 8: return 2; default: - DRM_ERROR("unknown cpp: %d\n", cpp); + pr_err("unknown cpp: %d\n", cpp); return 1; } } @@ -82,7 +82,7 @@ utile_height(int cpp) case 8: return 4; default: - DRM_ERROR("unknown cpp: %d\n", cpp); + pr_err("unknown cpp: %d\n", cpp); return 1; } } @@ -390,8 +390,8 @@ validate_tile_binning_config(VALIDATE_ARGS) bin_slot = vc4_v3d_get_bin_slot(vc4); if (bin_slot < 0) { if (bin_slot != -EINTR && bin_slot != -ERESTARTSYS) { - DRM_ERROR("Failed to allocate binner memory: %d\n", - bin_slot); + drm_err(dev, "Failed to allocate binner memory: %d\n", + bin_slot); } return bin_slot; } diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 070813b8aff8..eb64e881051e 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -557,7 +557,7 @@ static void vc4_vec_encoder_disable(struct drm_encoder *encoder, ret = pm_runtime_put(&vec->pdev->dev); if (ret < 0) { - DRM_ERROR("Failed to release power domain: %d\n", ret); + drm_err(drm, "Failed to release power domain: %d\n", ret); goto err_dev_exit; } @@ -591,7 +591,7 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder, ret = pm_runtime_resume_and_get(&vec->pdev->dev); if (ret < 0) { - DRM_ERROR("Failed to retain power domain: %d\n", ret); + drm_err(drm, "Failed to retain power domain: %d\n", ret); goto err_dev_exit; } @@ -604,13 +604,13 @@ static void vc4_vec_encoder_enable(struct drm_encoder *encoder, */ ret = clk_set_rate(vec->clock, 108000000); if (ret) { - DRM_ERROR("Failed to set clock rate: %d\n", ret); + drm_err(drm, "Failed to set clock rate: %d\n", ret); goto err_put_runtime_pm; } ret = clk_prepare_enable(vec->clock); if (ret) { - DRM_ERROR("Failed to turn on core clock: %d\n", ret); + drm_err(drm, "Failed to turn on core clock: %d\n", ret); goto err_put_runtime_pm; } @@ -806,7 +806,7 @@ static int vc4_vec_bind(struct device *dev, struct device *master, void *data) if (IS_ERR(vec->clock)) { ret = PTR_ERR(vec->clock); if (ret != -EPROBE_DEFER) - DRM_ERROR("Failed to get clock: %d\n", ret); + drm_err(drm, "Failed to get clock: %d\n", ret); return ret; } From patchwork Sun Jul 28 11:41:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815227 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0EB3EAD0; Sun, 28 Jul 2024 11:50:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167457; cv=none; b=CpV+93wvFeSrw0f671GpAJkVcX3At6YnlBBkBj+FGM2X4p9bMXL66pY1bruB5FtG6l7J7MLeuQpyPbQJF54J4uu6fN6QveUya6pvPxihY2g2kWgN3rtGgRC+J3CMuyG0/4khvPNTwhPtac44e4Uj5nNwuNyShCbfrNwL15LwXIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722167457; c=relaxed/simple; bh=hYV+TDr2SjVWw1zW4/vekSjFk8HOwZnHep+WUb6ve6s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lljA7sAAs38kXin/ZqSRpJTau+QomG1rNWbFAVwV5KmCRbBlDL8iOhLCU9x+QvGrRsc58yVOyiGvvByIz4mQdvkerdPhuH5b4ObZd/TntkFYPvgf13Xi8YEVNMKRgUhOOeWmb1I4NkPgCTLhzO6GRi2WHTARJwJB/rdoDYRBktw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=LfxGG3lO; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="LfxGG3lO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167429; x=1722772229; i=wahrenst@gmx.net; bh=mAP5K6rjjZ9h+Kyxjb/TLxq8qO4pvkW+IrtXzsPAOy0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=LfxGG3lOy6OxRESct9xiOlbE9Z2Y7Nr1g7apwiIVOPtmlfyXpEGmRGAF4LVJXdfm e9xl9QbkbyD89gE7aw9p2pfUPkzydUiX6xiLz2OfbiRy58Z/np2LeSoC2xU/zyRkP S74j/EZ76q1ZWncvp86yp3zwcL72rTSY1pYeTnMLS5ZZ6VfHJV4P06UCjnalHIm60 N/mk1g+3s0cxFMtRLjSCFAzhHzb6kHGltNSpvqLlFCDGsxCXgc2soOcAWd/KoJMBy KWvDBAgQwozvg3R0aTEslbrwwO3UGuwpD9mZiV2gZs6LkqkpEMyKm20xkn/3W8rSB /9eNns3wUz/Po9OnOw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MNsw4-1swITV0az2-00TM6x; Sun, 28 Jul 2024 13:50:29 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 08/16] drm/vc4: hdmi: add PM suspend/resume support Date: Sun, 28 Jul 2024 13:41:52 +0200 Message-Id: <20240728114200.75559-9-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:6d0dGDGm+dLjlwAyJtKK5CyUIflHh+zg4bpcrw5lentD0RqV+R1 BBYSPoh7fGH4pcoJ7loQRU3lQ9Fj9HRVJRjj92jVXX4mBACK3HAr6Y8CWN+g48h5EsSUVRR 3ngzvujax5a1GJEEcrVre8N3PmMKCp4W+Xeu8LH6NhOPMP3wO5ZRyb/O1s5TUC/pbJbgpYo Xi8a2Y2V4HYfkNGVXID6Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3fXImmlf+gA=;2OZ4akwS2nqG/5zVHPHoAraiCK+ skDAInbpKJEO9b6cdbrtpQCGtX7esVnV1uKbTnWfnMpK3at1CcyS+FFtNf3qV0Hp3UiNtB9lx CsmODXFfmsqc+LxnwxHxMLn2RRfxU3HFw9zidk65IRlsCNhv4ia7r4VUynLafkkyga6k2jhrB bmwy+slj4yYL09a2Aiv7spuHAZPI9i2Za0pgOU3UOq1AMKsTREkfO8sEPeRGxZwHmsBDLwz0z cSAqgk0OiR1PyjTX/ks0HfDZeUTDKFp3JboK76ggi2EQDSHPwcoBFelm39oq0nBOj/ceG71RL b2kBUnqkMZxsXTRBpIPDSDFk4NA1SjbEQDVDr6TXcBLghnQGjGz/OmSbDsBsnuMi1gVezdOGs YUla1A9n3EyeKNo8LDaLKsyLGVMhgGa/3+oM8TRzHcVMPRUKhNvYbfKvrO8k4sdva5zwTJlmW qE7UwFkBLlgBwKPgdUuiq9dYRl3VhnBFphxI+se8gXYf+1zoQdl6pDcRlb/epnW5exFFmFrKO B+nD0UrQWc1oNmfCmrP09ow1gYsN53+YtCZU8P1bwc7nKT71oVxEfgcjCqrKX3m9nr9jZ69dg gckazYUylKJkNBrGbAcGsT82fEZmggIKEb25QJoWoKz6BkTxeAXB8Yd6cQjSUqOShhJczO280 fH7YNLu5vbE12Stt1cdICidCZMgYZ0a0LvgUnDQdn7vNqCrvuwZnXambSBj48KxQXPbtZWOd7 YQnMxI5c3LIgZBgA+RhunTOXAV9kxFKPD6dTqQXZU+ymGNGd2yIgqLHfxLR47jwQXiV7UPvGu bthSAKzbrTVOL14sBy8K1hxg== Add suspend/resume support for the VC4 HDMI component in order to handle suspend to idle properly. Since the HDMI power domain is powered down during suspend, this makes connector status polling pointless. Link: https://lore.kernel.org/dri-devel/7003512d-7303-4f41-b0d6-a8af5bf8e497@gmx.net/ Signed-off-by: Stefan Wahren Acked-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -- 2.34.1 diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 6611ab7c26a6..f7a4ed16094e 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -3104,6 +3104,31 @@ static int vc5_hdmi_init_resources(struct drm_device *drm, return 0; } +static int vc4_hdmi_suspend(struct device *dev) +{ + struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); + struct drm_device *drm = vc4_hdmi->connector.dev; + + if (drm && drm->mode_config.poll_enabled) + drm_kms_helper_poll_disable(drm); + + return pm_runtime_force_suspend(dev); +} + +static int vc4_hdmi_resume(struct device *dev) +{ + struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); + struct drm_device *drm = vc4_hdmi->connector.dev; + int ret; + + ret = pm_runtime_force_resume(dev); + + if (drm && drm->mode_config.poll_enabled) + drm_kms_helper_poll_enable(drm); + + return ret; +} + static int vc4_hdmi_runtime_suspend(struct device *dev) { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); @@ -3405,6 +3430,7 @@ static const struct dev_pm_ops vc4_hdmi_pm_ops = { SET_RUNTIME_PM_OPS(vc4_hdmi_runtime_suspend, vc4_hdmi_runtime_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(vc4_hdmi_suspend, vc4_hdmi_resume) }; struct platform_driver vc4_hdmi_driver = { From patchwork Sun Jul 28 13:00:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814977 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B2461B86E5; Sun, 28 Jul 2024 13:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171686; cv=none; b=sYs91r/sUvpMkIBclDNAAPTBlAb0QJ6HLMnFZ/Y2J8foQd7L9SrTZV7ZamnFKUVOhneZbhA38nD4l02kGTgzuOGF4S11GwoY1mKWJIFwsIG/q3UfoBbmPMh9EykQCS6vPK8iNeaBfG3Ojratnv8LmOAwMpi48NL22pVU5URUS68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171686; c=relaxed/simple; bh=7Rdr3xo9Rvr2m1wSZjKEbf25RC7hTiGmH3OMG3XFiQg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nkZBcJbWbHWyHocDF7OapQrOor85PJ1onNV04rEpZYJF6XUZcTzA+bahSxFNs92rF0mMdyN2DaZpdC6zhZBQLpKF9Cwr4ZxFM1UfIHSrsPWWP5GNUbjCNa5a5wWiEMv0YyugCxh3qPJljRTG0bSKboGoxAh/vOXCL4TydX5oG3E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=H1+1N26d; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="H1+1N26d" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171645; x=1722776445; i=wahrenst@gmx.net; bh=vd35QWujqoCcgjswql0d6hqDvtzrzubBkMD+QAru0Qg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=H1+1N26dP3qxTbZhVbmD2kVxYDvt1bitmot0XfOTZRuZhUjzfLM8ETRZuo6e+TE5 mz5TrjZ1fjhIxqVAPBG+5e/GWQcVijDuoG1vgzpoG7VhnN7MvBw93jsDe02RvRF7s GvLi/mTmL1YbIrBGHkRnmlIkJJCyIZWqUj/XqouMgF1MK3FvEdv8fu09dajwn9m3d r/ZX4ARtdekRd8PHzVmo69IQ+LraHJn02aFegNXUwf3nJpNtQnIlDWuNFVYLIH5kD hQ+0py9UvYlokvYbcaaH9E/ncJuItdeC0kM//Sd8lBgrfXd+d0onftfEH35ax5WJO 2bCpTT/8gNxn4VcTNw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUosN-1sh62W1D0r-00YhSR; Sun, 28 Jul 2024 15:00:45 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 09/16] drm/vc4: v3d: simplify clock retrieval Date: Sun, 28 Jul 2024 15:00:22 +0200 Message-Id: <20240728130029.78279-1-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:pBQ7NbVoNBvF4yIvkxD/tynf0vR3oAGG6Sf+gA8vYtZQi08lBDC 0zBDHPYYYpVokSsMiUDz1Ksp6GoGWJdQU3kmcobhVvR0YP3w1oFOOfSWCbtOrZybaJiSaHj tm/fqlFx2pn3945+FbIho/zZR0rmu9emmLdLoMtR3+3pG2sUXpLmI/oubUyxh3Cd5PbfFT3 nk++MfRVoNdOSJ943i1Ig== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+vPpj/uVAzA=;irWGD7Y+dbxeocYnUfFCB/5Yp/L z4Da8MKGgalWaaps++KCqlP+9YICpWybJ0fhiOJ0Gii2cptTJtZE7o1XyR41ky5lX5GPH4SoF r7JGfNT1F3kFWHww86FZHrmVWosKTiBAgB96ro+MN7UkJhWeQT8bbE7IzNLBnA6rWITk7UW8D /L3JyLZ2aWQCUYjLWnL7ZSo43Bu9ourvXdqgK27JlwX2VtvQCzOtXsn6BT0ruIRFeiUN+/N6G wTJJ+kMxvNO689UjmE5rhGj3D9/AYDBRqJL25P5V2IiYHOW+mfEtRHNtwBcSnxB5DI0Hiz1b5 enHRLTtop0tjf60g/gVYwfY+uRcER7LSJa/XlpQcJayq36eeD5e3+Ur5/u1mUvI+ekPW9HeOT hska2q072STvAOPKm5AGd3MPI8MdOdqSSF+TPUSpgHQPYkBYJn2v5EFGeoSS7pq6cOTXItnvT 2+1D1aNt7p9ZUhkDk1G1Bve9fyFnUXr9JMSOrulKajiI175u1knJva71Ous4GpqtZhLWKFWY2 WOpVwlQx5XRoJdG/e8ANdcaFry+/qKYPSc2fh54Ew1U59HRXNapLMUQloqLEjZHcrIOKktD5I dwpaqDGON5HOtLTpgBgzBDQ68jZYcIt8nOJYa/b7z95ZcsnoAJEifldjiqyh2hNyyXelQJMA6 haoxOUG5TEVH3OqJLo4PAH7pmJu3uwLCmVAk/IMqeKvH5lEpv9NlhbTgLM/f1bic/QHKUcliu exu3dqzqJMZgFTfQNMBEO5ryb2lGSfOjQMs3XXABqLSRIN5/SJWD2Npn/aAKFm/L9CQ8PNk/A rpVu1hBnuSakHZF9JrsP6uig== Common pattern of handling deferred probe can be simplified with dev_err_probe() and devm_clk_get_optional(). This results in much less code. Signed-off-by: Stefan Wahren Reviewed-by: Maíra Canal --- drivers/gpu/drm/vc4/vc4_v3d.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) -- 2.34.1 diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 1ede508a67d3..4bf3a8d24770 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -441,20 +441,11 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) vc4->v3d = v3d; v3d->vc4 = vc4; - v3d->clk = devm_clk_get(dev, NULL); + v3d->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(v3d->clk)) { int ret = PTR_ERR(v3d->clk); - if (ret == -ENOENT) { - /* bcm2835 didn't have a clock reference in the DT. */ - ret = 0; - v3d->clk = NULL; - } else { - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get V3D clock: %d\n", - ret); - return ret; - } + return dev_err_probe(dev, ret, "Failed to get V3D clock\n"); } ret = platform_get_irq(pdev, 0); From patchwork Sun Jul 28 13:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815226 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 094713BB24; Sun, 28 Jul 2024 13:02:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171741; cv=none; b=h5c2kld30CGS2GIVGFkgTb5mBClOx/4zd7rv2+6ESc3HRIclVFqYXPGZtJ80m48mueQFuJk0HTb+I5938cyBqmAgsfIv6cMqEzg6OxDl5weOal19ymYKLCnHGvmjJPCyI6/J6LRK4ewgW2tfyTZlVNhYZl8qTkstELppojeLAKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171741; c=relaxed/simple; bh=87ySgbiiYe8HB9qINfpN7uKwCQeO6bWDjeLE0wDwUCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JG8RQXXo4SUgz3rbgqhbtWiK+r8CBzRR+ZiZAjy8SyzjroHab54dgizwTvrz5RpbwB3hkBcaq6mq/FOHP9gHBP3FRWyXe/MUFYdHD/3lMFzUKdfYUWVZwxA1gDwl9elyjLgNLVj1/+iqFrsJifLLC31qCCqJBPFTmwyt+d0ZuFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=LZnHzB/b; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="LZnHzB/b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171708; x=1722776508; i=wahrenst@gmx.net; bh=ar/kp7yD2mJLJuSys73kvAqBB9MnTy6xyWNEEdcVnRA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=LZnHzB/bDBiYalGk5UPDHQt9PHDy+KZ7w7DSeMZvHGDnHMyMrrCgpIMZ+iPDk0Gv G5HNBmOYG+insjXO6+vTcUcyzck1nyUorJNj3Xg6BACbEgo2OP2L2hZhGwXWSkbTv 6TyW1Z3iczgkao0oeHZupuxy+R4DSmzZhi8RnK7wUYq3qmrVUyHuToBZyJcRiYQfp yhvOlS7/PvZcrXGn1myzoK/B5ZdcQCqzoBL/vWeItOUahHCwK72HweqsO7tE2gWSk 2Tqq9Ul1sQbYsS6s8+ienD8T2DWX9EUG9HfvSlIOfTFtsppuQbp7xYSzpbEbwrYMB ZSaxbUELZSj41wR8Pw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MzQgC-1sKwYe1EyO-010E9t; Sun, 28 Jul 2024 15:01:48 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 10/16] drm/vc4: v3d: add PM suspend/resume support Date: Sun, 28 Jul 2024 15:00:23 +0200 Message-Id: <20240728130029.78279-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:7IJwLoTzlwttqekflfpKp30OMNgCC3j4tWm9XhRYDocXhUqvFz4 fVyOSsioY5Adrs1r12juiZMUFnUcFVKLW4xosI+l3QsE+KzidpSCATgSFsIfLWyrpuFH40F G5YzwSO6aXeiPPEcUqY0QcOibtdV8YZr8uHCLPId3UC5evWHHpkdKMbX4KMUqcBiEJ5f2lF Hf+ImoiVPnqpTtSkP08AA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:i/6mUy9V+lU=;7OqSqn0WBQcyR+A6WrRxHHWZ3z9 BWxoMASO4FUYKHwltmw+jjL1K021d9WYt57p72CaSTjkLyxfGtsC+mK4UbURJW8yWClJQE7/9 jBtrfTGKoDbJ7LHf0ENevzJho6XBJFZfeyiU0/4sXUO/9A9qrtcaAslt3tr+8Uke2SqeQjCZb jB8ShVJkcM1ulhL9djEQLSNFPSrVydSyMZzDXVyZfAtDSeL2hNb8swVTGBnieaKpB3H2oLQIG uul/tbpGtCZ1c4m3OFylGn/lx/5wzvqVhJi1o5MHZ1zhb3AmJiWbJhk9A0J452cFeTei+54bg AJBVbmfcaEgKub93NNBEZJb4zMybI1znfIPqhBnYn5zMymqQOlKLhiMzyW4QjiBG3yCqpgfPB ZmAhc2y5C7VW8LDLOGWupisWd+cKLWL8ii8sS0g+/0NgbUsCCYf8EmYvXMCnaNb7w+HzMPH46 dTSaWAIr50aFq21HdkEoPoA+qHJTEyHQcWas9ETSqidOZMZRpIM5+nTqbc3lFxAdgXyAQDdxO JtKVrPdOl08XZGARoIr17+bVH1VbwNU/ZvkBdS0ENVBXGLGhKsBJ5hBcBdC889Aba2HWOxtUa Lc71shiuBVFKGbC917q9/G1c0ePYpLCNO1O1jj2hx9V7N4m3muh75n5cJwU6aBsEiMgTtnd1X x34BLjXC7+ib/ElpoKQ3wJ+mouMdbzvKT8S2FdvNhGl/9mftj8u4bY3lHkk7tek8tehVmOnpR BcSRbPPUSiAu/aVkMg6+G/DdNBDG+BYM4qBXUM6/ZYci5XTTis2dlsIqqRrf0OoM1BHiY1Nt9 w7qnjdQMSCdsTydkIcl8P1Pw== Add suspend/resume support for the VC4 V3D component in order to handle suspend to idle properly. Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.34.1 diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 4bf3a8d24770..309c8af08fd0 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -511,6 +511,8 @@ static void vc4_v3d_unbind(struct device *dev, struct device *master, static const struct dev_pm_ops vc4_v3d_pm_ops = { SET_RUNTIME_PM_OPS(vc4_v3d_runtime_suspend, vc4_v3d_runtime_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static const struct component_ops vc4_v3d_ops = { From patchwork Sun Jul 28 13:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814976 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A095239FCE; Sun, 28 Jul 2024 13:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171818; cv=none; b=moqZGPLmG5qumJsQDeWKCBFvWPK81lT8em6jRcf7jEphXTqhitcx7ktJ3WFt/Ny6zBXA5sDPgt7EpP9okO3drctVObmsAbmxNf62orgchTl54IjvVGnUY4vb0q+UJFgtXgBzzS0KRrJ3oLP8e1BoF7ZcRUFkB+/9wpINJpi41no= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171818; c=relaxed/simple; bh=wws1JkoeTl8Ln5vCnAfEgBeGUMbEsuuyrmeHW0BObBs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YRmdOqh0PGpIEiths5MkTZcx9xRQrZGhPo96Xkiueyj/tiZM8zkzQoluJg92Q0dOZO0aV9glrHhnbFFYiCgXjAr7sNxi3CaaZc2ZvjAa6DZJTkG3fd7FFsJ31N7Km+pD6M1hAgCT2WkLoSVjko0XchVwQRcNapFUH8rmFG+YsWo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=AWjpf9vH; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="AWjpf9vH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171773; x=1722776573; i=wahrenst@gmx.net; bh=cmHYnLGXn5Yd/1OpHJBxm40cex9jafN03MDZJmc7bGI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=AWjpf9vHzDdLEeRClvD2Dvyd/QflXEJ24IPsMhRydRtA30yewy1Nwjpj7Jv4cEPX y0+Nu+SzXC/i08o4XvGYV8mhq3yJNAFza6kBUPEtLzkERSHgdVbeShZGO2X/UreLX 7WlM1C/6EX0BcRGjiCvLuVDZdKXlR4r3TAn2VzIV30OvrI0wDQ3P6TahVyyNMOzH9 FlgwseZZoGtPHC2DBO5ecp77t1ovKnddCi567b/C7ABSg9v5XUeUCgYKFqwY8xBES FG0W8sShLJuSpnywglzBpcQ4QkKUzfe1JOI0QIhapo15iuKQxeo+K7pnstH61Wxx3 IbglK31j341P4Evi5Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDhlV-1sNvC73mlT-002ZWL; Sun, 28 Jul 2024 15:02:53 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 11/16] usb: dwc2: debugfs: Print parameter no_clock_gating Date: Sun, 28 Jul 2024 15:00:24 +0200 Message-Id: <20240728130029.78279-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:lSg1FCepvSIHTnFDP4f/Qf43QyaiFYaGcCE3gb4WJE++lpO3ow8 mKRRPjAqJDuOezzMVEwD0IylhiXtT3JwqwD3GCqwyQ+nd6+rM8Or/2ieStUiEP7R/8mgZlv Yr49GNbtlAbIDwyjS5hsNh/zkgvcCe4t4yqp2Dt7VtgVRdVb5oWGsfy0qW7d2FB2ydw6J5v jBe24lvlOT18SLMBaQqUQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:z/NKxCFSSqc=;YAKYBHzrYzeRIKYgh6aUQlJ1EHf N5TmyI0+LC+Up/4ILpI8cx6GuKOvtP3fSjAJgQ4PB2GTo3FKRZlHBp3ZVNP6P6oxsmwsqdaj0 b8QAZGButiZ8RZRG54JyWIZ1aB0EkPGut3oMUwOa27vvBvWOZrsOfUV4f1OG3w6dv+9QCYhRk mCW6tFp/vgdmkzUyz7uML6AaF9NME5f4ajTjDKPjPpnEAH6Gu1ppYrSmXDTrhd61jGt2VjCt/ XoiNP5KNP9W1ID6sBmh155stsVj2f1lsIPj1jCmUYGSO34urhl8xftkdbInU6qSXtYVcuhJYU 9u2nYgIXtpJjeTQjAE7NkEqmXyRl0l+2k6dmL45PHcqyO5dbrJP4eq12Ei59u4yAy3gTAfG3L JxCKJrWxWbr3PsYxct9jUb+VfkI8aicgGswDNqYFxGuzi/YRob+GMFsNzPIn6sqLxb45k/HCi vGdr1dnO26d6JBOtrEkMB1F662krY/wcInoqB6f42nBtW8GT71omtEwbufp2L39a32YGIebMb Ja7ZesDOPgKdcm+bT8o8WGZK++lKBC3B2KOjnaU2mCND8Gkflzv7rsW4m/neCoapZvzW6Ql9a viMDBkWki3r+VePuc4rwVbINMk/uA6eTBU1xVsXJGlU/oyvgJdtXMl7YNUJn6B289tEa31ZUu abp/AvIYjfBe5vB01lgtfVrIQN4iT992GS+yjU867ZejruHbON2VhzMKrm35Nt3IyJmrOkwKL WZXrGRnky27t8iYtkkfzFyOWG5a2rOjW4dv7I4zvaKxkv+6VYIFG/VwJSn4bDI07S7aQNd3sL /cC6hK2kvhFAVVpLCbxJro7w== The commit c4a0f7a6ab54 ("usb: dwc2: Skip clock gating on Samsung SoCs") introduced a parameter to skip enabling clock gating mode even the hardware platform should supports it. In order to make this more visible also print this in show parameters of debugfs. Signed-off-by: Stefan Wahren Acked-by: Minas Harutyunyan Reviewed-by: Florian Fainelli --- drivers/usb/dwc2/debugfs.c | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index 7c82ab590401..3116ac72747f 100644 --- a/drivers/usb/dwc2/debugfs.c +++ b/drivers/usb/dwc2/debugfs.c @@ -702,6 +702,7 @@ static int params_show(struct seq_file *seq, void *v) print_param(seq, p, uframe_sched); print_param(seq, p, external_id_pin_ctl); print_param(seq, p, power_down); + print_param(seq, p, no_clock_gating); print_param(seq, p, lpm); print_param(seq, p, lpm_clock_gating); print_param(seq, p, besl); From patchwork Sun Jul 28 13:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815225 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF22B3D556; Sun, 28 Jul 2024 13:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171865; cv=none; b=TF8h/jN73l+1eSaKkUHm4lCLwrpsponYsUjhnYB85Opi+qj9Zmty42zK0kiUUTS2y9PIirJVIkzBSHvG17jxtbAnB96sMGHs+fKpSV/AwwEmC+Wi6O4AwpoEPjUZzj/uWIxwc+IDyFpR1KX8DX0flkxEqf2OH+FXl+04hvLuny4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171865; c=relaxed/simple; bh=HMjFJtI+u2C215k4q8qd9sKCbIbjpxZPRtmBLVvy73k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jClNr4ukE8S1U2MCrCjSMZYrzf4Kld6mafguZtsFJ//KnlJf4PC+8gsDba3fZHl44OSfba15p3SnqU5I6GMBMYoRdUdRRyaLItVW4L8A/oFFGOeWAOCqAcfQFf5f/OQF6zfeJQ0qVLo2YvGCvkwUScE/Ns7oZATGc1BI5TYFqUU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=kc9pymxl; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="kc9pymxl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171835; x=1722776635; i=wahrenst@gmx.net; bh=QW57IYRI4P68nR61yVnC7GlYDX8vXW5afRYotl24vJI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=kc9pymxlFrlBSeObMYYT9G63wvPKtH0GXvEFSq5sDbYKdGTs+gvcyLEk26P8O8Uo yN7yzLFxZZnOb5RT/NWuhhRghY6B7nEh3mLBjnoAztdK32mTCny4TNEVU6yIwSbU7 OnX8vqhFh2WVLI8AA6P2FNzbP/XmWu94wBvz8JgPltUmiF1+poBn5m/LBwevN73d0 /UrkaPVjxWLHq+OPV+aTwgydOGZRyywuVgNTe38bBxjqfKwuIN4cdh4qVpOPoUG1x csIweff28y5YqLZ+KsF2q44esj393NoNMLqhnEfRxl6d2EIuTkMhYzSlR5X6Vs/uP 5urS6sOgsTEeNrL1yA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDysg-1sOCC718Gi-002vRi; Sun, 28 Jul 2024 15:03:55 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 12/16] usb: dwc2: Add comment about BCM2848 ACPI ID Date: Sun, 28 Jul 2024 15:00:25 +0200 Message-Id: <20240728130029.78279-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:I4iTnkxVmX6uCQRToKN4nNo2sp1GwSRVzLmPfzX9E41Z5v2gKe3 09kkOASd7hPTla9HDIsXgsQct1ZccQtC6iSYyfd7lNnrcM5NZz47+0An+wFa3hqj29GcmAq JCuL8i5F5dtNHYbU2gPSqqEVFc1gqiA4vywMCyJ7bRvRQ4ee1RoNnEfu5jS62AP0+nVZRQY jQPkg18RFRY3QpLZuqlIw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5XIu6/O8icM=;YGRkMRhm0fCWytJNRUyvf50XTp3 Rw8QCYLQveoSrvVCvfRfc9cvpAbrdg0IbXTAHKTLkt48t0etdP/aK24sYDi5SU8GmXkVRnsuO n/v3CCG159Lwp7R+4IrAagYGYUXZb/o+Rq+gNkeJ13v1tqHoBtDoXxKJY7+yDfda/XQ4Pkb+x l7vG+vadiN9E1S0rdkPUQkJEYGSONkABLlX+yOh0coLogrOYzw/FEZqZcKfqgBHy/g0NZ/nS9 j0CC4Clc/E0sF4sXNQwcv8JD/cnDpRyQ1zvTd0En53UTyixlZcwYNZxnm425py5aJvljSeIgo KiIKLHA3dtoP8JSF5Rmx94ZLpPTxth9bvpUn0Q4NHVcpPAF2FZEWdBFHIeVWuzv9xXcCEGkxJ C4yA/vx5lncYHfqN+4c7LF4yYh6LBUvwZx4QAZUUoeY8rv4LdGvwx7pNftHGacGVWkCzjrzqI ukr2Mb0hednxGB1rS2VQay7tHtJGi8eVegiOpYGem2Tk5I81tawVwLgTS9dNlalnrrRVKme5S ZX4GOW0kYRFxViHgdZU3bZqWvRea7L77oUig1rZWOcw5vIrU+tkLqlwY2LniULBF5a/aT24JR X0vppAVa2tUZvIfuzKlVnCMinJ4Ona6qRylyMINObzxaQUnN76kD5ONuUot35oZHk2WgSeoe4 rtcBqop3TzTBT5pxvDmyxjgXv2UCyz3YgRXyuDf63YpVkRuFEO45zn/wqNvSGDavX0hTNtYZs SuQSaZWwD0ONIvq2X2Ggcqx4x5DGkpCMPBkFqvfgi6iqGGO6931ioj8s23+po6w1z7eppP+30 Efoy8ZlbWWcBhtiLuT75ABWg== During recent code review the different naming between ACPI and OF IDs led to confusion. So add a clarifying comment. Link: https://lore.kernel.org/linux-usb/38e46b44-6248-45e8-bdf9-66008a2fe290@arm.com/ Signed-off-by: Stefan Wahren --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index a937eadbc9b3..4d73fae80b12 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -352,6 +352,7 @@ const struct of_device_id dwc2_of_match_table[] = { MODULE_DEVICE_TABLE(of, dwc2_of_match_table); const struct acpi_device_id dwc2_acpi_match[] = { + /* This ID refers to the same USB IP as of_device_id brcm,bcm2835-usb */ { "BCM2848", (kernel_ulong_t)dwc2_set_bcm_params }, { }, }; From patchwork Sun Jul 28 13:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814975 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7190739FCE; Sun, 28 Jul 2024 13:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171925; cv=none; b=Stx2/o69cdp1UrdYVjGy3at02HwvZCpTeQQW3LDJj1l6HkFH6oZ+BE5SiBsM/V5Ht4Gofn6bQL3ip41VJNYZTGfBilCWSZvMcxbKNHhjgFsu4X1ZNVwMSXQu8ITsAKVxEXO7rcnG+5qvTVNLjiPxUYSVbDrlYrTwQrZbF9hQ3KY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171925; c=relaxed/simple; bh=1OgNP2z2wcObDZoggVwBSp/N3WuQBXgDb7IqEI1gJ1A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=l3VsoRkxEl4gcuB9a8MdcxvElY+YKcFDQw8BZES0zdHKbQodE3lzhJd0T+Sd/s1UiwlGxw9nnguOu3FNG2KNpMI9U1Q0AdnWG9xinLwWq43uuPoxia2jJXL8yz+rrrD/llkLLtXu4b+Fjti7j5tkuhLrVeb3CDXhXeLkLi9D42M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=LmscagCW; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="LmscagCW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171897; x=1722776697; i=wahrenst@gmx.net; bh=CgyBVhShFPQHZA3QGcWv2/P5EoEiVb+TjGrpEimPkw0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=LmscagCWdykxy8BHKIPNK4bcXTouq8j/oUpumI0X0mp69ItEAEIyO4a+6RpIBkYZ 6NF329NP3eJHwTPcEhoiu7JpIMFxjjwksG84J5YRVfGQzrYYJMABi2WI8V5xDNzM8 cUpRefPt40a42h1X+B3yMcdQOb2uW4W/nY2X11+lGtmXGHwAYYBtTvfISwcD+pF9I iJbStJF9oorst5a8YTzG1Bki/NUsb0+3xXRgfWPEyAlZKuNdkiCy7oOVplvBjOYe9 L54Z1Z188auJMY3svXTwvChidjc5L3ljXMFSaPEigEwHZs1uJusyXUy/+u18XPtQS qrmnJtHVd+00Cw9g4A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Msq6M-1sIjaL0js0-00xHk0; Sun, 28 Jul 2024 15:04:57 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 13/16] usb: dwc2: Skip clock gating on Broadcom SoCs Date: Sun, 28 Jul 2024 15:00:26 +0200 Message-Id: <20240728130029.78279-5-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:s8dsyj9qqRYRsL8bQxmQ5roOnkmyC1BaDiF5Im83qgwzAe1fvr6 YXnXSZOZhFMguv09RAYYhDM4htVwDa5FeYuT+H/zRLHpvpAy3embHN092azTN9XIXKqI6LQ EqeF4jqQqz0Xe9a4i3mCDUz+PSAKUgHCcZwsaiIzby2QVe8AwODU1/uwi5Y8+rBTJyoqgFR 2p/gSxu8/5aOBWD7jcRDQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:JTYlFqlSooo=;Pk+uJOwCtCXcINyxmO7dEmrah04 UlqaymRbX4CDsGbuGm87NnD4Zn9nFGfDHkF9XM3X/7qCMlMnukYR9YbOGd1+h/CDfAO/QXR4j Mi2OYWa33FGI4McxuWU+k3ftzulYGx/FwCwVrvnMRwcN+0IM9AYCJ+66ykuqV2SKu0KB+0bvD CY9dth/UCl9UTQqAnavn+GsgK6M8oeULSmIFCKyWHHxqVmLwunOUfQqgO3EEIojncArkOAii4 /PVwVRf1NGvHecEiEnugwPkApVZwnPT3S91JTtXLBBZlCvdXhxM+WuznxF53Q76HfCUd7SORq h+LO45U2Uph33zEydNLlS2aNgdLD+6cF1iTACUrQJcTxOxtIAYYfzP2v9hjUC+E9HJy9us6fr /qIDEwOBsbSDNNSU7WKBPK/IXkyHCOHI8/eT4HW/9mkSdlhqcH7LyKNf5y0qV0jhQ++4XDGC7 +IXc0XGnvzCIkz/Rv/0oBnCnWU5B72aF3k+w6vTXN4YJ5TFv3RSj5E9E0Q6TyQd6sA9Mr4jmk C0x0+lXe2PhRxsH8fpKLWSUyHl7/w7sowHnSLl2VxiALCZtxa8IZmr3Bw4ddDW4l4UUz6HFVU kMtmIYztsHjrF23zxLoYPgzujYEvmxbWW+xnAt9jPSUEjs09kaBq1nO+4b6i7KWuHxgPtNSQa HURzalESXk+ZB6LBTxFryPcDIlnAn98/xIz+NNaQsDbC1vkN3LdZTb/cBIkHnvf1URGknvGRK LeEn0gIHaO/zO85hJoiPuCejMqKbxwdJ9cjQ5+A7+EjcTBULn2AxkjZ6lW7WjoEge/ysaLKGd sj4BCm6UWRIQKx6Nheb7bDpoQK+JoNk6fxrIqPkDdPPoM= On resume of the Raspberry Pi the dwc2 driver fails to enable HCD_FLAG_HW_ACCESSIBLE before re-enabling the interrupts. This causes a situation where both handler ignore a incoming port interrupt and force the upper layers to disable the dwc2 interrupt line. This leaves the USB interface in a unusable state: irq 66: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.10.0-rc3 Hardware name: BCM2835 Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x50/0x64 dump_stack_lvl from __report_bad_irq+0x38/0xc0 __report_bad_irq from note_interrupt+0x2ac/0x2f4 note_interrupt from handle_irq_event+0x88/0x8c handle_irq_event from handle_level_irq+0xb4/0x1ac handle_level_irq from generic_handle_domain_irq+0x24/0x34 generic_handle_domain_irq from bcm2836_chained_handle_irq+0x24/0x28 bcm2836_chained_handle_irq from generic_handle_domain_irq+0x24/0x34 generic_handle_domain_irq from generic_handle_arch_irq+0x34/0x44 generic_handle_arch_irq from __irq_svc+0x88/0xb0 Exception stack(0xc1b01f20 to 0xc1b01f68) 1f20: 0005c0d4 00000001 00000000 00000000 c1b09780 c1d6b32c c1b04e54 c1a5eae8 1f40: c1b04e90 00000000 00000000 00000000 c1d6a8a0 c1b01f70 c11d2da8 c11d4160 1f60: 60000013 ffffffff __irq_svc from default_idle_call+0x1c/0xb0 default_idle_call from do_idle+0x21c/0x284 do_idle from cpu_startup_entry+0x28/0x2c cpu_startup_entry from kernel_init+0x0/0x12c handlers: [] dwc2_handle_common_intr [<75cd278b>] usb_hcd_irq Disabling IRQ #66 Disabling clock gating workaround this issue. Fixes: 0112b7ce68ea ("usb: dwc2: Update dwc2_handle_usb_suspend_intr function.") Link: https://lore.kernel.org/linux-usb/3fd0c2fb-4752-45b3-94eb-42352703e1fd@gmx.net/T/ Link: https://lore.kernel.org/all/5e8cbce0-3260-2971-484f-fc73a3b2bd28@synopsys.com/ Signed-off-by: Stefan Wahren Acked-by: Minas Harutyunyan --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 4d73fae80b12..68226defdc60 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -23,6 +23,7 @@ static void dwc2_set_bcm_params(struct dwc2_hsotg *hsotg) p->max_transfer_size = 65535; p->max_packet_count = 511; p->ahbcfg = 0x10; + p->no_clock_gating = true; } static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) From patchwork Sun Jul 28 13:00:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815224 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C91C44A9B0; Sun, 28 Jul 2024 13:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171995; cv=none; b=URR7/zrr36/bNbfz/+WuAEjfFsxPwxt5GURzEtNh+3hhESyZV93jbTB/g4zoIuk5Mxp2uRyKuIQXrr5kKU5Tu9fHtdyVYEne6fk1X/WblIctomQmRCdTitmEiMWbMiDxavGzitMreDLURRFYFsEePVu4jDtedZW6ALTxZfiCLh0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722171995; c=relaxed/simple; bh=veaL8AejFrNn/XjuPINdl9LPyqcZ6ez16v7uQMryn5k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rIxnKnhq1UE8pI2NvSIgigA6/Uk+O65tPZ9kQnFN7zag84ikBrCx61zc/bvKba9UrOXRoAoCHHwno/T3CExQyzmPp2bsfEG4/KJzQW7IxtqZp6quZM1Ja7DjuoQcCBIOQ5y8lGy55QTDRXMCWjBcA5sfyx+AP7Cg3a+5ZV5nphM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=dAV1RNjt; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="dAV1RNjt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722171962; x=1722776762; i=wahrenst@gmx.net; bh=M7r0zgzsdRZMdo8RqGtVt52OP9WEg6pN/Bx4IF1TmGM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=dAV1RNjt6YGmbStVF14ePCj3d4y6nbdTmSJeuW1Dsceuzro7SMgd/8YWqV3R4dEW FpNKi3/pgVxbuPgyErH8Ts7UxyGdceJs4g2lrQZ6Iw9D2gkPaClChovna907KYOgm suMsrbrf5II0gt+gahIlhdTwynx7eED1XDQgA2dfIH6mvGGNcjqMLutMUft0AL65F kahYj09H4Is5vs15TbbGyO9sl0bZkENDFNyRTPUpuE63ioawMnYPRbyNRZBbPf9Jh VwrnQpirN865AsBpcqKauzjvrBpfM2tFhGLaHfoP2NqcqkWVBCHi2JorjTo5s0Txi bt8KOeIaE5sNfpGkPQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mwfac-1sMbJY29z0-016ZFJ; Sun, 28 Jul 2024 15:06:02 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 14/16] WIP: usb: dwc2: Implement recovery after PM domain off Date: Sun, 28 Jul 2024 15:00:27 +0200 Message-Id: <20240728130029.78279-6-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:/o5ph+IO8NWUQ7I1tOJI+ylH+u9cckK4F1uFGzHRwxaErB7jYQj v0WmAZKTvicrUjhuvD9D1YTiywi3lWh/MKt9Jj2ukj4oxsqbwKAdhLfUq2zV8TPAgDYQJL0 GPEfbjMbu/Jr8oTZoribnDUU8l8mxBgd9RnwhCrzNB7rjKXQfx6LUvzfmdqLSf96eSHUyJO wNFk8F2pMPA1z506FLssw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:VK/dZuUOFOU=;b4VS0LYzeaxQNdiY2u2VWiYUUWd gBDGD/w2EkraBIjMH8a3XhR0JNgHPLQdo7uULm/dp/8eESM77DDng0jQCjYMPuU2m7V1OLKI9 nuTo8jBK4DSRabSQTxHRcL/omo2IbUeJXfDTjQceKUi43ju1gpKNu/J78au5U+Me57HyhAbuV QrfSeHUlYSqJGla1egATfFImbGfzcIGyY19pnzAEHzmxAzFJsv7oo65+L0h9VINEJVHmiNUqz ICA/gRHh53H5oSt02aDAbB/0O+ex8Wn27tt4MjeDPEz/pMweF1Sxc2toLB4Bt4oud3XLZetzx 0tJrCA9i8GgsjSaGT3bzM8EDf8YIh2QNiATkduJXOXqsAZBhylu20Oef3Ma0Qit9MNzs1ckhU BSnFo+mjVX48BFl3sMRUQ7l9D8KB2eb1CbZJ0sB1Q/NuOcJj+bffk7lARmbTl/OfXU/01qfu1 suXE4hHASx9t4+m7pkk9cgX3B1wGfslPC1HWhz9PKt1LOnzv+2Iw2h1TmnheoKvGNXtVj2V6/ JY8IQ5KbdEhmcTP11pw84iHsY02eZarSywd7umdkDspP0txFYvhXdVccev2Ok8OWMIuOvtMpc PT6nSRAuqLpIU61RnMwTigoLv20LyiglmxRId8/4YM8NGY8F5jufCqCF/tKxh6gjo5diiuu0W IcEDc+DLbcruS9RXlJL+JObGbKLdGgUXpeOQpHUvgEdZO6FLY6FNd9tSQqn9ImAj+n68h2xf4 TDMaqu5V9KVE92c57pYyGaLIRyWq3Cp6fxvl+bJaMf8gWv5swEhb0VMb2E+Dbo62srXscBuOJ JXuPSsICEil71sfENv3apFXQ== DO NOT MERGE According to the dt-bindings there are some platforms, which have a dedicated USB power domain for DWC2 IP core supply. If the power domain is switched off during system suspend then all USB register will lose their settings. So use the power on/off notifier in order to save & restore the USB registers during system suspend. Signed-off-by: Stefan Wahren --- Any feedback is appreciated. drivers/usb/dwc2/core.c | 16 ++++++++++++ drivers/usb/dwc2/core.h | 17 +++++++++++++ drivers/usb/dwc2/gadget.c | 49 +++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/hcd.c | 49 +++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/platform.c | 32 ++++++++++++++++++++++++ 5 files changed, 163 insertions(+) -- 2.34.1 diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 9919ab725d54..a3263cfdedac 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -391,6 +391,22 @@ int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, return dwc2_gadget_exit_hibernation(hsotg, rem_wakeup, reset); } +int dwc2_enter_poweroff(struct dwc2_hsotg *hsotg) +{ + if (dwc2_is_host_mode(hsotg)) + return dwc2_host_enter_poweroff(hsotg); + else + return dwc2_gadget_enter_poweroff(hsotg); +} + +int dwc2_exit_poweroff(struct dwc2_hsotg *hsotg) +{ + if (dwc2_is_host_mode(hsotg)) + return dwc2_host_exit_poweroff(hsotg); + else + return dwc2_gadget_exit_poweroff(hsotg); +} + /* * Do core a soft reset of the core. Be careful with this because it * resets all the internal state machines of the core. diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 2bd74f3033ed..9ab755cc3081 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -9,6 +9,7 @@ #define __DWC2_CORE_H__ #include +#include #include #include #include @@ -1080,6 +1081,8 @@ struct dwc2_hsotg { struct regulator *vbus_supply; struct regulator *usb33d; + struct notifier_block genpd_nb; + spinlock_t lock; void *priv; int irq; @@ -1316,6 +1319,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, int rem_wakeup, int dwc2_enter_hibernation(struct dwc2_hsotg *hsotg, int is_host); int dwc2_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, int reset, int is_host); +int dwc2_enter_poweroff(struct dwc2_hsotg *hsotg); +int dwc2_exit_poweroff(struct dwc2_hsotg *hsotg); void dwc2_init_fs_ls_pclk_sel(struct dwc2_hsotg *hsotg); int dwc2_phy_init(struct dwc2_hsotg *hsotg, bool select_phy); @@ -1435,6 +1440,8 @@ int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg); int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg); void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg); void dwc2_gadget_program_ref_clk(struct dwc2_hsotg *hsotg); +int dwc2_gadget_enter_poweroff(struct dwc2_hsotg *hsotg); +int dwc2_gadget_exit_poweroff(struct dwc2_hsotg *hsotg); static inline void dwc2_clear_fifo_map(struct dwc2_hsotg *hsotg) { hsotg->fifo_map = 0; } #else @@ -1482,6 +1489,10 @@ static inline int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg) { return 0; } static inline void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg) {} static inline void dwc2_gadget_program_ref_clk(struct dwc2_hsotg *hsotg) {} +static inline int dwc2_gadget_enter_poweroff(struct dwc2_hsotg *hsotg) +{ return 0; } +static inline int dwc2_gadget_exit_poweroff(struct dwc2_hsotg *hsotg) +{ return 0; } static inline void dwc2_clear_fifo_map(struct dwc2_hsotg *hsotg) {} #endif @@ -1505,6 +1516,8 @@ int dwc2_host_exit_partial_power_down(struct dwc2_hsotg *hsotg, void dwc2_host_enter_clock_gating(struct dwc2_hsotg *hsotg); void dwc2_host_exit_clock_gating(struct dwc2_hsotg *hsotg, int rem_wakeup); bool dwc2_host_can_poweroff_phy(struct dwc2_hsotg *dwc2); +int dwc2_host_enter_poweroff(struct dwc2_hsotg *hsotg); +int dwc2_host_exit_poweroff(struct dwc2_hsotg *hsotg); static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) { schedule_work(&hsotg->phy_reset_work); } #else @@ -1544,6 +1557,10 @@ static inline void dwc2_host_exit_clock_gating(struct dwc2_hsotg *hsotg, int rem_wakeup) {} static inline bool dwc2_host_can_poweroff_phy(struct dwc2_hsotg *dwc2) { return false; } +static inline int dwc2_host_enter_poweroff(struct dwc2_hsotg *hsotg) +{ return 0; } +static inline int dwc2_host_exit_poweroff(struct dwc2_hsotg *hsotg) +{ return 0; } static inline void dwc2_host_schedule_phy_reset(struct dwc2_hsotg *hsotg) {} #endif diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index e7bf9cc635be..38f0112970fe 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -5710,3 +5710,52 @@ void dwc2_gadget_exit_clock_gating(struct dwc2_hsotg *hsotg, int rem_wakeup) hsotg->lx_state = DWC2_L0; hsotg->bus_suspended = false; } + +int dwc2_gadget_enter_poweroff(struct dwc2_hsotg *hsotg) +{ + int ret; + + dev_dbg(hsotg->dev, "Entering device power off.\n"); + + /* Backup all registers */ + ret = dwc2_backup_global_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to backup global registers\n", + __func__); + return ret; + } + + ret = dwc2_backup_device_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to backup device registers\n", + __func__); + return ret; + } + + dev_dbg(hsotg->dev, "Entering device power off completed.\n"); + return 0; +} + +int dwc2_gadget_exit_poweroff(struct dwc2_hsotg *hsotg) +{ + int ret; + + dev_dbg(hsotg->dev, "Exiting device power off.\n"); + + ret = dwc2_restore_global_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to restore registers\n", + __func__); + return ret; + } + + ret = dwc2_restore_device_registers(hsotg, 0); + if (ret) { + dev_err(hsotg->dev, "%s: failed to restore device registers\n", + __func__); + return ret; + } + + dev_dbg(hsotg->dev, "Exiting device power off completed.\n"); + return 0; +} diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index cb54390e7de4..22afdafb474e 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5993,3 +5993,52 @@ void dwc2_host_exit_clock_gating(struct dwc2_hsotg *hsotg, int rem_wakeup) jiffies + msecs_to_jiffies(71)); } } + +int dwc2_host_enter_poweroff(struct dwc2_hsotg *hsotg) +{ + int ret; + + dev_dbg(hsotg->dev, "Entering host power off.\n"); + + /* Backup all registers */ + ret = dwc2_backup_global_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to backup global registers\n", + __func__); + return ret; + } + + ret = dwc2_backup_host_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to backup host registers\n", + __func__); + return ret; + } + + dev_dbg(hsotg->dev, "Entering host power off completed.\n"); + return 0; +} + +int dwc2_host_exit_poweroff(struct dwc2_hsotg *hsotg) +{ + int ret; + + dev_dbg(hsotg->dev, "Exiting host power off.\n"); + + ret = dwc2_restore_global_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to restore registers\n", + __func__); + return ret; + } + + ret = dwc2_restore_host_registers(hsotg); + if (ret) { + dev_err(hsotg->dev, "%s: failed to restore host registers\n", + __func__); + return ret; + } + + dev_dbg(hsotg->dev, "Exiting host power off completed.\n"); + return 0; +} diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 7b84416dfc2b..b97eefc18a6b 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -307,6 +308,8 @@ static void dwc2_driver_remove(struct platform_device *dev) struct dwc2_gregs_backup *gr; int ret = 0; + dev_pm_genpd_remove_notifier(&dev->dev); + gr = &hsotg->gr_backup; /* Exit Hibernation when driver is removed. */ @@ -421,6 +424,31 @@ int dwc2_check_core_version(struct dwc2_hsotg *hsotg) return 0; } +static int dwc2_power_notifier(struct notifier_block *nb, + unsigned long action, void *data) +{ + struct dwc2_hsotg *hsotg = container_of(nb, struct dwc2_hsotg, + genpd_nb); + int ret; + + switch (action) { + case GENPD_NOTIFY_ON: + ret = dwc2_exit_poweroff(hsotg); + if (ret) + dev_err(hsotg->dev, "exit poweroff failed\n"); + break; + case GENPD_NOTIFY_PRE_OFF: + ret = dwc2_enter_poweroff(hsotg); + if (ret) + dev_err(hsotg->dev, "enter poweroff failed\n"); + break; + default: + break; + } + + return NOTIFY_OK; +} + /** * dwc2_driver_probe() - Called when the DWC_otg core is bound to the DWC_otg * driver @@ -620,6 +648,10 @@ static int dwc2_driver_probe(struct platform_device *dev) } } #endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ + + hsotg->genpd_nb.notifier_call = dwc2_power_notifier; + dev_pm_genpd_add_notifier(&dev->dev, &hsotg->genpd_nb); + return 0; #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ From patchwork Sun Jul 28 13:00:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 814974 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D54D754765; Sun, 28 Jul 2024 13:07:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172051; cv=none; b=BNJeS0p7ZNpUG/YJzby1SpgkEY5IgqCjfhk9AImBs9DRRo1ZDFq2NnAzo2mK+pZ8fZ4C1isH0mDP1Otqce0JvTU46rYROIoKE+Q96yyUTQsCBCBLbYWyvje7SNuC/7tLaEbhjrEBS2+WJN8R9cts2kr0BAKXM3h4Gg/XXVJw3K4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172051; c=relaxed/simple; bh=pVXHlnRu0F/n3FhLK5MBcvB0BkcNyDZOXRztm2fZhkE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Sgl50Tyc8HqA+tdI9sr+FmkcR5J/k98UfsW55EfSQsInosOyMS4ihcZ7OMeYS6jN+xVdgvXAu/JT0ReANOfFjskrwBaDev2/yUNPYCpU+JNm8nPQt2RWwfhn66LuWZHUJ53Pez9o238rwKkSLeYOXg/telpecnGzRofOjxdX18U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=QDu0TYVG; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="QDu0TYVG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722172024; x=1722776824; i=wahrenst@gmx.net; bh=Gj8I0V69M7z41gMXYM9ztoJQUMFw0S4Baat58tz4C0E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QDu0TYVGIrPPyHtkJcQPWt73BzzQw/56JyxEUV3i8Y2b0XaWlB4ELwwR4ReERlUQ J9CiHgKyRAHg/VzyFwOnPR5HSPd09O16rDNaYHGgfS3dl79Us+RPi/+D3LdgT9Jkz 9NKtQbS2w+LST9mJ455A1rJo2k6gWRf6faRSBYkVFmAgjexMqzlaQNyvDCmMiPggI 3GByP4Qdmg/N9hw5o8D0t+QYvOD0+6qXiA5MepPuLFc/xkdoGd/k4x3LTO3kW2i1c rAwSQTPQ89zHPLPX8T7I9J1SD2A3ain0Z2e1f9PaCpRuvkt5SN2KnVDAbr2RdYjvJ 2x+7iu8Pm8yKSMrgvA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdefD-1rzH1l2kef-00m7eG; Sun, 28 Jul 2024 15:07:04 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 15/16] serial: 8250_bcm2835aux: add PM suspend/resume support Date: Sun, 28 Jul 2024 15:00:28 +0200 Message-Id: <20240728130029.78279-7-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:LKpSEPBrxgSGKl6p0VVGDEip1oTMqhxgsWGVipZOkXwOdbvhctH 6hEsO2jq8rWwq+RqQ630dUH3ZPlgcT9Uu47UQTvOeCIZKQz+iXuZx4UTP0bTmx73wwiGAfG d1SHscW4D2Rpb9HtCqCZZRlWNxjyPNpPOdQXT5zBx4FvWCmABwh1z7UX0CGyizy9SS49CiX XFcEdtxmXcwvvDrEL2yLg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:JDg6C/dfUsw=;t/v0ogfId+qldYXoGuQjDQ9jqLV RfHJ/ghd4m4Axjtezz6w/Eg2GjBGrYjzWQfJa2ENJqK28/akFew3t80Nn24Roo3hU10VETT6t Y5+XtfO9+XEaJVEnBSx+iFOJ5SBmX1KJ42j6L18719CqrqwgJdZYmORLs+P12B+uEZGSFR2Wg swaqQinhsvxQGSeuEFJuQFfkOesC0jg8nHiO4D5HVUgPrthiRwe3lHfXMO1spiagZTU20/jC0 lhgWieXMQrcuTVyWnhNUXxY21uNTxqpB5YoT7hWCZQSoknkZGlyFKYmKYfThQmkc9KXKqafAG Wn/xPh5mhKMSOUbjUNa1FAgSNfuxuUmpw5OjzbleppitCkoXt+bgVxAP2RcyK9BcZsqQJGi6H v9O2HIE0Naeu+J/v+wTO4DhJKy97QdhdYeGwkfuzXxqcIXt0FfKt/ZhUWK1rk7Pb6hTGLYSUB cjpZ9+ytf/Hw3+fKBKVIB0nU6VB1YVRH7BdCHln94DGX6ehgvnxJRRGZzZUEtyndQN7N3GaGC vKsrEQus5zi4Ha06BMgnOboN2jlZzdgfMdmZXSlEZiFdcAkS++sFR+gQK0FfjE2c7vcxpGiU2 CKdzSDG9d4PX87a/VVPbdBo35awLp0DB8u8jMTezh4vxnH1st7Tn5MIok6Cr3PZ7fgXE6ceLB W5BLEvz6LtKyW4+hd7oBZyPuPrM8YInft7dLqIwK+/vqnQiT5mVUo9ld2WhdCWPUeWa5cL36z euGQ8GoWOTBh8ihZpJEy5gA2s1bcFvJb3pQXrF4NujsQdtprvtHl4xoL9mUXtVOjSgsoiXoLT 6V54Vu+9kOZJZQkWysyuTnOw== This adds suspend/resume support for the 8250_bcm2835aux driver to provide power management support on attached devices. Signed-off-by: Stefan Wahren --- drivers/tty/serial/8250/8250_bcm2835aux.c | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) -- 2.34.1 diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c index 121a5ce86050..36e2bb34d82b 100644 --- a/drivers/tty/serial/8250/8250_bcm2835aux.c +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -213,11 +214,47 @@ static const struct acpi_device_id bcm2835aux_serial_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, bcm2835aux_serial_acpi_match); +static int bcm2835aux_suspend(struct device *dev) +{ + struct bcm2835aux_data *data = dev_get_drvdata(dev); + struct uart_8250_port *up = serial8250_get_port(data->line); + + serial8250_suspend_port(data->line); + + if (device_may_wakeup(dev)) + return 0; + + if (uart_console(&up->port) && !console_suspend_enabled) + return 0; + + clk_disable_unprepare(data->clk); + return 0; +} + +static int bcm2835aux_resume(struct device *dev) +{ + struct bcm2835aux_data *data = dev_get_drvdata(dev); + int ret; + + ret = clk_prepare_enable(data->clk); + if (ret) + return ret; + + serial8250_resume_port(data->line); + + return 0; +} + +static const struct dev_pm_ops bcm2835aux_dev_pm_ops = { + SYSTEM_SLEEP_PM_OPS(bcm2835aux_suspend, bcm2835aux_resume) +}; + static struct platform_driver bcm2835aux_serial_driver = { .driver = { .name = "bcm2835-aux-uart", .of_match_table = bcm2835aux_serial_match, .acpi_match_table = bcm2835aux_serial_acpi_match, + .pm = pm_ptr(&bcm2835aux_dev_pm_ops), }, .probe = bcm2835aux_serial_probe, .remove_new = bcm2835aux_serial_remove, From patchwork Sun Jul 28 13:00:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 815223 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 877A7482D8; Sun, 28 Jul 2024 13:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172117; cv=none; b=DaeI3v+8Y+YWdrExRBZHVhf/XKnTAIsLlD789Xg3QZsvzAAJfk4Yvzp9UI/iyFsETBjAOc+T6+JjjN56sJsx3T0kRhfFpvzC2Qi2K4oK8QethksPDf9JH6Txqx7J0FGpCjmvXAeHRdh5KdZFcuaW15qQlkIxIrsEzoHr5SNWrTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722172117; c=relaxed/simple; bh=EIb/0BVQLAIWTGsSf2exEUrI6S97uVc10LsFQOB7HdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jSyH0kelxLltXBqHvyDAZUEHRPMFPEUM0r9XR4IYy1+2VK7zPUsBmrCYARWjObeEiDs3s/YaWZXXpPD4mmJk5xA1ryFOkJKa6w0Dxyd1vFxi9CB0WNoywKIE+dkijKyDCFqKzdGiiGk1ZShTrvbZhCYT5+fCiaFZTlSeTpI2ZWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=W79Hmsjz; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="W79Hmsjz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722172087; x=1722776887; i=wahrenst@gmx.net; bh=EIb/0BVQLAIWTGsSf2exEUrI6S97uVc10LsFQOB7HdM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=W79Hmsjz7U7XYrhfikB5fA/d87YEALxts+rMUgHZC7K6YKogcwefVd73Px1ngb20 365JEvCVRYXMhtiEbvA1DyAXJVDqJ1SuUk2mfYuogPsp1OG15PMNTzqM4NP54R0Y4 rco/BWhEqtLn21wNUdabqv28AeJfmp1xOChXBhFSbNnmF0yoagC2wqa7A6Bri2ikx aKa0DI1+Ta02ohrOjk7IW6adAKbC28vJZyQp4VxyIIaQq1Rew4IlM1HqpAkCo34B0 gS5QEDtNmMJpjkNQB58BsLVzvPBdM0FkqQ996gAfmPFazRgmL3u8pZSMXclP9slo4 53BDO4YPwK/5UoFbPw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M89L1-1scCMG0Qdv-009Dte; Sun, 28 Jul 2024 15:08:07 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH V2 16/16] ARM: bcm2835_defconfig: Enable SUSPEND Date: Sun, 28 Jul 2024 15:00:29 +0200 Message-Id: <20240728130029.78279-8-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728130029.78279-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> <20240728130029.78279-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:VDKN64YJ6p518cmZoBkZcyEycWgxqBiXzFOn7tj34Md65oD5Z+v ZyIH2kWrCo7uD/4rinuinIoegUeMNFemd1ZI3kcdichjEYV+XGxQJ0Le6WmlVnI0Zb96mrp CrC/znc5FWPOwF+m8fk6KB/L52BwZlWnZJnB6nouviFVAbfZaCVgOgU439aNUNVMIuISRIf DTVt762wNfN8J8Lz42eNA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:dM3fOqR1834=;S1pLtaHrDhNPdNkUIa0I15yIguO Z4ExTh1CVbI2XAwJU0xnTJM+/EWJOqr0F1e6NMJwleA6TpewGejD2Qx0Jwf9Jo2g+5wjvPFNU Iyl6hMNb43S9FYKt651c+jNhfgCCEqf2UbXvdHos6/m2BArgd1/JGTEssBbObpItkRKxIy2BK c3VmdVQJ5ZMc7kvxVKmg0CtynjvYUwbBjVUqJ3hmellCsLI2cCJquD15HPE/JT0wMd/9x0Ixg RXoMEFKAQDguz5Sb6cprcJyOrjWmrPVM1iNrWc7uJtQOzWMoQWWsYCJoF+5YfbEUC1jIEcuum 6H9tKXnjvOpLus+N+pf1BtxuIH+xk2wH/Y4zEb/pnjMKm25yKbeM0gzDHoAQYROdsorX48/46 DjvLkEWVvMMqEyqr0O6S9OF5/lcVQX7AW4So/EesTHKdesVYYsYn3r7HbRlA8vzZqKtoBpJq6 g6Z2KYshYwHlqxkbjgDxwz4JHO1CkwUSLMw0BS5ZBHcee23BtjJwVMyFg3Fyl3+zdk2g96vHv i5Wzjfe5rghfCDDRRt2IJ7aokGA22Upah8wtrtN90ypv8wm3vgaFbtc8RiTWUUgqfdhb5uH9V xyE8xI/b/0EQzz0690FoYI9rzhoyP+raQrW8zO2HbWbu5YLenJsejcfYcaF09DXx3RUWnhexJ GwWI75YsJuuZriwPepIFkvx7a14vWdLO5sNtc+/Tq4RL4ibM7hhTCZsbyqka6tdQbHhFA3KdY oOuSqF2J01n9R1mjSbzZnD4n5TfSS5gGUs1rIfsMaZzz2a5yf5pKZS4Y4vtIZ3g3xwiCvBWes jehdysnWw8gf/IZQgtRodJ4g== Since the Raspberry Pi supports Suspend-To-Idle now, this option should be enabled. This should make power management testing easier. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- arch/arm/configs/bcm2835_defconfig | 2 -- 1 file changed, 2 deletions(-) -- 2.34.1 diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index b5f0bd8dd536..97632dee1ab3 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -38,8 +38,6 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPUFREQ_DT=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_VFP=y -# CONFIG_SUSPEND is not set -CONFIG_PM=y CONFIG_JUMP_LABEL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y