[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d00d1e771f75e151481bb9a010a22faa5552a0a.camel@mediatek.com>
Date: Fri, 20 Dec 2024 05:36:11 +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 16/33] drm/mediatek: mtk_hdmi: Move
plugged_cb/codec_dev 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, move the
> mutex-protected cable plugged callback and codec device setting
> to a new function called mtk_hdmi_audio_set_plugged_cb().
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 | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index a927d9889818..f60c4effe905 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1597,17 +1597,22 @@ static int mtk_hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
> return 0;
> }
>
> -static int mtk_hdmi_audio_hook_plugged_cb(struct device *dev, void *data,
> - hdmi_codec_plugged_cb fn,
> +static void mtk_hdmi_audio_set_plugged_cb(struct mtk_hdmi *hdmi, hdmi_codec_plugged_cb fn,
> struct device *codec_dev)
> {
> - struct mtk_hdmi *hdmi = data;
> -
> mutex_lock(&hdmi->update_plugged_status_lock);
> hdmi->plugged_cb = fn;
> hdmi->codec_dev = codec_dev;
> mutex_unlock(&hdmi->update_plugged_status_lock);
> +}
> +
> +static int mtk_hdmi_audio_hook_plugged_cb(struct device *dev, void *data,
> + hdmi_codec_plugged_cb fn,
> + struct device *codec_dev)
> +{
> + struct mtk_hdmi *hdmi = data;
>
> + mtk_hdmi_audio_set_plugged_cb(hdmi, fn, codec_dev);
> mtk_hdmi_update_plugged_status(hdmi);
>
> return 0;
> --
> 2.47.0
>
Powered by blists - more mailing lists