Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -6368,6 +6368,10 @@ Params: cma-512 CMA is 512MB
nohdmi Disable both HDMI 0 & 1 outputs
nohdmi0 Disable HDMI 0 output
nohdmi1 Disable HDMI 1 output
hdmi0_edp Configure HDMI 0 as an internal eDP panel
(for CM4/CM5 laptops and handhelds)
hdmi1_edp Configure HDMI 1 as an internal eDP panel
(for CM4/CM5 laptops and handhelds)


Name: vc4-kms-v3d-pi5
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-v3d-pi4-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,7 @@
nohdmi0 = <0>, "-1-3-8";
nohdmi1 = <0>, "-2-4-10";
nohdmi = <0>, "-1-2-3-4-8-10";
hdmi0_edp = <&hdmi0>, "raspberrypi,is-internal-panel?";
hdmi1_edp = <&hdmi1>, "raspberrypi,is-internal-panel?";
};
};
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-v3d-pi5-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,7 @@
nohdmi0 = <0>, "-3-5-10";
nohdmi1 = <0>, "-4-6-11";
nohdmi = <0>, "-3-4-5-6-10-11";
hdmi0_edp = <&hdmi0>, "raspberrypi,is-internal-panel?";
hdmi1_edp = <&hdmi1>, "raspberrypi,is-internal-panel?";
};
};
8 changes: 8 additions & 0 deletions drivers/gpu/drm/vc4/vc4_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,14 @@ static int vc4_hdmi_connector_init(struct drm_device *dev,
if (ret)
return ret;

/* CM4/CM5 internal panels: allow overriding connector type to eDP */
if (of_property_read_bool(vc4_hdmi->pdev->dev.of_node, "raspberrypi,is-internal-panel")) {
connector->connector_type = DRM_MODE_CONNECTOR_eDP;
connector->connector_type_id = 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'll blow up if you set both hdmi0_edp and hdmi1_edp as both will be called eDP-1 and have the same ID.

kfree(connector->name);
connector->name = kasprintf(GFP_KERNEL, "eDP-1");
}

drm_connector_helper_add(connector, &vc4_hdmi_connector_helper_funcs);

/*
Expand Down