Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 970f4dd4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Fix nr_removed calculation while reducing pools"

parents 96fc138c debdfa5c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */

#include <asm/cacheflush.h>
@@ -176,9 +176,7 @@ kgsl_pool_reduce(unsigned int target_pages, bool exit)
		if (!pool->allocation_allowed && !exit)
			continue;

		total_pages -= pcount;

		nr_removed = total_pages - target_pages;
		nr_removed = total_pages - target_pages - pcount;
		if (nr_removed <= 0)
			return pcount;