#include <linux/list.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/vmalloc.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
-#include <media/videobuf2-vmalloc.h>
#include "vpu.h"
#include "vpu_defs.h"
#include "vpu_core.h"
vdec->slots = NULL;
vdec->slot_count = 0;
}
- vfree(vdec);
+ kfree(vdec);
inst->priv = NULL;
- vfree(inst);
+ kfree(inst);
}
static void vdec_init_params(struct vdec_t *vdec)
struct vdec_t *vdec;
int ret;
- inst = vzalloc(sizeof(*inst));
+ inst = kzalloc(sizeof(*inst), GFP_KERNEL);
if (!inst)
return -ENOMEM;
- vdec = vzalloc(sizeof(*vdec));
+ vdec = kzalloc(sizeof(*vdec), GFP_KERNEL);
if (!vdec) {
- vfree(inst);
+ kfree(inst);
return -ENOMEM;
}
sizeof(*vdec->slots),
GFP_KERNEL | __GFP_ZERO);
if (!vdec->slots) {
- vfree(vdec);
- vfree(inst);
+ kfree(vdec);
+ kfree(inst);
return -ENOMEM;
}
vdec->slot_count = VDEC_SLOT_CNT_DFT;
#include <linux/videodev2.h>
#include <linux/ktime.h>
#include <linux/rational.h>
-#include <linux/vmalloc.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
-#include <media/videobuf2-vmalloc.h>
#include "vpu.h"
#include "vpu_defs.h"
#include "vpu_core.h"
v4l2_m2m_dst_buf_remove(inst->fh.m2m_ctx)))
break;
list_del_init(&frame->list);
- vfree(frame);
+ kfree(frame);
}
return 0;
if (!info)
return -EINVAL;
venc = inst->priv;
- frame = vzalloc(sizeof(*frame));
+ frame = kzalloc(sizeof(*frame), GFP_KERNEL);
if (!frame)
return -ENOMEM;
return;
venc = inst->priv;
- vfree(venc);
+ kfree(venc);
inst->priv = NULL;
- vfree(inst);
+ kfree(inst);
}
static int venc_start_session(struct vpu_inst *inst, u32 type)
list_for_each_entry_safe(frame, tmp, &venc->frames, list) {
list_del_init(&frame->list);
- vfree(frame);
+ kfree(frame);
}
}
return ret;
list_del_init(&frame->list);
- vfree(frame);
+ kfree(frame);
return 0;
}
struct venc_t *venc;
int ret;
- inst = vzalloc(sizeof(*inst));
+ inst = kzalloc(sizeof(*inst), GFP_KERNEL);
if (!inst)
return -ENOMEM;
- venc = vzalloc(sizeof(*venc));
+ venc = kzalloc(sizeof(*venc), GFP_KERNEL);
if (!venc) {
- vfree(inst);
+ kfree(inst);
return -ENOMEM;
}
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/delay.h>
-#include <linux/vmalloc.h>
#include "vpu.h"
#include "vpu_defs.h"
#include "vpu_cmds.h"
int i;
int ret;
- cmd = vzalloc(sizeof(*cmd));
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return NULL;
- cmd->pkt = vzalloc(sizeof(*cmd->pkt));
+ cmd->pkt = kzalloc(sizeof(*cmd->pkt), GFP_KERNEL);
if (!cmd->pkt) {
- vfree(cmd);
+ kfree(cmd);
return NULL;
}
ret = vpu_iface_pack_cmd(inst->core, cmd->pkt, inst->id, id, data);
if (ret) {
dev_err(inst->dev, "iface pack cmd %s fail\n", vpu_id_name(id));
- vfree(cmd->pkt);
- vfree(cmd);
+ kfree(cmd->pkt);
+ kfree(cmd);
return NULL;
}
for (i = 0; i < ARRAY_SIZE(vpu_cmd_requests); i++) {
return;
if (cmd->last_response_cmd)
atomic_long_set(cmd->last_response_cmd, cmd->key);
- vfree(cmd->pkt);
- vfree(cmd);
+ kfree(cmd->pkt);
+ kfree(cmd);
}
static int vpu_session_process_cmd(struct vpu_inst *inst, struct vpu_cmd_t *cmd)
#include <linux/pm_runtime.h>
#include <linux/pm_domain.h>
#include <linux/firmware.h>
-#include <linux/vmalloc.h>
#include "vpu.h"
#include "vpu_defs.h"
#include "vpu_core.h"
INIT_WORK(&core->msg_work, vpu_msg_run_work);
INIT_DELAYED_WORK(&core->msg_delayed_work, vpu_msg_delayed_work);
buffer_size = roundup_pow_of_two(VPU_MSG_BUFFER_SIZE);
- core->msg_buffer = vzalloc(buffer_size);
+ core->msg_buffer = kzalloc(buffer_size, GFP_KERNEL);
if (!core->msg_buffer) {
dev_err(core->dev, "failed allocate buffer for fifo\n");
ret = -ENOMEM;
return 0;
error:
- if (core->msg_buffer) {
- vfree(core->msg_buffer);
- core->msg_buffer = NULL;
- }
+ kfree(core->msg_buffer);
+ core->msg_buffer = NULL;
if (core->workqueue) {
destroy_workqueue(core->workqueue);
core->workqueue = NULL;
vpu_core_put_vpu(core);
core->vpu = NULL;
- vfree(core->msg_buffer);
+ kfree(core->msg_buffer);
core->msg_buffer = NULL;
if (core->workqueue) {