Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1371898rdb; Tue, 30 Jan 2024 17:15:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtbl5JrHlgLYPKyPmePS7Gz0l1pmRu8FpAXkID73NflWU6MtfgGl3krh4CkBPhW7qBW1c4 X-Received: by 2002:a05:620a:102b:b0:783:c318:4e3a with SMTP id a11-20020a05620a102b00b00783c3184e3amr73100qkk.78.1706663756643; Tue, 30 Jan 2024 17:15:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706663756; cv=pass; d=google.com; s=arc-20160816; b=Gw3/Iv1F/KLe0aRZavz7ceTNwK/0Wk8CWOrJL3BaOPDklfhSmE2eQCnm9iOx1ZUCTB 9uwl35bsqKuGSmDvOpkE7YGsyN2Xyd4NYGyW4mEFCpf+d+PNcvdKwLsS2pS2iGhjOzzq ceryT1ttwOaYTl5ovaI/4suFjRuRf77a136F5A6vNVZR0HEo36IvKMV0HcfmbJ0JuSvl qIfzaDG4cKw5WpcR5lvE+BJlmxsRov7J0A9spIvrTLDmEdXFGQK6/9BK9bk6qN4FclWK pzvPIiJ9j8KqZVW4UpdAFMED5mXdMnJBO7b0TOPuWdU7Howqx5yXf6vqJVraZ247e3Rn /d3w== 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=TMI3cnWrauJ0sVrAPWjosebBGINiaEuvqhQTmdIHpwU=; fh=F36b7GtYjRcNPElyHD5mN3sePKNa4wpgRxU7LnyFAcA=; b=Bl/pEiGg/yr+MHyuUbVdT1EASR6BQ05ffnRnf/FyUTHDnF+vwcz5rONkuR/LRaNAsi DxajZCW8j9cT+kBfD5x+oHCdNhdU1gUNxyzQo2f91CjiB7HKFWk6aZp04AvTnNtp5DkM WOGyjNh6dICHgJ2h6yk9UyqkFMW4W+Be8oVBOr7xFXXtJPWsqa7tpj3N9pzLN+g/oGgs pVTQcuZOla7b6xCZA2lViwdnUTZgTqhtzSvNiN2fKq2apbd1fnwr4Nq4ZJK9ztopJTSh AUznJ4eTbnsKBa7X9HeSJnTmbtGcrUWLB3dzrrfCsZ89FaJk+HHjjpu64RugDzxmcKLT luzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ed5glmhA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCUw3DaqqwPaVHiZSrJtaVXWMVeRYUVzH27f7KEUV4qwMnNgOc7S0i/Vkxp2u8dT2wPFGjseY44gGkIMrUp3dPHORfdiFVpZvT+623G3XA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pj27-20020a05620a1d9b00b0078535dd3b0bsi1275324qkn.730.2024.01.30.17.15.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 17:15:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ed5glmhA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45579-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 666A71C2504B for ; Wed, 31 Jan 2024 01:15:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C3F3641; Wed, 31 Jan 2024 01:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ed5glmhA" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6327C1C20; Wed, 31 Jan 2024 01:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706663742; cv=none; b=dF3uU8IBHHqqqyKf11+UEIrAlikNk+RlTQZDxOfvbLk+DdkhAql9cAfFDfand1auh+tcsbYYNYPQl9we6kaUG61r99E4m0yOtguP7WEO6gA8iD8d5ZOYNZBq9g5Nbtf9+XdtfHtHmv77v4jHRHFBhuyx4usfdD6ScRqg/rzLjQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706663742; c=relaxed/simple; bh=/pTzJOK51v+5SYhIFOmecoVuKff4pmOxFD7hGsAarAo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=U2WZQygybQBAOrJYz00MtvGf415LE5G/4YcvgpbNyvqhyK96jFtct0kQHsbm7ohB88sRQGceqt3+BY69g21NEedbhlb8TjBqsaDiDmIDgyNdkLjXXj0crDNmumzTtPT+L/r3EDTb/OCe0cZsvMUfbxDNTNO6MSOwxpqpxSSNeM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ed5glmhA; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d7858a469aso26581045ad.2; Tue, 30 Jan 2024 17:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706663740; x=1707268540; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TMI3cnWrauJ0sVrAPWjosebBGINiaEuvqhQTmdIHpwU=; b=ed5glmhAauN1DdTP9WSelwo27ZmJ3DFMPnWR+X86+VV8YkHOSNjVNSR11ovk2TMCGy GirQdV64Ytk5hE5+8lv09bxszn1qWPS4HJc8krbYVXOYlbPjE0krswZB39bbQ9PiiXMi 27hObmpnQVaLYtOEwFuKWDaW3u+rR5WwBNHsS0Qus879Pbc+9yDOyrPOgj0cnAo3keZJ 34XR4usdxYewBYMqGyX3QPj3bJWcAktwErWy2E2qXGIldcc4rBKfErAERP0xa4JGmT2k 64ZUVlrgmCCJJabMPd5QXWlES8kz95hvsoNF42crApIARaaiIijdGcfd0QOMPeHQGZrH 6PQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706663740; x=1707268540; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TMI3cnWrauJ0sVrAPWjosebBGINiaEuvqhQTmdIHpwU=; b=asmnSjoaV1fJm1zmIk9/vGFH+dkp6YhV3XC3Zje8v8V0nanLaVW5MIGdRviZ+YHE2O mr1MpIRVy4qz+1LSyyLgafhZUYgAsPuXLsD9oYCGDFlMVAPz7S8zbpxusfpJK8Etdvih UpFcbAS1mwioXkrzArJwkaDeRPEiDanda01sLpUewszloHcVVl6xp5DHIWK92cP5ylAd iHdq1J73XnwtEiCPwuc9SnKgPyA53dIJq/kqIuECxo11VDMJWXWRspkfbbLjS8IXE1No MtWLw8o1GlUkQkN76sVuSvG/p8Cqm2NewJ36d2yzYOTbRzhCIixbqbDlwTwF9mH5OgSc apSg== X-Gm-Message-State: AOJu0YwlWu5iRn9TAao73sogSNyiwv0OBinY91MBv8YPcKVxvVGmCKiz tbnxyNM83MMz8RyVolvdSACkqun8aeE4Uc3nnYHyLdbZbCI3t/44 X-Received: by 2002:a17:902:e805:b0:1d8:d01b:571e with SMTP id u5-20020a170902e80500b001d8d01b571emr246288plg.33.1706663740422; Tue, 30 Jan 2024 17:15:40 -0800 (PST) Received: from localhost ([2601:1c0:5000:d5c:ae1c:de46:682a:206]) by smtp.gmail.com with ESMTPSA id t18-20020a170902d29200b001d8d6ec2d7fsm4866303plc.61.2024.01.30.17.15.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 17:15:39 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Rob Clark , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Dmitry Osipenko , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] drm/msm/gem: Fix double resv lock aquire Date: Tue, 30 Jan 2024 17:15:37 -0800 Message-ID: <20240131011537.31049-1-robdclark@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Rob Clark Since commit 56e5abba8c3e ("dma-buf: Add unlocked variant of vmapping functions"), the resv lock is already held in the prime vmap path, so don't try to grab it again. v2: This applies to vunmap path as well Fixes: 56e5abba8c3e ("dma-buf: Add unlocked variant of vmapping functions") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_prime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_prime.c b/drivers/gpu/drm/msm/msm_gem_prime.c index 5f68e31a3e4e..0915f3b68752 100644 --- a/drivers/gpu/drm/msm/msm_gem_prime.c +++ b/drivers/gpu/drm/msm/msm_gem_prime.c @@ -26,7 +26,7 @@ int msm_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map) { void *vaddr; - vaddr = msm_gem_get_vaddr(obj); + vaddr = msm_gem_get_vaddr_locked(obj); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); iosys_map_set_vaddr(map, vaddr); @@ -36,7 +36,7 @@ int msm_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map) void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct iosys_map *map) { - msm_gem_put_vaddr(obj); + msm_gem_put_vaddr_locked(obj); } struct drm_gem_object *msm_gem_prime_import_sg_table(struct drm_device *dev, -- 2.43.0