Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp630230lfv; Tue, 12 Apr 2022 00:26:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5WtrXWjFghVxyFHM+QZC6X/2O20JnQjzvOGoIW09KaFToZ7jaBSHFDn8gh+ELV2/0Q6Wu X-Received: by 2002:a17:907:94ca:b0:6da:e637:fa42 with SMTP id dn10-20020a17090794ca00b006dae637fa42mr33670999ejc.347.1649748363438; Tue, 12 Apr 2022 00:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649748363; cv=none; d=google.com; s=arc-20160816; b=OtNe6Ti5JNbx9Bl8IhgEBNt2WNWaImbU6oCarnzco1lSz4PoGaL64X0VwCkuD8wR1E oKryKrAt5v0WE676WQOoxWtS3EY+tDzn7HRiZRPE2yasgT3Fpy+phjrAegDCmitvu0+7 RgkopR55oAH5dJU9uHkuX5+wXkNe4CFoaJ9Cx1rgr2yYm7idYxe0J1pqixn+i+ZfrIDb CzO1fDzibznwBkyis9tA8kUzE05yfoSmqPG4jwHpEkv/nrqt8neOre0nUv+/CMiWIx7O 0B5laeleMtOA82jr5C4hEzG7GZnAfpbkl63cTYRUsWUpKsSqpZ9gLX163svuxhlM/iGW D3LQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KYHoK7uRUb9qq1oWehE50YQVt9q2ZPS/gLyjskm0H/o=; b=NZFvGGtmMcI+8kMDeoVPzy2P34Grz5DZUxwfyy2gULDhZFWhDyKPWA+4p57E7YIgHu 0T/kSQtUBNPUWtrNkdQtoP6yStY9nJKZMn1pfubMdqLTDH/YVno+AMzvGFobWg8gnXuo poGGFTv4oyT5c3zwG5GNcCWDbEzI34m4ord9wcStqQPjQliDBmSzCcnxVmiPWEMEsX+k ns/AP6yrOgdUOjKUamayfDLnUEJbKGIlHchhjBCu7u8EnOepmW6nSIn/rhtmYUthswZN gTyVYizPoY9bUN3XKH7p+RQnA+tT9QVQopuFj+aXEDdzdPsz1wJleefm2dm1W7ifCGIr lRAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LREqFUxn; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg9-20020a170906a04900b006df76385e65si7981256ejb.773.2022.04.12.00.25.37; Tue, 12 Apr 2022 00:26:03 -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=LREqFUxn; 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 S245470AbiDKWEB (ORCPT + 99 others); Mon, 11 Apr 2022 18:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350312AbiDKWC5 (ORCPT ); Mon, 11 Apr 2022 18:02:57 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A15BC11 for ; Mon, 11 Apr 2022 15:00:42 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id EC8301F43C7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649714441; bh=qFt9ZOB1/K3f6j95e83uUTQsFAU8GObxCwVCXrvjk/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LREqFUxnsMN90DJgwmRZ7u6JNL5myGlW9jIG6varDOlXyjxoaIFSYimM5MxRzygAs O5Ad1UoO1cqMO/unKfXTrk0zWOzrvi7HFGS6s9j7NcVoWJRsglcuvuR6VnXn72aTv0 i3GQ9LjparoI7L4PfLG7Wr7/lDzzuNBKUQkT88gyQUKvIOVNoGX+ShAUb/as4Hjofr cqOagGFMIymj9mocJaqElqqKfJOfxJnRFRxEx4iZwdggA+c5OLZiXw9VmKlqwvtU+G Mfi/xgnauguU7GFoNm3sbg1XfVkaAwLnwwIrUiIfcYMWJRVTiz/GIZfJaXlZPIZA1w LitM6cQ0nyYgg== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Gustavo Padovan , Daniel Stone , virtualization@lists.linux-foundation.org, Dmitry Osipenko , Dmitry Osipenko Subject: [PATCH v3 15/15] drm/shmem-helper: Remove drm_gem_shmem_purge() Date: Tue, 12 Apr 2022 00:59:37 +0300 Message-Id: <20220411215937.281655-16-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411215937.281655-1-dmitry.osipenko@collabora.com> References: <20220411215937.281655-1-dmitry.osipenko@collabora.com> 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_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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: X-Mailing-List: linux-kernel@vger.kernel.org The drm_gem_shmem_purge() was added back in 2019 and never had a user since then. GEM's purging is now managed by the generic shrinker and only the "locked" variant of the function is wanted. Remove the obsoleted function. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 11 ----------- include/drm/drm_gem_shmem_helper.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 8e31056575e3..89c64053247c 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -992,17 +992,6 @@ void drm_gem_shmem_purge_locked(struct drm_gem_shmem_object *shmem) } EXPORT_SYMBOL(drm_gem_shmem_purge_locked); -bool drm_gem_shmem_purge(struct drm_gem_shmem_object *shmem) -{ - if (!dma_resv_trylock(shmem->base.resv)) - return false; - drm_gem_shmem_purge_locked(shmem); - dma_resv_unlock(shmem->base.resv); - - return true; -} -EXPORT_SYMBOL(drm_gem_shmem_purge); - /** * drm_gem_shmem_dumb_create - Create a dumb shmem buffer object * @file: DRM file structure to create the dumb buffer for diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h index 7284335ea2c9..197d08452974 100644 --- a/include/drm/drm_gem_shmem_helper.h +++ b/include/drm/drm_gem_shmem_helper.h @@ -179,8 +179,6 @@ int drm_gem_shmem_swap_in_pages_locked(struct drm_gem_shmem_object *shmem); int drm_gem_shmem_swap_in_locked(struct drm_gem_shmem_object *shmem); void drm_gem_shmem_evict_locked(struct drm_gem_shmem_object *shmem); - -bool drm_gem_shmem_purge(struct drm_gem_shmem_object *shmem); void drm_gem_shmem_purge_locked(struct drm_gem_shmem_object *shmem); struct sg_table *drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object *shmem); -- 2.35.1