Message ID | 20221020213335.309092-1-dmitry.osipenko@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp338979wrr; Thu, 20 Oct 2022 14:55:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fQ2slNBJ3+UvTx/ofjr/Yq/cQduyePj7S8FiyUGybLxGVg4SvZQWZcFL4amzSOvArhTGM X-Received: by 2002:a17:90b:1b05:b0:20d:3b10:3800 with SMTP id nu5-20020a17090b1b0500b0020d3b103800mr54153601pjb.91.1666302898127; Thu, 20 Oct 2022 14:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666302898; cv=none; d=google.com; s=arc-20160816; b=B52BuZMWfu5WUbrer3JBNoKHCHvJb1TtVHmyRwFQ7FqApj5t795WhR8TwgCrAW3VWW Q02zJshwTit4HwkSx9KCLUa4FbWtbYvQAPBwRypbmU6mNN1KRxCAIcV2rgnV/j/gxL6G 5rV9twYFM4q4E1RvNm4auVtMdemSHuWzYMCKPJPXdH/32mfHp2lrVl//V9Mkm4lfhxYE /8du7/CuHbEOcsLu9TfC9s3YRSyFgsVtrmTuMOAr6Tc+7aiJG7gHlYoZHGhj4S//cfi0 gl1qX1axb1L/oCTSLKxOhXzTjdB0VxqGnXmyuPNJ19km30ll/Rau4mzhDW5OyaKNALA/ lRGw== 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=PGYiMuF1g45MgAi5zevV1eaA28VDOvDPEM8ocuKmMmo=; b=FLHpslN+9e6H/ZNaw83OQ9A1ROid7807BQgAeaS40iB0ZbeA3t1sjwwH+uBuAu76SN TzsAEsce71vLO9JYzA4q+gvAh84ztbqFvoc4NYsK7es+pgFetgAxBCVNNwocxOm3heRV dbUjcVTUGC2XIZ/iQzn3xTWpucCpU50k+15+OJubtIRdZfHz4WfIvIBRzWUH3AdEpIUD 33L5iBg4emFtMCBPMaxxHZYoy6EjQVPp0SkG846c8Rjme0Ix/kYARLyBxnwSl0YSMYro u8MV4iGm5YV62Q4ZUCiyYHqsyFKEeg0/4rbPKNoqY1Ph4Sm0Egj6YMw3hqA28ib9g6VL zYsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DZg3T6V0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja12-20020a170902efcc00b0016ce3d67e7csi4253197plb.387.2022.10.20.14.54.44; Thu, 20 Oct 2022 14:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DZg3T6V0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbiJTVeL (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Thu, 20 Oct 2022 17:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbiJTVeD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 17:34:03 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2121722659D for <linux-kernel@vger.kernel.org>; Thu, 20 Oct 2022 14:34:02 -0700 (PDT) Received: from dimapc.. (109-252-119-114.nat.spd-mgts.ru [109.252.119.114]) (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: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id B47256602482; Thu, 20 Oct 2022 22:33:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666301640; bh=W/n3zjR0a0jDhmMKl2jfwwXY/Ev21PtBnp6TxNf3TdM=; h=From:To:Cc:Subject:Date:From; b=DZg3T6V0kTVvs1FEuwfZdP0wxeYg6Jw4gcj36RvqnQAGIrYbmX6YMQ2Be8h3il2z7 ZELjQq0HaZGNlHaiI0ddU3aSafRy5u72PmmAzU9oQ3DLBdxyRHU4bNg3UwcB69W266 Q9uhHKOT3iT0SJAJjOEbZ/RhwiS5NJF+riGVEjXZOm3ei8adf2BRjQCvgs0y7RI17j xOg7iTDGHxLUaPzFCPesyG02WzHdYbYnM0BEtuksQ39pPH6eikTTk7j+6o1quI36bE ESw500SPsXaglHsuCn0ZDHMC9aqNyLwr+oyBr5CiD2WutBhv0vtf4paolNaXuPmuU7 THricDcNFDM7w== From: Dmitry Osipenko <dmitry.osipenko@collabora.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] drm: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap Date: Fri, 21 Oct 2022 00:33:35 +0300 Message-Id: <20221020213335.309092-1-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747245227485287130?= X-GMAIL-MSGID: =?utf-8?q?1747245227485287130?= |
Series |
[v1] drm: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap
|
|
Commit Message
Dmitry Osipenko
Oct. 20, 2022, 9:33 p.m. UTC
The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping
by accident when rest of drm_client code transitioned to the unlocked
variants of the vmapping functions. Make drm_client_buffer_delete() use
the unlocked variant. This fixes lockdep warning splat about missing
reservation lock when framebuffer is released.
Reported-by: kernel test robot <yujie.liu@intel.com>
Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90517@collabora.com/T/
Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
drivers/gpu/drm/drm_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello, On 10/21/22 00:33, Dmitry Osipenko wrote: > The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping > by accident when rest of drm_client code transitioned to the unlocked > variants of the vmapping functions. Make drm_client_buffer_delete() use > the unlocked variant. This fixes lockdep warning splat about missing > reservation lock when framebuffer is released. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90517@collabora.com/T/ > Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") > Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> > --- > drivers/gpu/drm/drm_client.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c > index fbcb1e995384..38e1be991caa 100644 > --- a/drivers/gpu/drm/drm_client.c > +++ b/drivers/gpu/drm/drm_client.c > @@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer) > { > struct drm_device *dev = buffer->client->dev; > > - drm_gem_vunmap(buffer->gem, &buffer->map); > + drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); > > if (buffer->gem) > drm_gem_object_put(buffer->gem); Christian, could you please give yours r-b? The dim insists that the patch should have r-b or it won't let me push to misc-next. Thanks in advance!
Am 20.10.22 um 23:33 schrieb Dmitry Osipenko: > The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping > by accident when rest of drm_client code transitioned to the unlocked > variants of the vmapping functions. Make drm_client_buffer_delete() use > the unlocked variant. This fixes lockdep warning splat about missing > reservation lock when framebuffer is released. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90517@collabora.com/T/ > Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") > Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> The code was properly added recently between review and pushing. Let's get that upstream ASAP. Acked-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/drm_client.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c > index fbcb1e995384..38e1be991caa 100644 > --- a/drivers/gpu/drm/drm_client.c > +++ b/drivers/gpu/drm/drm_client.c > @@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer) > { > struct drm_device *dev = buffer->client->dev; > > - drm_gem_vunmap(buffer->gem, &buffer->map); > + drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); > > if (buffer->gem) > drm_gem_object_put(buffer->gem);
On 10/21/22 00:33, Dmitry Osipenko wrote: > The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping > by accident when rest of drm_client code transitioned to the unlocked > variants of the vmapping functions. Make drm_client_buffer_delete() use > the unlocked variant. This fixes lockdep warning splat about missing > reservation lock when framebuffer is released. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90517@collabora.com/T/ > Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") > Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> > --- > drivers/gpu/drm/drm_client.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c > index fbcb1e995384..38e1be991caa 100644 > --- a/drivers/gpu/drm/drm_client.c > +++ b/drivers/gpu/drm/drm_client.c > @@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer) > { > struct drm_device *dev = buffer->client->dev; > > - drm_gem_vunmap(buffer->gem, &buffer->map); > + drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); > > if (buffer->gem) > drm_gem_object_put(buffer->gem); Applied to misc-next
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index fbcb1e995384..38e1be991caa 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -235,7 +235,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer) { struct drm_device *dev = buffer->client->dev; - drm_gem_vunmap(buffer->gem, &buffer->map); + drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); if (buffer->gem) drm_gem_object_put(buffer->gem);