dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Aaron Plattner <aplattner@nvidia.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm resend] tests/dristat: add -C to pretty-print device capabilities
Date: Tue, 13 May 2014 12:37:19 +0200	[thread overview]
Message-ID: <20140513103717.GB8407@ulmo> (raw)
In-Reply-To: <1397808565-14255-1-git-send-email-aplattner@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 1583 bytes --]

On Fri, Apr 18, 2014 at 01:09:25AM -0700, Aaron Plattner wrote:
> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
> ---
> Example output of dristat -C:
> /dev/dri/card0
>   Device capabilities:
>     Dumb framebuffer: yes
>     VBlank high crtc: yes
>     Preferred depth: 24
>     Prefer shadow: yes
>     Prime: import export

I think this could go into the commit message.

> diff --git a/tests/dristat.c b/tests/dristat.c
[...]
> +static void getcaps(int fd)
> +{
> +    const struct {
> +	    uint64_t capability;
> +	    enum cap_type type;
> +	    const char *name;

The indentation here is slightly odd. Indentation is slightly odd
throughout the file, but it's more odd here than elsewhere. I think to
make it consistent this should be indented using a single tab rather
than a tab and four spaces.

> +    } caps[] = {
> +	{ DRM_CAP_DUMB_BUFFER,          CAP_BOOL,  "Dumb framebuffer" },
> +	{ DRM_CAP_VBLANK_HIGH_CRTC,     CAP_BOOL,  "VBlank high crtc" },
> +	{ DRM_CAP_DUMB_PREFERRED_DEPTH, CAP_UINT,  "Preferred depth" },
> +	{ DRM_CAP_DUMB_PREFER_SHADOW,   CAP_BOOL,  "Prefer shadow" },
> +	{ DRM_CAP_PRIME,                CAP_PRIME, "Prime" },

/usr/include/drm/drm.h on my system has DRM_CAP_TIMESTAMP_MONOTONIC and
DRM_CAP_ASYNC_PAGE_FLIP in addition to the above. Any chance you could
add support for those as well?

Oh, and there's DRM_CAP_CURSOR_WIDTH and DRM_CAP_CURSOR_HEIGHT, although
those haven't been added to libdrm's copy of drm.h yet.

> +    };
> +    int i;

Perhaps unsigned int here?

Other than that this looks like a useful addition.

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2014-05-13 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  8:09 [PATCH libdrm resend] tests/dristat: add -C to pretty-print device capabilities Aaron Plattner
2014-05-13 10:37 ` Thierry Reding [this message]

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=20140513103717.GB8407@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=aplattner@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox