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@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx> +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. _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel