Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: free hdmi rx buffers on release #11

Open
wants to merge 1 commit into
base: rtk1296_ow
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,10 @@ static long v4l2_hdmi_do_ioctl(struct file *file, unsigned int cmd, void *arg)
}
case VIDIOC_STREAMOFF:
{
struct vb2_queue *vq;

HDMIRX_INFO(" ioctl VIDIOC_STREAMOFF");

vb2_streamoff(&dev->vb_hdmidq, dev->vb_hdmidq.type);

/* Release queue */
vq = &dev->vb_hdmidq;
vb2_queue_release(vq);

hdmi_timestamp_mode = 0;

break;
Expand Down Expand Up @@ -538,6 +532,20 @@ long v4l2_hdmi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return ret;
}

int compat_fop_release(struct file *file)
{
struct v4l2_hdmi_dev *dev = video_drvdata(file);
struct vb2_queue *vq;

HDMIRX_INFO("[%s]", __func__);

/* Release queue */
vq = &dev->vb_hdmidq;
vb2_queue_release(vq);

return vb2_fop_release(file);
}

long compat_v4l2_hdmi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret_val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

long v4l2_hdmi_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
long compat_v4l2_hdmi_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
int compat_fop_release(struct file *file);
int v4l2_mipi_top_open(struct file *filp);

struct compat_v4l2_plane {
Expand Down Expand Up @@ -57,7 +58,7 @@ struct compat_v4l2_buffer {
static const struct v4l2_file_operations hdmi_fops = {
.owner = THIS_MODULE,
.open = v4l2_mipi_top_open,
.release = vb2_fop_release,
.release = compat_fop_release,
.read = vb2_fop_read,
.poll = vb2_fop_poll,
.unlocked_ioctl = v4l2_hdmi_ioctl, /* V4L2 ioctl handler */
Expand Down