From patchwork Mon Dec 4 11:42:12 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: 17482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2701485vqy; Mon, 4 Dec 2023 03:42:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWamIZlX7whd46eOkrgyPUAJwsxFWav0sLL2G8ch1T/9Lz/jOaK2Jb9FG6nbF4xU6H8lOm X-Received: by 2002:a17:90b:4b10:b0:286:c5ae:5294 with SMTP id lx16-20020a17090b4b1000b00286c5ae5294mr338226pjb.63.1701690151054; Mon, 04 Dec 2023 03:42:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701690151; cv=none; d=google.com; s=arc-20160816; b=mDs6nepUmMKxZbO5bTSHvRlf1cEdOTDE+A2fg1kLAiQZj3t/6KmDT/1r79+daWFQAc uHXXmjcATMrdCIv1yvZjcfCFbq9AsmBuJY+hFjZKmUD6YT+M2hluiHOJCeSWEPt8w6NI JjBU1GNoytDzKmUID0EKhFAOI8krzxGrw7aE+C7bkRWSpyqnpKlvkEw0kXNWMUfuyMXk ZufTCTUb5OuDSeELso3Zy27bqllwdhzemrt8Vt4j8F6UckK8mxfY8cyuapm7yEB15Vj/ sEIzKDICFwZMu62IAel8Ut8/8YdZBhk44xxM5jdOhs0OyHlaERIkRQF5IpRwveqoET3X hcMg== 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=/+XdXxa/T9HWGJHjtcRTOHFc1MPnwOmlUVS2IY7lgD8=; fh=VZHXHo+vwBqT7vOg4dFYBUvOBDmtIVtwH9XG5mvsu+Q=; b=0X00jJmDmF0e+X5w2v7B0KZi4ALRPsWGFMgHFd/qPEe8cbnNnqKjsMHHkhWH/cuTXg o+u6yOlgwz1Cii5hxLDB2YNE7/K9KVYa7hs12YVItJ/o7lRnZOe//IhJCMmUzPGi8J+3 /6bwqvS5AFpe2yakGvlKm6zNaMY1YGHklwOPCFQlPeFwGmtRDk+3OiOtqff+cVxP31s0 byKgio8Ixc6WWzejGQwEpqndupF0yVM/4vAhS5MxBw+BQ/OVetuSbXzGSpXz803zflrb AbI8kTGnxbOT8AbxyexaAo1eyhUv5ikGrPyNTvWTaV47R9tf+w3GS03i7dGP3A3aGeOO UV7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hlLELGOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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. [23.128.96.31]) by mx.google.com with ESMTPS id l4-20020a17090a850400b002869ea4bb97si2061454pjn.93.2023.12.04.03.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 03:42:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hlLELGOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 6956D80758F5; Mon, 4 Dec 2023 03:42:26 -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 S232170AbjLDLmR (ORCPT + 99 others); Mon, 4 Dec 2023 06:42:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjLDLmQ (ORCPT ); Mon, 4 Dec 2023 06:42:16 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEBDEBB for ; Mon, 4 Dec 2023 03:42:22 -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 3C8B166022D1; Mon, 4 Dec 2023 11:42:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701690140; bh=dbT7V5enXDJ2E4Ob+hkRHh7p0dTf0R5FIQCB96fHlnU=; h=From:To:Cc:Subject:Date:From; b=hlLELGOEebvyBZU2AmACx0+OAov3VNPKaCF2qNWCYXRjLgXjrv6EOkbY4oHMKTGZI QL9QOl7uWoQmYz3txyzs8ZgGh4uJlrbticuPa/pTVrWy50IDRWYV4xKDC6zvjIUh1V T8hnH4MdNYN5sl2xv7zETskiHmKSI5JjsfAgzkijYCtI9jC+9+dQZFsvdxIPILtVsm IkE0XAhRrqbrxBQisA8vOchvjhmnpa4lLVA0RlkHVc5xBWclRIq1S3s/vjiLK8baVP I2LH4iVQqEB1j6Cmr9FDEkBwyfIbCzxjMsPJO+IVYKVt0w7jU+qslNJh/coHPsGApF XapZhwAqE1ELQ== 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 v4 0/3] drm/panfrost: Fix poweroff and sync IRQs for suspend Date: Mon, 4 Dec 2023 12:42:12 +0100 Message-ID: <20231204114215.54575-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.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]); Mon, 04 Dec 2023 03:42:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784351452165648234 X-GMAIL-MSGID: 1784351452165648234 Changes in v4: - Added checks for is_suspended bits in hardirqs - Added GPU suspended bit (and handling of it) - Reordered panfrost_drv_comp_bits entries - Commit description fixes Changes in v3: - Removed useless GPU_INT_CLEAR write in suspend path - Changed to clear suspend bits in job/mmu reset path 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 | 3 ++ drivers/gpu/drm/panfrost/panfrost_device.h | 10 ++++++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 40 ++++++++++++++++------ drivers/gpu/drm/panfrost/panfrost_gpu.h | 1 + drivers/gpu/drm/panfrost/panfrost_job.c | 26 +++++++++++--- drivers/gpu/drm/panfrost/panfrost_job.h | 1 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 32 ++++++++++++----- drivers/gpu/drm/panfrost/panfrost_mmu.h | 1 + 8 files changed, 91 insertions(+), 23 deletions(-)