diff options
author | Austin Shafer <ashafer@badland.io> | 2023-12-29 20:28:07 +0100 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2023-12-29 20:28:07 +0100 |
commit | fe705ac087444001315552af0c72cf39854eb1d5 (patch) | |
tree | 1f3a23e9934eaac34176854be6765a5834ec52f1 | |
parent | biology/diamond: Fix build on main after import of clang 17 (diff) |
graphics/nvidia-drm-515-kmod: Fix build on CURRENT with iosys-map.h
Commit f8ab2f5bae1d added the linux/iosys-map.h header to base in order
to support 5.18+ versions of drm-kmod. This messes with nvidia-drm's
conftest logic as on recent enough CURRENT versions it will see iosys-map
and assume it can use it, but the drm-kmod version in use is 5.15,
which wants to use the older dma_buf_map.
This adds a patch on the port side to override nvidia-drm's detector
and force the use of dma_buf_map on the 5.15 port.
Differential Revision: https://reviews.freebsd.org/D43234
-rw-r--r-- | graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-gem.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-gem.c b/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-gem.c new file mode 100644 index 000000000000..5693b76d27c4 --- /dev/null +++ b/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-gem.c @@ -0,0 +1,18 @@ +--- nvidia-drm-gem.c.orig 2023-12-29 19:08:23 UTC ++++ nvidia-drm-gem.c +@@ -68,15 +68,7 @@ void nv_drm_gem_free(struct drm_gem_object *gem) + #if !defined(NV_DRM_DRIVER_HAS_GEM_PRIME_CALLBACKS) && \ + defined(NV_DRM_GEM_OBJECT_VMAP_HAS_MAP_ARG) + +-/* +- * The 'dma_buf_map' structure is renamed to 'iosys_map' by the commit +- * 7938f4218168 ("dma-buf-map: Rename to iosys-map"). +- */ +-#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT) +-typedef struct iosys_map nv_sysio_map_t; +-#else + typedef struct dma_buf_map nv_sysio_map_t; +-#endif + + static int nv_drm_gem_vmap(struct drm_gem_object *gem, + nv_sysio_map_t *map) |