Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp297988ybg; Tue, 28 Jul 2020 06:23:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsOddbpxJ+C0yyzQ7wbIe9MLn1sZpuawel+WNwDUtvQwTKpeN51wHzfYTvZIDYkfLzMnrN X-Received: by 2002:a05:6402:308e:: with SMTP id de14mr10314982edb.344.1595942637734; Tue, 28 Jul 2020 06:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595942637; cv=none; d=google.com; s=arc-20160816; b=tpEh4lDM0CXGnMdpJRyDyIQVfRrKW+dm8KvKRUlZFiHKXDHhT6FEoxC/3OFV+domJq tyeZzwUDMuzZtHZO4TrHlkx+Y/7o+J4QyirFUOaL8Jf1xuV9E0igNo+nthZNSKwEpACb CfuTJluNPkLpxzUB+HK/0kSNLal+ML2U88MOIlAG5jbdjPWKHD75SzuAvdDzd1dWy3VW LwN8Te8EfDU0knvSTYcCQR9uqUowJqW7cHxbUN2/+aLVR8CXnV0GMnxB5hN/OqXPqRyP FVtfMEoSsb3qa9HG2N8kCABpObB9zgTEUZgAyhCqBAx0b1uebBJG/YLtsSG9mwq/Y+sj F/Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6n7DC2RwRJQwcE3VDCvW7mDTNfAGJnE5gpDIWkLHcHw=; b=gJma5W5AbCq1NSZakoiKlpAvuxvkMlpmqnBCIE22YeS/6rdYTSioVWALFKP9LOeKLD CA0nCaEdRY/MO6ra4hwGzA493cGnfKhCx/4OSoA2L9ypvapa1rc+4DFPJgpgJC30zga/ OTbLjTC9N7w7i8IfNmTtU8gDFoPqBTdpthe77hxroe44JsgYaYjFcUXk1Qcu+/WFtcf1 9WADH560vvLPWoC6jGG3hwRfZ4r9048ZaEbDoMYdXno9asTjSZbschlTqUZHkGLGtIb2 QzHujI+LYcC7PaleUby/R7LF5G4NbXVUko8EtIZ8GagR/Sd/7WES2oUP9twhqw5/MgQv x6YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=GsITKGrg; 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=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o23si3015721eju.715.2020.07.28.06.23.34; Tue, 28 Jul 2020 06:23:57 -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=@raspberrypi.com header.s=google header.b=GsITKGrg; 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=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730021AbgG1NVK (ORCPT + 99 others); Tue, 28 Jul 2020 09:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729673AbgG1NVK (ORCPT ); Tue, 28 Jul 2020 09:21:10 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC91C061794 for ; Tue, 28 Jul 2020 06:21:10 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id r4so15313175wrx.9 for ; Tue, 28 Jul 2020 06:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6n7DC2RwRJQwcE3VDCvW7mDTNfAGJnE5gpDIWkLHcHw=; b=GsITKGrgFlyLR97hy7qSX3O8Co7FNy9dMUDvmOGSRjPorVty+c45ZRw/XZ0eEDe8C0 vWU6JQ7z1Tiym2j3xkg2UynLMNgXv79lJgFwCTrnS6Xy7cA4kXAc3VyBxKOtHioes8m2 guw5IbXE5e1Wk/+Wor+TvQQpX6RMldYQ02Xv2Z3emyBRMvhwl1n+id0xBKBk2cW4QLlr BXXI5OsUgnByTZVxDqxmsZ4+qyZ1OTwX2pzEGBrNiFsZBYEe0AQZJGIp08xws/xeKqON pM9sUrXZPm1LmOqaNMEdfyeTz7ghhFpO3Ylzow4BQPRwD8vE9QGYgsGUrca5dBYrpPVT LByg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6n7DC2RwRJQwcE3VDCvW7mDTNfAGJnE5gpDIWkLHcHw=; b=SXSIwl937jJJpuvbzJMra6o5khN64QlrVGsdiVN0fI5naXjmC8gQxuXQfWHqHDP5Vl d7uuMIYQQ0FW6K1H+3cJ553iAtSplpyQsyAYKdgDQycucvwe9whe+jvs2L8ewDHek8Yv uUUROckIdc8WWDoeDnxedmMsMwSz8vCVaYo0sRlBZPj4MmjbuWFNHPZSVAaY171v47Go 9pGsDasU1LA00SznT48BYFlywFlj0qzbFRJkt9x6ZpAvKjAY7W5ugambTtsNxVgrj4Rg MIXvyj2iYqRHBM6eMk6zjdpEVBPtNF5KlaQR+tDB/5dHsP1PXyNJFow8nS6YsDEZ5wiq UUTg== X-Gm-Message-State: AOAM5317rG/AjdT4sqW2rv6FYj8pONfjG0tUkCSfDBplUZGaWEss0cmf RmqoOgD2C2rerjVmKDA+tCxPEe1PMi81TOSd6KAaYw== X-Received: by 2002:adf:fdce:: with SMTP id i14mr19660461wrs.273.1595942468291; Tue, 28 Jul 2020 06:21:08 -0700 (PDT) MIME-Version: 1.0 References: <9085677c3adf4a84c5ba5f8cdf4f3aff34e3e5a3.1594230107.git-series.maxime@cerno.tech> In-Reply-To: <9085677c3adf4a84c5ba5f8cdf4f3aff34e3e5a3.1594230107.git-series.maxime@cerno.tech> From: Dave Stevenson Date: Tue, 28 Jul 2020 14:20:50 +0100 Message-ID: Subject: Re: [PATCH v4 57/78] drm/vc4: hdmi: Deal with multiple debugfs files To: Maxime Ripard Cc: Nicolas Saenz Julienne , Eric Anholt , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, LKML , Tim Gover , Phil Elwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime On Wed, 8 Jul 2020 at 18:43, Maxime Ripard wrote: > > 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 Reviewed-by: Dave Stevenson > --- > 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