lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdbb4c9e1d4c69fad7f716db48f207e454a081ef.camel@mediatek.com>
Date: Fri, 20 Dec 2024 05:44:58 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: "robh@...nel.org" <robh@...nel.org>, "jie.qiu@...iatek.com"
	<jie.qiu@...iatek.com>, "tzimmermann@...e.de" <tzimmermann@...e.de>,
	"simona@...ll.ch" <simona@...ll.ch>, "mripard@...nel.org"
	<mripard@...nel.org>, Jitao Shi (石记涛)
	<jitao.shi@...iatek.com>, "linux-mediatek@...ts.infradead.org"
	<linux-mediatek@...ts.infradead.org>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "maarten.lankhorst@...ux.intel.com"
	<maarten.lankhorst@...ux.intel.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "kernel@...labora.com" <kernel@...labora.com>,
	"dmitry.baryshkov@...aro.org" <dmitry.baryshkov@...aro.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
	"airlied@...il.com" <airlied@...il.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, "junzhi.zhao@...iatek.com"
	<junzhi.zhao@...iatek.com>
Subject: Re: [PATCH v3 17/33] drm/mediatek: mtk_hdmi: Move N/CTS setting to
 new function

Hi, Angelo:

On Tue, 2024-12-17 at 16:43 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> 
> 
> In preparation for splitting common bits of this driver, moving
> the hdmi_rec_n_table struct array, and the hdmi_recommended_n(),
> hdmi_mode_clock_to_hz(), hdmi_expected_cts() functions, add one
> function called mtk_hdmi_get_ncts() that sets both N and CTS in
> a single call.

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index f60c4effe905..ef8dfcb77318 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -682,6 +682,13 @@ static unsigned int hdmi_expected_cts(unsigned int audio_sample_rate,
>                                      128 * audio_sample_rate);
>  }
> 
> +static void mtk_hdmi_get_ncts(unsigned int sample_rate, unsigned int clock,
> +                             unsigned int *n, unsigned int *cts)
> +{
> +       *n = hdmi_recommended_n(sample_rate, clock);
> +       *cts = hdmi_expected_cts(sample_rate, clock, *n);
> +}
> +
>  static void do_hdmi_hw_aud_set_ncts(struct mtk_hdmi *hdmi, unsigned int n,
>                                     unsigned int cts)
>  {
> @@ -712,8 +719,7 @@ static void mtk_hdmi_hw_aud_set_ncts(struct mtk_hdmi *hdmi,
>  {
>         unsigned int n, cts;
> 
> -       n = hdmi_recommended_n(sample_rate, clock);
> -       cts = hdmi_expected_cts(sample_rate, clock, n);
> +       mtk_hdmi_get_ncts(sample_rate, clock, &n, &cts);
> 
>         dev_dbg(hdmi->dev, "%s: sample_rate=%u, clock=%d, cts=%u, n=%u\n",
>                 __func__, sample_rate, clock, n, cts);
> --
> 2.47.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ