struct g2d_reg extra[],
unsigned int num_regs)
{
- unsigned int n, i;
+ unsigned int n;
+ size_t i;
/*
* TODO: NxM loop ==> total 2008 comparison are required in maximum:
* Consider if we can make it simple with a single range [0x2000, 4000)
cmdaddr += cmds->num_extra_regs;
for (base = 0x3600; base < 0x3800; base += 0x100) {
for (i = 0; i < NR_TM_LUT_VALUES; i++) {
- cmdaddr->offset = base + i * sizeof(u32);
+ cmdaddr->offset =
+ (unsigned long)(base + i * sizeof(u32));
cmdaddr->value = tm_tuned_lut[i];
cmdaddr++;
task->cmd_count++;
static struct g2d_stamp {
ktime_t time;
struct g2d_task *task;
- u32 state;
+ unsigned long state;
u32 job_id;
u32 val;
s32 info;
while (1) {
stamp = &g2d_stamp_list[i];
- seq_printf(s, "[%4d] %u:%2u@%u (0x%2x) %6d %06llu\n", i++,
+ seq_printf(s, "[%4d] %u:%2u@%u (0x%2lx) %6d %06llu\n", i++,
stamp->cpu, stamp->job_id, stamp->val, stamp->state,
stamp->info, ktime_to_us(stamp->time));
{
unsigned int i, num_array;
- num_array = ARRAY_SIZE(g2d_reg_info) - G2D_MAX_IMAGES +
- ((task) ? task->num_source : G2D_MAX_IMAGES);
+ num_array = (unsigned int)ARRAY_SIZE(g2d_reg_info) - G2D_MAX_IMAGES
+ + ((task) ? task->num_source : G2D_MAX_IMAGES);
for (i = 0; i < num_array; i++) {
pr_info("[%s: %04X .. %04X]\n",
switch (cmd) {
case COMPAT_G2D_IOC_PROCESS:
- cmd = G2D_IOC_PROCESS;
+ cmd = (unsigned int)G2D_IOC_PROCESS;
break;
case G2D_IOC_PRIORITY:
case G2D_IOC_PERFORMANCE:
if (data->num_buffers > 1) {
for (i = 0; i < data->num_buffers; i++) {
- payload = g2d_get_payload_index(cmd, fmt, i,
- data->num_buffers);
+ payload = (unsigned int)g2d_get_payload_index(
+ cmd, fmt, i, data->num_buffers);
if (data->buffer[i].length < payload) {
dev_err(dev,
"%s: Too small buffer[%d]: expected %uB"
layer->buffer[i].payload = payload;
}
} else {
- payload = g2d_get_payload(cmd, fmt, layer->flags);
+ payload = (unsigned int)g2d_get_payload(cmd, fmt, layer->flags);
if (data->buffer[0].length < payload) {
dev_err(dev, "%s: Too small buffer: expected %uB"
" for %ux%u(bt %u)/%s but %uB is given\n",
data->num_buffers = 1;
data->buffer[0].dmabuf.offset = 0;
- data->buffer[0].length = ctx->hwfc_info->bufs[idx]->size;
+ data->buffer[0].length = (__u32)ctx->hwfc_info->bufs[idx]->size;
}
if (target->buffer_type == G2D_BUFTYPE_EMPTY) {