From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFC1179C0 for ; Wed, 30 Nov 2022 18:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5188AC433C1; Wed, 30 Nov 2022 18:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669833742; bh=RmoTX2UPhMLIlIQ8C77l4eaObwlKHfySPZUbLRNJV4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YOBH53pZYO5se83BtUYx2JLThNkDMSxxo++IboL8RbfT70Ef9Bod7M4xOjq8OGMph fU4dNGm0wvDb8T8iUuXYKy9+armEZ96KKXz3PPHtJmXCNkOlMu/QmpSWWm5lTVWeDV nlLlz1tteU6TyIRFGddkS+0vDbbrQS3P9f6ZwAsY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Felix Kuehling Subject: [PATCH 5.15 205/206] drm/amdgpu: always register an MMU notifier for userptr Date: Wed, 30 Nov 2022 19:24:17 +0100 Message-Id: <20221130180538.241031021@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221130180532.974348590@linuxfoundation.org> References: <20221130180532.974348590@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Christian König commit b39df63b16b64a3af42695acb9bc567aad144776 upstream. Since switching to HMM we always need that because we no longer grab references to the pages. Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: Felix Kuehling CC: stable@vger.kernel.org Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -419,11 +419,9 @@ int amdgpu_gem_userptr_ioctl(struct drm_ if (r) goto release_object; - if (args->flags & AMDGPU_GEM_USERPTR_REGISTER) { - r = amdgpu_mn_register(bo, args->addr); - if (r) - goto release_object; - } + r = amdgpu_mn_register(bo, args->addr); + if (r) + goto release_object; if (args->flags & AMDGPU_GEM_USERPTR_VALIDATE) { r = amdgpu_ttm_tt_get_user_pages(bo, bo->tbo.ttm->pages);