From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too Date: Thu, 18 Apr 2013 17:37:49 +0300 Message-ID: <20130418143749.GS4469@intel.com> References: <1366226285-13282-1-git-send-email-ville.syrjala@linux.intel.com> <4636590.FUlXDK7TnS@avalon> <20130418140657.GR4469@intel.com> <5378755.F7lkGMFgoD@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 07612E5C76 for ; Thu, 18 Apr 2013 07:37:53 -0700 (PDT) Content-Disposition: inline In-Reply-To: <5378755.F7lkGMFgoD@avalon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, Apr 18, 2013 at 04:19:30PM +0200, Laurent Pinchart wrote: > On Thursday 18 April 2013 17:06:57 Ville Syrj=E4l=E4 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 wro= te: > > > > From: Ville Syrj=E4l=E4 > > > > = > > > > Signed-off-by: Ville Syrj=E4l=E4 > > > > --- > > > > = > > > > 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 rgb= 16) > > > = > > > 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 go= od = > 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=E4l=E4 Intel OTC