From patchwork Mon Aug 19 16:12:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 171649 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3197649ily; Mon, 19 Aug 2019 09:12:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqze2KxTzGWDIyh/4i6LQ1vGyXSL21fqwCtbF/TOtfMJmuBBfspQirXtvOmpgy2yBVE07vz6 X-Received: by 2002:a65:6859:: with SMTP id q25mr20244828pgt.181.1566231131551; Mon, 19 Aug 2019 09:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566231131; cv=none; d=google.com; s=arc-20160816; b=f+WBBBwDatOwm8ScqIzvc6yboWqMx+fQneuPmhSglsk3xfbds6T/EaZhP6vW1z+G7+ U/VZwsihGDhaaxOUjPJY4FNCBhF3fm5Aayk4lbWJtmlpzV9A1vRWKT8Poq20SuWHS6OW wpAZ2fG3KiPgRpcxQJEpWfVK8dbzOcGzZ4B6R2JZmayDquQSzK0qLxilsV6ysMK95xup rKxOCjqcm3/O18suiMe8gNMfHkLTR37HKQyZoUhHDJs50JTV0voud75scmuo9U3xbZdI ugqAqVnzU1Xhg1SO+yUJe0e02cU0HssA6Hx8Yh92toBJZMCp1SSnph8yW/ZOjknGNC6J +RSg== 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=QTlJIEHk0Sk9MX6gcBM1FWTPHxTvngkZOJ19cthybHo=; b=XLaF1XQvhlvaMUE1iahurSBvqHZcweSRs6sRRPg/IHS597JXelCKUeYHiR2avRqm7W ynIN8lw6Vhvcg9SQN+cjks/ugZUjhKzcnXNsCB01E+G+mxPOXpgL+J7Whqv76A4WFHDh /TN8sxe2ZuzH85TWbA3TLaL8q8fjxFd/YruowM4YclMLelLrmfOqQm9Ls2v432os37Ta P/huCPdlUX4do+DrirpDYnz5DfE/6pbqnQ6/oGIWYQGVAR+6Vt69bCNBOQ7nZiJPUPFA ldKU45j7ZXSJw87DNZ8PejVvCcdgPWG/DY6snCF/LPP26vh+et+aY68CJbUufLpwdLk/ gsfA== 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 t3si5819527pjw.46.2019.08.19.09.12.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 09:12:11 -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 E0C1E6E1F8; Mon, 19 Aug 2019 16:12:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 861FE6E1F4 for ; Mon, 19 Aug 2019 16:12:07 +0000 (UTC) Received: by mail-io1-f49.google.com with SMTP id o9so5495764iom.3 for ; Mon, 19 Aug 2019 09:12:07 -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=1AaiMrzn6Kck5w+7zpGIz8iRnQ0/4BQJVkrkea/mymE=; b=cM/JE4XK4Uw4h3cI2KAAtgEt/vAVwEEpl0FW3C85gz7AEg8mCdr9uI7LEDWZ+a8Yvi GW++q9BPjC9CzjNodFEjD1feZaQwTUjaXAkLmABTI3nrK77Na2VWI/tebulIqU1gCe+y sd27/GvnwvkDuUGMReExILaun8gda4nXFjj+zjZDJtKSxHDA/wlC6wXeeDTtyzPbQcgq 46VvT/nUJYf+G8DfIY9arJmMoZIpMNAHH9pbMyFDo3GvoLIO10/DCL/z//K55apyVkgP 8ma3hnnDc4rWfcKZL5rw6Si7owyQO8C2tIG+OCVwMRR6SmDQ0zoeNdjAt3c84Er1AKpj mGAA== X-Gm-Message-State: APjAAAWwiX3yJHeLyhkDjjYBGynjcM/Vb42euDc+8YcTKf9V2iSOPEEc ZSOYevU9kbjbkFhUKPnz25uf3NM= X-Received: by 2002:a02:a809:: with SMTP id f9mr21665284jaj.111.1566231126305; Mon, 19 Aug 2019 09:12:06 -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 c19sm4770584ioi.22.2019.08.19.09.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 09:12:05 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/4] panfrost: Locking fixes Date: Mon, 19 Aug 2019 11:12:00 -0500 Message-Id: <20190819161204.3106-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: Maxime Ripard , Tomeu Vizoso , David Airlie , Sean Paul , Steven Price , Boris Brezillon , Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With further testing of recent changes with lockdep and other locking checks enabled, we've found several bugs in the shrinker code and one sleep while atomic in panfrost_gem_open(). This series addresses those issues. Rob Rob Herring (4): drm/shmem: Do dma_unmap_sg before purging pages drm/shmem: Use mutex_trylock in drm_gem_shmem_purge drm/panfrost: Fix shrinker lockdep issues using drm_gem_shmem_purge() drm/panfrost: Fix sleeping while atomic in panfrost_gem_open drivers/gpu/drm/drm_gem_shmem_helper.c | 13 +++++++++++-- drivers/gpu/drm/panfrost/panfrost_gem.c | 10 ++++++---- drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 15 ++------------- include/drm/drm_gem_shmem_helper.h | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-)