blob: 65aa610a1272d5134c5198237574e781a0de3599 [file] [log] [blame]
/*
* Copyright © 2021 The Fuchsia Authors
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
#include "mos_bufmgr.h"
#include "mos_bufmgr_priv.h"
#include <assert.h>
#include <stdio.h>
#define NOT_IMPLEMENTED() \
do { \
static bool logged_already = false; \
if (!logged_already) { \
fprintf(stderr, "mos_bufmgr_stub:%d %s unimplemented\n", __LINE__, __FUNCTION__); \
fflush(stderr); \
logged_already = true; \
} \
} while (0)
void mos_bufmgr_gem_enable_reuse(struct mos_bufmgr *bufmgr)
{
NOT_IMPLEMENTED();
}
struct mos_linux_bo * mos_bo_gem_create_from_name(struct mos_bufmgr *bufmgr,
const char *name,
unsigned int handle)
{
NOT_IMPLEMENTED();
return NULL;
}
int mos_gem_bo_map_gtt(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_gem_bo_map_unsynchronized(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
void mos_gem_bo_start_gtt_access(struct mos_linux_bo *bo, int write_enable)
{
NOT_IMPLEMENTED();
}
int mos_gem_bo_unmap_gtt(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_query_device_blob(int fd, MEDIA_SYSTEM_INFO* gfx_info)
{
NOT_IMPLEMENTED();
return -1;
}
int mos_get_context_param(struct mos_linux_context *ctx,
uint32_t size,
uint64_t param,
uint64_t *value)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_set_context_param(struct mos_linux_context *ctx,
uint32_t size,
uint64_t param,
uint64_t value)
{
NOT_IMPLEMENTED();
return 0;
}
int
mos_get_reset_stats(struct mos_linux_context *ctx,
uint32_t *reset_count,
uint32_t *active,
uint32_t *pending)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_get_context_param_sseu(struct mos_linux_context *ctx,
struct drm_i915_gem_context_param_sseu *sseu) {
NOT_IMPLEMENTED();
return 0;
}
unsigned int mos_hweight8(uint8_t w)
{
NOT_IMPLEMENTED();
return 0;
}
uint8_t mos_switch_off_n_bits(uint8_t in_mask, int n)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_set_context_param_sseu(struct mos_linux_context *ctx,
struct drm_i915_gem_context_param_sseu sseu) {
NOT_IMPLEMENTED();
return 0;
}
int mos_set_context_param_bond(struct mos_linux_context *ctx,
struct i915_engine_class_instance master_ci,
struct i915_engine_class_instance *bond_ci,
unsigned int bond_count)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_set_context_param_parallel(struct mos_linux_context *ctx,
struct i915_engine_class_instance *ci,
unsigned int count)
{
NOT_IMPLEMENTED();
return 0;
}
bool mos_gem_bo_is_exec_object_async(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int mos_gem_bo_context_exec3(struct mos_linux_bo **bo, int num_bo, struct mos_linux_context *ctx,
struct drm_clip_rect *cliprects, int num_cliprects, int DR4,
unsigned int flags, int *fence)
{
NOT_IMPLEMENTED();
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
int bufmgr_bo_get_subdata(struct mos_linux_bo *bo, unsigned long offset,
unsigned long size, void *data)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_pad_to_size(struct mos_linux_bo *bo, uint64_t pad_to_size)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_emit_reloc(struct mos_linux_bo *bo, uint32_t offset,
struct mos_linux_bo *target_bo, uint32_t target_offset,
uint32_t read_domains, uint32_t write_domain)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_emit_reloc2(struct mos_linux_bo *bo, uint32_t offset,
struct mos_linux_bo *target_bo, uint32_t target_offset,
uint32_t read_domains, uint32_t write_domain,
uint64_t presumed_offset)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_emit_reloc_fence(struct mos_linux_bo *bo, uint32_t offset,
struct mos_linux_bo *target_bo,
uint32_t target_offset,
uint32_t read_domains, uint32_t write_domain)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_pin(struct mos_linux_bo *bo, uint32_t alignment)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_unpin(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_get_tiling(struct mos_linux_bo *bo, uint32_t * tiling_mode,
uint32_t * swizzle_mode)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_set_tiling(struct mos_linux_bo *bo, uint32_t * tiling_mode,
uint32_t stride)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_flink(struct mos_linux_bo *bo, uint32_t * name)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_exec2(struct mos_linux_bo *bo, int used,
drm_clip_rect_t *cliprects, int num_cliprects,
int DR4)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_mrb_exec2(struct mos_linux_bo *bo, int used,
drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
unsigned int flags)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_madvise(struct mos_linux_bo *bo, int madv)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_check_aperture_space(struct mos_linux_bo **bo_array, int count)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_disable_reuse(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_is_reusable(struct mos_linux_bo *bo)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_get_pipe_from_crtc_id(struct mos_bufmgr *bufmgr, int crtc_id)
{
NOT_IMPLEMENTED();
return 0;
}
int bufmgr_bo_references(struct mos_linux_bo *bo, struct mos_linux_bo *target_bo)
{
NOT_IMPLEMENTED();
return 0;
}