Hdmi in uboot and linux


(Frank W.) #101

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


#102

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.


(Frank W.) #103

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


#104

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


(Frank W.) #105

There is no mediatek-dri…have you tried to install software-dri?

apt-get install libgl1-mesa-dri

#106

yes is installed.

Is there a config entry, that forces xserver to load the software driver.


(Frank W.) #107

You can look if there is a /etc/X11/xorg.conf? In my test all config was done on the fly and this file does not exist

Which os do you use? Was xorg installed or have you done this?


#108

I use debian stretch. How did you install the xserver with task desktop or individual packages.

startx brings me only a black screen with mouse pointer and can only kill by kill -9

xinit even a xterm that I can end with the input of exit


(Frank W.) #109

I installed lxde, it’s a full and light desktop environment

how do you fixed your xserver-issue?


#110

yes lxde was a good tip.

I uninstalled everything and reinstalled task-lxde.

then it worked immediately with almost all resolutions


(Frank W.) #111

Can you create a post here: Searching testing people for hdmi + wifi in Kernel 4.16

With the following Informations:

  • kernel used (4.14/4.16)
  • operation system (debian/ubuntu with version)
  • resolutions and frequency (vsync)
  • adapters used (dvi/vga) if any
  • tested function (fbconsole/xorg)
  • problems

(Frank W.) #112

i merged hdmi-branch in 4.14-main and hdmi+wlan to 4.16-main and uploaded new precompiled kernels (4.14main+4.16-main)