• Steve Longerbeam's avatar
    media: rcar-vin: Allow independent VIN link enablement · 68ec6a13
    Steve Longerbeam authored
    [ Upstream commit c5ff0edb ]
    
    There is a block of code in rvin_group_link_notify() that prevents
    enabling a link to a VIN node if any entity in the media graph is
    in use. This prevents enabling a VIN link even if there is an in-use
    entity somewhere in the graph that is independent of the link's
    pipeline.
    
    For example, the code block will prevent enabling a link from
    the first rcar-csi2 receiver to a VIN node even if there is an
    enabled link somewhere far upstream on the second independent
    rcar-csi2 receiver pipeline.
    
    If this code block is meant to prevent modifying a link if any entity
    in the graph is actively involved in streaming (because modifying
    the CHSEL register fields can disrupt any/all running streams), then
    the entities stream counts should be checked rather than the use counts.
    
    (There is already such a check in __media_entity_setup_link() that verifies
    the stream_count of the link's source and sink entities are both zero,
    but that is insufficient, since there should be no running streams in
    the entire graph).
    
    Modify the code block to check the entity stream_count instead of the
    use_count (and elaborate on the comment). VIN node links can now be
    enabled even if there are other independent in-use entities that are
    not streaming.
    
    Fixes: c0cc5aef ("media: rcar-vin: add link notify for Gen3")
    Signed-off-by: 's avatarSteve Longerbeam <slongerbeam@gmail.com>
    Reviewed-by: 's avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    Signed-off-by: 's avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: 's avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    68ec6a13
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...