mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: linux-kernel@vger.kernel.org
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Dave Airlie" <airlied@redhat.com>,
	"Greg Kroah-Hartman" <greg@kroah.com>,
	dri-devel@lists.freedesktop.org, "Jon Smirl" <jonsmirl@gmail.com>
Subject: [PATCH v2 2/2] Doc/ABI: sysfs-drm initial document; "polled" entry
Date: Tue, 21 Sep 2010 23:20:22 -0400	[thread overview]
Message-ID: <1285125622.2518.21.camel@morgan.silverblock.net> (raw)
In-Reply-To: <1285023750.30856.99.camel@morgan.silverblock.net>

This is the initial addition of documentation for the drm module's sysfs
entries.  It provides a drm sysfs entries overview, and a detailed
description of the new drm per output connector "polled" entry in sysfs.

Signed-of-by: Andy Walls <awalls@md.metrocast.net>

diff --git a/Documentation/ABI/testing/sysfs-drm b/Documentation/ABI/testing/sysfs-drm
new file mode 100644
index 0000000..18a017a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-drm
@@ -0,0 +1,208 @@
+Direct Rendering Infrastructure (DRI) Direct Rendering Manager (drm) module
+and Translation Table Manager (ttm) module sysfs entries
+
+Example class view showing a single graphics adapter with three output
+connectors, a special control device node for the graphics adapter, and the
+Translation Table Manager (ttm) graphics memory manager virtual device:
+
+    /sys/class/drm/
+    ├── card0               -> ../../devices/<...>/drm/card0
+    ├── card0-DVI-D-1       -> ../../devices/<...>/drm/card0/card0-DVI-D-1
+    ├── card0-HDMI Type A-1 -> ../../devices/<...>/drm/card0/card0-HDMI Type A-1
+    ├── card0-VGA-1         -> ../../devices/<...>/drm/card0/card0-VGA-1
+    ├── controlD64          -> ../../devices/<...>/drm/controlD64
+    ├── ttm                 -> ../../devices/virtual/drm/ttm
+    └── version
+
+    6 directories, 1 file
+
+
+Corresponding DRI device nodes for the example graphics adapter, with
+additional ACL properties on card0 granting rw perms to the X/console user:
+
+    crw-rw----+ 1 root video 226,  0 2010-09-21 20:52 /dev/dri/card0
+    crw-rw-rw-. 1 root video 226, 64 2010-09-21 20:51 /dev/dri/controlD64
+
+
+Example physical device view for a single graphics adapter with three output
+connectors and a special control device node for the graphics adapter:
+
+    /sys/devices/<...>/drm
+    ├── card0
+    │   ├── card0-DVI-D-1
+    │   │   ├── device -> ../../card0
+    │   │   ├── dpms
+    │   │   ├── edid
+    │   │   ├── enabled
+    │   │   ├── modes
+    │   │   ├── polled
+    │   │   ├── power
+    │   │   │   ├── control
+    │   │   │   ├── runtime_active_time
+    │   │   │   ├── runtime_status
+    │   │   │   ├── runtime_suspended_time
+    │   │   │   ├── wakeup
+    │   │   │   └── wakeup_count
+    │   │   ├── status
+    │   │   ├── subsystem -> ../../../../../../../class/drm
+    │   │   └── uevent
+    │   ├── card0-HDMI Type A-1
+    │   │   ├── device -> ../../card0
+    │   │   ├── dpms
+    │   │   ├── edid
+    │   │   ├── enabled
+    │   │   ├── modes
+    │   │   ├── polled
+    │   │   ├── power
+    │   │   │   ├── control
+    │   │   │   ├── runtime_active_time
+    │   │   │   ├── runtime_status
+    │   │   │   ├── runtime_suspended_time
+    │   │   │   ├── wakeup
+    │   │   │   └── wakeup_count
+    │   │   ├── status
+    │   │   ├── subsystem -> ../../../../../../../class/drm
+    │   │   └── uevent
+    │   ├── card0-VGA-1
+    │   │   ├── device -> ../../card0
+    │   │   ├── dpms
+    │   │   ├── edid
+    │   │   ├── enabled
+    │   │   ├── modes
+    │   │   ├── polled
+    │   │   ├── power
+    │   │   │   ├── control
+    │   │   │   ├── runtime_active_time
+    │   │   │   ├── runtime_status
+    │   │   │   ├── runtime_suspended_time
+    │   │   │   ├── wakeup
+    │   │   │   └── wakeup_count
+    │   │   ├── status
+    │   │   ├── subsystem -> ../../../../../../../class/drm
+    │   │   └── uevent
+    │   ├── dev
+    │   ├── device -> ../../../0000:01:05.0
+    │   ├── power
+    │   │   ├── control
+    │   │   ├── runtime_active_time
+    │   │   ├── runtime_status
+    │   │   ├── runtime_suspended_time
+    │   │   ├── wakeup
+    │   │   └── wakeup_count
+    │   ├── subsystem -> ../../../../../../class/drm
+    │   └── uevent
+    └── controlD64
+        ├── dev
+        ├── device -> ../../../0000:01:05.0
+        ├── power
+        │   ├── control
+        │   ├── runtime_active_time
+        │   ├── runtime_status
+        │   ├── runtime_suspended_time
+        │   ├── wakeup
+        │   └── wakeup_count
+        ├── subsystem -> ../../../../../../class/drm
+        └── uevent
+
+    20 directories, 55 files
+
+
+Example virtual device view view showing the Translation Table Manager (ttm)
+graphics memory manager virtual device:
+
+    /sys/devices/virtual/drm
+    └── ttm
+        ├── buffer_objects
+        │   └── bo_count
+        ├── memory_accounting
+        │   ├── kernel
+        │   │   ├── available_memory
+        │   │   ├── emergency_memory
+        │   │   ├── swap_limit
+        │   │   ├── used_memory
+        │   │   └── zone_memory
+        │   └── pool
+        │       ├── pool_allocation_size
+        │       ├── pool_max_size
+        │       └── pool_small_allocation
+        ├── power
+        │   ├── control
+        │   ├── runtime_active_time
+        │   ├── runtime_status
+        │   ├── runtime_suspended_time
+        │   ├── wakeup
+        │   └── wakeup_count
+        ├── subsystem -> ../../../../class/drm
+        └── uevent
+
+    7 directories, 16 files
+
+
+
+Where:		/sys/devices/<...>/drm/cardN/cardN-C-M/polled
+		For N a decimal system graphics adapter number: 0, 1, 2, ...
+		For C a connector type name (including spaces) from the set:
+			Unknown
+			VGA
+			DVI-I
+			DVI-D
+			DVI-A
+			Composite
+			SVIDEO
+			LVDS
+			Component
+			9-pin DIN
+			DisplayPort
+			HDMI Type A
+			HDMI Type B
+			TV
+			Embedded DisplayPort
+		For M a decimal connector number for connectors of that type
+			over all the graphics adapters in the system: 1, 2, ...
+Date:		22 September 2010
+KernelVersion:	2.6.37
+Contact:	Andy Walls <awalls@md.metrocast.net>
+Description:
+		Manual control over DRM Kernel Mode Set (KMS) output connector
+		hotplug/connect/disconnect polling criteria.  The graphics
+		adapter drm driver (e.g. radeon, i915, nouveau) will detect
+		the available connectors on a graphics adapter and set polling
+		criteria flags for the connector to specify for what events the
+		0.1 Hz DRM KMS poll of the connector should look.
+
+		A read of the contents of this entry will show what flags are
+		available, with the names of flags that are set for the
+		connector enclosed in brackets:
+
+			# cat /sys/devices/.../drm/card0/card0-DVI-D-1/polled
+			[hotplug_detectable] connect disconnect
+
+		A write of flags names to this entry, will clear the current
+		flag settings and set the poll criteria flags for that
+		connector to those specified names:
+
+			# echo " disconnect  connect " > \
+				/sys/devices/.../drm/card0/card0-DVI-D-1/polled
+			# cat /sys/devices/.../drm/card0/card0-DVI-D-1/polled
+			hotplug_detectable [connect] [disconnect]
+
+			# echo > /sys/devices/.../drm/card0/card0-DVI-D-1/polled
+			# cat /sys/devices/.../drm/card0/card0-DVI-D-1/polled
+			hotplug_detectable connect disconnect
+
+		The flags have the following meanings in drm_crtc_helper.c:
+
+			hotplug_detectable:
+			   always attempt to detect connection status upon poll
+			   don't automatically set up another poll of connector
+
+			connect:
+			   attempt to detect "connect" events
+			   automatically set up another poll of connector
+
+			disconnect:
+			   attempt to detect "disconnect" events
+			   automatically set up another poll of connector
+
+		Clearing all three flags will disable any detection actions
+		being taken for that connector during the 0.1 Hz poll.






  parent reply	other threads:[~2010-09-22  3:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 12:59 [PATCH] drm/sysfs: Provide per connector control of DRM KMS polling Andy Walls
2010-09-20 18:29 ` Rafał Miłecki
2010-09-20 23:02   ` Andy Walls
2010-09-21  4:26     ` Alex Deucher
2010-09-21 17:30       ` Andy Walls
2010-09-22  5:30         ` Alex Deucher
2010-09-22 12:31           ` Andy Walls
2010-09-22 20:16             ` Andy Walls
2010-09-22 13:33           ` Jon Smirl
2010-09-22 21:07             ` Andy Walls
2010-09-22 22:05               ` Jon Smirl
2010-09-24 19:12               ` Alex Deucher
2010-09-26 18:12                 ` Andy Walls
2010-09-27 15:45                   ` Alex Deucher
2010-09-22  3:20     ` [PATCH v2 0/2] " Andy Walls
2010-09-22  3:20     ` [PATCH v2 1/2] " Andy Walls
2010-09-22  3:20     ` Andy Walls [this message]
2010-09-22 15:06       ` [PATCH v2 2/2] Doc/ABI: sysfs-drm initial document; "polled" entry Greg KH
2010-09-22 16:36         ` Andy Walls
2010-09-22 19:23           ` Greg KH
2010-09-20 18:52 ` [PATCH] drm/sysfs: Provide per connector control of DRM KMS polling Greg KH
2010-09-20 21:11   ` Andy Walls
2010-09-22  9:44     ` Florian Mickler
2010-09-22 12:49       ` Andy Walls

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=1285125622.2518.21.camel@morgan.silverblock.net \
    --to=awalls@md.metrocast.net \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greg@kroah.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zajec5@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome