[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acb52035-4f0c-430d-a2d2-26ab37805d7b@rock-chips.com>
Date: Fri, 5 Jan 2024 17:04:55 +0800
From: Andy Yan <andy.yan@...k-chips.com>
To: Heiko Stübner <heiko@...ech.de>,
Sandy Huang <hjc@...k-chips.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
Cc: dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...labora.com
Subject: Re: [PATCH] drm/rockchip: vop2: Drop unused if_dclk_rate variable
Hi:
On 1/4/24 23:58, Heiko Stübner wrote:
> Hi Christian, Andy,
>
> Am Donnerstag, 4. Januar 2024, 15:39:50 CET schrieb Cristian Ciocaltea:
>> Commit 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
>> introduced a variable which ended up being unused. Remove it.
>>
>> rockchip_drm_vop2.c:1688:23: warning: variable ‘if_dclk_rate’ set but not used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
>
> in general, please don't send non-series patches as replies to other patches.
> It confuses tooling like b4 way too often, as this patch is not designated
> as a 2/2 (similar to the first one not being 1/2).
>
>> ---
>> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> index 44508c2dd614..923985d4161b 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> @@ -1685,7 +1685,6 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
>> unsigned long dclk_core_rate = v_pixclk >> 2;
>> unsigned long dclk_rate = v_pixclk;
>> unsigned long dclk_out_rate;
>> - unsigned long if_dclk_rate;
>> unsigned long if_pixclk_rate;
>> int K = 1;
>>
>> @@ -1700,7 +1699,6 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
>> }
>>
>> if_pixclk_rate = (dclk_core_rate << 1) / K;
>> - if_dclk_rate = dclk_core_rate / K;
>> /*
>> * *if_pixclk_div = dclk_rate / if_pixclk_rate;
>> * *if_dclk_div = dclk_rate / if_dclk_rate;
>> */
> *if_pixclk_div = 2;
> *if_dclk_div = 4;
>
> with the code continuing with those static constants but the comment
> showing a forumula, I do hope Andy can provide a bit of insight into
> what is happening here.
>
> I.e. I'd really like to understand if that really is just a remnant or
> something different is needed.
This is not a remnant, in my V1, I calculate all the div by formula, but Sascha prefer
more for a constants value[0], so I keep this formula as comments to indicate how these value come from.
[0]https://patchwork.kernel.org/project/linux-rockchip/patch/20231114112855.1771372-1-andyshrk@163.com/
>
>
> Heiko
>
>
Powered by blists - more mailing lists