On Thu, 30 Jan 2025, Vinod Govindapillai <vinod.govindapillai@xxxxxxxxx> wrote: > 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. Needs to be sent to dri-devel. > > Signed-off-by: Vinod Govindapillai <vinod.govindapillai@xxxxxxxxx> > --- > drivers/gpu/drm/drm_damage_helper.c | 2 +- > include/drm/drm_damage_helper.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_damage_helper.c b/drivers/gpu/drm/drm_damage_helper.c > index afb02aae707b..44a5a36806e3 100644 > --- a/drivers/gpu/drm/drm_damage_helper.c > +++ b/drivers/gpu/drm/drm_damage_helper.c > @@ -308,7 +308,7 @@ EXPORT_SYMBOL(drm_atomic_helper_damage_iter_next); > * True if there is valid plane damage otherwise false. > */ > bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state, > - struct drm_plane_state *state, > + const struct drm_plane_state *state, > struct drm_rect *rect) > { > struct drm_atomic_helper_damage_iter iter; > diff --git a/include/drm/drm_damage_helper.h b/include/drm/drm_damage_helper.h > index effda42cce31..a58cbcd11276 100644 > --- a/include/drm/drm_damage_helper.h > +++ b/include/drm/drm_damage_helper.h > @@ -78,7 +78,7 @@ bool > drm_atomic_helper_damage_iter_next(struct drm_atomic_helper_damage_iter *iter, > struct drm_rect *rect); > bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state, > - struct drm_plane_state *state, > + const struct drm_plane_state *state, > struct drm_rect *rect); > > #endif -- Jani Nikula, Intel