Message ID | 20221219120621.15086-1-mcanal@igalia.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2348849wrn; Mon, 19 Dec 2022 04:12:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bwTvDKrOj7EiL+/KBJ5ELdhaC/AqOmXi4BWfJzitkue2571Oa9lDzoADdhvXEscDeAD9p X-Received: by 2002:a17:903:228f:b0:189:ec2c:bb0c with SMTP id b15-20020a170903228f00b00189ec2cbb0cmr62864427plh.28.1671451952170; Mon, 19 Dec 2022 04:12:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671451952; cv=none; d=google.com; s=arc-20160816; b=BMtuYQL8RnLzmUUAibGK5d12vs4i171YbzIVLuzxtkYjn6k7e3fUm0mAyjTXzK7C2u nn2B3sjmuAZo8fsTxdsmL9dxPXrtgmvNbqA8LmofFyUp1jK7YyuWCG87mPSRl+B5ZHMI bBlg+A7kZsQiLONzFeoa2dhMPCodUw7+Ch5wpnbCeU591tMH0EsoIHoz53b4pLidL9cS gOySvxjMLBIgbRiJhtUwCn6H7iISnH3zsKn4lq7BAPbnDybGulXVz9qN+x3lZisKzzC3 Fwt7x8DJ13p5wdWibVaf3jMC4+n4VVRw0qGC3jXZ1P6S4OiVIuRtymzJN+wb5na5lIWA bYvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/tluQ4TFrQ3TOyrt0gts8VOJdh/QSCw6IFv5qhZrYGo=; b=vkPZcxF5zBS8SSLp4MUsduULbrGFrGXNOML5dqaZd+7qJMAw2H8QNvFkGkLYf3mXzE SFcYuvRkoRu8gwp1tV/fjan9kIukw01oh7udpBbWVVq4OTx6Zd6/SYwrqP7SbE7rAXnU J7fqIDwWUGZ7pE2ORFbAj92kEAGbW/4rdIKQQguhAKffWDJ8FfETwz+/CZAMjAbsBmUg lwjith7h+wz/wcimAQ5s5qY6PfS5tFlrsMoESZrXD0IH5W+4tT2L5vrySmbAG0TgHADh z+5pIKHVmcN6tv0h2YeTGh+G5Ah5BHzrwhGMJ6YEXQqI/g0/D5wkZKD4RJBu+wNyRwv/ RycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=puVSV3sD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a170902cf4200b00189e206222csi10889750plg.536.2022.12.19.04.12.18; Mon, 19 Dec 2022 04:12:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=puVSV3sD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231771AbiLSMHu (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Mon, 19 Dec 2022 07:07:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbiLSMHD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Dec 2022 07:07:03 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0496026D for <linux-kernel@vger.kernel.org>; Mon, 19 Dec 2022 04:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/tluQ4TFrQ3TOyrt0gts8VOJdh/QSCw6IFv5qhZrYGo=; b=puVSV3sDX1xa9WZfvCJhiypw2B QN7QKBziPoObhy+nWLHx12qSk2dYzqLv2GnYHTISTiWcQZVuaw++8miFp4AONAChwgqhb5nOh5hLu bNla3xQGXizq9vph1J/SUF2VO0rigzmsdjEIZGF6tICIx0HUe09pKh0MbwGpLkWOQjk6HWu/W6T9X wWYHItTgqqe/vJT8ve/S6O5pHXb9sNM3O4BVhEQ8HfbmcaZu8pIH6UNX4vFM8n0s9Uj2baimPx/t4 kMajJtxWuurwpcOiQ7fl5gIv4fhGOiijjS23ttsarADNDInF14HXE5ZcLThlppu32EzddHF8hIuHs zQ6L42Ig==; Received: from [177.34.169.227] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1p7Euq-006HsS-3O; Mon, 19 Dec 2022 13:06:44 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Oded Gabbay <ogabbay@kernel.org>, Jani Nikula <jani.nikula@linux.intel.com> Cc: Melissa Wen <mwen@igalia.com>, =?utf-8?q?Andr=C3=A9_Almeida?= <andrealmeid@igalia.com>, Emma Anholt <emma@anholt.net>, Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>, Wambui Karuga <wambui@karuga.org>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com> Subject: [PATCH v4 0/7] Introduce debugfs device-centered functions Date: Mon, 19 Dec 2022 09:06:14 -0300 Message-Id: <20221219120621.15086-1-mcanal@igalia.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752644402172186289?= X-GMAIL-MSGID: =?utf-8?q?1752644402172186289?= |
Series |
Introduce debugfs device-centered functions
|
|
Message
Maíra Canal
Dec. 19, 2022, 12:06 p.m. UTC
This series introduces the initial structure to make DRM debugfs more device-centered and it is the first step to drop the drm_driver->debugfs_init hooks in the future [1]. Currently, DRM debugfs files are created using drm_debugfs_create_files() on request. The first patch of this series makes it possible for DRM devices for creating debugfs files during drm_dev_register(). For it, it introduces two new functions that can be used by the drivers: drm_debugfs_add_files() and drm_debugfs_add_file(). The requests are added to a list and are created all at once during drm_dev_register(). Moreover, the first patch was based on this RFC series [2]. The main difference between the RFC series and the current series is the creation of a new fops structure to accommodate the new structs and, also, the creation of a new drm_debugfs_open. Moreover, the new series uses device-managed allocation, returns memory allocation errors, and converts more drivers to the new structure. Moreover, since v3, the ability to create debugfs files at late_register hooks was added. In previous versions, modeset components weren't able to create debugfs files at late_register hooks as the registration of drm_minor happens before the registration of the modeset abstractions. So, the third patch fixes this problem by adding a drm_debugfs_late_register() function. Thanks to Melissa Wen for catching this problem! Apart from the third patch, the series looks similiar from its last version. [1] https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n506 [2] https://lore.kernel.org/dri-devel/20200513114130.28641-2-wambui.karugax@gmail.com/ Best Regards, - Maíra Canal --- v1 -> v2: https://lore.kernel.org/dri-devel/20221122190314.185015-1-mcanal@igalia.com/T/#t - Fix compilation errors in the second patch (kernel test robot). - Drop debugfs_init hook from vkms (Maíra Canal). - Remove return values and error handling to debugfs related functions (Jani Nikula). - Remove entry from list after the file is created, so that drm_debugfs_init can be called more than once (Maíra Canal). v2 -> v3: https://lore.kernel.org/dri-devel/20221123220725.1272155-1-mcanal@igalia.com/ - Rebase on top of drm-misc-next v3 -> v4: https://lore.kernel.org/dri-devel/20221207132325.140393-1-mcanal@igalia.com/ - Add Maxime's Reviewed-by tags - Add the ability to create debugfs files at late_register hooks (Melissa Wen). --- Maíra Canal (7): drm/debugfs: create device-centered debugfs functions drm: use new debugfs device-centered functions on DRM core files drm/debugfs: create debugfs late register functions drm/vc4: use new debugfs device-centered functions drm/v3d: use new debugfs device-centered functions drm/vkms: use new debugfs device-centered functions drm/todo: update the debugfs clean up task Documentation/gpu/todo.rst | 9 +-- drivers/gpu/drm/drm_atomic.c | 11 ++- drivers/gpu/drm/drm_client.c | 11 ++- drivers/gpu/drm/drm_debugfs.c | 102 +++++++++++++++++++++++--- drivers/gpu/drm/drm_drv.c | 3 + drivers/gpu/drm/drm_framebuffer.c | 11 ++- drivers/gpu/drm/drm_gem_vram_helper.c | 11 ++- drivers/gpu/drm/drm_internal.h | 5 ++ drivers/gpu/drm/drm_mode_config.c | 2 + drivers/gpu/drm/v3d/v3d_debugfs.c | 22 +++--- drivers/gpu/drm/vc4/vc4_bo.c | 10 +-- drivers/gpu/drm/vc4/vc4_crtc.c | 7 +- drivers/gpu/drm/vc4/vc4_debugfs.c | 36 ++------- drivers/gpu/drm/vc4/vc4_dpi.c | 5 +- drivers/gpu/drm/vc4/vc4_drv.c | 1 - drivers/gpu/drm/vc4/vc4_drv.h | 32 ++------ drivers/gpu/drm/vc4/vc4_dsi.c | 6 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +-- drivers/gpu/drm/vc4/vc4_hvs.c | 24 ++---- drivers/gpu/drm/vc4/vc4_v3d.c | 14 +--- drivers/gpu/drm/vc4/vc4_vec.c | 6 +- drivers/gpu/drm/vkms/vkms_drv.c | 17 ++--- include/drm/drm_debugfs.h | 41 +++++++++++ include/drm/drm_device.h | 15 ++++ 24 files changed, 233 insertions(+), 180 deletions(-)
Comments
On 12/19, Maíra Canal wrote: > This series introduces the initial structure to make DRM debugfs more > device-centered and it is the first step to drop the > drm_driver->debugfs_init hooks in the future [1]. > > Currently, DRM debugfs files are created using drm_debugfs_create_files() > on request. The first patch of this series makes it possible for DRM devices > for creating debugfs files during drm_dev_register(). For it, it introduces > two new functions that can be used by the drivers: drm_debugfs_add_files() > and drm_debugfs_add_file(). The requests are added to a list and are created > all at once during drm_dev_register(). Moreover, the first patch was based on > this RFC series [2]. > > The main difference between the RFC series and the current series is the > creation of a new fops structure to accommodate the new structs and, also, > the creation of a new drm_debugfs_open. Moreover, the new series uses > device-managed allocation, returns memory allocation errors, and converts > more drivers to the new structure. > > Moreover, since v3, the ability to create debugfs files at late_register hooks was > added. In previous versions, modeset components weren't able to create debugfs > files at late_register hooks as the registration of drm_minor happens before the > registration of the modeset abstractions. So, the third patch fixes this problem > by adding a drm_debugfs_late_register() function. Thanks to Melissa Wen for > catching this problem! > > Apart from the third patch, the series looks similiar from its last version. > > [1] https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n506 > [2] https://lore.kernel.org/dri-devel/20200513114130.28641-2-wambui.karugax@gmail.com/ > > Best Regards, > - Maíra Canal > > --- > > v1 -> v2: https://lore.kernel.org/dri-devel/20221122190314.185015-1-mcanal@igalia.com/T/#t > > - Fix compilation errors in the second patch (kernel test robot). > - Drop debugfs_init hook from vkms (Maíra Canal). > - Remove return values and error handling to debugfs related > functions (Jani Nikula). > - Remove entry from list after the file is created, so that drm_debugfs_init > can be called more than once (Maíra Canal). > > v2 -> v3: https://lore.kernel.org/dri-devel/20221123220725.1272155-1-mcanal@igalia.com/ > > - Rebase on top of drm-misc-next > > v3 -> v4: https://lore.kernel.org/dri-devel/20221207132325.140393-1-mcanal@igalia.com/ > > - Add Maxime's Reviewed-by tags > - Add the ability to create debugfs files at late_register hooks (Melissa Wen). Hi Maíra, Thanks for addressing all comments. Maybe Danvet has some inputs for the late_register approach. Anyway, LGTM and the entire series is: Reviewed-by: Melissa Wen <mwen@igalia.com> > > --- > > Maíra Canal (7): > drm/debugfs: create device-centered debugfs functions > drm: use new debugfs device-centered functions on DRM core files > drm/debugfs: create debugfs late register functions > drm/vc4: use new debugfs device-centered functions > drm/v3d: use new debugfs device-centered functions > drm/vkms: use new debugfs device-centered functions > drm/todo: update the debugfs clean up task > > Documentation/gpu/todo.rst | 9 +-- > drivers/gpu/drm/drm_atomic.c | 11 ++- > drivers/gpu/drm/drm_client.c | 11 ++- > drivers/gpu/drm/drm_debugfs.c | 102 +++++++++++++++++++++++--- > drivers/gpu/drm/drm_drv.c | 3 + > drivers/gpu/drm/drm_framebuffer.c | 11 ++- > drivers/gpu/drm/drm_gem_vram_helper.c | 11 ++- > drivers/gpu/drm/drm_internal.h | 5 ++ > drivers/gpu/drm/drm_mode_config.c | 2 + > drivers/gpu/drm/v3d/v3d_debugfs.c | 22 +++--- > drivers/gpu/drm/vc4/vc4_bo.c | 10 +-- > drivers/gpu/drm/vc4/vc4_crtc.c | 7 +- > drivers/gpu/drm/vc4/vc4_debugfs.c | 36 ++------- > drivers/gpu/drm/vc4/vc4_dpi.c | 5 +- > drivers/gpu/drm/vc4/vc4_drv.c | 1 - > drivers/gpu/drm/vc4/vc4_drv.h | 32 ++------ > drivers/gpu/drm/vc4/vc4_dsi.c | 6 +- > drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +-- > drivers/gpu/drm/vc4/vc4_hvs.c | 24 ++---- > drivers/gpu/drm/vc4/vc4_v3d.c | 14 +--- > drivers/gpu/drm/vc4/vc4_vec.c | 6 +- > drivers/gpu/drm/vkms/vkms_drv.c | 17 ++--- > include/drm/drm_debugfs.h | 41 +++++++++++ > include/drm/drm_device.h | 15 ++++ > 24 files changed, 233 insertions(+), 180 deletions(-) > > -- > 2.38.1 >
On Mon, Dec 19, 2022 at 11:49:47AM -0100, Melissa Wen wrote: > On 12/19, Maíra Canal wrote: > > This series introduces the initial structure to make DRM debugfs more > > device-centered and it is the first step to drop the > > drm_driver->debugfs_init hooks in the future [1]. > > > > Currently, DRM debugfs files are created using drm_debugfs_create_files() > > on request. The first patch of this series makes it possible for DRM devices > > for creating debugfs files during drm_dev_register(). For it, it introduces > > two new functions that can be used by the drivers: drm_debugfs_add_files() > > and drm_debugfs_add_file(). The requests are added to a list and are created > > all at once during drm_dev_register(). Moreover, the first patch was based on > > this RFC series [2]. > > > > The main difference between the RFC series and the current series is the > > creation of a new fops structure to accommodate the new structs and, also, > > the creation of a new drm_debugfs_open. Moreover, the new series uses > > device-managed allocation, returns memory allocation errors, and converts > > more drivers to the new structure. > > > > Moreover, since v3, the ability to create debugfs files at late_register hooks was > > added. In previous versions, modeset components weren't able to create debugfs > > files at late_register hooks as the registration of drm_minor happens before the > > registration of the modeset abstractions. So, the third patch fixes this problem > > by adding a drm_debugfs_late_register() function. Thanks to Melissa Wen for > > catching this problem! > > > > Apart from the third patch, the series looks similiar from its last version. > > > > [1] https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n506 > > [2] https://lore.kernel.org/dri-devel/20200513114130.28641-2-wambui.karugax@gmail.com/ > > > > Best Regards, > > - Maíra Canal > > > > --- > > > > v1 -> v2: https://lore.kernel.org/dri-devel/20221122190314.185015-1-mcanal@igalia.com/T/#t > > > > - Fix compilation errors in the second patch (kernel test robot). > > - Drop debugfs_init hook from vkms (Maíra Canal). > > - Remove return values and error handling to debugfs related > > functions (Jani Nikula). > > - Remove entry from list after the file is created, so that drm_debugfs_init > > can be called more than once (Maíra Canal). > > > > v2 -> v3: https://lore.kernel.org/dri-devel/20221123220725.1272155-1-mcanal@igalia.com/ > > > > - Rebase on top of drm-misc-next > > > > v3 -> v4: https://lore.kernel.org/dri-devel/20221207132325.140393-1-mcanal@igalia.com/ > > > > - Add Maxime's Reviewed-by tags > > - Add the ability to create debugfs files at late_register hooks (Melissa Wen). > > Hi Maíra, > > Thanks for addressing all comments. > > Maybe Danvet has some inputs for the late_register approach. I think as a stop-gap (really need to get this stuff landed so people can start to use it) this is ok, but long term I think the right fix is to roll out the same pre-register infrastructure for connector and crtc too. That way drivers don't need to split their setup code into init and register anymore, which is the point of this entire rework. If you want, you can adjust the todo accordingly, but we do already have the paragraph about connector/crtc. But we can do that later on, because this is definitely a great way forward. Thanks a lot for pushing this forward! > Anyway, LGTM and the entire series is: > > Reviewed-by: Melissa Wen <mwen@igalia.com> On the series: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > > > > --- > > > > Maíra Canal (7): > > drm/debugfs: create device-centered debugfs functions > > drm: use new debugfs device-centered functions on DRM core files > > drm/debugfs: create debugfs late register functions > > drm/vc4: use new debugfs device-centered functions > > drm/v3d: use new debugfs device-centered functions > > drm/vkms: use new debugfs device-centered functions > > drm/todo: update the debugfs clean up task > > > > Documentation/gpu/todo.rst | 9 +-- > > drivers/gpu/drm/drm_atomic.c | 11 ++- > > drivers/gpu/drm/drm_client.c | 11 ++- > > drivers/gpu/drm/drm_debugfs.c | 102 +++++++++++++++++++++++--- > > drivers/gpu/drm/drm_drv.c | 3 + > > drivers/gpu/drm/drm_framebuffer.c | 11 ++- > > drivers/gpu/drm/drm_gem_vram_helper.c | 11 ++- > > drivers/gpu/drm/drm_internal.h | 5 ++ > > drivers/gpu/drm/drm_mode_config.c | 2 + > > drivers/gpu/drm/v3d/v3d_debugfs.c | 22 +++--- > > drivers/gpu/drm/vc4/vc4_bo.c | 10 +-- > > drivers/gpu/drm/vc4/vc4_crtc.c | 7 +- > > drivers/gpu/drm/vc4/vc4_debugfs.c | 36 ++------- > > drivers/gpu/drm/vc4/vc4_dpi.c | 5 +- > > drivers/gpu/drm/vc4/vc4_drv.c | 1 - > > drivers/gpu/drm/vc4/vc4_drv.h | 32 ++------ > > drivers/gpu/drm/vc4/vc4_dsi.c | 6 +- > > drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +-- > > drivers/gpu/drm/vc4/vc4_hvs.c | 24 ++---- > > drivers/gpu/drm/vc4/vc4_v3d.c | 14 +--- > > drivers/gpu/drm/vc4/vc4_vec.c | 6 +- > > drivers/gpu/drm/vkms/vkms_drv.c | 17 ++--- > > include/drm/drm_debugfs.h | 41 +++++++++++ > > include/drm/drm_device.h | 15 ++++ > > 24 files changed, 233 insertions(+), 180 deletions(-) > > > > -- > > 2.38.1 > >
On 12/22/22 14:20, Daniel Vetter wrote: > On Mon, Dec 19, 2022 at 11:49:47AM -0100, Melissa Wen wrote: >> On 12/19, Maíra Canal wrote: >>> This series introduces the initial structure to make DRM debugfs more >>> device-centered and it is the first step to drop the >>> drm_driver->debugfs_init hooks in the future [1]. >>> >>> Currently, DRM debugfs files are created using drm_debugfs_create_files() >>> on request. The first patch of this series makes it possible for DRM devices >>> for creating debugfs files during drm_dev_register(). For it, it introduces >>> two new functions that can be used by the drivers: drm_debugfs_add_files() >>> and drm_debugfs_add_file(). The requests are added to a list and are created >>> all at once during drm_dev_register(). Moreover, the first patch was based on >>> this RFC series [2]. >>> >>> The main difference between the RFC series and the current series is the >>> creation of a new fops structure to accommodate the new structs and, also, >>> the creation of a new drm_debugfs_open. Moreover, the new series uses >>> device-managed allocation, returns memory allocation errors, and converts >>> more drivers to the new structure. >>> >>> Moreover, since v3, the ability to create debugfs files at late_register hooks was >>> added. In previous versions, modeset components weren't able to create debugfs >>> files at late_register hooks as the registration of drm_minor happens before the >>> registration of the modeset abstractions. So, the third patch fixes this problem >>> by adding a drm_debugfs_late_register() function. Thanks to Melissa Wen for >>> catching this problem! >>> >>> Apart from the third patch, the series looks similiar from its last version. >>> >>> [1] https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n506 >>> [2] https://lore.kernel.org/dri-devel/20200513114130.28641-2-wambui.karugax@gmail.com/ >>> >>> Best Regards, >>> - Maíra Canal >>> >>> --- >>> >>> v1 -> v2: https://lore.kernel.org/dri-devel/20221122190314.185015-1-mcanal@igalia.com/T/#t >>> >>> - Fix compilation errors in the second patch (kernel test robot). >>> - Drop debugfs_init hook from vkms (Maíra Canal). >>> - Remove return values and error handling to debugfs related >>> functions (Jani Nikula). >>> - Remove entry from list after the file is created, so that drm_debugfs_init >>> can be called more than once (Maíra Canal). >>> >>> v2 -> v3: https://lore.kernel.org/dri-devel/20221123220725.1272155-1-mcanal@igalia.com/ >>> >>> - Rebase on top of drm-misc-next >>> >>> v3 -> v4: https://lore.kernel.org/dri-devel/20221207132325.140393-1-mcanal@igalia.com/ >>> >>> - Add Maxime's Reviewed-by tags >>> - Add the ability to create debugfs files at late_register hooks (Melissa Wen). >> >> Hi Maíra, >> >> Thanks for addressing all comments. >> >> Maybe Danvet has some inputs for the late_register approach. > > I think as a stop-gap (really need to get this stuff landed so people can > start to use it) this is ok, but long term I think the right fix is to > roll out the same pre-register infrastructure for connector and crtc too. > That way drivers don't need to split their setup code into init and > register anymore, which is the point of this entire rework. > > If you want, you can adjust the todo accordingly, but we do already have > the paragraph about connector/crtc. > > But we can do that later on, because this is definitely a great way > forward. Thanks a lot for pushing this forward! > >> Anyway, LGTM and the entire series is: >> >> Reviewed-by: Melissa Wen <mwen@igalia.com> > > On the series: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Applied this series to drm-misc-next. Best Regards, - Maíra Canal >> >>> >>> --- >>> >>> Maíra Canal (7): >>> drm/debugfs: create device-centered debugfs functions >>> drm: use new debugfs device-centered functions on DRM core files >>> drm/debugfs: create debugfs late register functions >>> drm/vc4: use new debugfs device-centered functions >>> drm/v3d: use new debugfs device-centered functions >>> drm/vkms: use new debugfs device-centered functions >>> drm/todo: update the debugfs clean up task >>> >>> Documentation/gpu/todo.rst | 9 +-- >>> drivers/gpu/drm/drm_atomic.c | 11 ++- >>> drivers/gpu/drm/drm_client.c | 11 ++- >>> drivers/gpu/drm/drm_debugfs.c | 102 +++++++++++++++++++++++--- >>> drivers/gpu/drm/drm_drv.c | 3 + >>> drivers/gpu/drm/drm_framebuffer.c | 11 ++- >>> drivers/gpu/drm/drm_gem_vram_helper.c | 11 ++- >>> drivers/gpu/drm/drm_internal.h | 5 ++ >>> drivers/gpu/drm/drm_mode_config.c | 2 + >>> drivers/gpu/drm/v3d/v3d_debugfs.c | 22 +++--- >>> drivers/gpu/drm/vc4/vc4_bo.c | 10 +-- >>> drivers/gpu/drm/vc4/vc4_crtc.c | 7 +- >>> drivers/gpu/drm/vc4/vc4_debugfs.c | 36 ++------- >>> drivers/gpu/drm/vc4/vc4_dpi.c | 5 +- >>> drivers/gpu/drm/vc4/vc4_drv.c | 1 - >>> drivers/gpu/drm/vc4/vc4_drv.h | 32 ++------ >>> drivers/gpu/drm/vc4/vc4_dsi.c | 6 +- >>> drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +-- >>> drivers/gpu/drm/vc4/vc4_hvs.c | 24 ++---- >>> drivers/gpu/drm/vc4/vc4_v3d.c | 14 +--- >>> drivers/gpu/drm/vc4/vc4_vec.c | 6 +- >>> drivers/gpu/drm/vkms/vkms_drv.c | 17 ++--- >>> include/drm/drm_debugfs.h | 41 +++++++++++ >>> include/drm/drm_device.h | 15 ++++ >>> 24 files changed, 233 insertions(+), 180 deletions(-) >>> >>> -- >>> 2.38.1 >>> > > >