OSDN Git Service

generic_dri: don't advertise BGR24 as a render/texture target
[android-x86/external-minigbm.git] / amdgpu.c
index 93681cb..7f2abcd 100644 (file)
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -672,6 +672,15 @@ static int amdgpu_unmap_bo(struct bo *bo, struct vma *vma)
        }
 }
 
+static int amdgpu_bo_get_plane_fd(struct bo *bo, size_t plane)
+{
+       if (bo->priv)
+               dri_bo_get_plane_fd(bo, plane);
+       else
+               /* Fallback to default implementation */
+               return -1;
+}
+
 static int amdgpu_bo_invalidate(struct bo *bo, struct mapping *mapping)
 {
        int ret;
@@ -723,6 +732,7 @@ const struct backend backend_amdgpu = {
        .bo_import = amdgpu_import_bo,
        .bo_map = amdgpu_map_bo,
        .bo_unmap = amdgpu_unmap_bo,
+       .bo_get_plane_fd = amdgpu_bo_get_plane_fd,
        .bo_invalidate = amdgpu_bo_invalidate,
        .resolve_format = amdgpu_resolve_format,
        .num_planes_from_modifier = dri_num_planes_from_modifier,