All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Korsnes <johan.korsnes@gmail.com>
To: linux-media@vger.kernel.org
Cc: Johan Korsnes <johan.korsnes@gmail.com>
Subject: [PATCH v2 4/9] media: vivid: add number of HDMI ports to device state
Date: Sun, 16 Jun 2019 11:22:13 -0700	[thread overview]
Message-ID: <20190616182218.37726-5-johan.korsnes@gmail.com> (raw)
In-Reply-To: <20190616182218.37726-1-johan.korsnes@gmail.com>

This will be used for HDMI-specific controls such as hotplug detection
and power present.

Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com>
---
 drivers/media/platform/vivid/vivid-core.c | 2 ++
 drivers/media/platform/vivid/vivid-core.h | 2 ++
 2 files changed, 4 insertions(+)

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 24104df6c444..1d04b7209f2b 100644
--- a/drivers/media/platform/vivid/vivid-core.h
+++ b/drivers/media/platform/vivid/vivid-core.h
@@ -180,9 +180,11 @@ struct vivid_dev {
 	/* supported features */
 	bool				multiplanar;
 	unsigned			num_inputs;
+	unsigned			num_hdmi_inputs;
 	u8				input_type[MAX_INPUTS];
 	u8				input_name_counter[MAX_INPUTS];
 	unsigned			num_outputs;
+	unsigned			num_hdmi_outputs;
 	u8				output_type[MAX_OUTPUTS];
 	u8				output_name_counter[MAX_OUTPUTS];
 	bool				has_audio_inputs;
-- 
2.19.1


  parent reply	other threads:[~2019-06-16 18:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16 18:22 [PATCH v2 0/9] media: vivid: add HDMI (dis)connect emulation Johan Korsnes
2019-06-16 18:22 ` [PATCH v2 1/9] media: vivid: make input dv_timings per-input Johan Korsnes
2019-06-16 18:22 ` [PATCH v2 2/9] media: vivid: make input std_signal per-input Johan Korsnes
2019-06-17  9:59   ` Hans Verkuil
2019-06-16 18:22 ` [PATCH v2 3/9] media: vivid: add display present control Johan Korsnes
2019-06-16 18:22 ` Johan Korsnes [this message]
2019-06-16 18:22 ` [PATCH v2 5/9] media: vivid: add HDMI (dis)connect TX emulation Johan Korsnes
2019-06-16 18:22 ` [PATCH v2 6/9] media: vivid: add HDMI (dis)connect RX emulation Johan Korsnes
2019-06-16 18:22 ` [PATCH v2 7/9] media: vivid: reorder CEC allocation and control set-up Johan Korsnes
2019-06-17  9:57   ` Hans Verkuil
2019-06-16 18:22 ` [PATCH v2 8/9] media: vivid: add CEC support to display present ctrl Johan Korsnes
2019-06-17  9:59   ` Hans Verkuil
2019-06-16 18:22 ` [PATCH v2 9/9] media: vivid.rst: describe display present control Johan Korsnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190616182218.37726-5-johan.korsnes@gmail.com \
    --to=johan.korsnes@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.