We need use_flags when we implement the dri interface on top of hbm. Also, dri_bo_create_with_modifiers does not take use flags only because gbm_bo_create_with_modifiers does not. That has changed with gbm_bo_create_with_modifiers2 although minigbm does not reflect that. BUG=b:292148713 TEST=CQ Change-Id: I120358c843140a937fee1dd6183d1836ea622eec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5801181 Reviewed-by: Ryan Neph <ryanneph@google.com> Commit-Queue: Chia-I Wu <olv@google.com> Tested-by: Chia-I Wu <olv@google.com> Reviewed-by: Dominik Behr <dbehr@chromium.org>
34 lines
1.4 KiB
C
34 lines
1.4 KiB
C
/*
|
|
* Copyright 2017 Advanced Micro Devices. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifdef DRV_AMDGPU
|
|
|
|
#include "drv.h"
|
|
|
|
struct dri_driver;
|
|
|
|
void *dri_dlopen(const char *dri_so_path);
|
|
void dri_dlclose(void *dri_so_handle);
|
|
|
|
struct dri_driver *dri_init(struct driver *drv, const char *dri_so_path, const char *driver_suffix);
|
|
void dri_close(struct dri_driver *dri);
|
|
|
|
int dri_bo_create(struct dri_driver *dri, struct bo *bo, uint32_t width, uint32_t height,
|
|
uint32_t format, uint64_t use_flags);
|
|
int dri_bo_create_with_modifiers(struct dri_driver *dri, struct bo *bo, uint32_t width,
|
|
uint32_t height, uint32_t format, uint64_t use_flags,
|
|
const uint64_t *modifiers, uint32_t modifier_count);
|
|
int dri_bo_import(struct dri_driver *dri, struct bo *bo, struct drv_import_fd_data *data);
|
|
int dri_bo_release(struct dri_driver *dri, struct bo *bo);
|
|
int dri_bo_destroy(struct dri_driver *dri, struct bo *bo);
|
|
void *dri_bo_map(struct dri_driver *dri, struct bo *bo, struct vma *vma, size_t plane,
|
|
uint32_t map_flags);
|
|
int dri_bo_unmap(struct dri_driver *dri, struct bo *bo, struct vma *vma);
|
|
|
|
size_t dri_num_planes_from_modifier(struct dri_driver *dri, uint32_t format, uint64_t modifier);
|
|
bool dri_query_modifiers(struct dri_driver *dri, uint32_t format, int max, uint64_t *modifiers,
|
|
int *count);
|
|
#endif
|