#include <linux/module.h>
 #include <linux/platform_device.h>
 
+#include <media/v4l2-event.h>
+
 #include "video.h"
 
 static void tegra_v4l2_dev_release(struct v4l2_device *v4l2_dev)
        kfree(vid);
 }
 
+static void tegra_v4l2_dev_notify(struct v4l2_subdev *sd,
+                                 unsigned int notification, void *arg)
+{
+       struct tegra_vi_channel *chan;
+       const struct v4l2_event *ev = arg;
+
+       if (notification != V4L2_DEVICE_NOTIFY_EVENT)
+               return;
+
+       chan = v4l2_get_subdev_hostdata(sd);
+       v4l2_event_queue(&chan->video, arg);
+       if (ev->type == V4L2_EVENT_SOURCE_CHANGE && vb2_is_streaming(&chan->queue))
+               vb2_queue_error(&chan->queue);
+}
+
 static int host1x_video_probe(struct host1x_device *dev)
 {
        struct tegra_video_device *vid;
 
        vid->v4l2_dev.mdev = &vid->media_dev;
        vid->v4l2_dev.release = tegra_v4l2_dev_release;
+       vid->v4l2_dev.notify = tegra_v4l2_dev_notify;
        ret = v4l2_device_register(&dev->dev, &vid->v4l2_dev);
        if (ret < 0) {
                dev_err(&dev->dev,