]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Implement mmap as GEM object function
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 25 May 2021 15:10:52 +0000 (17:10 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 26 May 2021 18:56:33 +0000 (20:56 +0200)
commitde68fbaa2c79cc33f2eb7dd5a65a6a75e3361b39
treef9cd820d7d534a054546fad5c4afd9e2fabd8c2e
parentcb6ed2dda842d25a5795f6b7e7fe63df0618ca3f
drm/nouveau: Implement mmap as GEM object function

Moving the driver-specific mmap code into a GEM object function allows
for using DRM helpers for various mmap callbacks.

The GEM object function is provided by GEM TTM helpers. Nouveau's
implementation of verify_access is unused and has been removed. Access
permissions are validated by the DRM helpers.

As a side effect, nouveau_ttm_vm_ops and nouveau_ttm_fault() are now
implemented in nouveau's GEM code.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-5-tzimmermann@suse.de
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/nouveau/nouveau_ttm.h