drm/vc4: kms: Constify the HVS old/new state helpers

The vc4_hvs_get_(old|new)_global_state functions don't modify the
drm_atomic_state passed as an argument, so let's make it const.

Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v1-13-051a0bb60a16@cerno.tech
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
This commit is contained in:
Maxime Ripard 2022-11-23 16:25:55 +01:00
parent 553a241b80
commit e818ee6899
No known key found for this signature in database
GPG Key ID: E3EF0D6F671851C5

View File

@ -191,7 +191,7 @@ vc4_ctm_commit(struct vc4_dev *vc4, struct drm_atomic_state *state)
} }
static struct vc4_hvs_state * static struct vc4_hvs_state *
vc4_hvs_get_new_global_state(struct drm_atomic_state *state) vc4_hvs_get_new_global_state(const struct drm_atomic_state *state)
{ {
struct vc4_dev *vc4 = to_vc4_dev(state->dev); struct vc4_dev *vc4 = to_vc4_dev(state->dev);
struct drm_private_state *priv_state; struct drm_private_state *priv_state;
@ -204,7 +204,7 @@ vc4_hvs_get_new_global_state(struct drm_atomic_state *state)
} }
static struct vc4_hvs_state * static struct vc4_hvs_state *
vc4_hvs_get_old_global_state(struct drm_atomic_state *state) vc4_hvs_get_old_global_state(const struct drm_atomic_state *state)
{ {
struct vc4_dev *vc4 = to_vc4_dev(state->dev); struct vc4_dev *vc4 = to_vc4_dev(state->dev);
struct drm_private_state *priv_state; struct drm_private_state *priv_state;