Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp752894ybt; Wed, 8 Jul 2020 10:46:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzew+q+D8Fb+UB7IKzIKBcdJCCEU1G0t+DrkboESi4PEAOu0lruVlPgAlKiFlV+XvCVLWW0 X-Received: by 2002:a05:6402:1d97:: with SMTP id dk23mr69255230edb.1.1594230409165; Wed, 08 Jul 2020 10:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594230409; cv=none; d=google.com; s=arc-20160816; b=z11joMhoB1OHZeJvY/m2RwUfC944wE0hsLhgBzmY1/tVy32QH8JjPgRlqrc5coHxVW 2RjDTp54cGfB2TNnbvumGCDIsYl8Ys9TfyApAsR0Gr1/aRxsKTuqYypCkfD/Sz9aHBlz ChEjR6qUUlnp6Cg3ddAHQCga7zNS2tetH9xlMXs4DC16dU4OSUYiLyrMKFWd6wWMH6aO 7q1LuEv5zFsG4WzqdwvxWQMZci0olYYwA3YtQKDIdzsV08YzJEG0ue7w9zgLtCK2axD8 ro8xUdXQPBI1xvnwELABsNDywv1zT8YL4ozZ5M8Krq4TZ5BVgh2l1x1feNRZt8EPuzr4 tZ9g== 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=TC7izKpYjQR6hrOt4TJNUojPSHh2NBNzpbsHJjTGRCk=; b=qu7TZm+u0guTP66LHzMVlF79MG7XXh17+LUczrVFRHY/qyqYxVsBAKd54ii9jm9/fl RwmTA2dUHoIujZViUNmuzbJefrEFI2JsxB9NgNFcWtDhFDMiHvg/YkLfRmdiPoqnhvpq MLtxj1x87JiXgbNfUsfZbeO5cRFq3aBpNHjrtGJLs8nQSzHeWrqb/Mv5CrNWQZr8a05W YOBsLbhE1zASLjmm4ufprZmLooUhZ44py9XOS89xHOcJLjmrwAGHwWEUyX4x585FzAjS ykAD36e4muCTb17PEMjpMXav+zsk0b5kv6kLuTS/3Iff6cJIRdKXYBxo9AnF/3ason9m VeHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=gTLpe57b; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JI9ErrbZ; 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 e5si327901ejb.453.2020.07.08.10.46.26; Wed, 08 Jul 2020 10:46:49 -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=gTLpe57b; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JI9ErrbZ; 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 S1726662AbgGHRpR (ORCPT + 99 others); Wed, 8 Jul 2020 13:45:17 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:40555 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727874AbgGHRnz (ORCPT ); Wed, 8 Jul 2020 13:43:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id A74792F2; Wed, 8 Jul 2020 13:43:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Jul 2020 13:43:54 -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=TC7izKpYjQR6h rOt4TJNUojPSHh2NBNzpbsHJjTGRCk=; b=gTLpe57b+djfKGjEpWNJdpjEZgld+ 8/K0+D6gu8sUOqN1DDH83SKAz4oHdfWiMMDcgJL+5Y6rJLizc33Akb/MOsAL9Yy4 EB9xjbaOskiTNQJyFQSG0+aOBh2b8YzVK6OeY0jUVyvmNkrGosJ7b4Ctoj7DJ46c 3jtuVfPr25RQWGvjLqWPRUx0KLHDoMvYABwoRR5wy2JPk1C21u+YZzhaeMbNZdh8 YCDCxAsG4tn2luigT79rGMv+op4qu7xT3MzV1gtX1ImAaBo4D6PLtGkNxgobMIxP Bu6vaxWJfN8QPGZPt050fYTVpTPwLqaGgatwpjOblM4eh4hrPmjjnsi+w== 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=TC7izKpYjQR6hrOt4TJNUojPSHh2NBNzpbsHJjTGRCk=; b=JI9ErrbZ TdF7he42j+Etw+U3i6vaMKjKV+pQDahPqPhQE3YsepVsh5CMxJYe2kqIVroWO8QL LEjaaNCkcHgRprmabpHU7lG8wK4Xt+qooBZhNBbZY40UsLmWJ0zzyuaq/pJhw+48 S5efIQNBd03XPDGaR+3ezmLA70udiYaCiXsyHtl9MpHU2YyZbGhHRtfDvkHMg388 tK/OZuMzhBtlkRYsCj3SAE7gqiEamr59vLtfLCJV5cp0MDzQuqQUZd3xOqBnOB8U /9SIJBmdoI4/WQDX4I3rHzA12EDwg84lIKc6oUms3taRE0ZotjHWIAeEKs2GbULF ZKM/1omajzVY+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudejgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgephedtne 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 E6394306005F; Wed, 8 Jul 2020 13:43:52 -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 57/78] drm/vc4: hdmi: Deal with multiple debugfs files Date: Wed, 8 Jul 2020 19:42:05 +0200 Message-Id: <9085677c3adf4a84c5ba5f8cdf4f3aff34e3e5a3.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 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 c50241170d7e..ef51eedaf75a 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1370,7 +1370,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; @@ -1448,6 +1450,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 0d529db4b3ab..794216f3228d 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