Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arun R Murthy <arun.r.murthy@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	ankit.k.nautiyal@intel.com, adarsh.g.m@intel.com,
	"Arun R Murthy" <arun.r.murthy@intel.com>
Subject: [PATCH libdrm 0/2] Get active crtc list
Date: Mon, 21 Sep 2026 18:37:44 +0530	[thread overview]
Message-ID: <20260921130747.2557722-1-arun.r.murthy@intel.com> (raw)

drmModeGetResources() tells the system capability and not runtime
availability of the hardware resource.
DRM_IOCTL_MODE_GETCRTC only tells userspace which CRTCs are enabled
through KMS, not which are active in hardware. A pipe can be actively
scanning out without being enabled through the KMS state, so relying on
GETCRTC alone would report such a CRTC as free and assignable when it is
not.
Add new function drmModeGetCrtcList that enumerates the crtc list.

Arun R Murthy (2):
  xf86drmMode: add drmModeGetCrtcList() to enumerate available CRTCs
  tests/crtclist: add utility to inspect CRTC usage

 core-symbols.txt  |   2 +
 tests/crtclist.c  | 116 +++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build |   9 ++++
 xf86drmMode.c     | 123 ++++++++++++++++++++++++++++++++++++++++++++++
 xf86drmMode.h     |  38 ++++++++++++++
 5 files changed, 288 insertions(+)
 create mode 100644 tests/crtclist.c

-- 
2.25.1


             reply	other threads:[~2026-09-21 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 13:07 Arun R Murthy [this message]
2026-09-21 13:07 ` [PATCH libdrm 1/2] xf86drmMode: add drmModeGetCrtcList() to enumerate available CRTCs Arun R Murthy
2026-09-21 13:07 ` [PATCH libdrm 2/2] tests/crtclist: add utility to inspect CRTC usage Arun R Murthy
2026-09-21 14:07   ` Murthy, Arun R
2026-09-22 14:16     ` Michel Dänzer
2026-09-23  4:22       ` Murthy, Arun R

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=20260921130747.2557722-1-arun.r.murthy@intel.com \
    --to=arun.r.murthy@intel.com \
    --cc=adarsh.g.m@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=ville.syrjala@linux.intel.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