summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
diff options
context:
space:
mode:
authorMika Kahola <mika.kahola@intel.com>2020-11-13 13:57:07 +0200
committerMika Kahola <mika.kahola@intel.com>2020-11-23 09:51:43 +0200
commitfed745e58c4b18831be2f569ef1f48a5a185ae97 (patch)
tree4f5d1578c377440f0a5b14c3f772080e55035290 /lib/igt_fb.c
parent15890fd59055f043e91fcda9013ec4827d4cb07e (diff)
lib/rendercopy: Enable fast clear
Enable fast clear rendering on rendercopy function. v2: Modify _gen9_render_copyfunc to support fast clear (Matt) Enable fast clear bit on 3D sequence (Matt) Add helper function to figure out clear color modifier (Matt) v3: Remove unrelated line additions/removes v4: Fast clear with color (Imre) v5: Write raw 32-bit color values to register (Imre) Require 32-bit color format v6: Rebase to use batchbuffer without libdrm dependency v7: Enable clear color (Nanley) v8: Various cleanups (Imre) Modificate buffer creation (Imre) v9: Renaming of render_copyfunc() to render_op() (Imre) Remove igt_render_clearfunc variable (Imre) v10: Dst buffer width division by 64 pixels and height by 16 lines (Imre) Reorder ss10 bit fields (Imre) Relocate buffer with clear color value enabled (Imre) Set fast clear enable bit in correct dword (Imre) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r--lib/igt_fb.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 43f8c475..422a9e06 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2141,9 +2141,10 @@ static int yuv_semiplanar_bpp(uint32_t drm_format)
}
}
-static struct intel_buf *create_buf(struct fb_blit_upload *blit,
- const struct igt_fb *fb,
- const char *name)
+struct intel_buf *
+igt_fb_create_intel_buf(int fd, struct buf_ops *bops,
+ const struct igt_fb *fb,
+ const char *name)
{
struct intel_buf *buf;
uint32_t bo_name, handle, compression;
@@ -2169,10 +2170,10 @@ static struct intel_buf *create_buf(struct fb_blit_upload *blit,
compression = I915_COMPRESSION_NONE;
}
- bo_name = gem_flink(blit->fd, fb->gem_handle);
- handle = gem_open(blit->fd, bo_name);
+ bo_name = gem_flink(fd, fb->gem_handle);
+ handle = gem_open(fd, bo_name);
- buf = intel_buf_create_using_handle(blit->bops, handle,
+ buf = intel_buf_create_using_handle(bops, handle,
fb->width, fb->height,
fb->plane_bpp[0], 0,
igt_fb_mod_to_tiling(fb->modifier),
@@ -2213,6 +2214,13 @@ static struct intel_buf *create_buf(struct fb_blit_upload *blit,
return buf;
}
+static struct intel_buf *create_buf(struct fb_blit_upload *blit,
+ const struct igt_fb *fb,
+ const char *name)
+{
+ return igt_fb_create_intel_buf(blit->fd, blit->bops, fb, name);
+}
+
static void fini_buf(struct intel_buf *buf)
{
intel_buf_destroy(buf);