From bb679b74195a463e53d253085f5f0f22dde9cc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 19 Jan 2016 20:17:38 +0200 Subject: [PATCH] hack for Y tiling and rotation --- src/sna/kgem.c | 1 + src/sna/sna_display.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 8e5ec51..3648331 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4958,6 +4958,7 @@ struct kgem_bo *kgem_create_linear(struct kgem *kgem, int size, unsigned flags) int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int bpp) { + return I915_TILING_Y; if (DBG_NO_TILING) return tiling < 0 ? tiling : I915_TILING_NONE; diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 60bc42b..e921514 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1341,6 +1341,13 @@ sna_crtc_apply(xf86CrtcPtr crtc) sna_crtc_disable_cursor(sna, sna_crtc); if (!rotation_set(sna, &sna_crtc->primary, sna_crtc->rotation)) { + struct drm_mode_crtc arg; + memset(&arg, 0, sizeof(arg)); + arg.crtc_id = __sna_crtc_id(sna_crtc); + (void)drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC,&arg); + } + + if (!rotation_set(sna, &sna_crtc->primary, sna_crtc->rotation)) { ERR(("%s: set-primary-rotation failed (rotation-id=%d, rotation=%d) on CRTC:%d [pipe=%d], errno=%d\n", __FUNCTION__, sna_crtc->primary.rotation.prop, sna_crtc->rotation, __sna_crtc_id(sna_crtc), __sna_crtc_pipe(sna_crtc), errno)); sna_crtc->primary.rotation.supported &= ~sna_crtc->rotation; @@ -2377,7 +2384,7 @@ force_shadow: sna_crtc->shadow_bo = NULL; } - tiling = I915_TILING_X; + tiling = I915_TILING_Y; if (sna->kgem.gen == 071) tiled_limit = 16 * 1024 * 8; else if ((sna->kgem.gen >> 3) > 4) -- 2.7.0