diff options
author | Ryo Kataoka <ryo.kataoka.wt@renesas.com> | 2019-03-22 20:50:28 +0900 |
---|---|---|
committer | Ryo Kataoka <ryo.kataoka.wt@renesas.com> | 2019-03-22 20:50:28 +0900 |
commit | 7165b409091f5c3fe8bc9a602613564f4a330034 (patch) | |
tree | d7d0cf74f00f1255025814cdc1b23b6838f54f49 | |
parent | 505e5f61f280cc4a06942d8f4493d10af4011ee7 (diff) | |
parent | 620f3e493e55cf958dfadfa40b728ab921e5ab55 (diff) | |
download | renesas-bsp-7165b409091f5c3fe8bc9a602613564f4a330034.tar.gz |
Merge branch 'rcar-3.9.2/rcar-vin.rc2' into v4.14.75-ltsi/rcar-3.9.3
* rcar-3.9.2/rcar-vin.rc2:
media: rcar-vin: Allow independent VIN link enablement
-rw-r--r-- | drivers/media/platform/rcar-vin/rcar-core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index c57a0a5313deac..d6f99dbb165dd0 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -1,7 +1,7 @@ /* * Driver for Renesas R-Car VIN * - * Copyright (C) 2016-2018 Renesas Electronics Corp. + * Copyright (C) 2016-2019 Renesas Electronics Corp. * Copyright (C) 2011-2013 Renesas Solutions Corp. * Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com> * Copyright (C) 2008 Magnus Damm @@ -135,9 +135,13 @@ static int rvin_group_link_notify(struct media_link *link, u32 flags, !is_media_entity_v4l2_video_device(link->sink->entity)) return 0; - /* If any entity is in use don't allow link changes. */ + /* + * Don't allow link changes if any entity in the graph is + * streaming, modifying the CHSEL register fields can disrupt + * running streams. + */ media_device_for_each_entity(entity, &group->mdev) - if (entity->use_count) + if (entity->stream_count) return -EBUSY; mutex_lock(&group->lock); |