mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-08 16:36:14 +00:00
v2: Fixed the source register used for the send with EOT Fixed the posted destination operand for the send with EOT v3: Workaround: Insert MEDIA_STATE_FLUSH after MEDIA_OBJECT. Fixed the cache agent used in media_block_write message Set Instruction Buffer size Modify Enable to 1, otherwise it may result in GPU hang Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
58 lines
1.2 KiB
C
58 lines
1.2 KiB
C
#ifndef RENDE_MEDIA_FILL_H
|
|
#define RENDE_MEDIA_FILL_H
|
|
|
|
#include <stdlib.h>
|
|
#include <sys/ioctl.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
#include <fcntl.h>
|
|
#include <inttypes.h>
|
|
#include <errno.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/time.h>
|
|
#include <getopt.h>
|
|
#include "drm.h"
|
|
#include "i915_drm.h"
|
|
#include "drmtest.h"
|
|
#include "intel_bufmgr.h"
|
|
#include "intel_batchbuffer.h"
|
|
#include "intel_gpu_tools.h"
|
|
|
|
struct scratch_buf {
|
|
drm_intel_bo *bo;
|
|
uint32_t stride;
|
|
uint32_t tiling;
|
|
uint32_t *data;
|
|
uint32_t *cpu_mapping;
|
|
uint32_t size;
|
|
unsigned num_tiles;
|
|
};
|
|
|
|
static inline unsigned buf_width(struct scratch_buf *buf)
|
|
{
|
|
return buf->stride/sizeof(uint8_t);
|
|
}
|
|
|
|
static inline unsigned buf_height(struct scratch_buf *buf)
|
|
{
|
|
return buf->size/buf->stride;
|
|
}
|
|
|
|
typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch,
|
|
struct scratch_buf *dst,
|
|
unsigned x, unsigned y,
|
|
unsigned width, unsigned height,
|
|
uint8_t color);
|
|
|
|
media_fillfunc_t get_media_fillfunc(int devid);
|
|
|
|
void
|
|
gen8_media_fillfunc(struct intel_batchbuffer *batch,
|
|
struct scratch_buf *dst,
|
|
unsigned x, unsigned y,
|
|
unsigned width, unsigned height,
|
|
uint8_t color);
|
|
|
|
#endif /* RENDE_MEDIA_FILL_H */
|