Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp927872lqp; Thu, 23 May 2024 04:33:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVc46WfQ3el66/FCQJ92w65nBsaYL8LQubEuiYdjvdqV7tUMTQrSOMxlLOA/iV58neBTm9j+QuBCuhOqkiM2mmy5yZcRbySv60qNR79IA== X-Google-Smtp-Source: AGHT+IEy4R3lWw7HhWwE1OwC5yMdudhp2tviwIl/IKJ2vfY5djfNrejF7pbbq/Mug3BFCgOZpAah X-Received: by 2002:a50:cd06:0:b0:572:9b21:e0c9 with SMTP id 4fb4d7f45d1cf-578329fd415mr4790231a12.14.1716463982379; Thu, 23 May 2024 04:33:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716463982; cv=pass; d=google.com; s=arc-20160816; b=ogM0OLEc01Z8MCvO9bxvZMSIyv61JdJy5N4ZUqVkn9CslGn3JXOiU3Y2fv8tV0VC86 KfY9Ag338zMWv9DgMH5rQpQRmT9AVRddwdFeoBhsxlrsxIUqDKp3h23rh6dXjprTPR7s G5JxpcU+QFCXDNRKxBmmIODXBh3GjOglGG3GkadW+Wow6vkRIJqv01hbLu623IkHrOIh P3vQ1FiJ3rCVKlsvzUGqzSxR2AX/990pIQGNg8GIXvrt38iGJQ6NLRX8i/w5oJtaRpca PdyA2njUSgV2Mgi+U5UsZLa0QdQt7kJEM49JzeRpkdhb1UtqfaGvuXD9bxgTF2QnD6TM TStQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=EmSgKUqOApYNaNdGPdSkuREsru/PnYXnbbSe1bQIXK0=; fh=Ghx6tcIzyVO5WF7aoLQ8kSAUDZ5XrKLfQq3Zu5A2d+E=; b=prFXCCppM0iLK4vIQciB5oVTi4fmM5xAmO5icNKT02GoyRceE1DsHHCBL1barUFzXT i1Xdff0R5+E3fJv9szMMHE3bRPbyGIcPzevdEIdcbca5tadNYU5nPZZZCuAdHPraaKjW xJkt3h1mdfsY4aLoq8w+T55ZQhUjhkSiyrQFzFtpZ05xYr7UpcetcRCHiwGMP8KC36cX 0Bqa3PtSvmuqaNrXAwlKyd9hP8ccmd5uCumSebwst4bAmZWokP65bRc6dAZh1HJ8OFL2 9I/1dNdNLLhSeVt8d5nV+wvbtWl4jNkn3qrsSiBRSBPiXk/AalESYXuP5z2d+xpu7YQL Qf7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=taQOIum8; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-187400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574e13be2f5si10471362a12.11.2024.05.23.04.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 04:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=taQOIum8; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-187400-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1B7D91F21EE1 for ; Thu, 23 May 2024 11:33:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 507C71487D3; Thu, 23 May 2024 11:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="taQOIum8" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA8DCBA2F; Thu, 23 May 2024 11:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716463971; cv=none; b=aa0c2N2Lv401BVUUn1BQlDipTu8cR+udo43y2kst6LDZzkFkpSrdQzfREe/slCisamF7mravx+2K8deZ0Bl8Q2kG26Z0HMFDQfdpoiFxLGOJtxLyNPjSYkJpqaromzOxw7Hu9lUjjErfDQD1jQYp+2ggKHU1ejh5D1m+Q1DoM+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716463971; c=relaxed/simple; bh=P8iZRYjzf5V/CwUg/tRStLzmlTzFHauJjmXv3MkDoCs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BeoXKKE8JcvqlYHHhZF/u81cIH6Q3uEY6PWyJtq6GEARHIYu4t7XdawaLgFcvVZBTMsPefIFbOUGqwiF3mKDvZxlejRXWUeIJ8UNkK+ozgpW3MxyeF6QpPB0I9BW/aYUqZdX0DCccXXZ8Mjsnkl1SOKqYvGr7qEH8Ob1Zv6qDKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=taQOIum8; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1716463967; bh=P8iZRYjzf5V/CwUg/tRStLzmlTzFHauJjmXv3MkDoCs=; h=From:To:Cc:Subject:Date:From; b=taQOIum8Twjkoi5IyV7Vq6dIRtnTd0nMeQutsIHIpCrhgEovTWViWuRgANmci3jCB PEwcy/7mdF08aneb6cv2asq1wSUWj1sPFbpVzyBv2dz1II6dk+BOkoTQoKHE5E9qlN CVVY0K/22QLDrWIDOgd7cusZ82eq3ibKrWtkErq1XH6+EhfieMIZpy8KL1qCErajy2 R+gGSM160e6U3pqG+rqWTc7uxM5+kz4iBozc9Qp0KAZjj0uHihJdOSmO80farKXArM nlQc1cjSdZfaXS4ZCqWFz19SkM7WWuc4Ek1RKJZ5PZExYe/A3+NwWt3bu9xvcqjR0n wG2ToueKf7JpA== Received: from localhost.localdomain (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: alarumbe) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 1925537821B8; Thu, 23 May 2024 11:32:47 +0000 (UTC) From: =?UTF-8?q?Adri=C3=A1n=20Larumbe?= To: Boris Brezillon , Rob Herring , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Dmitry Osipenko , Zack Rusin Cc: kernel@collabora.com, =?UTF-8?q?Adri=C3=A1n=20Larumbe?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH v4 0/3] drm: Fix dma_resv deadlock at drm object pin time Date: Thu, 23 May 2024 12:32:16 +0100 Message-ID: <20240523113236.432585-1-adrian.larumbe@collabora.com> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is v4 of https://lore.kernel.org/lkml/20240521181817.097af5e1@collabora.com/T/ The goal of this patch series is fixing a deadlock upon locking the dma reservation of a DRM gem object when pinning it, at a prime import operation. Changelog: v3: - Split driver fixes into separate commits for Panfrost and Lima - Make drivers call drm_gem_shmem_pin_locked instead of drm_gem_shmem_object_pin - Improved commit message for first patch to explain why dma resv locking in the pin callback is no longer necessary. v2: - Removed comment explaining reason why an already-locked pin function replaced the locked variant inside Panfrost's object pin callback. - Moved already-assigned attachment warning into generic already-locked gem object pin function Adrián Larumbe (3): drm/panfrost: Fix dma_resv deadlock at drm object pin time drm/lima: Fix dma_resv deadlock at drm object pin time drm/gem-shmem: Add import attachment warning to locked pin function drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ drivers/gpu/drm/lima/lima_gem.c | 2 +- drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) base-commit: 7acacca1b157fcb258cfd781603425f73bc7370b -- 2.45.1