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: 13743891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F4C6C3DA49 for ; Sun, 28 Jul 2024 11:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5K5kBAdZCWeAsANsjCXXlgQc+q/qI1OkuEhMl0S3/Ys=; b=mbB3eoAekBv+cmmUtP6SeJ37bi JS2M/3RGy1vQn4L+/Mg6MVOsnUs0KHpOfJHciplQLLtu3fb3cbhQoixmWNzwkMpLrZzD39SmWhnyG uBSEBm/wBIOxoMajdTEAQgoe0A/23rqAkLhCQqhDa8CiRTuWk+RtVVuKpQHofTN9AHCzvr83+ktVC NEN4KLC5gWv5HAOuy/pjhVE/rVjvvPEwD/qDddSBfVFbkHLPmQQu5EPIHjervDrQnY+27fGOv3ZdT kEML8rsY42RQn+Xx0BbdvZRgB/zsR04h1OsnvV8QpdD00/NMhAHzeDxTEwQlZCt+plDFVBF9Y9nG9 bxWBYHqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Jk-00000008Njv-3CJ2; Sun, 28 Jul 2024 11:44:00 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2JL-00000008NfO-0s3n for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:43:37 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:FVA7jnUYemg65bMAN/KzrSjeUZ7AIaT5urGSfhIox8kocVwgT2/ hh458humeGIY15HoUPJuOHuKer7xspVDz2r2LAKAfyEv1BoOW46hwaLFIFQwNw/07F6+xOw mBz189fmXQ5hGReyTveqQq8SOtVAh4zvRizne3aSe+wq61N+bv+Em3NA/vrzpYsGA1JOoIU 9t/V7UjaYw88aDrvu1YxQ== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044335_539535_3426516A X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD1E2C3DA49 for ; Sun, 28 Jul 2024 11:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IbGjewfMVvYXbrFbwzubZ45vd9Gh3tFpLWbhBJeYuoI=; b=liwIdwCjdPeiv1Jw5CewKc/hCP Rx30SUCTXQc9sl+EgLZaRxkO/eLTyE4SiSEiJLFnaioq5WrmLdvGD7BsYizpwvDiGX0R57HpkjJDN qI7KbgNGYVn0vt2CHTCs21qZVAkV3bhjFvPesZG+/hmd6wAZaquKMlXknOTwgeD0J8MC20vkN976z QE4sXcismz0B8jquCv92EOaH0jIHucykPUJCP2ZumOlZCoe1safhFm2H+RiCt5ja1DxgD95QyyjVO xetcPA2Jk0VK+kW4UcWQp3qUqij/13aXrnFAbOEXO5uceTnfDyc3am6C7Snkv9sXlI/Qh1RUdbY80 1LetwFZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Kg-00000008NuS-077e; Sun, 28 Jul 2024 11:44:58 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2KF-00000008Noh-0P49 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:44:33 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:8gHlvy2cq7q0FmBdgqfBmCudv2v+AkQkTrbr6+v+4cawgLMRiP7 I6WYfRp6lfU706qmZLWTww4siOukAG7n+jA1FU86+qu98d+U9UMGhdlkyDy7QS5icxFNBoQ NOzJmBmCDlN8gyXryRU/xNOovaw4p4zCkJorOxMb2ZmVx52i6MHgBiBiZH9NahfdXKsFV0r 17NLGKp4+sax2g19ulL0g== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044431_467658_A90DFD71 X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00016C3DA49 for ; Sun, 28 Jul 2024 11:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4q82fafFyhWuE8D9fKAnSbhAEbmOAflZeVN6dmlZRD0=; b=yWBeB3j+OgvNwtymMQ5X9Ys4Qg WW59CcTQLg9vEVzoAs2LHcu9Q0b7TGLDKA/MP1ONzpHQYzZBUdRZr2OJYe/W8gV5hvR5VNiATB3Me eb+ApDfV3Iz/9MJCYcX9yFSl8qh/KNHMkpEMy4igCoFxe2cdIt7srhF8BOLHo8vyEpvKV7jMiuV4j lrkly0j8A3umFUfb87oEXzwzaI06kCxYhWCG4IMxKzX5z2wNM5UkdYhzJ28HVXSQwU6Aka3ndMKyn V+BMibvs9VC7OTg1CmNydJmB7ICpG+DXiNvszry1Y9HOixhVvzMz9be3fx4VLUeal1AMO4RY3lzmX mILzN5kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Ll-00000008O5U-3ium; Sun, 28 Jul 2024 11:46:05 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2LK-00000008NzA-1sTh for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:45:40 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:ww2ImHiANw1KUG0kC6NCMNYw2JJ6/w2TlLV8iCX0cp1WhqnY1gf Lrt7Rel1WCNivDng91th4RxlDGK+MD84bbpqap26he9//LsKj8FW02IehVq7aIM7RY1iuQd 5HxfVCxyLYAZflwkRNBYrC7kl0sMXN6RZClcV2ykSweCLdnMcrZtHDg1BiC88GRPcaQxwv4 iKPV35Fj2K4jIbxgLcw4g== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044538_803775_1B8468E1 X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743894 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E08A0C3DA64 for ; Sun, 28 Jul 2024 11:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MUjx857aVJb3m/BIq/jv+muXKfBK4aj/UlImOJhlQl0=; b=n8wrWb+D46QtP64FcxdCQALblV AjkNIAVyxzUiL+kUn1sXRVe9OjJ3n51Iim3DwgBW60h4lS+gX2jfcXH/hCypDOSI8k0FiiiCUOtz8 sJgVAJ4aZMJ7lfjfqzjvqevPvQSI4RyC3VST4BwqmUVR/qV/c4yKJYmGKVWSkZXqDPvwEYyLw4f/m Ox68qb+7mdwy0yjSNO4IAybP81oRf98/7rOmwWKLw0t4n+YyEMrEUa0RkdpspxK0+sn3LytsU6rE4 EgrQJ9/TcWu9ZxEMDg9v291RbFmnalA6gThuAkcr+Xozf1Ywnh8M738Q4MdQVUVpEdRkwNArGQ8M+ t7EtFW7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Mh-00000008OH9-42OQ; Sun, 28 Jul 2024 11:47:04 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2MH-00000008OB8-2LXO for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:46:39 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:4Eq85eFpyWQtoeOdYaR/mTT65Ogz1QD7be1K3QBHel9skaxonHe OTAXpGmln6oRRCUb9/Rjlq7p4feQmQFbl/SAJNdc6K3tBfH/XwL5ySYhaCKHVJ8AMka+AEC naQazZaWITnN7A+4GI63w6/SbHKS+wDSJIyDfA+yD6aBDfPaPGJzhTyiTMuWA4FtsIBZsI4 wk5HudZs94o39xgwnJGjA== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044637_890670_B3986EF6 X-CRM114-Status: GOOD ( 13.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 535FDC3DA49 for ; Sun, 28 Jul 2024 11:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VnHoX9D2vL8DbaLHX2BeVUbFhgz21D+r3BRC2GixxA0=; b=EgiEOcGJrEODE1q5LJ/qfWkA7z d5ZzRXgUYCsPiIN1w/O5QRQi/M+1WkjRxOkQ+7/35qtUsQoLACUAk114Kjq/qVERRhkzS9thLNQ+h jz0UdiyumOZGh2fTrLoVsTJhrsfgTFJqtXn7hnym6zsHlC+keFifGuXxvTC4KAX6mWC0tiVG6BlCi tP2l9T9Cx8MNOFETaqZbTEPfUiyvDJYvnkIdYaaHTmLOFrchWEAzgT2ZPeuk6BPcB8IQa0MmJgWt2 Ds93qdmTmdOnv9JvGA2yikHS3T6jloYFtd8646AcWvMjTy8p+GWZyjXLP5dj54Pr9msJfZ+aBq+/o P3LbY6OQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Nk-00000008ORJ-0Wwk; Sun, 28 Jul 2024 11:48:08 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2NK-00000008ONb-38o8 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:47:44 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:uxKiXd6jwZWgXWEH6uC64rVTfCngHxgdOvyVH/WF2293Y1bqd/J g0oFNZ2i9C3d7IgzUd1/GQbUeBVl+bFscd2h8xXnAqiFtovevQWuF2o1xsy95bDQUAjzYfc NqPM0YMADF+60LN54UAeqLlk8l/3vhRAnjJ/Cvn0c5pK/ZRpowh9lsb0g9Rh6F70Kvj8L5/ O5SZE8lUiQfDIVymrwAFg== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044743_099403_1E5251F7 X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93A3BC3DA49 for ; Sun, 28 Jul 2024 11:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+RSO60HpkoAR0KgK8nLHKjh1dUUkKYc0+NfSi30ZRwM=; b=NgNo8v8wE9IWw1/uawDdgUSm0B IB0+W4L58VdEGRoQ+vRztGfyfOEBZgAFTq7GlRW4gyE78b8p04pqnMD7NSOVyi2IDZp3n/Econe6U 9J5ocN8lnu2W9JrQdOGdcOrtX8jaCNtTW1qZMD/tCYr01fSup/juRg7QNq9rCl8JMC4aWB67Nk6VD Q3hLf3zmo1z8hhEThMb9cPs2oDO3G/6Ng/1GUiqt5cmwKf+SPBmvAXZ6tdBv+krJMLwNHiYYNmYp9 vLFMXpc2uEf3Er9IFGIipOwxKEpruEjAeB8As9UD8iE05nU0gROMl16DBZCrErxqFV5j/DVc2h4Nx UhesFTJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Ot-00000008OaA-3ocS; Sun, 28 Jul 2024 11:49:19 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2OT-00000008OXB-2pBW for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:48:55 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:L7OrAzJpv8XxwcKtjfsgVpdvZhEK3mZJ0zOlR3NCxGwCNbbV5LC 8cqO/xoX4g564Y7hTk0eAm3PoETG0D8w2dBEDeMSYKCeSCR4sini4theANuPxmpissjbvgY jszIeE9YldH+vBI4cyfjzh3g8NavBM+EZf1cTEcZUKng2IT+dSN04cUnsyTbc2fRUJOO2UF iYy/6Tvbb9HwH9/EQQlhw== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044854_027284_631472EE X-CRM114-Status: GOOD ( 14.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E144C3DA64 for ; Sun, 28 Jul 2024 11:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OETJHmfg+IWvFND21ujMzZHxRiMCnLCfIId2t3sSrIg=; b=AkqgpNKD9hpdhoM/zZaGbk6F76 +JktQKsnGsdUXrksw4nbqwDzS/VfSJFgOuOHtWeqVwQGkxjN6v9W+aZ1KVEtBrcNpD7UjgeUnELXD SBHu/sa0I1qbQVQrAB0dJOG87gWfEQOWQaxEPJRBw3v3K+95Ffb5569o2xNKEl6njXbDH9uUb/xXS yB/WgoIPq34ruWExBLlUGngGvTILon0fXxTNWfAHT8GBTvZPaMWlSe8NO4t4szZYS6xtiYbg5exgZ vZa+XLgKM6+x+RRb2b7L5x9Ef31sxBeOr8gsK6TbD6wSyKTVab9gxMdb9Z6/R47ao+lAICXslPCze gNMQRfXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Pl-00000008Ohg-0hbx; Sun, 28 Jul 2024 11:50:13 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2PK-00000008OeO-3tTU for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:49:49 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:vlufmZmc7VbhfuNGl348AU8Y5F8QKWnubU+/zgbZggrclMUpJJc lOLT9OuPFYx3fn9O6TUrW99FN8igt25huLm5BtuQLdd1eLjw58eo2rl6tdQft+gqGIyq9yk MtLfTHLb2kMZD/9SPCGcLQ5BtnaNoLA8PEPLustqrU3gokx4W9GIHRdXUvCEZf3Wc80IXY8 6cIodOdFU2E9UbWthKp6w== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044947_346336_9664DD2D X-CRM114-Status: GOOD ( 18.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743910 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D577C3DA64 for ; Sun, 28 Jul 2024 11:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mAP5K6rjjZ9h+Kyxjb/TLxq8qO4pvkW+IrtXzsPAOy0=; b=ArBZUhj8kEGmHqlh/ExPEK1Tuq j3vtfk/o3TtBH1jUCVodPSM8/rHUDY4lLHlIKnpCV5zNn1G0olXYAS1zzosKNWAL87WUZrTT5QlMR 1xEnzn9FREaCgVATDI8Pk6T63/2b+KD04ZNjYCvoeHrp5kMnoEiAhwLpg4hjm4f+WhPn3N90VW+nl DtFiGtzkzbaGBw0rzZGTLi4YuYoFoOIrafUzTB6yH3sSwkZgyflTyxk6UW22pv69QnBQ5fA4hGKoL CzvqZ2jaFnSmR6O4IvrCojGAC1aFLHWp2BmwC7R5FPMASR9c5pVNyd/rIFTRoXbue56QpWWhjW+vY GhilBW/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Qk-00000008Oq7-24iU; Sun, 28 Jul 2024 11:51:14 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2QK-00000008Omy-24K9 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:50:50 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:6d0dGDGm+dLjlwAyJtKK5CyUIflHh+zg4bpcrw5lentD0RqV+R1 BBYSPoh7fGH4pcoJ7loQRU3lQ9Fj9HRVJRjj92jVXX4mBACK3HAr6Y8CWN+g48h5EsSUVRR 3ngzvujax5a1GJEEcrVre8N3PmMKCp4W+Xeu8LH6NhOPMP3wO5ZRyb/O1s5TUC/pbJbgpYo Xi8a2Y2V4HYfkNGVXID6Q== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_045048_830963_D5B9AD00 X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1ED4C3DA49 for ; Sun, 28 Jul 2024 13:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vd35QWujqoCcgjswql0d6hqDvtzrzubBkMD+QAru0Qg=; b=zAzlJV4L84GjU5PZIVqeghF+Qz 6Cly21LOyqp6tSTHzZcaE52xZ98Pmmhq9Fo1PK+KEb7kPt4pe+5K+J0aV4sOmu3++Fgh4ZxVN/7QK NKDu9ZkjzY9xk0wyDSzG6Ln06Fn2JW/utNXL/zY+IBtSbIlquP/nxVk8ZQMUBUOLs8ZURST28GS/b sruEmS7bJGu/cMbVtGXmmSzLahaVIsuX+yA73LTGjUFa8hIBbQXHtsvOH/w5gv2Fo1/FJPvleT5GP 8cQuHzw3+vOua8GB3yLCkulKbYoll9xdXFVNlf/NBofWidVcMY9NiPhErVFKWm1Syxp6xx3vLiw/G bhdvTEgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3Ww-00000008UNY-1U7Z; Sun, 28 Jul 2024 13:01:42 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3WW-00000008ULN-0Cdd for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:01:17 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:pBQ7NbVoNBvF4yIvkxD/tynf0vR3oAGG6Sf+gA8vYtZQi08lBDC 0zBDHPYYYpVokSsMiUDz1Ksp6GoGWJdQU3kmcobhVvR0YP3w1oFOOfSWCbtOrZybaJiSaHj tm/fqlFx2pn3945+FbIho/zZR0rmu9emmLdLoMtR3+3pG2sUXpLmI/oubUyxh3Cd5PbfFT3 nk++MfRVoNdOSJ943i1Ig== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060116_381449_ACEC108F X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743934 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87F8AC3DA49 for ; Sun, 28 Jul 2024 13:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ar/kp7yD2mJLJuSys73kvAqBB9MnTy6xyWNEEdcVnRA=; b=J9kJzY4fA79OK9IM4+4oBj9QSD d0pMCFzNzHhlvc4b9yzAzvuGlFxuidYxOishlQvOsi1j6+uABv+7Fp08/59RqUB0vSY3bJgoSdmC0 52hlYpN0i6C34jdnPxLYzhUGtDvNTXiV5CE8ijKhxfy1dPdGRgd6FISiNns2pM7FDSIe7grcHliPb tTslr3FGiw2p/uWBkfRC1INnx4Pb/8FoaGY8pn2WPXzqR2kfWnTd0dexM85lO5eErZ+XR3w2k7SEC hqa3h4gMKDEsnwHV/SPci+9/fqEvW/yjxeKXS94hH2307gVqYO6ZtAVdkNhEw8+vcVr1OhVqRA+Yk PerC8oLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3Xo-00000008UTY-1RSo; Sun, 28 Jul 2024 13:02:36 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3XO-00000008URC-42Q1 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:02:12 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:7IJwLoTzlwttqekflfpKp30OMNgCC3j4tWm9XhRYDocXhUqvFz4 fVyOSsioY5Adrs1r12juiZMUFnUcFVKLW4xosI+l3QsE+KzidpSCATgSFsIfLWyrpuFH40F G5YzwSO6aXeiPPEcUqY0QcOibtdV8YZr8uHCLPId3UC5evWHHpkdKMbX4KMUqcBiEJ5f2lF Hf+ImoiVPnqpTtSkP08AA== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060211_317525_A17571A9 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FCA4C3DA64 for ; Sun, 28 Jul 2024 13:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cmHYnLGXn5Yd/1OpHJBxm40cex9jafN03MDZJmc7bGI=; b=GkbhSOuAV/Ivb9m/bym+xqDShm 50P2lvS6ADDzQc6ZiZ4qGQIXPiToizJC6yM2GHjCYeZP2+/5rKgM03xV5etwodVpJWk9XXd4nP10C 212bUWVjKRUU7wW+Pi8YHdpmkbmZBK/tKZJNv4CT2cVILgaeMQxJG5cwcSyVexT5Qr1gdWDi5LOf2 xfQ/BbfSD4rYsmIuwN6ihGaxfyhqS7OhCQY0FJwWj7EePTTsV4PBWehecwVSPOU+ks362KWOWlOPd M2tWP0Rq2hkoFJwSxznGa1sI7kxRWhbFviWJj5kMXzZcc7JLcBWTdGz5LJBAL8Afxtz5CcwafTTua YBzeaC4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3Z6-00000008Uce-0C81; Sun, 28 Jul 2024 13:03:56 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3Yf-00000008UZk-0wC9 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:03:31 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:lSg1FCepvSIHTnFDP4f/Qf43QyaiFYaGcCE3gb4WJE++lpO3ow8 mKRRPjAqJDuOezzMVEwD0IylhiXtT3JwqwD3GCqwyQ+nd6+rM8Or/2ieStUiEP7R/8mgZlv Yr49GNbtlAbIDwyjS5hsNh/zkgvcCe4t4yqp2Dt7VtgVRdVb5oWGsfy0qW7d2FB2ydw6J5v jBe24lvlOT18SLMBaQqUQ== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060329_572360_BCF2AE90 X-CRM114-Status: GOOD ( 10.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2D83C3DA64 for ; Sun, 28 Jul 2024 13:04:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QW57IYRI4P68nR61yVnC7GlYDX8vXW5afRYotl24vJI=; b=4NEFjAfq0gnle/HnZxeacMnJFE cyUA5U7uu9tMZPd8vTWTTzB1wKuG6a9YX6+T528hBVCftz3oR3XYaoyk6GOceWqvlfxpzy6sea8nD scEQcSdNcuTvh7MD8V5FmIJQG+23c7ak8QQX1+wBQ36p+7Cs3IHgwPxLvr2srCmcOxYQZuSgNEJci CGL2kc+3++hu0eUQjHSFML+TwCba2wL7KqksxTquMXRTcEhEtWrYtao9vCXnK8fbeSL3xyO+NYbEJ TJVidFBjpVcihGuZveoFXRJ/Clm4GCW0eEebQ6Q3vSnv448mNUufNJq9pRyXq//b38jDSb0WRKItn pJS+c7/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3Zp-00000008Uj5-4Af9; Sun, 28 Jul 2024 13:04:42 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3ZP-00000008Ufc-3A98 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:04:17 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:I4iTnkxVmX6uCQRToKN4nNo2sp1GwSRVzLmPfzX9E41Z5v2gKe3 09kkOASd7hPTla9HDIsXgsQct1ZccQtC6iSYyfd7lNnrcM5NZz47+0An+wFa3hqj29GcmAq JCuL8i5F5dtNHYbU2gPSqqEVFc1gqiA4vywMCyJ7bRvRQ4ee1RoNnEfu5jS62AP0+nVZRQY jQPkg18RFRY3QpLZuqlIw== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060416_085535_EDC91BB7 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C93AC3DA49 for ; Sun, 28 Jul 2024 13:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CgyBVhShFPQHZA3QGcWv2/P5EoEiVb+TjGrpEimPkw0=; b=RESGXhQjPtcN3BpITTg6dVAs8n kqN6iADCyY9tB8paBVZRpkmHk6TngOUmgAqqJv7Qdp9LuZ44AY2uJ8JnkT6TDPSIkl+PyrBRp480o /k5RJX0XEdkASeuzv17cGoinueVztf/2Bj106kNRTrUct+v3C3+YzOyE9je0X1tiS750ba9NVJeuL S3olPGE7DqfrjgTBITIxpFj+jmdj6CBurn6sFbSyMHX/pnahnp2qqCn5eIWUrsdZ2AIoQ6AcHWaM7 RCYhPdUEh1CBE2OoXqTrfdDKDxrfdZn4KDi9DPQoOmBWE5IYYGXMmzKyqXnYqq4PnA62vr1sOjdbj RXjvhYHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3an-00000008UrI-0ebV; Sun, 28 Jul 2024 13:05:41 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3aN-00000008Unv-1nme for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:05:17 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:s8dsyj9qqRYRsL8bQxmQ5roOnkmyC1BaDiF5Im83qgwzAe1fvr6 YXnXSZOZhFMguv09RAYYhDM4htVwDa5FeYuT+H/zRLHpvpAy3embHN092azTN9XIXKqI6LQ EqeF4jqQqz0Xe9a4i3mCDUz+PSAKUgHCcZwsaiIzby2QVe8AwODU1/uwi5Y8+rBTJyoqgFR 2p/gSxu8/5aOBWD7jcRDQ== 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060515_784251_B93344FB X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D117C3DA64 for ; Sun, 28 Jul 2024 13:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=M7r0zgzsdRZMdo8RqGtVt52OP9WEg6pN/Bx4IF1TmGM=; b=B0L7ySbWxz0gThNOG1/N2Li/tY Qj39tzLAK+r64GAZlnSloC67y6WqQM2BqtHZ2vVAC8u8vQ4ucYnY92iCWtDWF+raLQXXN2k0OJXDL 2Wafm8C4skQufXgxe7kwKSurOpLhZ9/f5eMlXHIfdWa/CtMs9qlPVwGv3xxxnAUFodvReP07yZWRk 9Uv32iXFhkrY+VbLt1jkuAPnONhgc0cK5APqOwAbT6hXmSpAVrP04jvA8yIx/9PJ7Oj0jYnQfmoJp gcHoDP+sPAsQnoc2rkHGacqAR/0OvGhyuYJpm4gz96nOokRS42Hert7JKMsDuUJgRs17qjHo17r27 slbuFZqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3bv-00000008V1l-2ZIE; Sun, 28 Jul 2024 13:06:51 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3bV-00000008Uxs-3gXY for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:06:27 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:/o5ph+IO8NWUQ7I1tOJI+ylH+u9cckK4F1uFGzHRwxaErB7jYQj v0WmAZKTvicrUjhuvD9D1YTiywi3lWh/MKt9Jj2ukj4oxsqbwKAdhLfUq2zV8TPAgDYQJL0 GPEfbjMbu/Jr8oTZoribnDUU8l8mxBgd9RnwhCrzNB7rjKXQfx6LUvzfmdqLSf96eSHUyJO wNFk8F2pMPA1z506FLssw== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060626_218685_50A0B528 X-CRM114-Status: GOOD ( 18.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C95DCC3DA49 for ; Sun, 28 Jul 2024 13:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Gj8I0V69M7z41gMXYM9ztoJQUMFw0S4Baat58tz4C0E=; b=hBfEH3LDKjwN5zIZ+9eOMqHTxB kGtpDxmJxp1Ybo+BkIqMK38Rlbc6DeamYWkYBqSEW0B7hLwZGOvv/rizNb14ZpOZIANdBmF3T++A6 7CICV4TBFco8DvywHinZddbKB2jNue9OLS0AW8OaUaiFwz/rqsdD09WU2DX7zRB2rJtTh6Y6Yv8lC E6o97VvcfI9v6A2cuG9dqcq3rL5JF0mK4ZgSVLwnVd41tqQd4ub9winI+5ddPTcZCcVMi5JgCigNv JXgWBz8HFgXzSxE/7fL3ByERL9SkpZrAnCIAI2NQDWfK9GuBu7EyRahFO/0P62nVR1EeBwnVy6YB0 7y2Y9IEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3d2-00000008VGb-3xza; Sun, 28 Jul 2024 13:08:00 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3cQ-00000008V5O-3J2X for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:07:24 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:LKpSEPBrxgSGKl6p0VVGDEip1oTMqhxgsWGVipZOkXwOdbvhctH 6hEsO2jq8rWwq+RqQ630dUH3ZPlgcT9Uu47UQTvOeCIZKQz+iXuZx4UTP0bTmx73wwiGAfG d1SHscW4D2Rpb9HtCqCZZRlWNxjyPNpPOdQXT5zBx4FvWCmABwh1z7UX0CGyizy9SS49CiX XFcEdtxmXcwvvDrEL2yLg== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060723_127663_A3183EEB X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13743960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78C15C3DA49 for ; Sun, 28 Jul 2024 13:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EIb/0BVQLAIWTGsSf2exEUrI6S97uVc10LsFQOB7HdM=; b=EmJB1Q4ODzoNA/hXq3S9YyMuxr V+kkNilkjCXBvvlSI/ooGar06bnTID1Xy794BeYKCx4C8dd9lk/RXKlp3kTQ8YDqNs5Odu3afyLo+ Boa/fuTNID+wCqPClhOHvfrBZ/uUSFs2qoOBl8Z59l+Eo2VgRnkro1emxB44z0DFSqix1QrRa3CxR vkl2EbDrS1aOHBBrk3+Mpbmz1HsissZ5d4u87uaatJJa/yvKkoNzJoPVmLs1a1U4V4r3aMu+D0dKv QMqoEgl9Vb0G6pCklZSw9XA3Tn9HD/kK8g8zx/9DRUmGDOMdNizlKegwAkTPIYje3XIxXGsuglj/K GRTIjrbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3du-00000008VSj-1Q0Q; Sun, 28 Jul 2024 13:08:54 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY3dU-00000008VNX-1YYB for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 13:08:29 +0000 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> MIME-Version: 1.0 X-Provags-ID: V03:K1:VDKN64YJ6p518cmZoBkZcyEycWgxqBiXzFOn7tj34Md65oD5Z+v ZyIH2kWrCo7uD/4rinuinIoegUeMNFemd1ZI3kcdichjEYV+XGxQJ0Le6WmlVnI0Zb96mrp CrC/znc5FWPOwF+m8fk6KB/L52BwZlWnZJnB6nouviFVAbfZaCVgOgU439aNUNVMIuISRIf DTVt762wNfN8J8Lz42eNA== 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_060828_705477_D935547A X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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