[MPlayer-dev-eng] Removal of backing store

Stephane Marchesin marchesin at icps.u-strasbg.fr
Sun Aug 24 14:23:41 CEST 2008


On Sat, Aug 23, 2008 at 12:40 PM, Vladimir Mosgalin
<mosgalin at vm10124.spb.edu> wrote:
> Hi Stephane Marchesin!
>
>  On 2008.08.23 at 02:43:49 +0200, Stephane Marchesin wrote next:
>
>> > And what exactly does composite has to do with backing store?
>>
>> The link is that when you use an EXA driver, windows with a backing
>> store flag are redirected. From then you can't use the hw overlay.
>
> Then it's bug in nouveau driver. I don't observe anything like that on
> intel. Can't check ati driver for R3xx/R4xx with EXA, though.
>
>> Hmm, compiz doesn't use backing store, it's mplayer that enables it.
>> And yes, the flag still exists for backwards compatibility.
>
> Well.. isnt' mplayer merely setting a hint, that it could use backing
> store? And it's up to X server whether to actually utilize one.
>
> What I mean, is that X should just ignore that hint with compiz, there's
> no need in it.
>
>> Sure, and it made no difference. So again, what good does it do ?
>
> You missed my point. I agree that if it improves things a lot in one
> configuration and doesn't hurt in others, it should be removed. But can
> you honestly say that all your patch does is performance improvement for
> your case? The improvement is pretty big, so how can you be sure that it
> produces no slowdowns and no ill-effects on all other supported
> configurations?
>
>> > Intel provides two xv adaptors, one for hardware overlay and one for
>> > textured video. Not sure about fallback, probably there isn't (when you
>> > specify adaptor directly).
>>
>> Intel has the textured adapter as default, and overlay as 2nd. So you
>> will use the textured adapter usually. This means you don't encounter
>
> Sure, I know that. And I use overlay - it gives slightly better
> performance without compiz, and MUCH better performance with it.
>
>> the issue by default. But it you do the following :
>> - mplayer -vo xv:port=[the overlay port]
>> - make the mplayer window transparent or whatever under a composited
>> desktop (using xcompmgr + transset for example).
>> you will get a blue window. This could be fixed if intel added an
>> automatic fallback (except it would fallback all the time because of
>> backing store, like nouveau).
>
> Yes, obviously. It does exactly like it should. If I force overlay
> instead of default textured video xv port, it gives funny effects in
> compiz - effects operate on blue window, not on video. Not that it
> matters much, since when you don't make window transparent or move it or
> switch tasks you can watch video without any problems.

But you have to use the textured adapter, which is a performance loss.
It might not matter to you, but I've found the hw overlay to be the
only way to play 1080p material in real time on nv10-grade cards for
example...

> And the only
> alternative, textured video, becomes really slow when effects are used
> (i945 + 800 mhz cpu + single-channel ram isn't exactly a fastest combo).
>
> But I don't care about effects for video window, I care about fast video
> output. And isn't that exactly the thing you are trying to achieve? So
> the question is, why are there no problems with intel driver without
> your patch (I don't have build env on my notebook, so I can't check
> patched version right away, sorry)? intel can manage both textured video
> and overlay usage in EXA mode perfectly with and without compiz, so why
> does nouveau needs your hack? It really sounds like a bug in nouveau.

No intel doesn't manage overlay usage, they basically don't make you
use the overlay adapter. As I said before, intel uses textured video
by default for everyone, at the expense of speed.

>
>> > IOW, are you sure your fix applies to anything but older nvidia cards?
>> >
>>
>> I think for now it applies to nouveau only. Once this is fixed, other
>> drivers can enable their hw overlay in a composited situation too, and
>> everyone wins.
>
> intel already does that, so why nouveau can't?
>

No, intel uses the textured adapter by default and the hw overlay
adapter comes second, so people don't use it. In the end, the result
for intel is that their video playback is slower.
Now if intel wanted to improve the speed, they could put the overlay
adapter as default, and make it fallback to the textured adapter when
the window is redirected. However, mplayer would prevent this by
making it fallback all the time (because of the backing store flag).

> And actually I meant a different thing. Newer radeon cards don't support
> hw overlay, but doesn't the same applies to newest intel and nvidia
> cards too? For example, intel driver doesn't provide overlay xv port for
> X3500 & X4500 (maybe for X3000 too).

Yeah cards that feature a real, usable (for video) hw overlay are
nv4->nv40 (only the first nv40 features a real hw overlay, later
models don't), r100->r300 (that is up to X800) and i810 -> i915 (there
were some talks about the i965 having hw overlay but it being disabled
at the driver level IIRC).

Stephane



More information about the MPlayer-dev-eng mailing list