All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too
Date: Thu, 18 Apr 2013 15:43:23 +0200	[thread overview]
Message-ID: <4636590.FUlXDK7TnS@avalon> (raw)
In-Reply-To: <1366226285-13282-1-git-send-email-ville.syrjala@linux.intel.com>

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 ?

>  {
>  #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

  parent reply	other threads:[~2013-04-18 13:43 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 ` Laurent Pinchart [this message]
2013-04-18 14:06   ` [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too Ville Syrjälä
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=4636590.FUlXDK7TnS@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.