public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "robh@kernel.org" <robh@kernel.org>,
	"jie.qiu@mediatek.com" <jie.qiu@mediatek.com>,
	"kernel@collabora.com" <kernel@collabora.com>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"Jitao Shi (石记涛)" <jitao.shi@mediatek.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"junzhi.zhao@mediatek.com" <junzhi.zhao@mediatek.com>
Subject: Re: [PATCH v2 15/15] drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188
Date: Tue, 17 Dec 2024 06:40:11 +0000	[thread overview]
Message-ID: <d64ff9f1525fe3563502e470b2a31303de08a7c6.camel@mediatek.com> (raw)
In-Reply-To: <e5788187-e894-4aab-a41e-a3d7a64762c6@collabora.com>

On Mon, 2024-12-16 at 12:04 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> 
> 
> Il 16/12/24 09:57, CK Hu (胡俊光) ha scritto:
> > Hi, Angelo:
> > 
> > On Thu, 2024-12-05 at 12:45 +0100, AngeloGioacchino Del Regno wrote:
> > > External email : Please do not click links or open attachments until you have verified the sender or the content.
> > > 
> > > 
> > > Add support for the newer HDMI-TX (Encoder) v2 and DDC v2 IPs
> > > found in MediaTek's MT8195, MT8188 SoC and their variants, and
> > > including support for display modes up to 4k60 and for HDMI
> > > Audio, as per the HDMI 2.0 spec.
> > > 
> > > HDCP and CEC functionalities are also supported by this hardware,
> > > but are not included in this commit and that also poses a slight
> > > difference between the V2 and V1 controllers in how they handle
> > > Hotplug Detection (HPD).
> > > 
> > > While the v1 controller was using the CEC controller to check
> > > HDMI cable connection and disconnection, in this driver the v2
> > > one does not.
> > > 
> > > This is due to the fact that on parts with v2 designs, like the
> > > MT8195 SoC, there is one CEC controller shared between the HDMI
> > > Transmitter (HDMI-TX) and Receiver (HDMI-RX): before eventually
> > > adding support to use the CEC HW to wake up the HDMI controllers
> > > it is necessary to have support for one TX, one RX *and* for both
> > > at the same time.
> > > 
> > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> > > ---
> > 
> > [snip]
> > 
> > > +static int mtk_hdmi_v2_bridge_atomic_check(struct drm_bridge *bridge,
> > > +                                          struct drm_bridge_state *bridge_state,
> > > +                                          struct drm_crtc_state *crtc_state,
> > > +                                          struct drm_connector_state *conn_state)
> > > +{
> > 
> > I would like v1 and v2 has the same behavior.
> > Why v2 has atomic check but v1 has no?
> > If this is better to have, add atomic check to v1, and this function would be common function.
> > 
> 
> That's because v2 uses the new helpers, while v1 does not.
> The v1 must be converted to the new helpers in order to use atomic_check() like v2.

I just find the description here, and I don't know why new helper need atomic_check().
Would you provide more information how new helper need atomic_check()?
For example, the call stack to atomic_check(). (You could use dump_stack() to show it)

        /**
        * @atomic_check:
        *
        * This method is responsible for checking bridge state correctness.
        * It can also check the state of the surrounding components in chain
        * to make sure the whole pipeline can work properly.
        *
        * &drm_bridge_funcs.atomic_check() hooks are called in reverse
        * order (from the last to the first bridge).
        *
        * This method is optional. &drm_bridge_funcs.mode_fixup() is not
        * called when &drm_bridge_funcs.atomic_check() is implemented, so only
        * one of them should be provided.
        *
        * If drivers need to tweak &drm_bridge_state.input_bus_cfg.flags or
        * &drm_bridge_state.output_bus_cfg.flags it should happen in
        * this function. By default the &drm_bridge_state.output_bus_cfg.flags
        * field is set to the next bridge
        * &drm_bridge_state.input_bus_cfg.flags value or
        * &drm_connector.display_info.bus_flags if the bridge is the last
        * element in the chain.
        *
        * RETURNS:
        * zero if the check passed, a negative error code otherwise.
        */

Regards,
CK

> 
> Cheers,
> Angelo
> 
> > Regards,
> > CK
> > 
> > > +       return drm_atomic_helper_connector_hdmi_check(conn_state->connector,
> > > +                                                     conn_state->state);
> > > +}
> > > +
> > 
> > 
> 
> 
> 


  reply	other threads:[~2024-12-17  6:40 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 11:45 [PATCH v2 00/15] Add support for MT8195/88 DPI, HDMIv2 and DDCv2 AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 01/15] dt-bindings: display: mediatek: dpi: Add MT8195 and MT8188 compat AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 02/15] drm/mediatek: mtk_dpi: Add support for Pattern Generator in debugfs AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 03/15] drm/mediatek: mtk_dpi: Use an array for pixclk factor calculation AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 04/15] drm/mediatek: mtk_dpi: Move pixel clock setting flow to function AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 05/15] drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 06/15] drm/mediatek: Add support for MT8195 Digital Parallel Interface AngeloGioacchino Del Regno
2024-12-09  2:32   ` CK Hu (胡俊光)
2024-12-05 11:45 ` [PATCH v2 07/15] dt-bindings: display: mediatek: Add binding for MT8195 HDMI-TX v2 AngeloGioacchino Del Regno
2024-12-05 13:33   ` Rob Herring (Arm)
2024-12-09  3:26   ` CK Hu (胡俊光)
2024-12-05 11:45 ` [PATCH v2 08/15] drm/mediatek: mtk_cec: Switch to register as module_platform_driver AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 09/15] drm/mediatek: mtk_hdmi_ddc: " AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 10/15] drm/mediatek: hdmi: Use regmap instead of iomem for main registers AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 11/15] drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member AngeloGioacchino Del Regno
2024-12-09  6:00   ` CK Hu (胡俊光)
2024-12-05 11:45 ` [PATCH v2 12/15] drm/mediatek: mtk_hdmi: Split driver and add common probe function AngeloGioacchino Del Regno
2024-12-05 12:29   ` Dmitry Baryshkov
2024-12-05 12:36     ` AngeloGioacchino Del Regno
2024-12-05 12:56       ` Dmitry Baryshkov
2024-12-09  7:05   ` CK Hu (胡俊光)
2024-12-09  7:19   ` CK Hu (胡俊光)
2024-12-09  7:51   ` CK Hu (胡俊光)
2024-12-11  2:46   ` CK Hu (胡俊光)
2024-12-13  8:43   ` CK Hu (胡俊光)
2024-12-16  6:05   ` CK Hu (胡俊光)
2024-12-16  7:38   ` CK Hu (胡俊光)
2024-12-17  1:55   ` CK Hu (胡俊光)
2024-12-05 11:45 ` [PATCH v2 13/15] drm/mediatek: mtk_hdmi_common: Assign DDC adapter pointer to bridge AngeloGioacchino Del Regno
2024-12-09  8:17   ` CK Hu (胡俊光)
2024-12-09  9:49     ` AngeloGioacchino Del Regno
2024-12-05 11:45 ` [PATCH v2 14/15] drm/mediatek: mtk_hdmi_common: Add OP_HDMI, vendor and product strings AngeloGioacchino Del Regno
2024-12-09  9:09   ` CK Hu (胡俊光)
2024-12-09  9:56     ` AngeloGioacchino Del Regno
2024-12-10  1:22       ` CK Hu (胡俊光)
2024-12-05 11:45 ` [PATCH v2 15/15] drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188 AngeloGioacchino Del Regno
2024-12-05 12:56   ` Dmitry Baryshkov
2024-12-05 13:30     ` AngeloGioacchino Del Regno
2024-12-05 19:35       ` Dmitry Baryshkov
2024-12-09 11:33         ` AngeloGioacchino Del Regno
2024-12-09 13:08           ` Dmitry Baryshkov
2024-12-05 22:48   ` kernel test robot
2024-12-10  3:28   ` CK Hu (胡俊光)
2024-12-10  8:33     ` AngeloGioacchino Del Regno
2024-12-10  8:09   ` CK Hu (胡俊光)
2024-12-16  8:57   ` CK Hu (胡俊光)
2024-12-16 11:04     ` AngeloGioacchino Del Regno
2024-12-17  6:40       ` CK Hu (胡俊光) [this message]
2024-12-17 12:34         ` Dmitry Baryshkov
2024-12-17  6:47   ` CK Hu (胡俊光)
2024-12-17  9:21   ` CK Hu (胡俊光)
2024-12-17 14:49     ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d64ff9f1525fe3563502e470b2a31303de08a7c6.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jie.qiu@mediatek.com \
    --cc=jitao.shi@mediatek.com \
    --cc=junzhi.zhao@mediatek.com \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox