diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-13 17:25:31 -0300 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-14 15:28:07 -0300 |
commit | 9194f4efdf89d9c2e9ab79a232e642b8664fa54f (patch) | |
tree | 85e96246ee393589bf43eb75e4e405648bdb64ee /lib | |
parent | caaf3b869f2be2758ba836244f07ad25c35ec7d5 (diff) |
lib/igt_draw: fix pwrite_tiled()
Don't forget to flush in case we're in the last iteration of the loop.
This fixes failures of kms_frontbuffer_tracking when used with
--use-small-modes on eDP monitors.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/igt_draw.c b/lib/igt_draw.c index 50bed863..10187d8e 100644 --- a/lib/igt_draw.c +++ b/lib/igt_draw.c @@ -375,7 +375,8 @@ static void draw_rect_pwrite_tiled(int fd, struct buf_data *buf, flush_tmp = true; } - if (tmp_used == tmp_size || (flush_tmp && tmp_used > 0)) { + if (tmp_used == tmp_size || (flush_tmp && tmp_used > 0) || + tiled_pos + pixel_size >= buf->size) { gem_write(fd, buf->handle, tmp_start_pos, tmp, tmp_used * pixel_size); flush_tmp = false; |