Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/damage-helper: add const qualifier in drm_atomic_helper_damage_merged()

Add a const qualifier for the "state" parameter as well as we could
use this helper to get the combined damage in cases of const
drm_plane_state as well. Needed mainly for xe driver big joiner cases
where we need to track the damage from immutable plane state.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250228093802.27091-3-vinod.govindapillai@intel.com

authored by

Vinod Govindapillai and committed by
Mika Kahola
9a112dd8 840cb2dc

+2 -2
+1 -1
drivers/gpu/drm/drm_damage_helper.c
··· 308 308 * True if there is valid plane damage otherwise false. 309 309 */ 310 310 bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state, 311 - struct drm_plane_state *state, 311 + const struct drm_plane_state *state, 312 312 struct drm_rect *rect) 313 313 { 314 314 struct drm_atomic_helper_damage_iter iter;
+1 -1
include/drm/drm_damage_helper.h
··· 78 78 drm_atomic_helper_damage_iter_next(struct drm_atomic_helper_damage_iter *iter, 79 79 struct drm_rect *rect); 80 80 bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state, 81 - struct drm_plane_state *state, 81 + const struct drm_plane_state *state, 82 82 struct drm_rect *rect); 83 83 84 84 #endif