• Jacopo Mondi's avatar
    media: rcar-vin: Cache the mbus configuration flags · 158e2a53
    Jacopo Mondi authored
    Media bus configuration flags and media bus type were so far a property
    of each VIN instance, as the subdevice they were connected to was
    immutable during the whole system life time.
    
    With the forth-coming introduction of parallel input devices support,
    a VIN instance can have the subdevice it is connected to switched at
    runtime, from a CSI-2 subdevice to a parallel one and viceversa, through
    the modification of links between media entities in the media controller
    graph. To avoid discarding the per-subdevice configuration flags retrieved by
    v4l2_fwnode parsing facilities, cache them in the 'rvin_graph_entity'
    member of each VIN instance, opportunely renamed to 'rvin_parallel_entity'.
    
    Also modify the register configuration function to take mbus flags into
    account when running on a bus type that supports them.
    
    The media bus type currently in use will be updated in a follow-up patch
    to the link state change notification function.
    Signed-off-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
    Acked-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    158e2a53
rcar-vin.h 7.12 KB