All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Maíra Canal" <mcanal@igalia.com>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Melissa Wen" <mwen@igalia.com>,
	"Maxime Ripard" <maxime@cerno.tech>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Wambui Karuga" <wambui.karugax@gmail.com>
Subject: Re: [PATCH] drm: document better that drivers shouldn't use drm_minor directly
Date: Thu, 5 Jan 2023 07:27:33 -0500	[thread overview]
Message-ID: <Y7bCNYSqqZKyCTKW@intel.com> (raw)
In-Reply-To: <20230104211754.1967591-1-daniel.vetter@ffwll.ch>

On Wed, Jan 04, 2023 at 10:17:54PM +0100, Daniel Vetter wrote:
> The documentation for struct drm_minor already states this, but that's
> not always that easy to find.
> 
> Also due to historical reasons we still have the minor-centric (like
> drm_debugfs_create_files), but since this is now getting fixed we can
> put a few more pointers in place as to how this should be done
> ideally.
> 
> Motvated by some discussion with Rodrigo on irc about how drm/xe
> should lay out its sysfs interfaces.

Thank you!

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Wambui Karuga <wambui.karugax@gmail.com>
> Cc: Maíra Canal <mcanal@igalia.com>
> Cc: Maxime Ripard <maxime@cerno.tech>
> Cc: Melissa Wen <mwen@igalia.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  include/drm/drm_device.h | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index 9923c7a6885e..b40e07e004ee 100644
> --- a/include/drm/drm_device.h
> +++ b/include/drm/drm_device.h
> @@ -87,10 +87,23 @@ struct drm_device {
>  	 */
>  	void *dev_private;
>  
> -	/** @primary: Primary node */
> +	/**
> +	 * @primary:
> +	 *
> +	 * Primary node. Drivers should not interact with this
> +	 * directly. debugfs interface can be registered with
> +	 * drm_debugfs_add_file(), and sysfs should be directly added on the
> +	 * hardwire struct device @dev.
> +	 */
>  	struct drm_minor *primary;
>  
> -	/** @render: Render node */
> +	/**
> +	 * @render:
> +	 *
> +	 * Render node. Drivers should not interact with this directly ever.
> +	 * Drivers should not expose any additional interfaces in debugfs or
> +	 * sysfs on thise node.
> +	 */
>  	struct drm_minor *render;
>  
>  	/**
> -- 
> 2.37.2
> 

  parent reply	other threads:[~2023-01-05 12:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 21:17 [PATCH] drm: document better that drivers shouldn't use drm_minor directly Daniel Vetter
2023-01-05  7:38 ` Maxime Ripard
2023-01-05 10:21 ` Maíra Canal
2023-01-05 12:07 ` Melissa Wen
2023-01-05 12:27 ` Rodrigo Vivi [this message]
2023-01-05 12:39 ` Jani Nikula
2023-01-05 13:39   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2023-01-09 16:46 Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7bCNYSqqZKyCTKW@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime@cerno.tech \
    --cc=mcanal@igalia.com \
    --cc=mwen@igalia.com \
    --cc=wambui.karugax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.