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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e789f2741346be40263bcec038dc66624e4aef6.camel@mediatek.com>
Date:   Tue, 13 Jun 2023 08:24:21 +0000
From:   CK Hu (胡俊光) <ck.hu@...iatek.com>
To:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "kishon@...com" <kishon@...com>,
        Chunfeng Yun (云春峰) 
        <Chunfeng.Yun@...iatek.com>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        Jitao Shi (石记涛) <jitao.shi@...iatek.com>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "granquet@...libre.com" <granquet@...libre.com>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "airlied@...il.com" <airlied@...il.com>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        Mac Shen (沈俊) <Mac.Shen@...iatek.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "krzysztof.kozlowski@...aro.org" <krzysztof.kozlowski@...aro.org>,
        Stuart Lee (李翰) <Stuart.Lee@...iatek.com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>
Subject: Re: [PATCH v4 5/8] drm/mediatek: hdmi: add v2 support

Hi, Guillaume:

On Mon, 2023-05-29 at 16:31 +0200, Guillaume Ranquet wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Adds hdmi and hdmi-ddc support for v2 IP.
> 
> Signed-off-by: Guillaume Ranquet <granquet@...libre.com>
> ---

[snip]

> +
> +static void mtk_hdmi_bridge_disable(struct drm_bridge *bridge,
> +    struct drm_bridge_state *old_bridge_state)
> +{
> +struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
> +
> +if (!hdmi->enabled)
> +return;
> +
> +mtk_hdmi_hw_send_av_mute(hdmi);
> +usleep_range(50000, 50050);
> +mtk_hdmi_hw_vid_black(hdmi, true);
> +mtk_hdmi_disable_hdcp_encrypt(hdmi);
> +usleep_range(50000, 50050);
> +
> +phy_power_off(hdmi->phy);
> +
> +hdmi->enabled = false;
> +}
> +
> +static void mtk_hdmi_bridge_post_disable(struct drm_bridge *bridge,
> + struct drm_bridge_state *old_state)
> +{
> +struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
> +
> +if (!hdmi->powered)
> +return;
> +
> +phy_power_off(hdmi->phy);
> +
> +hdmi->powered = false;
> +}
> +
> +static void mtk_hdmi_bridge_pre_enable(struct drm_bridge *bridge,
> +       struct drm_bridge_state *old_state)
> +{
> +struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
> +struct drm_atomic_state *state = old_state->base.state;
> +union phy_configure_opts opts = {
> +.dp = { .link_rate = hdmi->mode.clock * KILO}
> +};
> +
> +/* Retrieve the connector through the atomic state. */
> +hdmi->curr_conn = drm_atomic_get_new_connector_for_encoder(state,
> +   bridge->encoder);
> +
> +mtk_hdmi_output_set_display_mode(hdmi, &hdmi->mode);
> +/* configuring phy clock link with appropriate rate */
> +phy_configure(hdmi->phy, &opts);
> +phy_power_on(hdmi->phy);
> +hdmi->powered = true;
> +}

In mt8173 hdmi driver, only bridge_enable stage, no bridge_pre_enable
stage, why mt8195 need to separate it?

Regards,
CK

> +
> +static void mtk_hdmi_bridge_enable(struct drm_bridge *bridge,
> +   struct drm_bridge_state *old_state)
> +{
> +struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
> +u8 buffer_spd[HDMI_INFOFRAME_SIZE(SPD)];
> +u8 buffer_avi[HDMI_INFOFRAME_SIZE(AVI)];
> +
> +phy_power_on(hdmi->phy);
> +mtk_hdmi_send_infoframe(hdmi, buffer_spd, sizeof(buffer_spd),
> +buffer_avi, sizeof(buffer_avi), &hdmi->mode);
> +mtk_hdmi_hw_spd_infoframe(hdmi, buffer_spd, sizeof(buffer_spd));
> +mtk_hdmi_hw_avi_infoframe(hdmi, buffer_avi, sizeof(buffer_avi));
> +
> +mtk_hdmi_hw_vid_black(hdmi, false);
> +
> +hdmi->enabled = true;
> +}
> +
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ