From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3563CC31E50 for ; Sun, 16 Jun 2019 18:23:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0ACD9208E3 for ; Sun, 16 Jun 2019 18:23:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="t4uX4evP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726267AbfFPSXP (ORCPT ); Sun, 16 Jun 2019 14:23:15 -0400 Received: from mail-lj1-f174.google.com ([209.85.208.174]:35056 "EHLO mail-lj1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfFPSXO (ORCPT ); Sun, 16 Jun 2019 14:23:14 -0400 Received: by mail-lj1-f174.google.com with SMTP id x25so7164771ljh.2 for ; Sun, 16 Jun 2019 11:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oTACBj1SNotKeh448jg6GXSUlcVrP4s2D18F0yKnfus=; b=t4uX4evPUttsrAPL5OljElbkI9jRECClFgMK9rOopOtPoulrzw5SIqja+iYmOBVzrH YWaemJPOAEcpr6GJTs1SkwvWtr3xsja8t3JC5jVF02CkkhPnHCrB86PD7TbhbzSvpl2F Nl4ZDPWJsBaJVZmN5RCc1d90L0GP7NOWpXR85UR6f7u5bIBV2HWNgPAoMvTUgZXy3oXx eBUIZNr7Zl+KsAkjwmnNWxAVilsWi6+AcQpfu+vmhokkSg84rRU61hCB4L5J1PfVCzCJ NjbuL7vFW6kSh4h4vE1Ng9IlDWFAJtcNl9nvFotbzONXNf4mAPMpT0sXtQzXPdXBTqXC yoBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oTACBj1SNotKeh448jg6GXSUlcVrP4s2D18F0yKnfus=; b=gv+W4mMnyZMAgd3R91tEFe7dXiRi80MDmSdzudDh/1D1GhNoQJV0GesY0LijrVJU8g 6AAMLD+o83+pmQ2LMXb6GHT+qxhLuO5V7RsnlaFAxBHjA5ichwjRIenNJwmHYNjsCRWD 0JXMunQ9pMthORz4e/PI6DFCthUZ+ZmzIS0grz4kXnlCNehiAn4H2ABkbfeBWEAap4nM O8ubzMOfV8EqmsZW1jyI+PuW0KdSlz2rSHKt9pKpA3m9BzHT0jGqTeYEubtzssgSeGg3 5Kp0Bpx+Hy7HklTGf9JqqSyLEkmLVlDP6qBxRTWx07lqo57S2ckVGzlhQsMRHQxlX+cO 3fHw== X-Gm-Message-State: APjAAAVqGZjFmkZb4FOjIix20naqXm6UC8y8VDHUXRFAemCDhnWCfdev TrszAFEkBT+m649rSkk3ydZ7t+44/O8= X-Google-Smtp-Source: APXvYqx3ulkDwMZFnYoLbF3r7/coJcGztUhU1iKtMYgEORwCLHX/K7XDRwDxr+AQ00fSrNcsEFoDRA== X-Received: by 2002:a2e:968e:: with SMTP id q14mr15180724lji.195.1560709392347; Sun, 16 Jun 2019 11:23:12 -0700 (PDT) Received: from localhost.localdomain ([178.74.2.49]) by smtp.gmail.com with ESMTPSA id z85sm1714081ljb.101.2019.06.16.11.23.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 16 Jun 2019 11:23:11 -0700 (PDT) From: Johan Korsnes To: linux-media@vger.kernel.org Cc: Johan Korsnes Subject: [PATCH v2 4/9] media: vivid: add number of HDMI ports to device state Date: Sun, 16 Jun 2019 11:22:13 -0700 Message-Id: <20190616182218.37726-5-johan.korsnes@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190616182218.37726-1-johan.korsnes@gmail.com> References: <20190616182218.37726-1-johan.korsnes@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This will be used for HDMI-specific controls such as hotplug detection and power present. Signed-off-by: Johan Korsnes --- 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