All of lore.kernel.org
 help / color / mirror / Atom feed
From: johan.korsnes@gmail.com
To: linux-media@vger.kernel.org
Cc: Johan Korsnes <johan.korsnes@gmail.com>
Subject: [PATCH 4/8] media: vivid: add number of HDMI ports to device state
Date: Tue, 28 May 2019 10:19:08 -0700	[thread overview]
Message-ID: <20190528171912.3688-5-johan.korsnes@gmail.com> (raw)
In-Reply-To: <20190528171912.3688-1-johan.korsnes@gmail.com>

From: Johan Korsnes <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 20a0dcebd783..b2b4ee48cef0 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -722,6 +722,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];
@@ -744,6 +745,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.17.1


  parent reply	other threads:[~2019-05-28 16:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 17:19 vivid: Add HDMI (dis)connect emulation johan.korsnes
2019-05-28 17:19 ` [PATCH 1/8] media: vivid: make input dv_timings per-input johan.korsnes
2019-05-28 17:19 ` [PATCH 2/8] media: vivid: make input std_signal per-input johan.korsnes
2019-05-28 17:19 ` [PATCH 3/8] media: vivid: add display present control johan.korsnes
2019-05-28 17:19 ` johan.korsnes [this message]
2019-05-28 17:19 ` [PATCH 5/8] media: vivid: add HDMI (dis)connect TX emulation johan.korsnes
2019-05-28 17:19 ` [PATCH 6/8] media: vivid: add HDMI (dis)connect RX emulation johan.korsnes
2019-05-28 17:19 ` [PATCH 7/8] media: vivid: add CEC support to display present ctrl johan.korsnes
2019-05-29  7:39   ` Hans Verkuil
2019-06-11 20:25     ` Johan Korsnes
2019-06-11 20:45       ` Hans Verkuil
2019-05-28 17:19 ` [PATCH 8/8] 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=20190528171912.3688-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.