summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-01-20 17:40:41 +0000
committerDave Airlie <airlied@redhat.com>2012-01-20 17:40:41 +0000
commitee5944eba45176e48396b94172a27a47edd33fc4 (patch)
treee1e210f363445fc457fd5414864477b160efb8f6
parent5185a18a016d9ccbfea3a3cdb314041268222708 (diff)
dd inital providerdrvmodel
-rw-r--r--xrandr.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xrandr.c b/xrandr.c
index 62b32d1..2980e23 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -46,6 +46,7 @@ static int screen = -1;
static Bool verbose = False;
static Bool automatic = False;
static Bool properties = False;
+static Bool providers = False;
static Bool grab_server = True;
static Bool no_primary = False;
@@ -143,6 +144,7 @@ usage(void)
fprintf(stderr, " --rmmode <name>\n");
fprintf(stderr, " --addmode <output> <name>\n");
fprintf(stderr, " --delmode <output> <name>\n");
+ fprintf(stderr, " --listprovider\n");
exit(1);
/*NOTREACHED*/
@@ -2652,6 +2654,13 @@ main (int argc, char **argv)
action_requested = True;
continue;
}
+ if (!strcmp ("--listproviders", argv[i]))
+ {
+ query_1_2 = True;
+ providers = True;
+ action_requested = True;
+ continue;
+ }
usage();
}
if (!action_requested)
@@ -3154,6 +3163,21 @@ main (int argc, char **argv)
}
}
+ if (providers)
+ {
+ XRRProviderResources *providers;
+ providers = XRRGetProviderResources(dpy, root);
+ if (providers) {
+ printf("Providers: number : %d\n", providers->nproviders);
+
+ for (j = 0; j < providers->nproviders; j++) {
+ XRRProviderInfo *info = XRRGetProviderInfo(dpy, providers->providers[j]);
+ printf("Provider %d: %d %x %x %d %d\n", j, (int)providers->providers[j], info->current_role, info->allowed_roles, info->ncrtcs, info->noutputs);
+ XRRFreeProviderInfo(info);
+ }
+ }
+
+ }
if (verbose)
{
for (j = 0; j < output_info->nmode; j++)