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: <588ccb13-e37f-43bf-a421-8620ff68a373@collabora.com>
Date: Mon, 17 Feb 2025 15:41:57 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: CK Hu (胡俊光) <ck.hu@...iatek.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>,
 Lewis Liao (廖柏鈞) <Lewis.Liao@...iatek.com>,
 "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
 "conor+dt@...nel.org" <conor+dt@...nel.org>,
 TommyYL Chen (陳彥良) <TommyYL.Chen@...iatek.com>,
 Ives Chenjh (陳俊弘) <Ives.Chenjh@...iatek.com>,
 "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>,
 Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
 "junzhi.zhao@...iatek.com" <junzhi.zhao@...iatek.com>
Subject: Re: [PATCH v6 09/42] drm/mediatek: mtk_dpi: Explicitly manage TVD
 clock in power on/off

Il 14/02/25 04:31, CK Hu (胡俊光) ha scritto:
> On Fri, 2025-02-14 at 09:51 +0800, CK Hu wrote:
>> On Tue, 2025-02-11 at 12:33 +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 adding support for MT8195's HDMI reserved
>>> DPI, add calls to clk_prepare_enable() / clk_disable_unprepare()
>>> for the TVD clock: in this particular case, the aforementioned
>>> clock is not (and cannot be) parented to neither pixel or engine
>>> clocks hence it won't get enabled automatically by the clock
>>> framework.
>>>
>>> Please note that on all of the currently supported MediaTek
>>> platforms, the TVD clock is always a parent of either pixel or
>>> engine clocks, and this means that the common clock framework
>>> is already enabling this clock before the children.
>>> On such platforms, this commit will only increase the refcount
>>> of the TVD clock without any functional change.
>>
>> Reviewed-by: CK Hu <ck.hu@...iatek.com>
> 
> One question:
> MT8195 DPI clock is from HDMI, why need to contol TVD clock?
> It seems this patch is redundant.
> 

Ungates the HDMI-generated TVD, that's it.

Regards,
Angelo

> Regards,
> CK
> 
>>
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>>> ---
>>>   drivers/gpu/drm/mediatek/mtk_dpi.c | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> index 5c15c8935916..67504eb874d2 100644
>>> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> @@ -501,6 +501,7 @@ static void mtk_dpi_power_off(struct mtk_dpi *dpi)
>>>
>>>          mtk_dpi_disable(dpi);
>>>          clk_disable_unprepare(dpi->pixel_clk);
>>> +       clk_disable_unprepare(dpi->tvd_clk);
>>>          clk_disable_unprepare(dpi->engine_clk);
>>>   }
>>>
>>> @@ -517,6 +518,12 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
>>>                  goto err_refcount;
>>>          }
>>>
>>> +       ret = clk_prepare_enable(dpi->tvd_clk);
>>> +       if (ret) {
>>> +               dev_err(dpi->dev, "Failed to enable tvd pll: %d\n", ret);
>>> +               goto err_engine;
>>> +       }
>>> +
>>>          ret = clk_prepare_enable(dpi->pixel_clk);
>>>          if (ret) {
>>>                  dev_err(dpi->dev, "Failed to enable pixel clock: %d\n", ret);
>>> @@ -526,6 +533,8 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
>>>          return 0;
>>>
>>>   err_pixel:
>>> +       clk_disable_unprepare(dpi->tvd_clk);
>>> +err_engine:
>>>          clk_disable_unprepare(dpi->engine_clk);
>>>   err_refcount:
>>>          dpi->refcount--;
>>> --
>>> 2.48.1
>>>
>>
> 




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ