Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp752610ybt; Wed, 8 Jul 2020 10:46:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJApK9UwPDV57VIAD5aq7KJCCwLoqBc9ER3fUsFrDAt05VIb8Dr8ruQXR19fscSywYqhkz X-Received: by 2002:a17:906:f752:: with SMTP id jp18mr52274574ejb.538.1594230390157; Wed, 08 Jul 2020 10:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594230390; cv=none; d=google.com; s=arc-20160816; b=lz6lTGg24z/GZYa7I7ubwEcju1HiT6WikMxMYyF8HjtbmLH+TeEPLe4jYl499+Bpjo KaJG3mMuox5Q7wtzZJCHgODRsLQ3o5hyLYbKiDipiC7/ajceorBzbQcJUHACDx7AsEMv hbJnB9wm7+85uHK/8xzI0japaMtRswKasG9w4lXXj6lSynenUtnDAnUMSapRbuziCzSo qoOXK5B5xEnd+IT9tTva4uEAbT1HUvJkbiaHTtdL+nN/M6b8qwfrjXAxJrqS19ulKx/x PzI9Kw/cxSHJQVhigUviaX9MHmUDsZSRxpbFx5RKIxoETI2JpfWhcwVmdUh/UpWQkWV0 027w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=AM8MsEZZ3zYOQ3XQhFBbvPEglr+eKkHlxggT5g99HFU=; b=O2pscqTuBCKLWaBow8Sbt/6d2FtUJyTsMrYqqTvk33P+AQAbT7LfCzBeA3/ZNlgATI G7nW8uIP0ILBVD8CM7G6TP96QAgCeC81XFt4WEEJDj45o3TdxqGJkO3froQaZvg/XzZx wze4ZdUAhNQYsAOvoqOVeIpNO5e1Z0LKzvPMu6012u9SvxupjOINp4rqh435OnPYnUsq L7RvROpfFyvq93wi3/GVnhUopMuwyWexvuxy0FynkBdIk5JGwpqX5Cfdr2MIN2ge492f yoP1oUYk9kTxMpAXGuk1gecK7AOsC1xfnmmiYDtb6IUmIPID2Px+hi340Gfh/TVjoDLz bemQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=I+bZy+8X; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="nriX/dB9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si466214edf.300.2020.07.08.10.46.07; Wed, 08 Jul 2020 10:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=I+bZy+8X; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="nriX/dB9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726347AbgGHRo5 (ORCPT + 99 others); Wed, 8 Jul 2020 13:44:57 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:41175 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbgGHRoK (ORCPT ); Wed, 8 Jul 2020 13:44:10 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 781A4102B; Wed, 8 Jul 2020 13:44:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 08 Jul 2020 13:44:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=AM8MsEZZ3zYOQ 3XQhFBbvPEglr+eKkHlxggT5g99HFU=; b=I+bZy+8X/5pfwS+GERZ1Vj2oNzNOF 8jZbSHVpIlgASbAkw1bDI1giVKoLlVtPLEJGbWEDAZw9MPIpktXpk1zzy+nLEQnn CwVe+iqX/vcXK+XPj1a9C9qPs3r/M5n6BS5vrCOGsVWCZCdMIJpWX3oFDZhfwLoj sFB20EWFnB0R/JR/q8f6I5HvXXdbbiFz7BYFcq+k/X4xYcG9avQd1bdUIxQ6uAuk M/T2aOdQaJCL7RJpK2E52JOyI8h69pY2Dj8gqeg1zkYX9E74j8GqMeMO0fOcrKLI 6SVY/kj/MTZzUiQ9qMdvzi6r9MuTaAkiFLl8HPjfvj7CJsOVIRtradArg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=AM8MsEZZ3zYOQ3XQhFBbvPEglr+eKkHlxggT5g99HFU=; b=nriX/dB9 OiyHzc8DFe1XeNPqlI7R4Oqx+SHvcZRMlmiRPQ50O3cGrnzFDzdR14hLrZqjw0U4 N7IbwjJOMDlQAB1jcLNHr3m36DB87+V5Swx32ER38/VcE7eplVaktXxrzrC1Oz58 sIhHXILqttz5tiPALiz4bYIm0rTLnX0ifKipSBFGnMG7ML2EKpm2Dcjz6UR135t0 a/4i7u+rjbieInzMPrGz/k2NS2dxh0aVCjbMk1rLrGEi3TynakzCwp3f+gAdSZ4q c12yjJEBoT+Zi/6tICGolFHI8xlv93eCIVp8MQWD7kXXZRD9dNGUta4bcTyuvETP Gy12QO/vLajvYw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudejgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepiedvne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id B07343280064; Wed, 8 Jul 2020 13:44:08 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v4 68/78] drm/vc4: hdmi: Deal with multiple ALSA cards Date: Wed, 8 Jul 2020 19:42:16 +0200 Message-Id: <7d4c17db4a1214b7665375aa83fe1f8b4f0fbdfb.1594230107.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The HDMI driver was registering a single ALSA card so far with the name vc4-hdmi. Obviously, this is not going to work anymore when will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++- drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 1b6f51849d6c..0a9a323e03d8 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1044,7 +1044,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi) card->dai_link = dai_link; card->num_links = 1; - card->name = "vc4-hdmi"; + card->name = vc4_hdmi->variant->card_name; card->dev = dev; /* @@ -1503,6 +1503,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) static const struct vc4_hdmi_variant bcm2835_variant = { .encoder_type = VC4_ENCODER_TYPE_HDMI0, .debugfs_name = "hdmi_regs", + .card_name = "vc4-hdmi", .max_pixel_clock = 162000000, .cec_available = true, .registers = vc4_hdmi_fields, diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h index 4aea5ee8a91d..34138e0dd4a6 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h @@ -30,6 +30,9 @@ struct vc4_hdmi_variant { /* Encoder Type for that controller */ enum vc4_encoder_type encoder_type; + /* ALSA card name */ + const char *card_name; + /* Filename to expose the registers in debugfs */ const char *debugfs_name; -- git-series 0.9.1