minigbm: modify resolve format hooks a bit

Plumb the driver backend to the resolve format hook.

BUG=b:132939420
TEST=compile

Change-Id: I3ac10f5c986bc5dae5b34cd70654676d4ad289ea
Reviewed-on: https://chromium-review.googlesource.com/1645879
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
This commit is contained in:
Gurchetan Singh 2019-06-04 19:39:51 -07:00 committed by chrome-bot
parent 51e785f12d
commit 0d44d48d52
8 changed files with 8 additions and 8 deletions

View file

@ -276,7 +276,7 @@ static int amdgpu_bo_invalidate(struct bo *bo, struct mapping *mapping)
return 0;
}
static uint32_t amdgpu_resolve_format(uint32_t format, uint64_t use_flags)
static uint32_t amdgpu_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED:

2
drv.c
View file

@ -606,7 +606,7 @@ uint32_t drv_bo_get_format(struct bo *bo)
uint32_t drv_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
if (drv->backend->resolve_format)
return drv->backend->resolve_format(format, use_flags);
return drv->backend->resolve_format(drv, format, use_flags);
return format;
}

View file

@ -73,7 +73,7 @@ struct backend {
int (*bo_unmap)(struct bo *bo, struct vma *vma);
int (*bo_invalidate)(struct bo *bo, struct mapping *mapping);
int (*bo_flush)(struct bo *bo, struct mapping *mapping);
uint32_t (*resolve_format)(uint32_t format, uint64_t use_flags);
uint32_t (*resolve_format)(struct driver *drv, uint32_t format, uint64_t use_flags);
};
// clang-format off

2
i915.c
View file

@ -559,7 +559,7 @@ static int i915_bo_flush(struct bo *bo, struct mapping *mapping)
return 0;
}
static uint32_t i915_resolve_format(uint32_t format, uint64_t use_flags)
static uint32_t i915_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED:

View file

@ -218,7 +218,7 @@ static int mediatek_bo_flush(struct bo *bo, struct mapping *mapping)
return 0;
}
static uint32_t mediatek_resolve_format(uint32_t format, uint64_t use_flags)
static uint32_t mediatek_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED:

View file

@ -288,7 +288,7 @@ static int rockchip_bo_flush(struct bo *bo, struct mapping *mapping)
return 0;
}
static uint32_t rockchip_resolve_format(uint32_t format, uint64_t use_flags)
static uint32_t rockchip_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED:

2
vgem.c
View file

@ -38,7 +38,7 @@ static int vgem_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32
return drv_dumb_bo_create(bo, width, height, format, flags);
}
static uint32_t vgem_resolve_format(uint32_t format, uint64_t flags)
static uint32_t vgem_resolve_format(struct driver *drv, uint32_t format, uint64_t flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED:

View file

@ -313,7 +313,7 @@ static int virtio_gpu_bo_flush(struct bo *bo, struct mapping *mapping)
return 0;
}
static uint32_t virtio_gpu_resolve_format(uint32_t format, uint64_t use_flags)
static uint32_t virtio_gpu_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags)
{
switch (format) {
case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED: