drm/vmwgfx: Fix large topology crash
authorSinclair Yeh <syeh@vmware.com>
Fri, 2 Jun 2017 05:55:50 +0000 (07:55 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 7 Jun 2017 12:36:02 +0000 (14:36 +0200)
commita1ac633912305168bf432c3d47979d43b16164f8
treea16c610f9d82665889f29e973ec83cf792ed42c0
parent8a309c8a2d0619efe29ec652c163d6b89eff9f9f
drm/vmwgfx: Fix large topology crash

The previous attempt at this had an issue with with num_clips > 1
because it would always end up using the coordinates of the last
clip while using width and height calculated from the bounding
box of all the clips.

So if the last clip happens to be not at the top-left corner of
the bounding box, the CPU blit operation would go out of bounds.

The original intent was to coalesce all the clips into one blit,
and to do that we need to also track the starting point of the
content buffer.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c