mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/amd/display: Remove a unused variable and add a function prototype
@ 2023-03-28 22:09 Caio Novais
  2023-03-28 22:09 ` [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable' Caio Novais
  2023-03-28 22:09 ` [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear' Caio Novais
  0 siblings, 2 replies; 5+ messages in thread
From: Caio Novais @ 2023-03-28 22:09 UTC (permalink / raw)
  To: amd-gfx, dri-devel, linux-kernel
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Wesley Chalmers, Lee, Alvin, Jun Lei, Qingqing Zhuo,
	Aurabindo Pillai, Caio Novais, Hamza Mahfooz, Jiapeng Chong,
	Nicholas Kazlauskas, Gabe Teeger, Roman Li, Maíra Canal,
	Deepak R Varma

This patchset removes one unused variable and adds a function prototype.

Caio Novais (2):
  drm/amd/display: Remove unused variable 'scl_enable'
  drm/amd/display: Add previous prototype to
    'optc3_wait_drr_doublebuffer_pending_clear'

 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h               | 2 ++
 .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.40.0


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

* [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable'
  2023-03-28 22:09 [PATCH 0/2] drm/amd/display: Remove a unused variable and add a function prototype Caio Novais
@ 2023-03-28 22:09 ` Caio Novais
  2023-03-29 16:06   ` Hamza Mahfooz
  2023-03-28 22:09 ` [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear' Caio Novais
  1 sibling, 1 reply; 5+ messages in thread
From: Caio Novais @ 2023-03-28 22:09 UTC (permalink / raw)
  To: amd-gfx, dri-devel, linux-kernel
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Wesley Chalmers, Lee, Alvin, Jun Lei, Qingqing Zhuo,
	Aurabindo Pillai, Caio Novais, Hamza Mahfooz, Jiapeng Chong,
	Nicholas Kazlauskas, Gabe Teeger, Roman Li, Maíra Canal,
	Deepak R Varma

Compiling AMD GPU drivers displays a warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c: In function ‘dml_rq_dlg_get_dlg_params’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:991:14: warning: variable ‘scl_enable’ set but not used [-Wunused-but-set-variable]

Get rid of it by removing the variable 'scl_enable'.

Signed-off-by: Caio Novais <caionovais@usp.br>
---
 .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
index d1c2693a2e28..ea4eb66066c4 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
@@ -988,7 +988,6 @@ static void dml_rq_dlg_get_dlg_params(
 	double hratio_c;
 	double vratio_l;
 	double vratio_c;
-	bool scl_enable;
 
 	unsigned int swath_width_ub_l;
 	unsigned int dpte_groups_per_row_ub_l;
@@ -1117,7 +1116,6 @@ static void dml_rq_dlg_get_dlg_params(
 	hratio_c = scl->hscl_ratio_c;
 	vratio_l = scl->vscl_ratio;
 	vratio_c = scl->vscl_ratio_c;
-	scl_enable = scl->scl_enable;
 
 	swath_width_ub_l = rq_dlg_param->rq_l.swath_width_ub;
 	dpte_groups_per_row_ub_l = rq_dlg_param->rq_l.dpte_groups_per_row_ub;
-- 
2.40.0


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

* [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear'
  2023-03-28 22:09 [PATCH 0/2] drm/amd/display: Remove a unused variable and add a function prototype Caio Novais
  2023-03-28 22:09 ` [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable' Caio Novais
@ 2023-03-28 22:09 ` Caio Novais
  2023-03-29 16:07   ` Hamza Mahfooz
  1 sibling, 1 reply; 5+ messages in thread
From: Caio Novais @ 2023-03-28 22:09 UTC (permalink / raw)
  To: amd-gfx, dri-devel, linux-kernel
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Wesley Chalmers, Lee, Alvin, Jun Lei, Qingqing Zhuo,
	Aurabindo Pillai, Caio Novais, Hamza Mahfooz, Jiapeng Chong,
	Nicholas Kazlauskas, Gabe Teeger, Roman Li, Maíra Canal,
	Deepak R Varma

Compiling AMD GPU drivers displays a warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes]

Get rid of it by adding a function prototype

'optc3_wait_drr_doublebuffer_pending_clear(struct timing_generator *optc)' on drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h

Signed-off-by: Caio Novais <caionovais@usp.br>
---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
index fb06dc9a4893..2e3ba6e2f336 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
@@ -331,6 +331,8 @@ void optc3_lock_doublebuffer_enable(struct timing_generator *optc);
 
 void optc3_lock_doublebuffer_disable(struct timing_generator *optc);
 
+void optc3_wait_drr_doublebuffer_pending_clear(struct timing_generator *optc);
+
 void optc3_set_drr_trigger_window(struct timing_generator *optc,
 		uint32_t window_start, uint32_t window_end);
 
-- 
2.40.0


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

* Re: [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable'
  2023-03-28 22:09 ` [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable' Caio Novais
@ 2023-03-29 16:06   ` Hamza Mahfooz
  0 siblings, 0 replies; 5+ messages in thread
From: Hamza Mahfooz @ 2023-03-29 16:06 UTC (permalink / raw)
  To: Caio Novais, amd-gfx, dri-devel, linux-kernel
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Wesley Chalmers, Lee, Alvin, Jun Lei, Qingqing Zhuo,
	Aurabindo Pillai, Jiapeng Chong, Nicholas Kazlauskas,
	Gabe Teeger, Roman Li, Maíra Canal, Deepak R Varma

On 3/28/23 18:09, Caio Novais wrote:
> Compiling AMD GPU drivers displays a warning:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c: In function ‘dml_rq_dlg_get_dlg_params’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:991:14: warning: variable ‘scl_enable’ set but not used [-Wunused-but-set-variable]
> 
> Get rid of it by removing the variable 'scl_enable'.
> 
> Signed-off-by: Caio Novais <caionovais@usp.br>

Applied, thanks!

> ---
>   .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> index d1c2693a2e28..ea4eb66066c4 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> @@ -988,7 +988,6 @@ static void dml_rq_dlg_get_dlg_params(
>   	double hratio_c;
>   	double vratio_l;
>   	double vratio_c;
> -	bool scl_enable;
>   
>   	unsigned int swath_width_ub_l;
>   	unsigned int dpte_groups_per_row_ub_l;
> @@ -1117,7 +1116,6 @@ static void dml_rq_dlg_get_dlg_params(
>   	hratio_c = scl->hscl_ratio_c;
>   	vratio_l = scl->vscl_ratio;
>   	vratio_c = scl->vscl_ratio_c;
> -	scl_enable = scl->scl_enable;
>   
>   	swath_width_ub_l = rq_dlg_param->rq_l.swath_width_ub;
>   	dpte_groups_per_row_ub_l = rq_dlg_param->rq_l.dpte_groups_per_row_ub;

-- 
Hamza


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

* Re: [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear'
  2023-03-28 22:09 ` [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear' Caio Novais
@ 2023-03-29 16:07   ` Hamza Mahfooz
  0 siblings, 0 replies; 5+ messages in thread
From: Hamza Mahfooz @ 2023-03-29 16:07 UTC (permalink / raw)
  To: Caio Novais, amd-gfx, dri-devel, linux-kernel
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Wesley Chalmers, Lee, Alvin, Jun Lei, Qingqing Zhuo,
	Aurabindo Pillai, Jiapeng Chong, Nicholas Kazlauskas,
	Gabe Teeger, Roman Li, Maíra Canal, Deepak R Varma


On 3/28/23 18:09, Caio Novais wrote:
> Compiling AMD GPU drivers displays a warning:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes]
> 
> Get rid of it by adding a function prototype
> 
> 'optc3_wait_drr_doublebuffer_pending_clear(struct timing_generator *optc)' on drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
> 
> Signed-off-by: Caio Novais <caionovais@usp.br>
> ---
>   drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
> index fb06dc9a4893..2e3ba6e2f336 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h
> @@ -331,6 +331,8 @@ void optc3_lock_doublebuffer_enable(struct timing_generator *optc);
>   
>   void optc3_lock_doublebuffer_disable(struct timing_generator *optc);
>   
> +void optc3_wait_drr_doublebuffer_pending_clear(struct timing_generator *optc);

I would prefer if you marked the function as static instead, since it is
only used in dcn30_optc.c.

> +
>   void optc3_set_drr_trigger_window(struct timing_generator *optc,
>   		uint32_t window_start, uint32_t window_end);
>   

-- 
Hamza


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

end of thread, other threads:[~2023-03-29 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 22:09 [PATCH 0/2] drm/amd/display: Remove a unused variable and add a function prototype Caio Novais
2023-03-28 22:09 ` [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable' Caio Novais
2023-03-29 16:06   ` Hamza Mahfooz
2023-03-28 22:09 ` [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear' Caio Novais
2023-03-29 16:07   ` Hamza Mahfooz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®