Edge 2 DP resolution and frequency

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 12

Which version of system do you use? Khadas official images, self built images, or others?


Please describe your issue below:

When I connect a screen in Display Port I have a multiple resolution but I need 3840 x 2160p 60hz but only I have at 50hz, in HDMI no problem we get
3840 x 2160p 60hz, this problem only occurs on Android, in Ubuntu khadas image image is perfect

@davrdz25 We have verified and found no such issue. That means it’s a compatibility issue. Can you try upgrading back to the earliest firmware version for verification?

Hi I’m testing FydeOS image from owoow and support DP 4k resolution perfectly

I’m tested on various screens and the behavior is the same, i have to select 1080p@60hz on display port, also no sound through display port, Ubuntu, bredOS, openfyde images works perfectly at 4k@ through display port just android not work

@davrdz25 What version of firmware are you testing? If you are testing the latest version of firmware, please make the following modifications to see if there are any improvements?

kernel-5.10$ git diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
index 7a77c46eefff..d0eaa4457461 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -194,6 +194,11 @@
        status = "okay";
+&display_subsystem {
+       clocks = <&hdptxphy_hdmi_clk0>;
+       clock-names = "hdmi0_phy_pll";
 &dp0 {
        status = "okay";

Hi @goenjoy I’m using the latest image from owoow
No changes after apply the changes and rebuild

@davrdz25 I have uploaded a firmware for Android 13 separately for you. Give it a try. If it still doesn’t work, please execute the following command and send me the generated file.

cat sys/devices/platform/display-subsystem/drm/card0/card0-DP-1/edid > /data/edid.bin
1 Like

Thank you very much I going to test immediately

Hi again, I can’t load firmware into android tool, I tested different versions of android tool and different Windows versions

@davrdz25 RKDevTool_Release_v3.18.zip - Google Drive

Hi @goenjoy I’m testing the new firmware and i have com trouble when i set resolution in DP output, changes doesn’t apply or reset the UI

Here is the edid.bin out from the command

@davrdz25 Execute the following command to apply this patch. If it still doesn’t work, please provide me with the kernel log and the following command information.

kernel-5.10$ patch -p1 < 0001-dp-force-output-only-4k-60hz.patch


diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
index 7a77c46eefff..d9a3513bec07 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -195,6 +195,7 @@
 &dp0 {
+	force-hpd;
 	status = "okay";
diff --git a/drivers/gpu/drm/rockchip/dw-dp.c b/drivers/gpu/drm/rockchip/dw-dp.c
old mode 100644
new mode 100755
index b0f2c05f4c83..b925301861b9
--- a/drivers/gpu/drm/rockchip/dw-dp.c
+++ b/drivers/gpu/drm/rockchip/dw-dp.c
@@ -305,6 +305,14 @@ struct dw_dp {
 	struct rockchip_drm_sub_dev sub_dev;
+static const struct drm_display_mode dw_dp_default_modes[] = {
+	/* 97 - 3840x2160@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+	  .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
 struct dw_dp_state {
 	struct drm_connector_state state;
@@ -679,8 +687,10 @@ static int dw_dp_connector_get_modes(struct drm_connector *connector)
 	struct dw_dp *dp = connector_to_dp(connector);
 	struct drm_display_info *di = &connector->display_info;
+	struct drm_display_mode *mode;
 	struct edid *edid;
 	int num_modes = 0;
+	int i, ret = 0;
 	if (dp->right && dp->right->next_bridge) {
 		struct drm_bridge *bridge = dp->right->next_bridge;
@@ -695,13 +705,27 @@ static int dw_dp_connector_get_modes(struct drm_connector *connector)
 		num_modes = drm_bridge_get_modes(dp->next_bridge, connector);
 	if (!num_modes) {
-		edid = drm_bridge_get_edid(&dp->bridge, connector);
+		edid = NULL;//drm_bridge_get_edid(&dp->bridge, connector);
 		if (edid) {
 			drm_connector_update_edid_property(connector, edid);
 			num_modes = drm_add_edid_modes(connector, edid);
+		}else {
+		for (i = 0; i < ARRAY_SIZE(dw_dp_default_modes); i++) {
+			const struct drm_display_mode *ptr =
+				&dw_dp_default_modes[i];
+			mode = drm_mode_duplicate(connector->dev, ptr);
+			if (mode) {
+				if (!i)
+					mode->type = DRM_MODE_TYPE_PREFERRED;
+				drm_mode_probed_add(connector, mode);
+				ret++;
+			}
-	}
 	if (!di->color_formats)
 		di->color_formats = DRM_COLOR_FORMAT_RGB444;
@@ -717,8 +741,10 @@ static int dw_dp_connector_get_modes(struct drm_connector *connector)
 		list_for_each_entry(mode, &connector->probed_modes, head)
+    }
+	}
 	return num_modes;
 static int dw_dp_connector_atomic_check(struct drm_connector *conn,
adb shell dmesg > kernel.log
cat /d/dri/0/summary

@davrdz25 anyupdate?

Sorry for the late but I had problems with the server where I’m building, I built android with the patch applied but the board is getting stuck at khadas logo, I rebuilt deleting all source without patch and it boot correctly

Additionally I tested Android 13 image from oowow and I have image in 4k@60hz on DP but touchscreen doesn’t work, It seems that the axes are inverted and I can’t enable developer options, rotation doesn’t work

Follow the instructions in the following post to solve your touch issue.

I works perfectly
Sound through DP

Thank you so much