Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2452188pxb; Sun, 17 Apr 2022 23:44:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXQt182+IDh2STBS+LZpD8/QM1PDKa0nlUFRG8HDKpFxuYdUiZinrVfqHIc1yedNsa2Lst X-Received: by 2002:a63:69c7:0:b0:380:afc8:33be with SMTP id e190-20020a6369c7000000b00380afc833bemr8762279pgc.304.1650264283549; Sun, 17 Apr 2022 23:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650264283; cv=none; d=google.com; s=arc-20160816; b=xWTGsl4rQe+7Qt4J2yufK3Sxm/THPQG2faTOEn+u3jWbjWFb2biMDLNDA55cXGuXOI o+tfTFib1bi6q3AgtDeeuqcU0GuwCAahKBzo3QOTd9XWR0jSz3FyXhcd6CeW+yXxZhmI gBp1ll+s0E9iBxVIPbH5+7dqDwN5pMy16LgoolP54Qs5G7WiMmgg+MmzqB2Q5m1xHrOQ HQabIXZ+vNV6oAJJJ02LEv22/kh1iZDXLeOyxeS8xdFxEO1NNj9GrPXaFL2XdWFOP0SK FRx5NzXCQRgtgDcOAqRTBEbrDbc8RALbvORdyA3PbNHWNv0NXpWtqjVzK5pP794pq9x3 PUYQ== 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=+GqciarLukKi5nprmmahWvtIDQQ7YwUsaT22cLUldRI=; b=Gc2tcjl/fjlLHTTou5Nx2Xt/THbkd0aUc1CbOvx1wcDunz1SOWvs8hoAbVpNyHuJBo DofsCP8YpyIU6h3e3iVm9oxqWDB4KtjGnoTP9MXf3WqT251qAOkkSsmoPVs3UgiY8SPO DfQiFjC2EBSbMRDlJRlYn6ptgG9nKqHEXXwjj3AxPfkr932Gzlz3fTWZPlhRosU0hMN3 2UFQus8ZZHB57uXFwKd6y/rJwLgWI8oUyU/ybcycjRcTUVr8szze+drdkdxEgaiNdRVX OzbdzqWoF9G9VYCbkEwhHy8BmMwfC75roA2YBroKGm5DfzdXJwjI68eFK2mi+zDk4VKt 022w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XxYaf6Sb; 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 c7-20020a170903234700b001548c7c077fsi8477138plh.454.2022.04.17.23.44.29; Sun, 17 Apr 2022 23:44:43 -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=XxYaf6Sb; 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 S235254AbiDQWlV (ORCPT + 99 others); Sun, 17 Apr 2022 18:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235279AbiDQWku (ORCPT ); Sun, 17 Apr 2022 18:40:50 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1DE17AB4 for ; Sun, 17 Apr 2022 15:37:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 44C641F40EAA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650235074; bh=AocJApo4ydFCVzv5kkL5J5T725jSrlmEEAg0KTvbJJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XxYaf6SbIIT2JsBtHRD1b6DEtIV0jtTFZO33qLm0XQzbvV8nHNC/E3PAxvPMlj5un T5nz0IJ/0MMIMO6STTSRs/ZIhhPkPmwDEd024Uhg1nUKWCk69lkrdAccJ76O7YzJMb UQ0bnd7ZaU2ronhWuBgmHZ3XvIqDjEvl3fPFrVvnmBAdjDXKbYM1BA8aYHId3Da9mn xfk35CZfHFQQrCGCNEXlrx1j/2AiuLGjzPPtE3TSUs+Euc+KkC4QHerZDtd7+k87VV gCk+8gemnNqR7FVDNpq7G2+EHbgR2GJqYGtCllkFSNCLjT9/tbMSVkm1gCKEhY2KFa M3IzR3BN4qI1g== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Robin Murphy Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , Dmitry Osipenko Subject: [PATCH v4 15/15] drm/shmem-helper: Remove drm_gem_shmem_purge() Date: Mon, 18 Apr 2022 01:37:07 +0300 Message-Id: <20220417223707.157113-16-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220417223707.157113-1-dmitry.osipenko@collabora.com> References: <20220417223707.157113-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 6d83d11211fc..3695fdb24ac8 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -991,17 +991,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 84316c281292..91e97aa829a7 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