Wifi has newer version of watchdog (drivers/watchdog/mtk_wdt.c)…maybe this conflicts?
Try to use the original from 4.14,compile without wifi-driver and try to reboot
Wifi has newer version of watchdog (drivers/watchdog/mtk_wdt.c)…maybe this conflicts?
Try to use the original from 4.14,compile without wifi-driver and try to reboot
Try to use predefined templates a top of the page. There are most of resolutions in these templates.
mhm…option is already set in defconfig…will try again with debug=7 and drm.debug=0x7
grep 'CONFIG_DYNAMIC_DEBUG' arch/arm/configs/*fwu_defconfig
CONFIG_DYNAMIC_DEBUG=y
800x600@60Hz => HSYNC of 37.88kHz
1024x768@60Hz=> HSYNC of 48.36kHz
same values used by rpi in my screens above…but it seems that these are not used by fbdev/drm-driver on r2
found messages in debugfs…but placeholder are not filled:
drivers/gpu/drm/mediatek/mtk_hdmi.c:1382 [mediatek_drm_hdmi]mtk_hdmi_bridge_mode_set =_ "hsync_start:%d,hsync_end:%d, htotal:%d"
log with dmesg and debug-fs-messages for drm: 4.16-hdmi-1024x768@60_debug.txt (75,7 KB)
So looks like approximately value of hsync can be calculated as: vsync * vert-res * 1.05
after adding #define DEBUG in mtk_hdmi.c:
[13:28] root@bpi-r2:~# dmesg |grep -i sync
[ 2.959897] mediatek-drm-hdmi 14015000.hdmi: hsync_start:1048,hsync_end:1184, htotal:1344
[ 2.959909] mediatek-drm-hdmi 14015000.hdmi: vsync_start:771, vsync_end:777, vtotal:806
still 1024x768@60…full dmesg: 4.16-hdmi-1024x768@60_debug.txt (74,6 KB)
i have created branch 4.16-hdmi+wlan for testing if the reboot-issue also occour in 4.16 => reboot works here…so it should be nothing wifi-driver-related
What is your actual hsync frequency when using 1024x768@60? Lines 406 and 488 looks suspicious (sorry, can’t insert, I’m writing from smartphone)
it seems 67.5kHz, but i don’t know if that info is from uboot…becuase my screen goes off and does not go on after that (check signal cable)…maybe vga-adapter blocks incorect signal
405: [ 3.022383] [drm:drm_calc_timestamping_constants] crtc 34: hwmode: htotal 1344, vtotal 806, vdisplay 768
406: [ 3.022392] [drm:drm_calc_timestamping_constants] crtc 34: clock 65000 kHz framedur 16665600 linedur 20676
487: [ 9.335294] [drm:drm_calc_timestamping_constants] crtc 34: hwmode: htotal 1344, vtotal 806, vdisplay 768
488: [ 9.335304] [drm:drm_calc_timestamping_constants] crtc 34: clock 65000 kHz framedur 16665600 linedur 20676
489: [ 9.335331] [drm:drm_vblank_enable] enabling vblank on crtc 0, ret: 0
btw. xserver also does not work here (see process running but screen stays in standby)… @Ryder.Lee
edit: after killing x-server, i got the fb-console…and also can start xserver again…
Is there anything useful in dmesg?
BTW, have you tried to run same video config on 4.4 bsp kernel?
Have not looked in it and did not tried with 4.4…but i can reproduce it…after reboot monitor-standby,also after starting x-server, after killing this the first time monitor goes on and virtualconsole is visible
I will make a log later…currently out of home
i don’t know why it works before multiple time also with reboot after killing xserver…i have tried it again and now it does not work anymore with 4.16
but i have tried with 4.4, and have same behaviour…
i have no DEBUG-Flag in 4.4, but this errors came up after killing xserver the first time:
[ 65.763056] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x300000 pa=0x0 larb=0 port=0
[ 65.763167] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x301000 pa=0x0 larb=0 port=0
[ 65.763212] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x304000 pa=0x0 larb=0 port=0
[ 65.763308] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x300000 pa=0x0 larb=0 port=0
[ 65.764035] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x301000 pa=0x0 larb=0 port=0
[ 65.764065] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x302000 pa=0x0 larb=0 port=0
[ 65.764094] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x304000 pa=0x0 larb=0 port=0
[ 65.764123] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x305000 pa=0x0 larb=0 port=0
[ 65.764153] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x307000 pa=0x0 larb=0 port=0
[ 65.764182] mtk-iommu 10205000.mmsys_iommu: fault type=0x5 iova=0x308000 pa=0x0 larb=0 port=0
@DeadMeat hdmi is working in 4.14? for kernelcrash in wifi-driver did you reset mtk_wdt.c? Maybe this causes watchdog-crash…looks like same crash as here: R2 internal Wifi/BT (MT6625L) - Kernel 4.14.x/4.16
Hi, Frank, As for me there are no problems with hdmi in 4.14 - it’s works same way as in 4.16.
No progress with mtk_wdt.c/wifi/broken reboot for today.
I see your last commit…you’ve removed wifi-driver as i suggested…
Which image do you use as base for testing? Are the wmt-tools available? I ask because you have no changes in files used by wifi-driver. Have you same crash with default main-kernel on same system?
i created 4.14-hdmi also in my repo and merged your commits into it for testing…
I’m using 2018-03-29-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc
I’m not shure
pi@bpi-iot-ros-ai:~$ aptitude search wmt
p wmtemp - WM dock applet displaying lm_sensors temperature values
p wmtime - Window Maker dockapp that displays the time and date
p wmtop - dockapp that displays 3 top memory or CPU using processes
p wmtv - Dockable video4linux TV player for WindowMaker
Only on hdmi-patched 4.14.
wmt-tools are not available via apt…these are compiled additionally but in latest official images they should be in /usr/bin (wmt_loader, wmt_loopback, stp_uart_launcher).
i have included wifi-driver in my build…will try it…it will crash if i try to enable wifi-driver, same procedure does not crash with 4.14-main (.44), so it’s a change with the hdmi-driver, hdmi itself works at least with 1080p, nice work… now we have to look why wifi crash => wifi-thread
it seems that you removed the wifi-related dts(i)-nodes…bpi-r2.dts.diff (2,4 KB) mt7623.dtsi.diff (3,5 KB) => fixed in my repo ( https://github.com/frank-w/BPI-R2-4.14/tree/4.14-hdmi ) by applying these 2 patches with -R
have you simply copied dts/dtsi from 4.16 to 4.14?
reverted dts(i) to 4.14-main, removed hdmi-related nodes and readded them from 4.16…works so far. here the full log (including bootloader+ wifi-init): 4.14-hdmi wlan.txt (115,7 KB)
also cleaned defconfig…only thing to do is fix warnings:
drivers/gpu/drm/mediatek/mtk_drm_drv.c:172:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.main_path = mt2701_mtk_ddp_main,
^
drivers/gpu/drm/mediatek/mtk_drm_drv.c:174:14: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.ext_path = mt2701_mtk_ddp_ext,
^
drivers/gpu/drm/mediatek/mtk_drm_drv.c:180:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
.main_path = mt8173_mtk_ddp_main,
^
In file included from ./include/linux/cdev.h:8:0,
from ./include/drm/drmP.h:36,
from drivers/gpu/drm/mediatek/mtk_dpi.c:14:
drivers/gpu/drm/mediatek/mtk_dpi.c: In function 'mtk_dpi_probe':
./include/linux/device.h:1346:36: warning: 'bridge_node' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
^
drivers/gpu/drm/mediatek/mtk_dpi.c:731:27: note: 'bridge_node' was declared here
struct device_node *ep, *bridge_node;
^
In file included from drivers/gpu/drm/mediatek/mtk_drm_fbdev.c:14:0:
drivers/gpu/drm/mediatek/mtk_drm_fbdev.c: In function 'mtk_fbdev_probe':
./include/drm/drmP.h:175:2: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
drm_dev_printk(dev, KERN_ERR, DRM_UT_NONE, __func__, " *ERROR*",\
^
drivers/gpu/drm/mediatek/mtk_drm_fbdev.c:61:6: note: 'err' was declared here
int err;
^
fixed the warnings in my repo…
Have you tried your adapter?
@Ryder.Lee can you explain this hsync-values: Hdmi in uboot and linux ? For 1024x768@60 i need near 48khz…800x600 should be 38khz
Hello Frank,
when i compile, i get these two warnings:
drivers/gpu/drm/mediatek/mtk_drm_fbdev.c: In function 'mtk_fbdev_probe':
./include/drm/drm_print.h:236:2: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
drm_dev_printk(dev, KERN_ERR, DRM_UT_NONE, __func__, " *ERROR*",\
^~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_fbdev.c:61:6: note: 'err' was declared here
int err;
^~~
In file included from ./include/linux/cdev.h:8:0,
from ./include/drm/drmP.h:36,
from drivers/gpu/drm/mediatek/mtk_dpi.c:14:
drivers/gpu/drm/mediatek/mtk_dpi.c: In function 'mtk_dpi_probe':
./include/linux/device.h:1357:36: warning: 'bridge_node' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
^~~~~~~~~
drivers/gpu/drm/mediatek/mtk_dpi.c:731:27: note: 'bridge_node' was declared here
struct device_node *ep, *bridge_node;
^~~~~~~~~~~
Which I have solved with the following changes.
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_fbdev.c b/drivers/gpu/drm/mediatek/mtk_drm_fbdev.c
index 2bff6bc1c7b7..173fe6702841 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_fbdev.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_fbdev.c
@@ -78,17 +78,17 @@ static int mtk_fbdev_probe(struct drm_fb_helper *helper,
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) {
+ err = PTR_ERR(info);
DRM_DEV_ERROR(dev->dev, "failed to allocate framebuffer info, %d\n",
err);
- err = PTR_ERR(info);
goto out;
}
fb = mtk_drm_framebuffer_create(dev, &mode, private->fbdev_bo);
if (IS_ERR(fb)) {
+ err = PTR_ERR(fb);
DRM_DEV_ERROR(dev->dev, "failed to allocate DRM framebuffer, %d\n",
err);
- err = PTR_ERR(fb);
goto out;
}
helper->fb = fb;
and
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index c58b39f55374..40a111820e2d 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -782,16 +782,15 @@ static int mtk_dpi_probe(struct platform_device *pdev)
if (ep) {
bridge_node = of_graph_get_remote_port_parent(ep);
of_node_put(ep);
- }
- if (!bridge_node) {
+ if (!bridge_node) {
dev_err(dev, "Failed to find bridge node\n");
return -ENODEV;
+ }
+ dev_info(dev, "Found bridge node: %pOF\n", bridge_node);
+ dpi->encoder.bridge = of_drm_find_bridge(bridge_node);
+ of_node_put(bridge_node);
}
- dev_info(dev, "Found bridge node: %pOF\n", bridge_node);
-
- dpi->encoder.bridge = of_drm_find_bridge(bridge_node);
- of_node_put(bridge_node);
if (!dpi->encoder.bridge)
return -EPROBE_DEFER;
could you also add nfs (at least as a client) to your defconfig.
When importing the changes over nfs at least the SD card slot is spared.
You use 4.16 or 4.14? In one hdmi-branch i fixed both by initializing them with 0/NULL
err-patch makes more sense than my one…committed to 4.16-hdmi
added nfs-options to 4.16-main
I use the 4.16-hdmi branch which also works with the console. The Xserver quits his service with the following error message.
MESA-LOADER: failed to retrieve device information
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/mediatek_dri.so: cannot open shared object file: No such file or directory
failed to load driver: mediatek
EGL_MESA_drm_image required.
xinit: connection to X server lost
any idea