commit 0da359a
Michael Forney
·
2019-03-19 03:33:02 +0000 UTC
parent b4e902b
intel: Don't tile cursor buffer, regardless of size The right way to choose a kernel buffer size is to query DRM_CAP_CURSOR_WIDTH and DRM_CAP_CURSOR_HEIGHT. However, on intel this may return 256, the maximum size. Make sure not to tile the cursor buffer, even if we'd tile it otherwise.
M
intel.c
+1,
-1
1@@ -155,7 +155,7 @@ struct buffer * context_create_buffer(struct wld_context * base,
2 struct intel_context * context = intel_context(base);
3 struct buffer * buffer;
4 drm_intel_bo * bo;
5- uint32_t tiling_mode = width >= 128 ? I915_TILING_X : I915_TILING_NONE;
6+ uint32_t tiling_mode = width >= 128 && !(flags & WLD_FLAG_CURSOR) ? I915_TILING_X : I915_TILING_NONE;
7 unsigned long pitch;
8
9 bo = drm_intel_bo_alloc_tiled(context->bufmgr, "buffer", width, height, 4,
M
wld.h
+2,
-1
1@@ -49,7 +49,8 @@ enum wld_format
2
3 enum wld_flags
4 {
5- WLD_FLAG_MAP = 0x1 << 16
6+ WLD_FLAG_MAP = 1 << 16,
7+ WLD_FLAG_CURSOR = 1 << 17,
8 };
9
10 bool wld_lookup_named_color(const char * name, uint32_t * color);