public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_fb: better format printing
Date: Wed, 13 Mar 2019 17:27:14 +0100	[thread overview]
Message-ID: <20190313162714.GL2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190312135332.32738-1-daniel.vetter@ffwll.ch>

On Tue, Mar 12, 2019 at 02:53:32PM +0100, Daniel Vetter wrote:
> Steal if from kms_plane.c and put it into igt_fb.h
> 
> Also tiny bikeshed to remove the space, so it fits more tidily into
> the usual name1=value1, name2=value2 style printing.
> 
> v2: Rebase
> 
> v3: It better compile :-/
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

... and pushed.
-Daniel

> ---
>  lib/igt_fb.c      | 6 ++++--
>  lib/igt_fb.h      | 4 ++++
>  tests/kms_plane.c | 3 ---
>  3 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index e696c863ea70..6a9a93417230 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1146,8 +1146,10 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  
>  	fb->size = bo_size;
>  
> -	igt_debug("%s(width=%d, height=%d, format=0x%x, modifier=0x%"PRIx64", size=%"PRIu64")\n",
> -		  __func__, width, height, format, modifier, bo_size);
> +	igt_debug("%s(width=%d, height=%d, format=" IGT_FORMAT_FMT
> +		  ", modifier=0x%"PRIx64", size=%"PRIu64")\n",
> +		  __func__, width, height, IGT_FORMAT_ARGS(format), modifier,
> +		  bo_size);
>  
>  	create_bo_for_fb(fb);
>  	igt_assert(fb->gem_handle > 0);
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index 7667579b3d98..ba22bd664510 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -44,6 +44,10 @@
>   */
>  #define IGT_FORMAT_FLOAT fourcc_code('I', 'G', 'F', 'x')
>  
> +#define IGT_FORMAT_FMT "%c%c%c%c(0x%08x)"
> +#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
> +		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
> +
>  /**
>   * igt_fb_t:
>   * @fb_id: KMS ID of the framebuffer
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index d8098bef891a..69069f6b1356 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -401,9 +401,6 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
>  	free(lut);
>  }
>  
> -#define IGT_FORMAT_FMT "%c%c%c%c (0x%08x)"
> -#define IGT_FORMAT_ARGS(f) ((f) >> 0) & 0xff, ((f) >> 8) & 0xff, \
> -		((f) >> 16) & 0xff, ((f) >> 24) & 0xff, (f)
>  
>  static void test_format_plane_color(data_t *data, enum pipe pipe,
>  				    igt_plane_t *plane,
> -- 
> 2.20.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-13 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 16:47 [igt-dev] [PATCH i-g-t] lib/igt_fb: better format printing Daniel Vetter
2019-03-11 17:03 ` Ville Syrjälä
2019-03-12  9:50 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-12 13:51 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2019-03-12 13:53 ` Daniel Vetter
2019-03-13 16:27   ` Daniel Vetter [this message]
2019-03-13 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_fb: better format printing (rev3) Patchwork
2019-03-13 14:32 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190313162714.GL2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=igt-dev@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