Status of JH7110 on-board HDMI

179 views
Skip to first unread message

Peter Yoon

unread,
Jun 22, 2023, 12:05:32 AM6/22/23
to android-risc-v
Last week, Starfive team added DC8200 HDMI driver in upstream kernel tree:

Then tried following kernel source based on above tree:

Android boot-up starts, but it seems the kernel stopped when /dev/dri/card0 is accessed.
You can check the kernel output (verisilicon_kerenl_230614.txt) in this folder:
(Used same android system image, but kernel is rebuilt from arv-6.4_vs)

After following kernel logs, there is no response on the serial console.
    [   35.301201] dwmmc_starfive 16020000.mmc: Unexpected interrupt latency
    [   49.494917] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:

On Saturday, May 27, 2023 at 1:42:32 PM UTC+9 Peter Yoon wrote:
Now JH7110 can boot-up to Home screen, although it takes about 20 minutes.
- Mesa swpipe is used for graphics, UI resolution 640x480
- Ethernet working,  Can connect ADB with IP address

Build & Flashing guide is at https://github.com/android-risc-v/device_arv_jh7110

Display output is virtual KMS (kernel CONFIG_DRM_VKMS), since JH7110 upstream HDMI driver is still WIP.
https://rvspace.org/en/project/JH7110_Upstream_Plan
If you need physical display, apply kernel CONFIG_DRM_UDL with displaylink adapters.
https://www.synaptics.com/products/displaylink-graphics/displaylink-products

Chang Rebecca Swee Fun

unread,
Jun 22, 2023, 3:16:13 AM6/22/23
to android-risc-v
Hi Peter, I am asking for help internal StarFive to support this HDMI issue.
Meanwhile, as we have a stable kernel version tested on Debian with kernel 5.15 internally, we would like to try android kernel 5.15 with Starfive patches to see if the display can work. We noticed that you have a 5.15 branch in your repo, is that working for JH7110? Is that based on Android common kernel 5.15?

Peter Yoon

unread,
Jun 22, 2023, 3:29:44 AM6/22/23
to android-risc-v
This branch is for JH7100 , which was based on tree below:

For JH7110, I have tried above 5.15 tree. But it was not working. Tree below was the trial source.

After 5.15 trial with JH7110 failed,  I found Starfive upstream tree shows a lot better result for Android.
Then keep following Starfive upstream tree so far.

Chang Rebecca Swee Fun

unread,
Jun 26, 2023, 9:56:40 PM6/26/23
to android-risc-v
Hi Peter, can you upload the kernel image from arv-6.4_vs branch? Along with the initramfs.cpio.gz. We are investigating the bootloader and would like to verify whether it will fix the HDMI issue. Thanks a lot.

Peter Yoon

unread,
Jun 26, 2023, 10:08:09 PM6/26/23
to android-risc-v
It's better to build from following source:

With 'Download & Build kernel' guide in following README:

initramfs.cpio.gz was not generated on AOSP build.

Chang Rebecca Swee Fun

unread,
Jun 27, 2023, 1:32:43 AM6/27/23
to android-risc-v
Ok, we have a developer build of uboot payload where we disabled the power on splash screen.
With this payload, we can boot up the image build from https://github.com/android-risc-v/kernel_arv/tree/arv-6.4.
You just need these two config:
CONFIG_DRM_VERISILICON=y
CONFIG_STARFIVE_HDMI=y

With this, the image is booted up but HDMI display is still not showing up for me. We will need to investigate further.


I attached the patch to disable splash screen on uboot.
diff --git a/drivers/video/starfive/sf_vop.c b/drivers/video/starfive/sf_vop.c
index dbbccdf04e..73ad226339 100644
--- a/drivers/video/starfive/sf_vop.c
+++ b/drivers/video/starfive/sf_vop.c
@@ -617,7 +617,7 @@ static int sf_vop_probe(struct udevice *dev)
 
  ofnode port, node;
  int ret;
-
+ return 0;
  sf_vop_power(dev);
  mdelay(50);
 

Chang Rebecca Swee Fun

unread,
Jun 27, 2023, 2:02:34 AM6/27/23
to android-risc-v
Also sharing my current boot log: https://drive.google.com/file/d/12zBiJcQxd13SGkfHTQRtI-oJ1lWX8Fl3/view?usp=sharing 

Snippet:
[ 40.745683] servicemanager: Could not find android.hardware.graphics.composer3.IComposer/default in the VINTF manifest. [ 40.771715] servicemanager: Could not find android.hardware.graphics.allocator.IAllocator/default in the VINTF manifest. [ 40.802927] [drm:vs_gem_prime_import_sg_table] *ERROR* sg_table is not contiguous [ 41.367281] logd: logdr: UID=1000 GID=1003 PID=618 n tail=500 logMask=8 pid=560 start=0ns deadline=0ns [ 41.385462] logd: logdr: UID=1000 GID=1003 PID=618 n tail=500 logMask=1 pid=560 start=0ns deadline=0ns [ 41.396174] type=1400 audit(41.248:86): avc: denied { getattr } for comm="BootAnimation" path="/dev/dri/card1" dev="tmpfs" ino=382 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1 [ 41.417101] type=1400 audit(41.248:87): avc: denied { read } for comm="BootAnimation" name="uevent" dev="sysfs" ino=1710 scontext=u:r:bootanim:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [ 41.435880] type=1400 audit(41.248:88): avc: denied { open } for comm="BootAnimation" path="/sys/devices/platform/display-subsystem/uevent" dev="sysfs" ino=1710 scontext=u:r:bootanim:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [ 41.458643] type=1400 audit(41.248:89): avc: denied { getattr } for comm="BootAnimation" path="/sys/devices/platform/display-subsystem/uevent" dev="sysfs" ino=1710 scontext=u:r:bootanim:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [ 41.480797] type=1400 audit(41.252:90): avc: denied { read write } for comm="BootAnimation" name="card1" dev="tmpfs" ino=382 scontext=u:r:bootanim:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
Some error on ""[drm:vs_gem_prime_import_sg_table] *ERROR* sg_table is not contiguous"" is suspicious

Peter Yoon

unread,
Jun 27, 2023, 2:11:07 AM6/27/23
to android-risc-v
Scan the file with "drm", then you can check relevant logs.
It seems VKMS is also enabled, then there might be 2 drm devices.

On kernel config,  try remove following. 
CONFIG_DRM_VKMS=y
Then only DRM_VERISILICON will be used.

Chang Rebecca Swee Fun

unread,
Jul 13, 2023, 3:34:06 AM7/13/23
to android-risc-v
Hi, can you do a favor to try out this change in https://github.com/android-risc-v/device_arv_jh7110/blob/arv-master/jh7110.mk

- gralloc.drm.kms=/dev/dri/card0 \
+ gralloc.drm.kms=/dev/dri/card1 \

This is for HDMI issue, for 5.15 kernel, we do set it to /dev/dri/card1 for VF2 to work. Maybe is worth to try this for 6.4 kernel.
I have repo issue where my images are giving me kernel panic (synced on 13 July), still trying to figure out a working manifest.
Thanks a lot.

Peter Yoon

unread,
Jul 13, 2023, 3:44:06 AM7/13/23
to android-risc-v
You can edit /vendor/build.prop. When prebuilt-images are flashed into SD card, and mounted to PC host.
There is an entry gralloc.drm.kms in build.prop.

Chang Rebecca Swee Fun

unread,
Jul 20, 2023, 9:25:06 PM7/20/23
to android-risc-v
Hi Peter, do you still have the repo you used to build the prebuilt images? Can you generate a new manifest with SHASUM on the subprojects using:  repo manifest -r -o baseline.xml ?
We still unable to catch a working commit from the mainline. Hope your manifest can help us stabilize for debugging purposes. Thanks a lot.

Peter Yoon

unread,
Jul 20, 2023, 9:57:55 PM7/20/23
to android-risc-v
Find default_230720.xml in following folder.  Local manifest projects are not included.
https://drive.google.com/drive/u/1/folders/1W24mMNe09cyOJ_oQoPduxi7qSPkKEjbh

Chang Rebecca Swee Fun

unread,
Aug 9, 2023, 4:00:11 AM8/9/23
to android-risc-v
We internally developed a patch to enable VS HDMI on the VF2 Android. We tested the patch was working but we do notice display flakes.
The patch is on my personal github repo:  rebeccasf/kernel_common at arv-6.4_hdmi (github.com) 
The branch is a forked from kernel-arv/arv-6.4 branch, you might need to manually tweak the CONFIG_DRM_VERISILICON during kernel compilation.
We are still working in upstreaming the changes to mainline kernel. This patch is just for preliminary assessment purposes.

Thanks.

Regards,
Rebecca

Peter Yoon

unread,
Aug 9, 2023, 5:05:01 AM8/9/23
to android-risc-v
Good News!
And I've just seen that it works!

Updated arv-6.4 branch with the patch     :  https://github.com/android-risc-v/kernel_arv/tree/arv-6.4
Revised prebuilt binaries                             :  https://drive.google.com/drive/u/1/folders/1W24mMNe09cyOJ_oQoPduxi7qSPkKEjbh

Thanks,
Peter
Reply all
Reply to author
Forward
0 new messages