~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/drm_damage_helper.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
  2 /**************************************************************************
  3  *
  4  * Copyright (c) 2018 VMware, Inc., Palo Alto, CA., USA
  5  * All Rights Reserved.
  6  *
  7  * Permission is hereby granted, free of charge, to any person obtaining a
  8  * copy of this software and associated documentation files (the
  9  * "Software"), to deal in the Software without restriction, including
 10  * without limitation the rights to use, copy, modify, merge, publish,
 11  * distribute, sub license, and/or sell copies of the Software, and to
 12  * permit persons to whom the Software is furnished to do so, subject to
 13  * the following conditions:
 14  *
 15  * The above copyright notice and this permission notice (including the
 16  * next paragraph) shall be included in all copies or substantial portions
 17  * of the Software.
 18  *
 19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 21  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 22  * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 23  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 24  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 25  * USE OR OTHER DEALINGS IN THE SOFTWARE.
 26  *
 27  * Authors:
 28  * Deepak Rawat <drawat@vmware.com>
 29  *
 30  **************************************************************************/
 31 
 32 #ifndef DRM_DAMAGE_HELPER_H_
 33 #define DRM_DAMAGE_HELPER_H_
 34 
 35 #include <drm/drm_atomic_helper.h>
 36 
 37 /**
 38  * drm_atomic_for_each_plane_damage - Iterator macro for plane damage.
 39  * @iter: The iterator to advance.
 40  * @rect: Return a rectangle in fb coordinate clipped to plane src.
 41  *
 42  * Note that if the first call to iterator macro return false then no need to do
 43  * plane update. Iterator will return full plane src when damage is not passed
 44  * by user-space.
 45  */
 46 #define drm_atomic_for_each_plane_damage(iter, rect) \
 47         while (drm_atomic_helper_damage_iter_next(iter, rect))
 48 
 49 /**
 50  * struct drm_atomic_helper_damage_iter - Closure structure for damage iterator.
 51  *
 52  * This structure tracks state needed to walk the list of plane damage clips.
 53  */
 54 struct drm_atomic_helper_damage_iter {
 55         /* private: Plane src in whole number. */
 56         struct drm_rect plane_src;
 57         /* private: Rectangles in plane damage blob. */
 58         const struct drm_rect *clips;
 59         /* private: Number of rectangles in plane damage blob. */
 60         uint32_t num_clips;
 61         /* private: Current clip iterator is advancing on. */
 62         uint32_t curr_clip;
 63         /* private: Whether need full plane update. */
 64         bool full_update;
 65 };
 66 
 67 void drm_atomic_helper_check_plane_damage(struct drm_atomic_state *state,
 68                                           struct drm_plane_state *plane_state);
 69 int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,
 70                               struct drm_file *file_priv, unsigned int flags,
 71                               unsigned int color, struct drm_clip_rect *clips,
 72                               unsigned int num_clips);
 73 void
 74 drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter,
 75                                    const struct drm_plane_state *old_state,
 76                                    const struct drm_plane_state *new_state);
 77 bool
 78 drm_atomic_helper_damage_iter_next(struct drm_atomic_helper_damage_iter *iter,
 79                                    struct drm_rect *rect);
 80 bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state,
 81                                      struct drm_plane_state *state,
 82                                      struct drm_rect *rect);
 83 
 84 #endif
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php