This is one of several patchset s to improve fb deferred I/O and DRM's use of it. THe patches fix several problems with the current helpers and add some easy improvements. Deferred I/O tracks dirty pages of the screen buffer, from which DRM calculates a bounding box of the damaged area. Patches 1 and 2 resolve bugs in the computation. Speifically, it makes the damage handling work with overallocation and panning enabled. Patches 3 to 5 add an easy performance improvement. Instead of damaging the whole viewport after a write operation, only damage the written area. For large writes the area consists of multiple scanlines, for small writes the area might consist of only a few pixels on a single scanline. Write operations now also work correctly with overallocation and panning enabled. Thomas Zimmermann (5): drm/fb-helper: Fix clip rectangle height drm/fb-helper: Fix vertical damage clipping drm/fb-helper: Calculate damaged area in separate helper drm/fb-helper: Clip damage area to written memory range drm/fb-helper: Clip damage area horizontally drivers/gpu/drm/drm_fb_helper.c | 69 ++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 15 deletions(-) base-commit: 0bb81b5d6db5f689b67f9d8b35323235c45e890f prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 prerequisite-patch-id: 8e52143a6cd7b8fb789e656208f6edde71d0f499 prerequisite-patch-id: 4b0e798cb2990b553d44e1bc39634d72d172ea7b -- 2.34.1