public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Wood <thomas.wood@intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 2/6] lib: Extract ssme common fb create+fill methods into helpers
Date: Mon, 4 Jan 2016 18:23:18 +0200	[thread overview]
Message-ID: <20160104162318.GF4437@intel.com> (raw)
In-Reply-To: <CANkqdn03LB3kxKhQmP=+Be1AOasx+U-AC4gK4=OgxbpU--9hYw@mail.gmail.com>

On Mon, Dec 21, 2015 at 10:42:46AM +0000, Thomas Wood wrote:
> On 18 December 2015 at 17:25,  <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Several tests do one or more of the followin:
> > * igt_create_fb() + igt_paint_test_pattern()
> > * igt_create_color_fb() + igt_paint_test_pattern()
> > * igt_create_fb() + igt_paint_image()
> >
> > Extract them into new helpes: igt_create_pattern_fb(),
> > igt_create_color_pattern_fb(), igt_create_image_fb().
> 
> Couple of typos above: "ssme", "followin", "helpes"
> 
> 
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  lib/igt_fb.c              | 124 ++++++++++++++++++++++++++++++++++++++++++++++
> >  lib/igt_fb.h              |  11 ++++
> >  tests/kms_atomic.c        |  30 ++++-------
> >  tests/kms_flip_tiling.c   |  25 +++-------
> >  tests/kms_panel_fitting.c |  42 ++++------------
> >  tests/kms_plane_scaling.c |  60 ++++++----------------
> >  tests/kms_pwrite_crc.c    |   9 +---
> >  tests/kms_setmode.c       |  11 ++--
> >  tests/pm_lpsp.c           |  11 +---
> >  tests/pm_rpm.c            |  10 ++--
> >  tests/testdisplay.c       |   8 ++-
> >  11 files changed, 188 insertions(+), 153 deletions(-)
> >
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 3ea9915c42c4..b3c7840a22ae 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -537,6 +537,130 @@ unsigned int igt_create_color_fb(int fd, int width, int height,
> >         return fb_id;
> >  }
> >
> > +/**
> > + * igt_create_pattern_fb:
> > + * @fd: open i915 drm file descriptor
> > + * @width: width of the framebuffer in pixel
> > + * @height: height of the framebuffer in pixel
> > + * @format: drm fourcc pixel format code
> > + * @tiling: tiling layout of the framebuffer
> > + * @fb: pointer to an #igt_fb structure
> > + *
> > + * This function allocates a gem buffer object suitable to back a framebuffer
> > + * with the requested properties and then wraps it up in a drm framebuffer
> > + * object. All metadata is stored in @fb.
> > + *
> > + * Compared to igt_create_fb() this function also fills the entire framebuffer
> > + * with the test pattern.
> > + *
> > + * Returns:
> > + * The kms id of the created framebuffer on success or a negative error code on
> > + * failure.
> > + */
> > +unsigned int igt_create_pattern_fb(int fd, int width, int height,
> > +                                  uint32_t format, uint64_t tiling,
> > +                                  struct igt_fb *fb /* out */)
> > +{
> > +       unsigned int fb_id;
> > +       cairo_t *cr;
> > +
> > +       fb_id = igt_create_fb(fd, width, height, format, tiling, fb);
> > +       igt_assert(fb_id);
> > +
> > +       cr = igt_get_cairo_ctx(fd, fb);
> > +       igt_paint_test_pattern(cr, width, height);
> > +       igt_assert(cairo_status(cr) == 0);
> > +       cairo_destroy(cr);
> > +
> > +       return fb_id;
> > +}
> > +
> > +/**
> > + * igt_create_pattern_fb:
> 
> This should be igt_create_color_pattern_fb.
> 
> 
> > + * @fd: open i915 drm file descriptor
> > + * @width: width of the framebuffer in pixel
> > + * @height: height of the framebuffer in pixel
> > + * @format: drm fourcc pixel format code
> > + * @tiling: tiling layout of the framebuffer
> > + * @r: red value to use as fill color
> > + * @g: gree value to use as fill color
> 
> Typo of "green" here.

I think this was copy pasted from somewhere else. I'll fix up the
original as well.


-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-04 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 17:25 [PATCH i-g-t 1/6] lib: Make 'extra_long_opts' const ville.syrjala
2015-12-18 17:25 ` [PATCH i-g-t 2/6] lib: Extract ssme common fb create+fill methods into helpers ville.syrjala
2015-12-21 10:42   ` Thomas Wood
2016-01-04 16:23     ` Ville Syrjälä [this message]
2015-12-18 17:25 ` [PATCH i-g-t 3/6] lib: Use igt_assert_eq() to check for crc component count ville.syrjala
2015-12-21 15:55   ` Daniel Vetter
2015-12-18 17:25 ` [PATCH i-g-t 4/6] lib: Add igt_pipe_crc_new_nonblock() ville.syrjala
2015-12-21 15:53   ` Daniel Vetter
2016-01-04 16:46     ` Ville Syrjälä
2015-12-18 17:25 ` [PATCH i-g-t 5/6] tests/kms_pipe_crc_basic: Add tests for O_NONBLOCK CRC reads ville.syrjala
2015-12-18 17:25 ` [PATCH i-g-t 6/6] tests/kms_chv_cursor_fail: Add a test to exercise CHV pipe C cursor fail ville.syrjala
2015-12-21 10:42   ` Thomas Wood
2016-01-04 15:59     ` Ville Syrjälä

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=20160104162318.GF4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    /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