Merge "video: driver: fix compilation issues with mainline kernel"

This commit is contained in:
qctecmdr
2022-11-09 21:54:22 -08:00
gecommit door Gerrit - the friendly Code Review server
bovenliggende 643d2e2304 166330d8a9
commit b33fc5110e
8 gewijzigde bestanden met toevoegingen van 16 en 27 verwijderingen

Bestand weergeven

@@ -49,7 +49,7 @@ extern unsigned int msm_vidc_enable_bugon;
#define FMT_STRING_FAULT_HANDLER \
"%s: faulting address: %lx\n"
#define FMT_STRING_SET_CAP \
"set cap: name: %24s, cap value: %#10x, hfi: %#10x\n"
"set cap: name: %24s, cap value: %#10x, hfi: %#10llx\n"
/* To enable messages OR these values and
* echo the result to debugfs file.

Bestand weergeven

@@ -143,7 +143,7 @@ static int __load_fw_to_memory(struct platform_device *pdev,
virt = memremap(phys, res_size, MEMREMAP_WC);
if (!virt) {
d_vpr_e("%s: failed to remap fw memory phys %pa[p]\n",
__func__, phys);
__func__, &phys);
return -ENOMEM;
}

Bestand weergeven

@@ -177,7 +177,7 @@ void msm_vidc_show_stats(void *inst)
for (x = 0; x < MAX_PROFILING_POINTS; x++) {
if (i->debug.pdata[x].name[0]) {
if (i->debug.samples) {
i_vpr_p(i, "%s averaged %d ms/sample\n",
i_vpr_p(i, "%s averaged %llu ms/sample\n",
i->debug.pdata[x].name,
i->debug.pdata[x].cumulative /
i->debug.samples);

Bestand weergeven

@@ -2855,7 +2855,7 @@ int msm_vidc_ts_reorder_get_first_timestamp(struct msm_vidc_inst *inst, u64 *tim
/* check if list empty */
if (list_empty(&inst->ts_reorder.list)) {
i_vpr_e(inst, "%s: list empty. ts %lld\n", __func__, timestamp);
i_vpr_e(inst, "%s: list empty. ts %lld\n", __func__, *timestamp);
return -EINVAL;
}
@@ -5577,7 +5577,7 @@ void msm_vidc_destroy_buffers(struct msm_vidc_inst *inst)
inode_num = f_inode->i_ino;
}
}
i_vpr_e(inst, "%s: removing dma_buf %#lx, inode %lu, refcount %u\n",
i_vpr_e(inst, "%s: removing dma_buf %p, inode %lu, refcount %u\n",
__func__, dbuf->dmabuf, inode_num, dbuf->refcount);
call_mem_op(core, dma_buf_put_completely, inst, dbuf);
}

Bestand weergeven

@@ -6,9 +6,6 @@
#include <linux/dma-buf.h>
#include <linux/dma-heap.h>
#include <linux/dma-mapping.h>
#include <linux/qcom-dma-mapping.h>
#include <linux/mem-buf.h>
#include <soc/qcom/secure_buffer.h>
#include "msm_vidc_memory.h"
#include "msm_vidc_debug.h"
@@ -122,7 +119,7 @@ void msm_vidc_pool_free(struct msm_vidc_inst *inst, void *vidc_buf)
/* sanitize buffer addr */
if (hdr->buf != vidc_buf) {
i_vpr_e(inst, "%s: invalid buf addr %#x\n", __func__, vidc_buf);
i_vpr_e(inst, "%s: invalid buf addr %p\n", __func__, vidc_buf);
return;
}
@@ -135,7 +132,7 @@ void msm_vidc_pool_free(struct msm_vidc_inst *inst, void *vidc_buf)
/* catch double-free request */
if (!hdr->busy) {
i_vpr_e(inst, "%s: double free request. type %s, addr %#x\n", __func__,
i_vpr_e(inst, "%s: double free request. type %s, addr %p\n", __func__,
pool->name, vidc_buf);
return;
}
@@ -298,7 +295,7 @@ static void msm_vidc_dma_buf_put(struct msm_vidc_inst *inst, struct dma_buf *dma
}
}
if (!found) {
i_vpr_e(inst, "%s: invalid dmabuf %#x\n", __func__, dmabuf);
i_vpr_e(inst, "%s: invalid dmabuf %p\n", __func__, dmabuf);
return;
}
@@ -358,12 +355,6 @@ static struct dma_buf_attachment *msm_vidc_dma_buf_attach(struct msm_vidc_core *
return NULL;
}
/*
* We do not need dma_map function to perform cache operations
* on the whole buffer size and hence pass skip sync flag.
*/
attach->dma_map_attrs |= DMA_ATTR_SKIP_CPU_SYNC;
return attach;
}

Bestand weergeven

@@ -4,8 +4,6 @@
*/
/* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved. */
#include <linux/qcom-dma-mapping.h>
#include "msm_vidc_vb2.h"
#include "msm_vidc_core.h"
#include "msm_vidc_inst.h"

Bestand weergeven

@@ -108,7 +108,7 @@ static int __init_register_base(struct msm_vidc_core *core)
res->register_base_addr = devm_platform_ioremap_resource(core->pdev, 0);
if (IS_ERR(res->register_base_addr)) {
d_vpr_e("%s: map reg addr failed %d\n",
d_vpr_e("%s: map reg addr failed %ld\n",
__func__, PTR_ERR(res->register_base_addr));
return -EINVAL;
}
@@ -499,7 +499,7 @@ static int __init_freq_table(struct msm_vidc_core *core)
/* print freq field freq_set */
d_vpr_h("%s: updated freq table\n", __func__);
for (cnt = 0; cnt < clks->count; cnt++)
d_vpr_h("%s:\t %u\n", __func__, clks->freq_tbl[cnt].freq);
d_vpr_h("%s:\t %lu\n", __func__, clks->freq_tbl[cnt].freq);
return rc;
}

Bestand weergeven

@@ -804,7 +804,7 @@ static int handle_input_buffer(struct msm_vidc_inst *inst,
}
}
if (!found) {
i_vpr_e(inst, "%s: invalid buffer idx %d addr %#x data_offset %d\n",
i_vpr_e(inst, "%s: invalid buffer idx %d addr %#llx data_offset %d\n",
__func__, buffer->index, buffer->base_address,
buffer->data_offset);
return -EINVAL;
@@ -913,7 +913,7 @@ static int handle_output_buffer(struct msm_vidc_inst *inst,
break;
}
if (!found) {
i_vpr_l(inst, "%s: invalid idx %d daddr %#x\n",
i_vpr_l(inst, "%s: invalid idx %d daddr %#llx\n",
__func__, buffer->index, buffer->base_address);
return 0;
}
@@ -1058,7 +1058,7 @@ static int handle_input_metadata_buffer(struct msm_vidc_inst *inst,
}
}
if (!found) {
i_vpr_e(inst, "%s: invalid idx %d daddr %#x data_offset %d\n",
i_vpr_e(inst, "%s: invalid idx %d daddr %#llx data_offset %d\n",
__func__, buffer->index, buffer->base_address,
buffer->data_offset);
return -EINVAL;
@@ -1125,7 +1125,7 @@ static int handle_output_metadata_buffer(struct msm_vidc_inst *inst,
}
}
if (!found) {
i_vpr_e(inst, "%s: invalid idx %d daddr %#x data_offset %d\n",
i_vpr_e(inst, "%s: invalid idx %d daddr %#llx data_offset %d\n",
__func__, buffer->index, buffer->base_address,
buffer->data_offset);
return -EINVAL;
@@ -1298,7 +1298,7 @@ static int handle_release_internal_buffer(struct msm_vidc_inst *inst,
if (rc)
return rc;
} else {
i_vpr_e(inst, "%s: invalid idx %d daddr %#x\n",
i_vpr_e(inst, "%s: invalid idx %d daddr %#llx\n",
__func__, buffer->index, buffer->base_address);
return -EINVAL;
}
@@ -1320,7 +1320,7 @@ int handle_release_output_buffer(struct msm_vidc_inst *inst,
}
}
if (!found) {
i_vpr_e(inst, "%s: invalid idx %d daddr %#x\n",
i_vpr_e(inst, "%s: invalid idx %d daddr %#llx\n",
__func__, buffer->index, buffer->base_address);
return -EINVAL;
}