From patchwork Mon Aug 26 22:33:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 172219 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4965261ily; Mon, 26 Aug 2019 15:33:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBo/8NJdzqggBB5puj1hMQNn9TQyIxRlvtSwxwuaNtml9mL0SFm6QsBWGFtlTc4EkgQUO3 X-Received: by 2002:a17:902:724a:: with SMTP id c10mr5669295pll.163.1566858801644; Mon, 26 Aug 2019 15:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566858801; cv=none; d=google.com; s=arc-20160816; b=pbys3XbjZRa8UA2yhKUOEuXHLLS2CODHsS0sYDJuO3Tm3IXmuc8c0SUmac47wT/J5V 0zmXcs0MFUiNv3pXHOU/1nIDWbHUDFYxcxqKXE3qnFLnRSIYyc5aE1NjcgXTQcYrLdHQ 1iE1Qf+VCwDEb/e0vwBOEyi65S0F8FrxPmLJb7c8g2rfTn3nW1QLUp1pXEJL9qZyVXW8 4Z7vdom6z7F7S94+7vTImnJ+7m6NZMgdTkHVkiaL8Mx4pi1vFBW5jsX0DzIcx4YKWgmg UEjR9f6SYCbHwsdTgnjX3SsDhyCRXk27qvO83G801JSvRKLZSUdz8p45U5WBKuuO8l+y +1wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=qfB1/fO372o2sP9aSMND88C3/W1Ll+h5QYraiUfWiDc=; b=PEPKKTR7a7Ou6oyFcA46x8EN5mquHEaJ/XmDtUBVSaiQpvDImC2COUai+qpDhq3NY3 cR6WO8cXre0dmbYam+tbz9FPxwcGSeYVdZKlfH/sJmzvRFFPg+39S+gSJZJ5z8y7Quvq g/V3W8ly0YKLPZ7koSXBShiBjdULjQeJw0micm27ng1ptXijfstcmBoTSUsjsHQhXyC/ q4SIWaA+ZAbGh3A/4KXqdtF/3uhRdPuT1FgPff3Kks3IW1m3zp5swk9hCUkc9mFKdtBK arVwrl8oagAxe/XRuejKAxME0ftQxrHzXD8+XbvlOQz8gq8ahU32g7Gwc+cAZucPqAHD 5Rug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 20si11784572pfj.54.2019.08.26.15.33.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Aug 2019 15:33:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66B8B89C8D; Mon, 26 Aug 2019 22:33:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id A29DB89C8D for ; Mon, 26 Aug 2019 22:33:19 +0000 (UTC) Received: by mail-ot1-f68.google.com with SMTP id r20so16792716ota.5 for ; Mon, 26 Aug 2019 15:33:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jsndA9b/rejbqoOXLlE/f9LLe1+k2/Vp5Vj3Isfdruk=; b=ecpmjPnVaYLMC62HP8drOi4eNPapePZVSaqvV6HpusqbEOENl9dfZCGusFn4BJVOsU PMDqpXqT7m2Ih7hyqv6LuFKwEGg95diYKnT22v5sqeqzXB5apyoC5AkciFHOQC9brozQ zd/9/dFGmG/+13wYaOJX2RdNDO1wPHu/5/ysbAlGkCvHV4XVf1VJ9OODrZ5VB7pgebOc LNq7c0mZix0AzS1WM95bwf1WZW6vGEqR0y5FbPULg+k9akvg8dfq8sfD4PlTiIfeNfEQ PpFe7LyKK4XNRNgIDkCyWbqCkMBY14UpMcARjzRTIuzBo/kxfvIxL22uGfD7TcVV1Nze XCPw== X-Gm-Message-State: APjAAAVZ9BZlaSKBl6eVu2/a7V00Oh5EUPuJ1Ku0VU0yGtEtnfP3BP/R Rv/kFlVGLD6d2mFcQga033eCpdI= X-Received: by 2002:a9d:450b:: with SMTP id w11mr16660606ote.15.1566858798539; Mon, 26 Aug 2019 15:33:18 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id e22sm3668959oii.7.2019.08.26.15.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 15:33:18 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 0/8] panfrost: Locking and runtime PM fixes Date: Mon, 26 Aug 2019 17:33:09 -0500 Message-Id: <20190826223317.28509-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , David Airlie , Steven Price , Alyssa Rosenzweig , Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With further testing of recent changes with lockdep identified some locking issues. Avoiding lockdep issues means we need to avoid some locks in panfrost_mmu_unmap which in turn means avoiding runtime PM resume. In the process of re-working runtime PM several runtime PM and locking clean-ups have been identified. v3: - Applied patches 1, 4, 5, and 6 - Fix race in job timeout handling with ISR - Remove some no longer needed locks - Fix panfrost_mmu_unmap when autosuspend delay is > 0 - Disable AS MMU when freeing page tables v2: - Drop already applied 'drm/panfrost: Fix sleeping while atomic in panfrost_gem_open' - Runtime PM clean-ups - Keep panfrost_gem_purge and use mutex_trylock there - Rework panfrost_mmu_unmap runtime PM Rob Rob Herring (8): drm/panfrost: Rework runtime PM initialization drm/panfrost: Hold runtime PM reference until jobs complete drm/panfrost: Remove unnecessary mmu->lock mutex drm/panfrost: Rework page table flushing and runtime PM interaction drm/panfrost: Split mmu_hw_do_operation into locked and unlocked version drm/panfrost: Add cache/TLB flush before switching address space drm/panfrost: Flush and disable address space when freeing page tables drm/panfrost: Remove unnecessary hwaccess_lock spin_lock drivers/gpu/drm/panfrost/panfrost_device.c | 10 --- drivers/gpu/drm/panfrost/panfrost_device.h | 3 - drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++- drivers/gpu/drm/panfrost/panfrost_job.c | 43 ++++++---- drivers/gpu/drm/panfrost/panfrost_mmu.c | 91 ++++++++++------------ 5 files changed, 76 insertions(+), 81 deletions(-) --- 2.20.1