XenevaOS
Loading...
Searching...
No Matches
drm_damage_helper.h
Go to the documentation of this file.
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
36
46#define drm_atomic_for_each_plane_damage(iter, rect) \
47 while (drm_atomic_helper_damage_iter_next(iter, rect))
48
55 /* private: Plane src in whole number. */
57 /* private: Rectangles in plane damage blob. */
58 const struct drm_rect *clips;
59 /* private: Number of rectangles in plane damage blob. */
61 /* private: Current clip iterator is advancing on. */
63 /* private: Whether need full plane update. */
65};
66
68 struct drm_plane_state *plane_state);
70 struct drm_file *file_priv, unsigned int flags,
71 unsigned int color, struct drm_clip_rect *clips,
72 unsigned int num_clips);
73void
75 const struct drm_plane_state *old_state,
76 const struct drm_plane_state *new_state);
77bool
79 struct drm_rect *rect);
81 const struct drm_plane_state *state,
82 struct drm_rect *rect);
83
84#endif
uint8_t flags
Definition virtio.h:0
unsigned int uint32_t
Definition acefiex.h:163
int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb, struct drm_file *file_priv, unsigned int flags, unsigned int color, struct drm_clip_rect *clips, unsigned int num_clips)
bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state, const struct drm_plane_state *state, struct drm_rect *rect)
void drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter, const struct drm_plane_state *old_state, const struct drm_plane_state *new_state)
bool drm_atomic_helper_damage_iter_next(struct drm_atomic_helper_damage_iter *iter, struct drm_rect *rect)
void drm_atomic_helper_check_plane_damage(struct drm_atomic_commit *state, struct drm_plane_state *plane_state)
Definition i_video.h:141
Definition drm_atomic.h:480
Definition drm_damage_helper.h:54
const struct drm_rect * clips
Definition drm_damage_helper.h:58
uint32_t curr_clip
Definition drm_damage_helper.h:62
uint32_t num_clips
Definition drm_damage_helper.h:60
bool full_update
Definition drm_damage_helper.h:64
struct drm_rect plane_src
Definition drm_damage_helper.h:56
Definition drm.h:78
Definition drm_file.h:165
Definition drm_framebuffer.h:120
Definition drm_plane.h:54
Definition drm_rect.h:46
#define state(x)