From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH libdrm resend] tests/dristat: add -C to pretty-print device capabilities Date: Tue, 13 May 2014 12:37:19 +0200 Message-ID: <20140513103717.GB8407@ulmo> References: <1397808565-14255-1-git-send-email-aplattner@nvidia.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0892429188==" Return-path: Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 508326E7BC for ; Tue, 13 May 2014 03:39:20 -0700 (PDT) Received: by mail-ee0-f54.google.com with SMTP id b57so255221eek.41 for ; Tue, 13 May 2014 03:39:19 -0700 (PDT) In-Reply-To: <1397808565-14255-1-git-send-email-aplattner@nvidia.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Aaron Plattner Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0892429188== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wq9mPyueHGvFACwf" Content-Disposition: inline --wq9mPyueHGvFACwf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 18, 2014 at 01:09:25AM -0700, Aaron Plattner wrote: > Signed-off-by: Aaron Plattner > --- > 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 --wq9mPyueHGvFACwf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTcfXdAAoJEN0jrNd/PrOhUVUP/jHj3t7cLUSXkbU3IPkCavIS OdDycZ/O51Y1+yiAOef49Q4GnvCYIs+uxBhQ3gDTURajyuaIPAdF6jcblX4WNgAX SAyZmLdh5yyU6/BACmAPFJQwOre89XiTIngNok/ejB0hv4uf0cL7MfkzKYaL87+/ VPoQk04RxeasiBFsR+5lGKetXw3mrS2wdqJIkHa+bs9N+USQEAtW2C/f2GbBRBdk ZAntaBAYa9zqB4lL11++P5Qe1UFNKy7IpMgQtmCjcoHwdMC4c1WQm05376iX44PR 2KYAiMpa9Ops9+Zjp/ZXeW5evxdbZ8har5jQktv1jWQoYRuAmmSuFDH3ITOTpgkR kLruQwwu4glAwhAiWwR1RcWtpekHUlHlLiXHajnYQgRJYndk6XUahiw5vTXzO3bj 2aalhR2XZy7KoUrP7aJHeDxVLjz+MMv/PSzdYW6W6em6F6ax+i74QEOmrYSohqsW pQmOEGV1s+Yx0p9nalcBCN1RQB6HykC6Q0P0HkOHFHZroTYFcehmbah8q88r79Qi B/ies5Iae/rv+BEm/9YWrhUG2XJfAeqALbe2zFZfE6n5jkqqHsEVYc179NATi/U8 guXjwBZH7vYSi+N4Tkx5VOCa0n/OYGmP8zx2fUh/AXbM0N8cwKCenmmKyHAIXVVt lqwsRBfuFDgHbiaJN4VQ =2RQV -----END PGP SIGNATURE----- --wq9mPyueHGvFACwf-- --===============0892429188== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0892429188==--