All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma()
@ 2020-06-05 17:37 ` Denis Efremov
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Efremov @ 2020-06-05 17:37 UTC (permalink / raw)
  To: Leo Li
  Cc: Denis Efremov, David Airlie, Daniel Vetter, Krunoslav Kovac,
	amd-gfx, linux-kernel, stable

Use kvfree() instead of kfree() to free coeff in build_regamma()
because the memory is allocated with kvzalloc().

Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 9431b48aecb4..56bb1f9f77ce 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -843,7 +843,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
 	pow_buffer_ptr = -1; // reset back to no optimize
 	ret = true;
 release:
-	kfree(coeff);
+	kvfree(coeff);
 	return ret;
 }
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma()
@ 2020-06-05 17:37 ` Denis Efremov
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Efremov @ 2020-06-05 17:37 UTC (permalink / raw)
  To: Leo Li
  Cc: Krunoslav Kovac, David Airlie, linux-kernel, amd-gfx,
	Denis Efremov, Daniel Vetter, stable

Use kvfree() instead of kfree() to free coeff in build_regamma()
because the memory is allocated with kvzalloc().

Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 9431b48aecb4..56bb1f9f77ce 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -843,7 +843,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
 	pow_buffer_ptr = -1; // reset back to no optimize
 	ret = true;
 release:
-	kfree(coeff);
+	kvfree(coeff);
 	return ret;
 }
 
-- 
2.26.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp()
  2020-06-05 17:37 ` Denis Efremov
@ 2020-06-05 17:37   ` Denis Efremov
  -1 siblings, 0 replies; 6+ messages in thread
From: Denis Efremov @ 2020-06-05 17:37 UTC (permalink / raw)
  To: Leo Li
  Cc: Denis Efremov, David Airlie, Daniel Vetter, Krunoslav Kovac,
	amd-gfx, linux-kernel

Use kfree() instead of kvfree() to free rgb_user in
calculate_user_regamma_ramp() because the memory is allocated with
kcalloc().

Signed-off-by: Denis Efremov <efremov@linux.com>
---
Looks like this kvfree is from merge conflict between 
1fafef9dfe12 ("Merge drm-fixes-for-v4.17-rc6-urgent into drm-next")
and 6396bb221514 ("treewide: kzalloc() -> kcalloc()").
I'm not adding cc to stable because the bug looks harmless. You can
squash the commits if you want.
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 56bb1f9f77ce..bcfe34ef8c28 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -1777,7 +1777,7 @@ bool calculate_user_regamma_ramp(struct dc_transfer_func *output_tf,
 
 	kfree(rgb_regamma);
 rgb_regamma_alloc_fail:
-	kvfree(rgb_user);
+	kfree(rgb_user);
 rgb_user_alloc_fail:
 	return ret;
 }
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp()
@ 2020-06-05 17:37   ` Denis Efremov
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Efremov @ 2020-06-05 17:37 UTC (permalink / raw)
  To: Leo Li
  Cc: Krunoslav Kovac, David Airlie, linux-kernel, amd-gfx,
	Denis Efremov, Daniel Vetter

Use kfree() instead of kvfree() to free rgb_user in
calculate_user_regamma_ramp() because the memory is allocated with
kcalloc().

Signed-off-by: Denis Efremov <efremov@linux.com>
---
Looks like this kvfree is from merge conflict between 
1fafef9dfe12 ("Merge drm-fixes-for-v4.17-rc6-urgent into drm-next")
and 6396bb221514 ("treewide: kzalloc() -> kcalloc()").
I'm not adding cc to stable because the bug looks harmless. You can
squash the commits if you want.
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 56bb1f9f77ce..bcfe34ef8c28 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -1777,7 +1777,7 @@ bool calculate_user_regamma_ramp(struct dc_transfer_func *output_tf,
 
 	kfree(rgb_regamma);
 rgb_regamma_alloc_fail:
-	kvfree(rgb_user);
+	kfree(rgb_user);
 rgb_user_alloc_fail:
 	return ret;
 }
-- 
2.26.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma()
  2020-06-05 17:37 ` Denis Efremov
@ 2020-06-08 20:10   ` Alex Deucher
  -1 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2020-06-08 20:10 UTC (permalink / raw)
  To: Denis Efremov
  Cc: Leo Li, Krunoslav Kovac, David Airlie, LKML, amd-gfx list,
	Daniel Vetter, for 3.8

On Fri, Jun 5, 2020 at 1:38 PM Denis Efremov <efremov@linux.com> wrote:
>
> Use kvfree() instead of kfree() to free coeff in build_regamma()
> because the memory is allocated with kvzalloc().
>
> Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations")
> Cc: stable@vger.kernel.org
> Signed-off-by: Denis Efremov <efremov@linux.com>

Applied the series.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> index 9431b48aecb4..56bb1f9f77ce 100644
> --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> @@ -843,7 +843,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
>         pow_buffer_ptr = -1; // reset back to no optimize
>         ret = true;
>  release:
> -       kfree(coeff);
> +       kvfree(coeff);
>         return ret;
>  }
>
> --
> 2.26.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma()
@ 2020-06-08 20:10   ` Alex Deucher
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2020-06-08 20:10 UTC (permalink / raw)
  To: Denis Efremov
  Cc: Krunoslav Kovac, Leo Li, LKML, amd-gfx list, David Airlie,
	for 3.8, Daniel Vetter

On Fri, Jun 5, 2020 at 1:38 PM Denis Efremov <efremov@linux.com> wrote:
>
> Use kvfree() instead of kfree() to free coeff in build_regamma()
> because the memory is allocated with kvzalloc().
>
> Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations")
> Cc: stable@vger.kernel.org
> Signed-off-by: Denis Efremov <efremov@linux.com>

Applied the series.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> index 9431b48aecb4..56bb1f9f77ce 100644
> --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
> @@ -843,7 +843,7 @@ static bool build_regamma(struct pwl_float_data_ex *rgb_regamma,
>         pow_buffer_ptr = -1; // reset back to no optimize
>         ret = true;
>  release:
> -       kfree(coeff);
> +       kvfree(coeff);
>         return ret;
>  }
>
> --
> 2.26.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-08 20:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 17:37 [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma() Denis Efremov
2020-06-05 17:37 ` Denis Efremov
2020-06-05 17:37 ` [PATCH 2/2] drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp() Denis Efremov
2020-06-05 17:37   ` Denis Efremov
2020-06-08 20:10 ` [PATCH 1/2] drm/amd/display: Use kvfree() to free coeff in build_regamma() Alex Deucher
2020-06-08 20:10   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.