public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
To: "Xiang, Haihao" <haihao.xiang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Kenneth Graunke <kenneth-xkhwgxqQjnbNLxjTenLetw@public.gmane.org>,
	"libva-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<libva-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Make sample_c messages go faster on Haswell.
Date: Tue, 6 Jan 2015 09:08:35 +0100	[thread overview]
Message-ID: <20150106080835.GJ2711@phenom.ffwll.local> (raw)
In-Reply-To: <1420528539.2355.87.camel@xhh-u64>

On Tue, Jan 06, 2015 at 03:15:39PM +0800, Xiang, Haihao wrote:
> On Mon, 2015-01-05 at 23:03 -0800, Kenneth Graunke wrote:
> > On Tuesday, January 06, 2015 02:39:36 PM Xiang, Haihao wrote:
> > > On Mon, 2015-01-05 at 21:54 -0800, Kenneth Graunke wrote:
> > > > On Tuesday, January 06, 2015 01:11:53 PM Xiang, Haihao wrote:
> > > > > 
> > > > > Hi Kenneth,
> > > > > 
> > > > > How did you test OSD ? I can't reproduce the issue you mentioned, OSD
> > > > > works well for me when using mplayer-vaapi with the latest
> > > > > libva/libva-intel-driver master branch.
> > > > > 
> > > > > I tried your patch, what surprised me is OSD still works well after
> > > > > applying your patch. It seems your patch didn't disable the palette.
> > > > > 
> > > > > Thanks
> > > > > Haihao
> > > > 
> > > > I ran:
> > > > 
> > > > mplayer -osdlevel 3 -vo vaapi big_buck_bunny_720p_stereo.ogg
> > > > 
> > > > For me, the OSD text is solid green, with hard edges.
> > > 
> > > The OSD text is white for me when using mplayer -osdlevel 3 -vo vaapi
> > > xxx. If possible, could you update your mplayer ?
> > 
> > Huh.  I'm using the Arch Linux package of mplayer-vaapi 36265-13,
> > which seems to be the most recent subversion commit ID.  I've never seen
> > white text on my Haswell system - it seems to be consistently dark green.
> 
> > > > If you use "-vo gl" or "-vo xv", the OSD is solid white text with a black
> > > > border around it.  I presume that it's supposed to be white with vaapi as
> > > > well, but I guess I'm not entirely sure.
> > > > 
> > > > It's possible that the optimization doesn't affect the palette as long as
> > > > you never use sample_c with the paletted textures.
> > > 
> > > I verified the palette takes effect in the following way:
> > > 
> > > 1. Only support P8A8 format in the driver
> > > 
> > > 2. ran the above command and I saw white OSD text
> > > 
> > > 3. Only support P4A4 format in the driver and don't use
> > > 3DSTATE_SAMPLER_PALETTE_LOAD0 to load the value to the texture palette,
> > > so the palette keeps unchanged. 
> > > 
> > > 4. ran the above command and I saw black OSD text.
> > > 
> > > 5. Load the right value to the texture palette and ran the above command
> > > again, I saw white OSD text.
> > > 
> > > Hence I think sample_c with the paletted textures is used in the driver.
> > 
> > That sounds like the palette is actually working, then.  Great :)
> > 
> > I doubt that libva would use sample_c - sampling with a shadow comparison?
> > It looks like it just uses sample and sample+killpix.
> 
> You are right, libva driver doesn't use sample_c message. 
> 
> > I'm pretty sure the sample_c optimization just uses the palette memory as
> > storage for some stuff, so it's quite possible it just works if you're
> > only using sample and sample+killpix.
> 
> Thanks for the explanation, it makes sense to me.

Thanks for digging into this some more, I've added the above discussion in
a quote to the commit message.

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libva

  reply	other threads:[~2015-01-06  8:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01  0:23 [PATCH] drm/i915: Make sample_c messages go faster on Haswell Kenneth Graunke
2015-01-05  0:48 ` shuang.he
2015-01-05 13:19 ` Daniel Vetter
2015-01-05 21:39   ` Kenneth Graunke
2015-01-06  5:11     ` Xiang, Haihao
2015-01-06  5:54       ` Kenneth Graunke
2015-01-06  6:39         ` Xiang, Haihao
2015-01-06  7:00           ` [Intel-gfx] " Xiang, Haihao
2015-01-06  7:03           ` Kenneth Graunke
2015-01-06  7:15             ` [Intel-gfx] " Xiang, Haihao
2015-01-06  8:08               ` Daniel Vetter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-29 22:12 Kenneth Graunke
2014-10-30 17:32 ` Kenneth Graunke
2014-10-30 19:26   ` Ville Syrjälä
2014-10-30 19:57     ` Kenneth Graunke
2014-10-31  9:27       ` Ville Syrjälä
2014-11-03 12:48         ` Daniel Vetter
     [not found]           ` <CAKMK7uH7-ar7OB2sdZ0phoZJ6j8-660Nr_c5CyiZRqTfgtMGHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04  8:48             ` [Intel-gfx] " Xiang, Haihao

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=20150106080835.GJ2711@phenom.ffwll.local \
    --to=daniel-/w4ywyx8dfk@public.gmane.org \
    --cc=haihao.xiang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=kenneth-xkhwgxqQjnbNLxjTenLetw@public.gmane.org \
    --cc=libva-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox