Commit d15d2004 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Squash warnings

parent 527067de
......@@ -211,18 +211,6 @@ static char *panwrap_wrap_mode_name(enum mali_wrap_mode op)
}
#undef DEFINE_CASE
static void panwrap_property_u32_list(const char *name, const u32 *lst, size_t c)
{
panwrap_log(".%s = { ", name);
panwrap_indent++;
for (int i = 0; i < c; ++i)
panwrap_log_cont("0x%" PRIx32 ", ", lst[i]);
panwrap_indent--;
panwrap_log_cont("},\n");
}
static inline char *panwrap_decode_fbd_type(enum mali_fbd_type type)
{
if (type == MALI_SFBD) return "SFBD";
......@@ -231,7 +219,7 @@ static inline char *panwrap_decode_fbd_type(enum mali_fbd_type type)
}
static bool
panwrap_deduplicate(struct panwrap_mapped_memory *mem, uint64_t gpu_va, const char *name, int number)
panwrap_deduplicate(const struct panwrap_mapped_memory *mem, uint64_t gpu_va, const char *name, int number)
{
if (mem->touched[(gpu_va - mem->gpu_va) / sizeof(uint32_t)]) {
/* XXX: Is this correct? */
......@@ -396,9 +384,7 @@ void panwrap_replay_attributes(const struct panwrap_mapped_memory *mem,
panwrap_log("{\n");
panwrap_indent++;
int flags = attr[i].elements & 3;
panwrap_prop("elements = (%s_%d_p) | %d", base, i, attr[i].elements & 3);
panwrap_prop("elements = (%s_%d_p) | %d", base, i, (int) (attr[i].elements & 3));
panwrap_prop("stride = 0x%" PRIx32, attr[i].stride);
panwrap_prop("size = 0x%" PRIx32, attr[i].size);
panwrap_indent--;
......@@ -425,10 +411,8 @@ panwrap_replay_shader_address(const char *name, mali_ptr ptr)
}
static void
panwrap_replay_stencil(const char *name, const u32 *raw)
panwrap_replay_stencil(const char *name, const struct mali_stencil_test *stencil)
{
const struct mali_stencil_test *stencil = (struct mali_stencil_test *) raw;
const char *func = panwrap_func_name(stencil->func);
const char *sfail = panwrap_stencil_op_name(stencil->sfail);
const char *dpfail = panwrap_stencil_op_name(stencil->dpfail);
......@@ -450,10 +434,8 @@ panwrap_replay_stencil(const char *name, const u32 *raw)
}
static void
panwrap_replay_blend_equation(const u32 *raw)
panwrap_replay_blend_equation(const struct mali_blend_equation *blend)
{
const struct mali_blend_equation *blend = (struct mali_blend_equation *) raw;
if (blend->zero1 || blend->padding)
panwrap_msg("Blend zero tripped: %X, %X\n", blend->zero1, blend->padding);
......@@ -476,7 +458,7 @@ panwrap_replay_attribute_meta(int job_no, int count, const struct mali_payload_v
{
char base[128];
char *prefix = varying ? "varying" : "attribute";
snprintf(base, sizeof(base), "%s_meta", prefix, job_no);
snprintf(base, sizeof(base), "%s_meta", prefix, job_no); /* XXX */
panwrap_log("struct mali_attr_meta %s_%d[] = {\n", base, job_no);
panwrap_indent++;
......@@ -528,7 +510,7 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
/* TODO: Isn't this an -M-FBD? What's the difference? */
panwrap_replay_sfbd((u64) (uintptr_t) v->framebuffer, job_no);
int varying_count, attribute_count, uniform_count;
int varying_count = 0, attribute_count = 0, uniform_count = 0;
if (shader_meta_ptr) {
struct panwrap_mapped_memory *smem = panwrap_find_mapped_gpu_mem_containing(shader_meta_ptr);
......@@ -1028,7 +1010,7 @@ int panwrap_replay_jc(mali_ptr jc_gpu_va)
{
struct mali_job_descriptor_header *h;
int start_number;
int start_number = 0;
bool first = true;
bool last_size;
......
......@@ -50,7 +50,7 @@ struct panwrap_mapped_memory {
#define DISABLE_CPU_CACHING 1
#define TOUCH_MEMSET(mem, addr, sz, offset) \
memset(mem->touched + ((addr - mem->gpu_va) / sizeof(uint32_t)), 1, (sz - offset) / sizeof(uint32_t)); \
memset(mem->touched + (((addr) - mem->gpu_va) / sizeof(uint32_t)), 1, ((sz) - (offset)) / sizeof(uint32_t)); \
panwrap_log("\n");
#define TOUCH_LEN(mem, addr, sz, ename, number, dyn) \
......
......@@ -119,7 +119,6 @@ ioctl_get_info(unsigned long int request)
static int mali_fd = 0;
static long context_id = 0;
static char debugfs_ctx_path[PATH_MAX] = {0};
static LIST_HEAD(allocations);
static LIST_HEAD(mmaps);
......@@ -197,20 +196,6 @@ static const struct panwrap_flag_info jd_req_flag_info[] = {
};
#undef FLAG_INFO
#define FLAG_INFO(flag) { flag, #flag }
static const struct panwrap_flag_info external_resources_access_flag_info[] = {
FLAG_INFO(MALI_EXT_RES_ACCESS_SHARED),
FLAG_INFO(MALI_EXT_RES_ACCESS_EXCLUSIVE),
{}
};
static const struct panwrap_flag_info mali_jd_dep_type_flag_info[] = {
FLAG_INFO(MALI_JD_DEP_TYPE_DATA),
FLAG_INFO(MALI_JD_DEP_TYPE_ORDER),
{}
};
#undef FLAG_INFO
#define FLAG_INFO(flag) { JS_FEATURE_##flag, "JS_FEATURE_" #flag }
static const struct panwrap_flag_info js_feature_info[] = {
FLAG_INFO(NULL_JOB),
......@@ -563,8 +548,6 @@ static int stream_count = 0;
static inline void
ioctl_decode_pre_stream_create(unsigned long int request, void *ptr)
{
const struct mali_ioctl_stream_create *args = ptr;
/* Stream name is not semantic as far as I know, but the blob allocates
* them nondeterministically. Patch over this here for repro. */
......@@ -979,7 +962,6 @@ int ioctl(int fd, int request, ...)
const char *name;
char *lname;
int number;
union mali_ioctl_header *header;
PROLOG(ioctl);
int ioc_size = _IOC_SIZE(request);
int ret;
......@@ -1001,7 +983,6 @@ int ioctl(int fd, int request, ...)
LOCK();
msleep(log_delay);
name = ioctl_get_info(request)->name ?: "???";
header = ptr;
bool ignore = false;
......@@ -1135,12 +1116,12 @@ int ioctl(int fd, int request, ...)
panwrap_log_flush();
getchar();
}
out:
UNLOCK();
return ret;
}
static void inline *panwrap_mmap_wrap(mmap_func *func,
static inline void *panwrap_mmap_wrap(mmap_func *func,
void *addr, size_t length, int prot,
int flags, int fd, loff_t offset)
{
......
......@@ -92,7 +92,7 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_tripipe *meta,
if (src) {
last_shader_size = 1024;
dst = malloc(last_shader_size);
pandev_shader_assemble(dst, src, type);
pandev_shader_assemble((uint32_t *) dst, src, type);
} else {
dst = pandev_shader_compile(NULL, NULL, type);
}
......
......@@ -19,7 +19,7 @@ void slowfb_init(uint8_t *framebuffer, int width, int height) {
XNextEvent(d, &e);
if (e.type == MapNotify) break;
}
image = XCreateImage(d, DefaultVisual(d, 0), 24, ZPixmap, 0, framebuffer, width, height, 32, 0);
image = XCreateImage(d, DefaultVisual(d, 0), 24, ZPixmap, 0, (char *) framebuffer, width, height, 32, 0);
}
void slowfb_update(uint8_t *framebuffer, int width, int height) {
XPutImage(d, w, gc, image, 0, 0, 0, 0, width, height);
......
......@@ -17,8 +17,6 @@ int main(int argc, const char **argv)
struct pipe_screen *screen = &_screen;
struct pipe_context *gallium = panfrost_create_context(screen, NULL, 0);
struct panfrost_context *ctx = (struct panfrost_context *) gallium;
struct pipe_shader_state vs_cso, fs_cso;
gallium->bind_fs_state(gallium, gallium->create_fs_state(gallium, &fs_cso));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment