From: He YunLei <heyunlei@huawei.com>
To: dri-devel@lists.freedesktop.org
Cc: Bintian <bintian.wang@huawei.com>
Subject: drm: Request for help about drm_mode_getresources( ) returns empty modes message
Date: Fri, 6 Feb 2015 18:10:59 +0800 [thread overview]
Message-ID: <54D49333.8060104@huawei.com> (raw)
hi all,
when I run modetest process in libdrm to test our drm module, I find a strange problem:
The test successfully opened /dev/dri/card0 (major:226 minor:0) device by using module name.
but the returned message about crtc, encoder and connector are all empty. I confirm the num of them
is one when our drm device driver register in kernel. So I track the kernel and find here:
drivers/gpu/drm/drm_crtc.c
1806 if (!drm_is_primary_client(file_priv)) {
1807
1808 mode_group = NULL;
1809 list_for_each(lh, &dev->mode_config.crtc_list)
1810 crtc_count++;
1811
1812 list_for_each(lh, &dev->mode_config.connector_list)
1813 connector_count++;
1814
1815 list_for_each(lh, &dev->mode_config.encoder_list)
1816 encoder_count++;
1817 } else {
1818
1819 mode_group = &file_priv->master->minor->mode_group;
1820 crtc_count = mode_group->num_crtcs;
1821 connector_count = mode_group->num_connectors;
1822 encoder_count = mode_group->num_encoders;
1823 }
The device we opened with type of DRM_MINOR_LEGACY, so here come into else branch. The description
of drm_mode_group is that struct drm_mode_group - group of mode setting resources for potential sub-grouping,
and the note in drm_crtc.h also said :
943 * Currently this simply tracks the global mode setting state. But in the
944 * future it could allow groups of objects to be set aside into independent
945 * control groups for use by different user level processes (e.g. two X servers
946 * running simultaneously on different heads, each with their own mode
947 * configuration and freedom of mode setting).
I doubt the empty result has some relations with it, so I continue to track the kernel in function
drm_open, and I find mode_group lies in drm_minor, whick can be found by inode in function drm_open.
But when we create a crtc, encoder or connector, we do nothing to mode_group, just initializing it
when drm_core register. Can you help me and give me some advice?
regards,
Yunlei He
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
reply other threads:[~2015-02-06 10:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=54D49333.8060104@huawei.com \
--to=heyunlei@huawei.com \
--cc=bintian.wang@huawei.com \
--cc=dri-devel@lists.freedesktop.org \
/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.