From 265c982409a9d0b162bf8ea3388178119a675b83 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 24 May 2023 14:41:22 +0800 Subject: [PATCH] allow DRM_FORMAT_MOD_LINEAR on nvidia --- drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drm.c b/drm.c index d270cd9..69c2553 100644 --- a/drm.c +++ b/drm.c @@ -376,7 +376,9 @@ int drm_vendors() { { if (check_pixfmt_non_vaapi()) return 1; printf("warn: nvidia card detected. Currently only x-tiled framebuffer is supported. Performance may suffer.\n"); - drm->funcs->convert = &convert_nvidia_x_tiled_kmsbuf; + if (drm->mfb->modifier != DRM_FORMAT_MOD_NONE && drm->mfb->modifier != DRM_FORMAT_MOD_LINEAR) { + drm->funcs->convert = &convert_nvidia_x_tiled_kmsbuf; + } if (drm_kmsbuf_dumb()) return 1; } else if (strcmp(driver_name, "vmwgfx") == 0 ||