From patchwork Fri Dec 1 10:40:24 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: 17398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1023678vqy; Fri, 1 Dec 2023 02:40:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCB+vqGpOmBmKBXDFbtnlpSy8Wn86M4rbiTZnOtmEOuju6I4ORcDGAOVAnH8QVNE8e/1qe X-Received: by 2002:a05:6359:5182:b0:16e:53b9:8901 with SMTP id od2-20020a056359518200b0016e53b98901mr17494602rwb.22.1701427243959; Fri, 01 Dec 2023 02:40:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701427243; cv=none; d=google.com; s=arc-20160816; b=XmAQ9nVkUbPkQ3ZF3dxQndxl2Lx+quE7lkLmWTyiaAmmbpmoAToB2RsqCXG+1aJmBM 3afguAd1QOaw0v6I+itdiuoqGK2TfQf7ozxIzIOABvFM7sGHqifngi/MRFaKIbLjPk3h fsvKgw6WbdHLoFdIzh53nWCHPFbWMZGzrbt5l3k1hG6jcz8QbNP5Pix5a3/WnF3L7lOW sLka5lfBZjPSzfTXrFsoHJSSnjQADsPW/7f0W8xiJoTy5w0xMyp7s/4gaVEk5YcwZnIA R2OEzKCkk3cdmPq0Z0OCL2RuX7N2ahT9X10GPsSnD6Fqg8iDl/kaRPGWXWVh/efQ8PVe /fkg== 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=9dTt5kcKVe+70fJ8iu8YhHYHQCAo23QlbMWp1vNaoAo=; fh=VZHXHo+vwBqT7vOg4dFYBUvOBDmtIVtwH9XG5mvsu+Q=; b=Tmrr/FGO4oj0T6UWdYtlIgZhlyT7tBt1i6Y7M/4qajWOCEKndFhrBfu9DQXBij6xHy 2ZMcfX8XFeVdyPNNHOro8y15eEV/j1QGuuP92UE57Gs8qTceFV82fMwXPUXPVvTXJOC4 /27xBI9rt1qQ6SFAwrDa8uVXT9aPUJ5JKT9e5xj8SC54Ep5/K20J0CxMAN5VsBVI63qq DGqJAdS36xAU9NffKFc3UD/8H4Rks769xbdUwpK6NYtdwPiJfMy7MxEEQ7ipc3jNa+Aw 2+G24/NIXLeC9B7dtNomzPgZJGP0my1EpXkH8p+Mn+C36np7jb+wjw1efFmDyxGotono N32Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fqg8YB6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id cf5-20020a056a02084500b0057d08dac75csi3070939pgb.517.2023.12.01.02.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 02:40:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fqg8YB6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 2D56E80DE99E; Fri, 1 Dec 2023 02:40:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378324AbjLAKk3 (ORCPT + 99 others); Fri, 1 Dec 2023 05:40:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378295AbjLAKk2 (ORCPT ); Fri, 1 Dec 2023 05:40:28 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C90BA10D for ; Fri, 1 Dec 2023 02:40:34 -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 6D4B5660739C; Fri, 1 Dec 2023 10:40:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701427233; bh=0ug+U8+oATYsYs/JNbMT9HWVGshpUjmLXOajcBgeZ74=; h=From:To:Cc:Subject:Date:From; b=fqg8YB6RGLAsGa67XEUsNhDp8AHj54O5bU0RVByN0367O1tABKjV9kZy1ejTTwgV8 9kMQO7/BNfnkoWB9tT9sy+5aejcGWn8vT0OpFrZbDwhAPxA1tC8Jaxdx6ybkHIYslo REwtYtxhRRe3r6xjMuGH82Ofe4zSf+3SxjMnxaea93o4ROSiZKFhi38y/n3oLpCB8/ icYHMkQ16LYYje6YYoRhmZqvGJhqlRFxcLBe6malYYF1sW0WwCfobZ+F6x9bBsH7u7 KNkq3CdqRAFbHpFBNE7NbQxZOWc4UcN4UmNTkpfMx5IF1eyF9C8Vdtie+zIJAEluwD pGOzObXQyMsQw== 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 v3 0/3] drm/panfrost: Fix poweroff and sync IRQs for suspend Date: Fri, 1 Dec 2023 11:40:24 +0100 Message-ID: <20231201104027.35273-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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 02:40:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784075773401574214 X-GMAIL-MSGID: 1784075773401574214 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 | 9 +++++++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 28 ++++++++++++++------- drivers/gpu/drm/panfrost/panfrost_gpu.h | 1 + drivers/gpu/drm/panfrost/panfrost_job.c | 20 ++++++++++++--- drivers/gpu/drm/panfrost/panfrost_job.h | 1 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 29 ++++++++++++++++------ drivers/gpu/drm/panfrost/panfrost_mmu.h | 1 + 8 files changed, 72 insertions(+), 20 deletions(-)