• Laurent Pinchart's avatar
    media: ti-vpe: cal: Refactor camerarx start and stop · 49b184a0
    Laurent Pinchart authored
    Refactor the camerarx start and stop procedure to group all the
    corresponding operations in two functions, cal_camerarx_start() and
    cal_camerarx_stop() instead of splitting them in multiple steps called
    from the vb2 stream start and stop functions. This reduces the coupling
    between the camerarx and the contexts, and better models the camerarx
    hardware.
    
    The cal_camerarx_start() is a reworked version of cal_camerarx_init()
    with the description of the start procedure updated to match the AM65x,
    DRA7[124567]x and DRA80xM TRMs. The cal_camerarx_wait_ready() function
    is inlined in cal_camerarx_start() to better describe the start
    procedure.
    
    No functional change is included in the camerarx start and stop
    procedures themselves, but the interleaving of the start steps with the
    context configuration has been changed in cal_start_streaming().
    Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    49b184a0
cal.c 66.1 KB