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:37:49 +0300 [thread overview]
Message-ID: <20130418143749.GS4469@intel.com> (raw)
In-Reply-To: <5378755.F7lkGMFgoD@avalon>
On Thu, Apr 18, 2013 at 04:19:30PM +0200, Laurent Pinchart wrote:
> On Thursday 18 April 2013 17:06:57 Ville Syrjälä wrote:
> > On Thu, Apr 18, 2013 at 03:43:23PM +0200, Laurent Pinchart wrote:
> > > 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.
>
> It was just an idea to make the code more future-proof, in case we decide to
> make 24-bit formats pwetty at some point. Maybe a bpp value would be a good
> compromise ?
I already implemented your original idea. Just doing a quick test now.
It's a better idea anyway since we can then check that the color
channels match what we're rendering. My original code just assumed
that it can render RGB565 into an XRGB1555 buffer for example. That
produces some rather ugly results in reality, so it's better to
limit it to the formats where the size/location of RGB channels match.
The order or RGB channels doesn't actually matter since the source
color is always white or black.
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2013-04-18 14:37 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ä
2013-04-18 14:19 ` Laurent Pinchart
2013-04-18 14:37 ` Ville Syrjälä [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=20130418143749.GS4469@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 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.