diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-12 11:22:53 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-12 11:22:53 +0000 |
commit | 34aa1e3b2702a55799a5655a3ba10bce4cc2065a (patch) | |
tree | a053cf39f083a65c36d1d66d5c8ad9e114678ab2 /src/sna/sna_video_sprite.c | |
parent | 8f1afde57dca27e6542b0b8e7c87750f3d6367bf (diff) |
sna: Compile against ancient libdrm
We need to trim the sprite video overlays if the prototypes are not
known.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_sprite.c')
-rw-r--r-- | src/sna/sna_video_sprite.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c index ff3b4b33..d4eae913 100644 --- a/src/sna/sna_video_sprite.c +++ b/src/sna/sna_video_sprite.c @@ -37,9 +37,11 @@ #include <xf86xv.h> #include <X11/extensions/Xv.h> #include <fourcc.h> -#include <drm_fourcc.h> #include <i915_drm.h> +#ifdef DRM_IOCTL_MODE_GETPLANERESOURCES +#include <drm_fourcc.h> + #define IMAGE_MAX_WIDTH 2048 #define IMAGE_MAX_HEIGHT 2048 @@ -181,7 +183,7 @@ sna_video_sprite_show(struct sna *sna, xf86CrtcPtr crtc, BoxPtr dstBox) { - int plane = sna_crtc_to_plane(crtc); + uint32_t plane = sna_crtc_to_plane(crtc); update_dst_box_to_crtc_coords(sna, crtc, dstBox); if (crtc->rotation & (RR_Rotate_90 | RR_Rotate_270)) { @@ -286,7 +288,7 @@ static int sna_video_sprite_put_image(ScrnInfoPtr scrn, clip)) return Success; - if (!crtc || !sna_crtc_to_plane(crtc)) { + if (!crtc || sna_crtc_to_plane(crtc) == 0) { /* If the video isn't visible on any CRTC, turn it off */ sna_video_sprite_off(sna, video); return Success; @@ -441,3 +443,9 @@ XF86VideoAdaptorPtr sna_video_sprite_setup(struct sna *sna, return adaptor; } +#else +XF86VideoAdaptorPtr sna_video_sprite_setup(struct sna *sna, ScreenPtr screen) +{ + return NULL; +} +#endif |