drm: Add helper iterator functions for plane fb_damage_clips blob
authorDeepak Rawat <drawat@vmware.com>
Wed, 30 May 2018 21:42:52 +0000 (14:42 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 5 Dec 2018 09:00:36 +0000 (10:00 +0100)
commitd2780b1f021bfe1674d21542e7274df6a5016a52
tree246c3fb3d996f924705c9d4c1f0a4af580ca2cec
parentd9778b40260950a01a00852be43ca6c5c2d97f69
drm: Add helper iterator functions for plane fb_damage_clips blob

With fb_damage_clips blob property in drm_plane_state, this patch adds
helper iterator to traverse the damage clips that lie inside plane src.
Iterator will return full plane src as damage in case need full plane
update or damage is not specified.

v2:
- Plane src clipping correction
- Handle no plane update case in iter_next

Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/drm_damage_helper.c
include/drm/drm_damage_helper.h
include/drm/drm_plane.h