drm: Allow drivers to indicate the damage helpers to ignore damage clips
authorjsg <jsg@openbsd.org>
Fri, 2 Feb 2024 03:15:11 +0000 (03:15 +0000)
committerjsg <jsg@openbsd.org>
Fri, 2 Feb 2024 03:15:11 +0000 (03:15 +0000)
From Javier Martinez Canillas
45aafb5075754bbe6458a6b3e8ad02b408c35211 in linux-6.6.y/6.6.15
35ed38d58257336c1df26b14fd5110b026e2adde in mainline linux

sys/dev/pci/drm/drm_damage_helper.c
sys/dev/pci/drm/include/drm/drm_plane.h

index d8b2955..afb02aa 100644 (file)
@@ -241,7 +241,8 @@ drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,
        iter->plane_src.x2 = (src.x2 >> 16) + !!(src.x2 & 0xFFFF);
        iter->plane_src.y2 = (src.y2 >> 16) + !!(src.y2 & 0xFFFF);
 
-       if (!iter->clips || !drm_rect_equals(&state->src, &old_state->src)) {
+       if (!iter->clips || state->ignore_damage_clips ||
+           !drm_rect_equals(&state->src, &old_state->src)) {
                iter->clips = NULL;
                iter->num_clips = 0;
                iter->full_update = true;
index 79d6285..fef7752 100644 (file)
@@ -190,6 +190,16 @@ struct drm_plane_state {
         */
        struct drm_property_blob *fb_damage_clips;
 
+       /**
+        * @ignore_damage_clips:
+        *
+        * Set by drivers to indicate the drm_atomic_helper_damage_iter_init()
+        * helper that the @fb_damage_clips blob property should be ignored.
+        *
+        * See :ref:`damage_tracking_properties` for more information.
+        */
+       bool ignore_damage_clips;
+
        /**
         * @src:
         *