Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1047992ybm; Wed, 27 May 2020 14:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsAh6w5E13fv5ykY5kH54nohkGmkeM/1Me2+89FlnlGbYQTKSK9eAO8aZsZ1q9ZbgO3xJY X-Received: by 2002:a17:906:f6d6:: with SMTP id jo22mr340303ejb.310.1590616339550; Wed, 27 May 2020 14:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616339; cv=none; d=google.com; s=arc-20160816; b=ZxNPuKOr8Mj2lQUVRaAfhVYOycG577K1rnVx35fm6xOTEJtCYezm07t3cCoFp3FQMd 6qSf1MDaoJ0xteEWNMy6P1ZPLgFOmdNwmWK+LNvvR48DL1pw78UupDjJfZlstzNsKHD9 OIvpNnZ+uYjR0al58V/X0KzhMXItHZuPF1b1qoKPiS8XfrPzGzaovt62rM5JX+g9P6lv EQrC4lbBxhLcSUNHGnQTXm4xzEgyJTNudB5OjiLoNTL6plcyWilLx3tbKq+8CaxtDsjX X+cq1MC7AaZGV77tujji04fraOUcxUWB8bDy6dF7gcogGxs06PwDiP/uXqXypfzrNg8O Gktw== 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=cEGqeWIoGZHcWUZtLdrVVNYHXqJvib1Zg3nABEqU4iM=; b=QOFPMBqA0cVtsZGgXujVvKXHSFp8cQ7gYdruxy1JCSeaGpi0n/yx0tgzphvHUFQTsK CipmDeRWl8Zn9w/gdG+ztEA0Z2xZnouJGXILquKJzJUX97Il38/4ZH0q0aljz1dng7Kc VezsuWfZct5o0K29GlRQn7caDAe/4uXoS7p1cmtJE20RP55LaxJUWAlSlarF2AXt5zzy ubF0kl7IgCeK/zCFcQZYFKqS9HhxpEPM0ScqsAwra/sQHXmMmfJ/oZPdNuqmrFVxb5RM N8pObTDkeNxryGVq8LY9XrckONFfV1Y3SK/EDrVlrNefA2MASu7WqXoRj6OFksotl238 JRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Vi5DDjJg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mZBiVJkt; 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 x38si2298700ede.433.2020.05.27.14.51.56; Wed, 27 May 2020 14:52:19 -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=fm2 header.b=Vi5DDjJg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mZBiVJkt; 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 S2390594AbgE0Pyh (ORCPT + 98 others); Wed, 27 May 2020 11:54:37 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:46269 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730605AbgE0Pvd (ORCPT ); Wed, 27 May 2020 11:51:33 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id EAD3658150C; Wed, 27 May 2020 11:51:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 27 May 2020 11:51:32 -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=fm2; bh=cEGqeWIoGZHcW UZtLdrVVNYHXqJvib1Zg3nABEqU4iM=; b=Vi5DDjJgv1qaBfsY+BiJMyx74BCAN dvcPLPOe4ToONNZWjBwK+l6y7iGAcOOtSsEkdBpTr74BjegA/q0D6C4KoXStB/Zi kZOS7Z4/x+dEF5uJZm7kuntvchDUy0qB8VMB5DcbXSnWzzHELIrSHdt6Eh6Cq1Ww wo5C8Sgf32Qar61gyg1q6JwCfoYaWnxlJlT3wqyoCVQ4ojvJuRL8ajy333rCuAo0 kucnC6WKjWk1QIKnRfrYVPGCiuXKFFkp0z9ZeJLJkpgtlp+QC5jK6OI37wlktmiZ gcvhZkOuCfWzLfwIzL74CizrJ44z1kAO0PLjAj2M+eTCxbZMiQo9NtRig== 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= fm2; bh=cEGqeWIoGZHcWUZtLdrVVNYHXqJvib1Zg3nABEqU4iM=; b=mZBiVJkt 1v7+FbT30XVPijEsAgxWL7xFNNdqwIJlRoHF7XBiAGEPhvqQnakceoUQyM9N/0+7 8PkA+0uU3GITMuj7MdpCpWYNGIR5OOyAqdk59aAJj8E77fdh9ffSUaPz/LnLQX2s lQmhof278HU2JbffhdNn6MWSBTWEDLmlgPtvSZT9f7LgtUS3Q645a4gXs7AejewO JFqI/vY3yDeJRuYJaBH1jz+VbuGD4sq8jdkusfDKwvxjFl8qtpPLR7ZMB6OY8yZp llSo86OjekEngCNZk6vx4WLg1fQ+CqhEuGDw5vf43iGEmNJt8K2rEZpqBqN3pNFf kcXLgnyiJ6Agsg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepieefne 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 8EB093280066; Wed, 27 May 2020 11:51:32 -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 v3 086/105] drm/vc4: hdmi: Deal with multiple debugfs files Date: Wed, 27 May 2020 17:48:56 +0200 Message-Id: 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 debugfs file so far with the name hdmi_regs. 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 | 5 ++++- drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 7542447eb314..8a63ac3dd86b 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1366,7 +1366,9 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) if (ret) goto err_destroy_encoder; - vc4_debugfs_add_file(drm, "hdmi_regs", vc4_hdmi_debugfs_regs, vc4_hdmi); + vc4_debugfs_add_file(drm, variant->debugfs_name, + vc4_hdmi_debugfs_regs, + vc4_hdmi); return 0; @@ -1428,6 +1430,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", .registers = vc4_hdmi_fields, .num_registers = ARRAY_SIZE(vc4_hdmi_fields), diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h index 4240c5ea7fde..22100820c81b 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; + /* Filename to expose the registers in debugfs */ + const char *debugfs_name; + /* List of the registers available on that variant */ const struct vc4_hdmi_register *registers; -- git-series 0.9.1