AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <siqueira@igalia.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>,
	"Alex Hung" <alex.hung@amd.com>
Cc: amd-gfx@lists.freedesktop.org, Alexander.Deucher@amd.com,
	 Mario Limonciello <mario.limonciello@amd.com>,
	Ivan Lipski <ivan.lipski@amd.com>,
	harry.wentland@amd.com,  Leo Li <sunpeng.li@amd.com>
Subject: Re: [PATCH 3/5] drm/amd/display: Remove unused dce60_clk_mgr register definitions
Date: Tue, 3 Feb 2026 16:43:51 -0700	[thread overview]
Message-ID: <aYKH9e6VnIgRIg87@atmagalia> (raw)
In-Reply-To: <20260118173150.19790-4-timur.kristof@gmail.com>

On 01/18, Timur Kristóf wrote:
> It turned out that these were actually not necessary.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  .../display/dc/clk_mgr/dce60/dce60_clk_mgr.c  | 30 ++-----------------
>  .../amd/display/dc/inc/hw/clk_mgr_internal.h  | 11 -------
>  2 files changed, 3 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
> index 69dd80d9f738..1fdf344efe1a 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
> @@ -43,30 +43,6 @@
>  #include "dce/dce_6_0_d.h"
>  #include "dce/dce_6_0_sh_mask.h"
>  
> -#define REG(reg) \
> -	(clk_mgr->regs->reg)
> -
> -#undef FN
> -#define FN(reg_name, field_name) \
> -	clk_mgr->clk_mgr_shift->field_name, clk_mgr->clk_mgr_mask->field_name
> -
> -/* set register offset */
> -#define SR(reg_name)\
> -	.reg_name = mm ## reg_name
> -
> -static const struct clk_mgr_registers disp_clk_regs = {
> -		CLK_COMMON_REG_LIST_DCE60_BASE()
> -};
> -
> -static const struct clk_mgr_shift disp_clk_shift = {
> -		CLK_COMMON_MASK_SH_LIST_DCE60_COMMON_BASE(__SHIFT)
> -};
> -
> -static const struct clk_mgr_mask disp_clk_mask = {
> -		CLK_COMMON_MASK_SH_LIST_DCE60_COMMON_BASE(_MASK)
> -};
> -
> -
>  /* Max clock values for each state indexed by "enum clocks_state": */
>  static const struct state_dependent_clocks dce60_max_clks_by_state[] = {
>  /* ClocksStateInvalid - should not be used */
> @@ -155,9 +131,9 @@ void dce60_clk_mgr_construct(
>  		dce60_max_clks_by_state,
>  		sizeof(dce60_max_clks_by_state));
>  
> -	clk_mgr->regs = &disp_clk_regs;
> -	clk_mgr->clk_mgr_shift = &disp_clk_shift;
> -	clk_mgr->clk_mgr_mask = &disp_clk_mask;
> +	clk_mgr->regs = NULL;
> +	clk_mgr->clk_mgr_shift = NULL;
> +	clk_mgr->clk_mgr_mask = NULL;

After looking into the next commit, I got why you did this change. Maybe
for future patches, expand the commit message and mention that this is a
transition step. Anyway:

Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>

>  	clk_mgr->base.funcs = &dce60_funcs;
>  
>  	base->clks.max_supported_dispclk_khz =
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
> index bac8febad69a..836a28134d41 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
> @@ -89,11 +89,6 @@ enum dentist_divider_range {
>  	.DPREFCLK_CNTL = mmDPREFCLK_CNTL, \
>  	.DENTIST_DISPCLK_CNTL = mmDENTIST_DISPCLK_CNTL
>  
> -#if defined(CONFIG_DRM_AMD_DC_SI)
> -#define CLK_COMMON_REG_LIST_DCE60_BASE() \
> -	SR(DENTIST_DISPCLK_CNTL)
> -#endif
> -
>  #define CLK_COMMON_REG_LIST_DCN_BASE() \
>  	SR(DENTIST_DISPCLK_CNTL)
>  
> @@ -119,12 +114,6 @@ enum dentist_divider_range {
>  	CLK_SF(DPREFCLK_CNTL, DPREFCLK_SRC_SEL, mask_sh), \
>  	CLK_SF(DENTIST_DISPCLK_CNTL, DENTIST_DPREFCLK_WDIVIDER, mask_sh)
>  
> -#if defined(CONFIG_DRM_AMD_DC_SI)
> -#define CLK_COMMON_MASK_SH_LIST_DCE60_COMMON_BASE(mask_sh) \
> -	CLK_SF(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, mask_sh),\
> -	CLK_SF(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, mask_sh)
> -#endif
> -
>  #define CLK_COMMON_MASK_SH_LIST_DCN_COMMON_BASE(mask_sh) \
>  	CLK_SF(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, mask_sh),\
>  	CLK_SF(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, mask_sh)
> -- 
> 2.52.0
> 

-- 
Rodrigo Siqueira
https://siqueira.tech

  reply	other threads:[~2026-02-03 23:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 17:31 [PATCH 0/5] drm/amd/display: Clean up some DCE 6 code Timur Kristóf
2026-01-18 17:31 ` [PATCH 1/5] drm/amd/display: Use dce_audio_create for DCE 6 Timur Kristóf
2026-02-02 14:50   ` Rodrigo Siqueira
2026-01-18 17:31 ` [PATCH 2/5] drm/amd/display: Delete unused dce_clk_mgr.c Timur Kristóf
2026-02-02 14:54   ` Rodrigo Siqueira
2026-01-18 17:31 ` [PATCH 3/5] drm/amd/display: Remove unused dce60_clk_mgr register definitions Timur Kristóf
2026-02-03 23:43   ` Rodrigo Siqueira [this message]
2026-01-18 17:31 ` [PATCH 4/5] drm/amd/display: Handle DCE 6 in dce_clk_mgr.c Timur Kristóf
2026-01-30 18:47   ` Alex Hung
2026-02-03 23:45   ` Rodrigo Siqueira
2026-02-09 17:21   ` Alex Hung
2026-02-09 22:11     ` Timur Kristóf
2026-02-15  5:06       ` Alex Hung
2026-02-16 15:19         ` Timur Kristóf
2026-02-16 17:49           ` Alex Hung
2026-02-16 18:22             ` Timur Kristóf
2026-01-18 17:31 ` [PATCH 5/5] drm/amd/display: Handle DCE 6 in dce110_register_irq_handlers Timur Kristóf
2026-02-09 15:48 ` [PATCH 0/5] drm/amd/display: Clean up some DCE 6 code Rodrigo Siqueira
2026-02-09 17:25   ` Alex Hung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYKH9e6VnIgRIg87@atmagalia \
    --to=siqueira@igalia.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=ivan.lipski@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=timur.kristof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox