diff mbox series

[v3,1/7] drm/vc4: kms: Switch to drmm_add_action_or_reset

Message ID 20201105135656.383350-2-maxime@cerno.tech
State Accepted
Commit 3c354ed1c43dabbdaae8569f982cdcccfdecd6a8
Headers show
Series drm/vc4: Rework the HVS muxing code | expand

Commit Message

Maxime Ripard Nov. 5, 2020, 1:56 p.m. UTC
Even though it was pointed in the review by Daniel, and I thought to have
fixed it while applying the patches, but it turns out I forgot to commit
the fixes in the process. Properly fix it this time.

Fixes: dcda7c28bff2 ("drm/vc4: kms: Add functions to create the state objects")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Zimmermann Nov. 19, 2020, 7:56 a.m. UTC | #1
Am 05.11.20 um 14:56 schrieb Maxime Ripard:
> Even though it was pointed in the review by Daniel, and I thought to have

> fixed it while applying the patches, but it turns out I forgot to commit

> the fixes in the process. Properly fix it this time.

> 

> Fixes: dcda7c28bff2 ("drm/vc4: kms: Add functions to create the state objects")

> Signed-off-by: Maxime Ripard <maxime@cerno.tech>


Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>


> ---

>   drivers/gpu/drm/vc4/vc4_kms.c | 4 ++--

>   1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c

> index 2b951cae04ad..44db31e16e91 100644

> --- a/drivers/gpu/drm/vc4/vc4_kms.c

> +++ b/drivers/gpu/drm/vc4/vc4_kms.c

> @@ -113,7 +113,7 @@ static int vc4_ctm_obj_init(struct vc4_dev *vc4)

>   	drm_atomic_private_obj_init(&vc4->base, &vc4->ctm_manager, &ctm_state->base,

>   				    &vc4_ctm_state_funcs);

>   

> -	return drmm_add_action(&vc4->base, vc4_ctm_obj_fini, NULL);

> +	return drmm_add_action_or_reset(&vc4->base, vc4_ctm_obj_fini, NULL);

>   }

>   

>   /* Converts a DRM S31.32 value to the HW S0.9 format. */

> @@ -657,7 +657,7 @@ static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)

>   				    &load_state->base,

>   				    &vc4_load_tracker_state_funcs);

>   

> -	return drmm_add_action(&vc4->base, vc4_load_tracker_obj_fini, NULL);

> +	return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL);

>   }

>   

>   #define NUM_OUTPUTS  6

> 


-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 2b951cae04ad..44db31e16e91 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -113,7 +113,7 @@  static int vc4_ctm_obj_init(struct vc4_dev *vc4)
 	drm_atomic_private_obj_init(&vc4->base, &vc4->ctm_manager, &ctm_state->base,
 				    &vc4_ctm_state_funcs);
 
-	return drmm_add_action(&vc4->base, vc4_ctm_obj_fini, NULL);
+	return drmm_add_action_or_reset(&vc4->base, vc4_ctm_obj_fini, NULL);
 }
 
 /* Converts a DRM S31.32 value to the HW S0.9 format. */
@@ -657,7 +657,7 @@  static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)
 				    &load_state->base,
 				    &vc4_load_tracker_state_funcs);
 
-	return drmm_add_action(&vc4->base, vc4_load_tracker_obj_fini, NULL);
+	return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL);
 }
 
 #define NUM_OUTPUTS  6