From patchwork Tue Nov 28 12:45:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 17207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3888801vqx; Tue, 28 Nov 2023 04:46:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHk+K1PH756ZdmuoS9LOwmBgkhhrIO1qikb6mtoR7LDKqHvCGSvebHOirlRQdUmi/nl4X+i X-Received: by 2002:a17:902:e74f:b0:1cf:e4d2:bdf with SMTP id p15-20020a170902e74f00b001cfe4d20bdfmr3931075plf.51.1701175597058; Tue, 28 Nov 2023 04:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701175597; cv=none; d=google.com; s=arc-20160816; b=baNBeM/HUaAgQKLkFUTkUuhfhh+jHDQM/hDjQb3juOhV7u8oqP/9HSRj7JDkBadEkP pkYwJMWjKCJLoJ98+xSzMpwVNo8hk8kJezLBVQlgSAgbeIQGQuxCLwhSCTyWu8BxE+d/ 1vb0OJBtIyABjj3EoDwgpWNoJi1XGYmCRxIKuRQp5yIFZHU4031Pgnrb2fQ+LhT4NqcH mJP1QxCp4Iv9yppkw+fEilRX/UHlxV9GxcHsymZAKhdm1R2hNOyvCkQAFcWJ94cpuRxV W0crTJyL8e//8PDWqmWEuUrfxtaKt0tDlLg6FlqjaoV8O4g7Ce2zahikUW3mdMlW+yko zg/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Mq48xk9BxqusZhk4hmoI5N6ceR7KTcFebIbbPMKj+vw=; fh=VZHXHo+vwBqT7vOg4dFYBUvOBDmtIVtwH9XG5mvsu+Q=; b=Wp6xPK9yfzht7wREP3KL/I3Yt4McmoC6Gx19Q0JKdNYu3fP5lU8ECkjnWv0qOVoJUu CVyKq5ZZWpbmomzOFC2PMx31U0sg2kkSO4BzfnFafEGPoDxg7n8/a2PHeUBc+/l43geU 1sQt1jZwh0n4VBq/H5YM6NULcdIYHLqCU0W46bZm7OJLKWNZtlnljgL1cFeVYuZnf3Vf smgLq0dKqtfQFdPz3asmT5k9rOFeWdHqWoeVFh4nWJi31N4XLlmkYkcdgEUf3Sd1OucO 4eKfVKEW2RgPD089Abm1gAn6LkX28zTVECCTUMx24TzN9uZgO659tUBPwvxcMl9ywCPG OwgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dicwJevD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id io15-20020a17090312cf00b001b9f55d28a2si1181744plb.205.2023.11.28.04.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 04:46:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dicwJevD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 39BFA807C85B; Tue, 28 Nov 2023 04:45:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344414AbjK1MpM (ORCPT + 99 others); Tue, 28 Nov 2023 07:45:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234708AbjK1MpL (ORCPT ); Tue, 28 Nov 2023 07:45:11 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10602D4C for ; Tue, 28 Nov 2023 04:45:17 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6460766020EE; Tue, 28 Nov 2023 12:45:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701175516; bh=Q1fClNxiy5uCbKocfPk587p66TLkQdgMv+lgueLRZgc=; h=From:To:Cc:Subject:Date:From; b=dicwJevDrgKOkdWNhibo40/NRp7chzmaLrhuk0GWI7Twtdk/HUktcvcbRPmqS6rDR yd7nEZsZupNiNwF7lkpPfnbxC45lnlxcRCtbF11knluuY7G5+Exq4LBVduuIFI5Tmf t8F+ccRtOOohPOMF3nob8jOQpcMTzVQR6DIT9x/PS9RjAZ5pV9xBmmauMjf0ADp5DJ KBSRBqmV5QUubdkDmCB5X2r/sOIMpiCvTKXAnCf5OPKcDhyXgFXZsxMmotU4s0ga6K c2+4TFQNX+bb4f1ELDTEOlbQARZWGnLo71tYEgwb9fVVXYIZOpBmxuu7mJvfyVpu4J X4Ti8TKlB2h2Q== From: AngeloGioacchino Del Regno To: boris.brezillon@collabora.com Cc: robh@kernel.org, steven.price@arm.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, m.szyprowski@samsung.com, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 0/3] drm/panfrost: Fix poweroff and sync IRQs for suspend Date: Tue, 28 Nov 2023 13:45:07 +0100 Message-ID: <20231128124510.391007-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 04:45:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783811902546149555 X-GMAIL-MSGID: 1783811902546149555 This series contains a fast fix for the basic GPU poweroff functionality and goes further by implementing interrupt masking and synchronization before suspend. For more information, please look at the conversation at [1], which explains the regression seen with the poweroff commit and the initial approaches taken to solve that. Cheers! [1]: https://lore.kernel.org/all/20231123095320.41433-1-angelogioacchino.delregno@collabora.com/ AngeloGioacchino Del Regno (3): drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device drm/panfrost: Synchronize and disable interrupts before powering off drivers/gpu/drm/panfrost/panfrost_device.c | 4 +++ drivers/gpu/drm/panfrost/panfrost_device.h | 9 +++++++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 29 +++++++++++++++------- drivers/gpu/drm/panfrost/panfrost_gpu.h | 1 + drivers/gpu/drm/panfrost/panfrost_job.c | 18 +++++++++++--- drivers/gpu/drm/panfrost/panfrost_job.h | 1 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 27 ++++++++++++++------ drivers/gpu/drm/panfrost/panfrost_mmu.h | 1 + 8 files changed, 70 insertions(+), 20 deletions(-) Tested-by: Marek Szyprowski