diff options
author | Imre Deak <imre.deak@intel.com> | 2017-12-08 16:43:05 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2017-12-11 13:49:02 +0200 |
commit | 4d40a6776f08dd87b7e007da691b73d45a9bf1fa (patch) | |
tree | c19ac1384ab72393fa53fadbd3ea88bfed5a6782 /lib/igt_fb.c | |
parent | 0f3be861eb7456a87706b72216daa3ee7e4dde5b (diff) |
igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
When drawing with cairo to Y/Yf tiled FBs we use a temporary linear
buffer which is mapped to the CPU, but the fast blit needed for this
only expects 32 bpp FBs. Add support for other bpps too.
This is needed for upcoming patches testing non-32bit bpp formats with
Y/Yf tiling.
Thanks to Ville for explaining why we need the temporary buffer. (Looks
like for Y tiling we could do without, but that's a separate topic.)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r-- | lib/igt_fb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c index d4eaed71..dcae07df 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1043,6 +1043,7 @@ static void destroy_cairo_surface__blit(void *arg) I915_TILING_NONE, 0, 0, /* src_x, src_y */ fb->width, fb->height, + igt_drm_format_to_bpp(fb->drm_format), fb->gem_handle, fb->stride, obj_tiling, @@ -1090,6 +1091,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb) obj_tiling, 0, 0, /* src_x, src_y */ fb->width, fb->height, + igt_drm_format_to_bpp(fb->drm_format), blit->linear.handle, blit->linear.stride, I915_TILING_NONE, |