From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too
Date: Thu, 18 Apr 2013 17:06:57 +0300 [thread overview]
Message-ID: <20130418140657.GR4469@intel.com> (raw)
In-Reply-To: <4636590.FUlXDK7TnS@avalon>
On Thu, Apr 18, 2013 at 03:43:23PM +0200, Laurent Pinchart wrote:
> Hi Ville,
>
> Thank you for the patch.
>
> On Wednesday 17 April 2013 22:18:01 ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/modetest/buffers.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
> > index 5086381..6b117b4 100644
> > --- a/tests/modetest/buffers.c
> > +++ b/tests/modetest/buffers.c
> > @@ -601,7 +601,7 @@ fill_smpte(const struct format_info *info, void
> > *planes[3], unsigned int width, #define BLUE 0
> >
> > static void
> > -make_pwetty(void *data, int width, int height, int stride)
> > +make_pwetty(void *data, int width, int height, int stride, int rgb16)
>
> What about passing the format 4cc instead ?
It's a bit more work since I need to pass the whole format_info
down from fill_tiles(). But I can make a v2 with that change.
> > {
> > #ifdef HAVE_CAIRO
> > cairo_surface_t *surface;
> > @@ -609,7 +609,7 @@ make_pwetty(void *data, int width, int height, int
> > stride) int x, y;
> >
> > surface = cairo_image_surface_create_for_data(data,
> > - CAIRO_FORMAT_ARGB32,
> > + rgb16 ? CAIRO_FORMAT_RGB16_565 :
> CAIRO_FORMAT_ARGB32,
> > width, height,
> > stride);
> > cr = cairo_create(surface);
> > @@ -716,6 +716,7 @@ static void
> > fill_tiles_rgb16(const struct rgb_info *rgb, unsigned char *mem,
> > unsigned int width, unsigned int height, unsigned int stride)
> > {
> > + unsigned char *mem_base = mem;
> > unsigned int x, y;
> >
> > for (y = 0; y < height; ++y) {
> > @@ -732,6 +733,8 @@ fill_tiles_rgb16(const struct rgb_info *rgb, unsigned
> > char *mem, }
> > mem += stride;
> > }
> > +
> > + make_pwetty(mem_base, width, height, stride, 1);
> > }
> >
> > static void
> > @@ -777,7 +780,7 @@ fill_tiles_rgb32(const struct rgb_info *rgb, unsigned
> > char *mem, mem += stride;
> > }
> >
> > - make_pwetty(mem_base, width, height, stride);
> > + make_pwetty(mem_base, width, height, stride, 0);
> > }
> >
> > static void
>
> --
> Regards,
>
> Laurent Pinchart
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-04-18 14:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 19:18 [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too ville.syrjala
2013-04-17 19:18 ` [PATCH libdrm 2/5] modetest: Fix pitches, somewhat ville.syrjala
2013-04-18 13:45 ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 3/5] modetest: Add support for all 16/32 bpp RGB formats ville.syrjala
2013-04-18 13:56 ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 4/5] modetest: Print possible_crtcs for planes ville.syrjala
2013-04-18 13:46 ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 5/5] modetest: Reduce the length of the connector type string ville.syrjala
2013-04-18 13:46 ` Laurent Pinchart
2013-04-18 13:43 ` [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too Laurent Pinchart
2013-04-18 14:06 ` Ville Syrjälä [this message]
2013-04-18 14:19 ` Laurent Pinchart
2013-04-18 14:37 ` 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=20130418140657.GR4469@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.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