media: rockchip: vpss: add RKVPSS_CMD_BUF_DEL_BY_FILE cmd

Change-Id: I4c80133b75459c419f6572384be2fca9cdec978f
Signed-off-by: Wei Dun <willam.wei@rock-chips.com>
This commit is contained in:
Wei Dun
2025-09-08 18:47:59 +08:00
committed by willam.wei
parent 25f97ec5e6
commit 3795c31e57
3 changed files with 16 additions and 3 deletions

View File

@@ -91,6 +91,7 @@ long vpss_rockit_action(int *file_id, unsigned int cmd, void *arg)
case RKVPSS_CMD_MODULE_GET:
case RKVPSS_CMD_BUF_ADD:
case RKVPSS_CMD_BUF_DEL:
case RKVPSS_CMD_BUF_DEL_BY_FILE:
case RKVPSS_CMD_FRAME_HANDLE:
case RKVPSS_CMD_CHECKPARAMS:
case RKVPSS_CMD_WRAP_DVBM_INIT:

View File

@@ -2631,6 +2631,9 @@ long rkvpss_ofl_action(struct rkvpss_offline_dev *ofl,
case RKVPSS_CMD_BUF_DEL:
rkvpss_ofl_buf_del(ofl, file_id, arg);
break;
case RKVPSS_CMD_BUF_DEL_BY_FILE:
rkvpss_ofl_buf_del_by_file(ofl, file_id);
break;
case RKVPSS_CMD_CHECKPARAMS:
ret = rkvpss_check_params(ofl, arg, &unite);
break;
@@ -2662,9 +2665,15 @@ static long rkvpss_ofl_ioctl(struct file *file, void *fh,
long ret = 0;
int file_id = 0;
if (!arg) {
ret = -EINVAL;
goto out;
switch (cmd) {
case RKVPSS_CMD_BUF_DEL_BY_FILE:
break;
default:
if (!arg) {
ret = -EINVAL;
goto out;
}
break;
}
file_id = ofl_get_file_id(ofl, file);

View File

@@ -88,6 +88,9 @@
#define RKVPSS_CMD_STREAM_ATTACH_INFO \
_IOW('V', BASE_VIDIOC_PRIVATE + 56, int)
#define RKVPSS_CMD_BUF_DEL_BY_FILE \
_IO('V', BASE_VIDIOC_PRIVATE + 57)
/****** vpss(offline mode rockit) independent ioctl*************/
#define RKVPSS_CMD_OPEN \
_IOWR('V', BASE_VIDIOC_PRIVATE + 101, int *)