job->draw_min_y = info->dst.box.y;
job->draw_max_x = info->dst.box.x + info->dst.box.width;
job->draw_max_y = info->dst.box.y + info->dst.box.height;
- job->draw_width = dst_surf->width;
- job->draw_height = dst_surf->height;
- job->draw_tiles_x = DIV_ROUND_UP(dst_surf->width,
+ /* The simulator complains if we do a TLB load from a source with a
+ * stride that is smaller than the destination's, so we program the
+ * 'frame region' to match the smallest dimensions of the two surfaces.
+ * This should be fine because we only get here if the src and dst boxes
+ * match, so we know the blit involves the same tiles on both surfaces.
+ */
+ job->draw_width = MIN2(dst_surf->width, src_surf->width);
+ job->draw_height = MIN2(dst_surf->height, src_surf->height);
+ job->draw_tiles_x = DIV_ROUND_UP(job->draw_width,
job->tile_width);
- job->draw_tiles_y = DIV_ROUND_UP(dst_surf->height,
+ job->draw_tiles_y = DIV_ROUND_UP(job->draw_height,
job->tile_height);
job->needs_flush = true;