if with_dri_i915 and with_gallium_i915
error('Only one i915 provider can be built')
endif
-if with_gallium_kmsro and not (with_gallium_vc4 or with_gallium_etnaviv or with_gallium_freedreno or with_gallium_panfrost)
- error('kmsro driver requires one or more renderonly drivers (vc4, etnaviv, freedreno, panfrost)')
+if with_gallium_kmsro and not (with_gallium_vc4 or with_gallium_etnaviv or with_gallium_freedreno or with_gallium_panfrost or with_gallium_lima)
+ error('kmsro driver requires one or more renderonly drivers (vc4, etnaviv, freedreno, panfrost, lima)')
endif
if with_gallium_tegra and not with_gallium_nouveau
error('tegra driver requires nouveau driver')
#include "etnaviv/drm/etnaviv_drm_public.h"
#include "freedreno/drm/freedreno_drm_public.h"
#include "panfrost/drm/panfrost_drm_public.h"
+#include "lima/drm/lima_drm_public.h"
#include "xf86drm.h"
#include "pipe/p_screen.h"
}
#endif
+#if defined(GALLIUM_LIMA)
+ ro.gpu_fd = drmOpenWithType("lima", NULL, DRM_NODE_RENDER);
+ if (ro.gpu_fd >= 0) {
+ ro.create_for_resource = renderonly_create_kms_dumb_buffer_for_resource,
+ screen = lima_drm_screen_create_renderonly(&ro);
+ if (!screen)
+ close(ro.gpu_fd);
+ return screen;
+ }
+#endif
return screen;
}