lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] media: rcar-vin: Allow userspace to subscribe to V4L2_EVENT_XFER_ERROR
    Date
    Userspace should be able to subscribe to V4L2_EVENT_XFER_ERROR in order to
    implement recovery from possible transfer errors. We can set the event
    queue size to 1, since only the timestamp of the latest transfer error is
    relevant to determine if a recovery is needed for the current streaming
    session.

    Signed-off-by: Michael Rodin <mrodin@de.adit-jv.com>
    ---
    drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
    index 2e2aa9d746ee..8118c8d41a66 100644
    --- a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
    +++ b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
    @@ -648,6 +648,8 @@ static int rvin_subscribe_event(struct v4l2_fh *fh,
    switch (sub->type) {
    case V4L2_EVENT_SOURCE_CHANGE:
    return v4l2_event_subscribe(fh, sub, 4, NULL);
    + case V4L2_EVENT_XFER_ERROR:
    + return v4l2_event_subscribe(fh, sub, 1, NULL);
    }
    return v4l2_ctrl_subscribe_event(fh, sub);
    }
    --
    2.25.1
    \
     
     \ /
      Last update: 2022-06-28 20:01    [W:2.269 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site