xf86-video-intel: src/sna/sna_video_sprite.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Mar 13 15:53:59 UTC 2017
src/sna/sna_video_sprite.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 7e9e92c86b0fc4c848d164fe571798add5e1e36e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 13 15:50:58 2017 +0000
sna: No hw scaling for Baytrail sprites
Ville regrets to inform me that we don't have hardware scaling on
Valleyview either and so we need to employ the GPU as a scaler instead.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index bef1a44..69bfdfd 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -47,6 +47,8 @@
#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */
+#define has_hw_scaling(sna) ((sna)->kgem.gen < 071)
+
#define LOCAL_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct local_mode_set_plane)
struct local_mode_set_plane {
uint32_t plane_id;
@@ -151,7 +153,7 @@ static int sna_video_sprite_best_size(ddQueryBestSize_ARGS)
struct sna_video *video = port->devPriv.ptr;
struct sna *sna = video->sna;
- if (sna->kgem.gen >= 075 && !sna->render.video) {
+ if (!has_hw_scaling(sna) && !sna->render.video) {
*p_w = vid_w;
*p_h = vid_h;
} else {
@@ -522,7 +524,7 @@ off:
cache_bo = true;
}
- if (sna->kgem.gen >= 075 && sna->render.video &&
+ if (!has_hw_scaling(sna) && sna->render.video &&
!((frame.src.x2 - frame.src.x1) == (dst.x2 - dst.x1) &&
(frame.src.y2 - frame.src.y1) == (dst.y2 - dst.y1))) {
ScreenPtr screen = to_screen_from_sna(sna);
More information about the xorg-commit
mailing list