From: Robert Fekete <robert.fekete@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Add extra plane information in debugfs.
Date: Wed, 28 Oct 2015 10:37:08 +0100 [thread overview]
Message-ID: <1446025028.26346.92.camel@robertfe-linux> (raw)
In-Reply-To: <20151027173150.GH21481@nuc-i3427.alporthouse.com>
On tis, 2015-10-27 at 17:31 +0000, Chris Wilson wrote:
> On Tue, Oct 27, 2015 at 04:49:49PM +0100, Robert Fekete wrote:
> > +static const char *plane_rotation(unsigned int rotation)
> > +{
> > + static char buf[48];
> > + /*
> > + * According to doc only one DRM_ROTATE_ is allowed but this
> > + * will print them all to visualize if the values are misused
> > + */
> > + snprintf(buf, sizeof(buf),
> > + "%s%s%s%s%s%s(0x%08x)",
> > + (rotation & BIT(DRM_ROTATE_0)) ? "0 " : "",
> > + (rotation & BIT(DRM_ROTATE_90)) ? "90 " : "",
> > + (rotation & BIT(DRM_ROTATE_180)) ? "180 " : "",
> > + (rotation & BIT(DRM_ROTATE_270)) ? "270 " : "",
> > + (rotation & BIT(DRM_REFLECT_X)) ? "FLIPX " : "",
> > + (rotation & BIT(DRM_REFLECT_Y)) ? "FLIPY " : "",
> > + rotation);
>
> I'd do it the other away around "%x (%s...%s)", the number is the one we
> all know and love, and the human readable translation second.
I fully agree but this is printed right after drm_get_format_name() in
drm_crtc.c which in turn prints it like "%s%s..(%x)" so in order to make
it look consistent I went for this solution instead. Is it acceptable to
keep for consistency or do you still want me to change it?
BR
/R
> -Chris
>
--
BR
/Robert Fekete
Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-10-28 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 15:49 [PATCH v2] drm/i915: Add extra plane information in debugfs Robert Fekete
2015-10-27 15:55 ` Robert Fekete
2015-10-27 17:31 ` Chris Wilson
2015-10-28 9:37 ` Robert Fekete [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=1446025028.26346.92.camel@robertfe-linux \
--to=robert.fekete@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@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