Skip to contentSkip to conversation

sna/video sprite patch: support for multiple xv ports (exposes minimum Xv ports)

PATCH In review Michael Hadley 2 participants 3 messages May 10, 2016 – Jun 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sna/video sprite patch: support for multiple xv ports (exposes minimum Xv ports)

The current driver exposes a single adaptor port so that only one Xv video can be played using a single sprite at a given time. This change will allow available hardware sprites to be used. Exposes the minimum Xv sprite ports to be compatible with older X11.

v2: function sna_video_num_sprites() checks and returns the minimum number
of hardware sprites available on the adaptor for combatibility reasons.

v1: updated patch from [email protected]. removed/added
whitespace, re-formatted code, removed redundent variable allocation.

---
 src/sna/sna.h              |   7 +-
 src/sna/sna_display.c      | 188 +++++++++++++++++++++++++++++++++++++++------
 src/sna/sna_video_sprite.c | 139 ++++++++++++++++++---------------
 3 files changed, 249 insertions(+), 85 deletions(-)
src/sna/sna.h +5 -2
index 664308f..88bf145 100644
@@ -610,8 +610,11 @@ static inline void sna_present_vblank_handler(struct drm_event_vblank *event) {
 static inline void sna_present_cancel_flip(struct sna *sna) { }
 #endif
 
-extern bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, uint32_t rotation);
-extern uint32_t sna_crtc_to_sprite(xf86CrtcPtr crtc);
+extern bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, uint32_t rotation, DrawablePtr draw);
+extern uint32_t sna_crtc_num_sprites(xf86CrtcPtr crtc);
+extern bool sna_crtc_drawable_to_sprite_id(xf86CrtcPtr crtc, DrawablePtr draw, uint32_t *id);
+extern bool sna_crtc_sprite_lock(xf86CrtcPtr crtc, DrawablePtr draw);
+extern void sna_crtc_sprite_unlock(xf86CrtcPtr crtc, DrawablePtr draw);
 extern bool sna_crtc_is_transformed(xf86CrtcPtr crtc);
 
 #define CRTC_VBLANK 0x3
src/sna/sna_display.c +165 -23

276 lines not on this page · raw message

src/sna/sna_video_sprite.c +79 -60

224 lines not on this page · raw message

Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 10 lines · Michael Hadley

The current driver exposes a single adaptor port so that only one Xv video can be played using a single sprite at a given time. This change will allow available hardware sprites to be used. Exposes the minimum Xv sprite ports to be compatible with older X11.

v2: function sna_video_num_sprites() checks and returns the minimum number
of hardware sprites available on the adaptor for combatibility reasons.

v1: updated patch from [email protected]. removed/added
whitespace, re-formatted code, removed redundent variable allocation.

This still has the concept of a drawable owning a sprite, which is what I believe to be inconsistent with the exclusive ownership of the sprite from the XvAdapter. Abstracting the access, emulating more planes than physically present is intriguing, just requires careful scrutiny of the various runtime errors that the resource conflicts will then create and whether applications can handle that. Versus providing exclusive access to a sprite and the numerous virtual texture ports already provided. -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Hi Chris,

Thanks for the feedback and I'm glad to see that you've made the necessary changes and integrated the patches.

Regards

Mike

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Monday, June 20, 2016 12:10 PM
To: Hadley, MichaelX
Cc: [email protected]
Subject: Re: [PATCH] sna/video sprite patch: support for multiple xv ports (exposes minimum Xv ports)

Quoted 10 lines · Michael Hadley

The current driver exposes a single adaptor port so that only one Xv video can be played using a single sprite at a given time. This change will allow available hardware sprites to be used. Exposes the minimum Xv sprite ports to be compatible with older X11.

v2: function sna_video_num_sprites() checks and returns the minimum number
of hardware sprites available on the adaptor for combatibility reasons.

v1: updated patch from [email protected]. removed/added
whitespace, re-formatted code, removed redundent variable allocation.

This still has the concept of a drawable owning a sprite, which is what I believe to be inconsistent with the exclusive ownership of the sprite from the XvAdapter. Abstracting the access, emulating more planes than physically present is intriguing, just requires careful scrutiny of the various runtime errors that the resource conflicts will then create and whether applications can handle that. Versus providing exclusive access to a sprite and the numerous virtual texture ports already provided. -Chris

--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx