Skip to content

Commit e2e4f07

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: mtk_hdmi: Move vendor/product strings to drm_bridge
Move the vendor and product strings to the appropriate entries of struct drm_bridge and use that in mtk_hdmi_setup_spd_infoframe instead of having the same as function parameters. While at it, also beautify the strings, setting them to read "MediaTek On-Chip HDMI". Reviewed-by: CK Hu <[email protected]> Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 471a9c2 commit e2e4f07

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/gpu/drm/mediatek/mtk_hdmi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -988,15 +988,14 @@ static int mtk_hdmi_setup_avi_infoframe(struct mtk_hdmi *hdmi,
988988
return 0;
989989
}
990990

991-
static int mtk_hdmi_setup_spd_infoframe(struct mtk_hdmi *hdmi,
992-
const char *vendor,
993-
const char *product)
991+
static int mtk_hdmi_setup_spd_infoframe(struct mtk_hdmi *hdmi)
994992
{
993+
struct drm_bridge *bridge = &hdmi->bridge;
995994
struct hdmi_spd_infoframe frame;
996995
u8 buffer[HDMI_INFOFRAME_HEADER_SIZE + HDMI_SPD_INFOFRAME_SIZE];
997996
ssize_t err;
998997

999-
err = hdmi_spd_infoframe_init(&frame, vendor, product);
998+
err = hdmi_spd_infoframe_init(&frame, bridge->vendor, bridge->product);
1000999
if (err < 0) {
10011000
dev_err(hdmi->dev, "Failed to initialize SPD infoframe: %zd\n",
10021001
err);
@@ -1378,7 +1377,7 @@ static void mtk_hdmi_send_infoframe(struct mtk_hdmi *hdmi,
13781377
{
13791378
mtk_hdmi_setup_audio_infoframe(hdmi);
13801379
mtk_hdmi_setup_avi_infoframe(hdmi, mode);
1381-
mtk_hdmi_setup_spd_infoframe(hdmi, "mediatek", "On-chip HDMI");
1380+
mtk_hdmi_setup_spd_infoframe(hdmi);
13821381
if (mode->flags & DRM_MODE_FLAG_3D_MASK)
13831382
mtk_hdmi_setup_vendor_specific_infoframe(hdmi, mode);
13841383
}
@@ -1737,6 +1736,8 @@ static int mtk_hdmi_probe(struct platform_device *pdev)
17371736
hdmi->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
17381737
| DRM_BRIDGE_OP_HPD;
17391738
hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
1739+
hdmi->bridge.vendor = "MediaTek";
1740+
hdmi->bridge.product = "On-Chip HDMI";
17401741
drm_bridge_add(&hdmi->bridge);
17411742

17421743
ret = mtk_hdmi_clk_enable_audio(hdmi);

0 commit comments

Comments
 (0)