diff options
author | Johan Korsnes <johan.korsnes@gmail.com> | 2019-06-18 09:37:21 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-21 23:31:54 +0200 |
commit | 389e21b312a4bbe4ae72de5412dd3db6ea0818fa (patch) | |
tree | f3f8b30c86e4fe850e355443d2dc844b4a1d79ff /drivers/media | |
parent | media: vivid: add display present control (diff) | |
download | linux-389e21b312a4bbe4ae72de5412dd3db6ea0818fa.tar.xz linux-389e21b312a4bbe4ae72de5412dd3db6ea0818fa.zip |
media: vivid: add number of HDMI ports to device state
This will be used for HDMI-specific controls such as hotplug detection
and power present.
Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/vivid/vivid-core.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-core.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c index b1d5332b363f..8c211fba3c66 100644 --- a/drivers/media/platform/vivid/vivid-core.c +++ b/drivers/media/platform/vivid/vivid-core.c @@ -720,6 +720,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) in_type_counter[HDMI]--; dev->num_inputs--; } + dev->num_hdmi_inputs = in_type_counter[HDMI]; /* how many outputs do we have and of what type? */ dev->num_outputs = num_outputs[inst]; @@ -742,6 +743,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) out_type_counter[HDMI]--; dev->num_outputs--; } + dev->num_hdmi_outputs = out_type_counter[HDMI]; /* do we create a video capture device? */ dev->has_vid_cap = node_type & 0x0001; diff --git a/drivers/media/platform/vivid/vivid-core.h b/drivers/media/platform/vivid/vivid-core.h index 3b89e930eb0d..3b2c346ed53d 100644 --- a/drivers/media/platform/vivid/vivid-core.h +++ b/drivers/media/platform/vivid/vivid-core.h @@ -168,9 +168,11 @@ struct vivid_dev { /* supported features */ bool multiplanar; unsigned num_inputs; + unsigned int num_hdmi_inputs; u8 input_type[MAX_INPUTS]; u8 input_name_counter[MAX_INPUTS]; unsigned num_outputs; + unsigned int num_hdmi_outputs; u8 output_type[MAX_OUTPUTS]; u8 output_name_counter[MAX_OUTPUTS]; bool has_audio_inputs; |