dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@collabora.com>
To: Emil Velikov <emil.l.velikov@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 08/10] tests/drmdevice: add a couple of printf headers
Date: Thu, 28 Jun 2018 18:09:12 +0200	[thread overview]
Message-ID: <09017dcd-290c-cc0a-4b95-0820c833bf5a@collabora.com> (raw)
In-Reply-To: <20180625173626.8046-8-emil.l.velikov@gmail.com>

Feel free to add my r-b to this patch.

On 2018-06-25 19:36, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> Add a few printf statements, which should make the output easier to
> parse.
> 
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
>   tests/drmdevice.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/drmdevice.c b/tests/drmdevice.c
> index 9dd5098a..0d75836f 100644
> --- a/tests/drmdevice.c
> +++ b/tests/drmdevice.c
> @@ -112,12 +112,15 @@ main(void)
>       drmDevicePtr device;
>       int fd, ret, max_devices;
>   
> +    printf("--- Checking the number of DRM device available ---\n");
>       max_devices = drmGetDevices2(0, NULL, 0);
>   
>       if (max_devices <= 0) {
>           printf("drmGetDevices2() has returned %d\n", max_devices);
>           return -1;
>       }
> +    printf("--- Devices reported %d ---\n", max_devices);
> +
>   
>       devices = calloc(max_devices, sizeof(drmDevicePtr));
>       if (devices == NULL) {
> @@ -125,6 +128,7 @@ main(void)
>           return -1;
>       }
>   
> +    printf("--- Retrieving devices information (PCI device revision is ignored) ---\n");
>       ret = drmGetDevices2(0, devices, max_devices);
>       if (ret < 0) {
>           printf("drmGetDevices2() returned an error %d\n", ret);
> @@ -137,13 +141,14 @@ main(void)
>   
>           for (int j = 0; j < DRM_NODE_MAX; j++) {
>               if (devices[i]->available_nodes & 1 << j) {
> -                printf("Opening device %d node %s\n", i, devices[i]->nodes[j]);
> +                printf("--- Opening device node %s ---\n", devices[i]->nodes[j]);
>                   fd = open(devices[i]->nodes[j], O_RDONLY | O_CLOEXEC, 0);
>                   if (fd < 0) {
>                       printf("Failed - %s (%d)\n", strerror(errno), errno);
>                       continue;
>                   }
>   
> +                printf("--- Retrieving device info, for node %s ---\n", devices[i]->nodes[j]);
>                   if (drmGetDevice2(fd, DRM_DEVICE_GET_PCI_REVISION, &device) == 0) {
>                       print_device_info(device, i, true);
>                       drmFreeDevice(&device);
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-06-28 16:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 17:36 [PATCH libdrm 01/10] xf86drm: drmGetDevice2: error out if the fd has unknown subsys Emil Velikov
2018-06-25 17:36 ` [PATCH libdrm 02/10] xf86drm: introduce drm_device_has_rdev() helper Emil Velikov
2018-06-28 10:14   ` Robert Foss
2018-06-25 17:36 ` [PATCH libdrm 03/10] xf86drm: Fold drmDevice processing into process_device() helper Emil Velikov
2018-06-28 11:50   ` Robert Foss
2018-06-25 17:36 ` [PATCH libdrm 04/10] xf86drm: Allocate drmDevicePtr's on stack Emil Velikov
2018-06-28 12:52   ` Robert Foss
2018-06-28 17:07     ` Emil Velikov
2018-06-29 15:20   ` [PATCH libdrm v2 " Emil Velikov
2018-06-29 15:49     ` Robert Foss
2018-06-29 15:22   ` [PATCH libdrm v2 05/10] xf86drm: introduce a get_real_pci_path() helper Emil Velikov
2018-06-25 17:36 ` [PATCH libdrm " Emil Velikov
2018-06-28 10:21   ` Eric Engestrom
2018-06-28 10:23     ` Eric Engestrom
2018-06-28 16:42     ` Emil Velikov
2018-06-28 16:06   ` Robert Foss
2018-06-25 17:36 ` [PATCH libdrm 06/10] xf86drm: Add drmDevice support for virtio_gpu Emil Velikov
2018-06-28 16:08   ` Robert Foss
2018-06-25 17:36 ` [PATCH libdrm 07/10] tests/drmdevices: install alongside other utilities Emil Velikov
2018-06-28 16:09   ` Robert Foss
2018-06-25 17:36 ` [PATCH libdrm 08/10] tests/drmdevice: add a couple of printf headers Emil Velikov
2018-06-28 16:09   ` Robert Foss [this message]
2018-06-25 17:36 ` [PATCH libdrm 09/10] drmdevice: convert the tabbed output into a tree Emil Velikov
2018-06-28 10:19   ` Eric Engestrom
2018-06-28 16:43     ` Emil Velikov
2018-06-28 16:09   ` Robert Foss
2018-06-29 15:24   ` [PATCH libdrm v2 " Emil Velikov
2018-06-25 17:36 ` [PATCH libdrm 10/10] drmdevice: print the correct host1x information Emil Velikov
2018-06-28 16:09   ` Robert Foss
2018-06-28 10:11 ` [PATCH libdrm 01/10] xf86drm: drmGetDevice2: error out if the fd has unknown subsys Robert Foss
2018-06-28 10:11 ` Robert Foss

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=09017dcd-290c-cc0a-4b95-0820c833bf5a@collabora.com \
    --to=robert.foss@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@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