[PATCH libdrm resend] tests/dristat: add -C to pretty-print device capabilities
Thierry Reding
thierry.reding at gmail.com
Tue May 13 03:37:19 PDT 2014
On Fri, Apr 18, 2014 at 01:09:25AM -0700, Aaron Plattner wrote:
> Signed-off-by: Aaron Plattner <aplattner at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140513/7ae56a3e/attachment.sig>
More information about the dri-devel
mailing list