From: "Andy Yan" <andyshrk@163.com>
To: "Alex Bee" <knaerzche@gmail.com>
Cc: heiko@sntech.de, conor+dt@kernel.org, krzk+dt@kernel.org,
robh@kernel.org, hjc@rock-chips.com, mripard@kernel.org,
neil.armstrong@linaro.org, dmitry.baryshkov@oss.qualcomm.com,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
"Andy Yan" <andy.yan@rock-chips.com>
Subject: Re:Re: [PATCH v3 7/7] drm/rockchip: inno-hdmi: Convert to drm bridge
Date: Tue, 8 Apr 2025 20:12:29 +0800 (CST) [thread overview]
Message-ID: <618c65eb.b8a8.1961550f5ae.Coremail.andyshrk@163.com> (raw)
In-Reply-To: <680a40a8-07c1-4dde-93b2-337ab15f7afe@gmail.com>
Hi Alex,
At 2025-04-03 01:24:22, "Alex Bee" <knaerzche@gmail.com> wrote:
>
>Hi Andy,
>
>> From: Andy Yan <andy.yan@rock-chips.com>
>>
>> Convert it to drm bridge driver, it will be convenient for us to
>> migrate the connector part to the display driver later.
>>
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>>
>> ---
>>
>> Changes in v3:
>> - First included in v3
>> - Link to V2: https://lore.kernel.org/dri-devel/20250325132944.171111-1-andyshrk@163.com/
>>
>> drivers/gpu/drm/bridge/Kconfig | 7 +
>> drivers/gpu/drm/bridge/Makefile | 1 +
>> .../inno_hdmi.c => bridge/inno-hdmi.c} | 924 ++++++++++--------
>> drivers/gpu/drm/rockchip/Kconfig | 1 +
>> drivers/gpu/drm/rockchip/Makefile | 2 +-
>> drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 187 ++++
>> drivers/gpu/drm/rockchip/inno_hdmi.h | 349 -------
>> include/drm/bridge/inno_hdmi.h | 33 +
>> 8 files changed, 741 insertions(+), 763 deletions(-)
>> rename drivers/gpu/drm/{rockchip/inno_hdmi.c => bridge/inno-hdmi.c} (52%)
>> create mode 100644 drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
>> delete mode 100644 drivers/gpu/drm/rockchip/inno_hdmi.h
>> create mode 100644 include/drm/bridge/inno_hdmi.h
>>
>
>...
>
>> +#define m_RX_DONE (1 << 0)
>> +
>> +#define HDMI_CEC_TX_INT 0xda
>> +#define HDMI_CEC_RX_INT 0xdb
>> +#define HDMI_CEC_BUSFREETIME_L 0xdc
>> +#define HDMI_CEC_BUSFREETIME_H 0xdd
>> +#define HDMI_CEC_LOGICADDR 0xde
>> +
>> struct inno_hdmi_i2c {
>> struct i2c_adapter adap;
>>
>> @@ -68,41 +395,18 @@ struct inno_hdmi_i2c {
>>
>> struct inno_hdmi {
>> struct device *dev;
>> -
>> + struct drm_bridge bridge;
>> struct clk *pclk;
>> struct clk *refclk;
>> void __iomem *regs;
>> struct regmap *grf;
>>
>> - struct drm_connector connector;
>> - struct rockchip_encoder encoder;
>> -
>> struct inno_hdmi_i2c *i2c;
>> struct i2c_adapter *ddc;
>> -
>> - const struct inno_hdmi_variant *variant;
>> + const struct inno_hdmi_plat_data *plat_data;
>> + unsigned int colorimetry;
>
>thanks a lot for doing the bridge conversion for this driver.
>Please keep the custom connector state which was introduced after Maxim's
>review during the last rework of this [0] driver. The colorimetry is not
>part of the device, but of the connector and thus should not be part of the
>device struct.
>It's, however, likely that the common (hdmi-)connector framework will once
>hold its own colorimetry property and then the custom connector state in
>this driver can go away, but until than we have to keep it here.
After converting to a bridge driver, this driver no longer has a connector.
In this case, how should I create customized connector states?
>
>Thanks,
>Alex
>
>[0]
>https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ceeb0f0104a62c867656c2730a51df47e7350b8f
>
>
>> };
>>
>> -struct inno_hdmi_connector_state {
>> - struct drm_connector_state base;
>> - unsigned int colorimetry;
>> -};
>> -
>> -static struct inno_hdmi *encoder_to_inno_hdmi(struct drm_encoder *encoder)
>> -{
>> - struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
>> -
>> - return container_of(rkencoder, struct inno_hdmi, encoder);
>> -}
>> -
>> -static struct inno_hdmi *connector_to_inno_hdmi(struct drm_connector *connector)
>...
next prev parent reply other threads:[~2025-04-08 13:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 12:31 [PATCH v3 0/7] Convert inno hdmi to drm bridge Andy Yan
2025-04-02 12:31 ` [PATCH v3 1/7] dt-bindings: display: rockchip,inno-hdmi: Fix Document of RK3036 compatible Andy Yan
2025-04-02 12:31 ` [PATCH v3 2/7] dt-bindings: display: rockchip,inno-hdmi: Document GRF for RK3036 HDMI Andy Yan
2025-04-03 6:34 ` Krzysztof Kozlowski
2025-04-02 12:31 ` [PATCH v3 3/7] drm/rockchip: inno-hdmi: Simplify error handler with dev_err_probe Andy Yan
2025-04-02 12:31 ` [PATCH v3 4/7] drm/rockchip: inno-hdmi: Fix video timing HSYNC/VSYNC polarity setting for rk3036 Andy Yan
2025-04-02 12:31 ` [PATCH v3 5/7] ARM: dts: rockchip: Add ref clk for hdmi Andy Yan
2025-04-02 12:31 ` [PATCH v3 6/7] Revert "ARM: dts: rockchip: drop grf reference from rk3036 hdmi" Andy Yan
2025-04-02 12:31 ` [PATCH v3 7/7] drm/rockchip: inno-hdmi: Convert to drm bridge Andy Yan
2025-04-02 17:24 ` Alex Bee
2025-04-08 12:12 ` Andy Yan [this message]
2025-04-08 12:44 ` Dmitry Baryshkov
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=618c65eb.b8a8.1961550f5ae.Coremail.andyshrk@163.com \
--to=andyshrk@163.com \
--cc=andy.yan@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=knaerzche@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
/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