This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: No DRM?

Part Number: AM3352
Other Parts Discussed in Thread: DA8XX, LM3630A, LM3639, OPA362, TFP410, TPD12S015, TLC59108

Tool/software: Linux

Hello,

I'm having an issue getting a yocto project (morty) based core-image-weston build to place anything on an LCD connected to an AM3352 on a custom board.  I've built a linux-yocto-4.9.13 kernel with graphics options listed below:

  • CONFIG_DRM=y
  • CONFIG_DRM_I2C_NXP_TDA998X=y
  • CONFIG_DRM_TILCDC=y

The board I'm working with does not have any I2C hardware that the NXP TDA998X driver can utilize, but it is a requirement for the tilcdc driver.

I've configured my panel, backlight, and lcdc nodes in my dts nearly identical to the am335x-evm.dts with the exception that I did not include the include the blue-and-red-wiring property in my lcdc node.  I'm not sure whether it was worth stating that or not with what other info I have presented below.

My core-image-weston build is very basic, meaning that I made no changes to any recipes or configurations other than adding support for my board through my own layer in the form of a defconfig and patch (which only adds my boards dts) in meta-custom/recipes-kernel/linux/linux-yocto-custom.  With that said, poky is the distro for this build (in case that wasn't implied by the previous sentence).

The build was successful and when I boot into my kernel, these are the DRM related messages that I see:

...

[    0.907395] [drm] Initialized
[    0.914081] tilcdc 4830e000.lcdc: no encoders/connectors found

...

INIT: version 2.88 booting
Error opening /dev/fb0: No such file or directory
Starting udev
...

The Weston log at /var/volatile/log/weston.log contains the lines below:

Date: 2017-03-01 UTC
[15:06:10.925] weston 1.11.1
               http://wayland.freedesktop.org
               Bug reports to: bugs.freedesktop.org/enter_bug.cgi
               Build: 1.11.0-8-g79d1925 configure.ac: bump to version 1.11.1 for the point release (2016-09-20 17:39:57 -0700)
[15:06:10.925] OS: Linux, 4.9.13-yocto-standard, #3 Tue Feb 28 16:00:57 MST 2017, armv7l
[15:06:10.927] Starting with no config file.
[15:06:10.938] Output repaint window is 7 ms maximum.
[15:06:10.941] Loading module '/usr/lib/weston/drm-backend.so'
[15:06:10.993] initializing drm backend
[15:06:11.000] no drm device found
[15:06:11.000] fatal: failed to create compositor backend

This lead me to look for /dev/drm, which was not there.

I looked for any udev rules and only found /etc/udev/rules.d/60-drm.rules which contains the following lines:

# do not edit this file, it will be overwritten on update

ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"

So I'm not sure whether this is kernel/dts configuration related, udev related, or something else entirely.  More than likely I need to do more configuration within the yocto project for my build, but I'm sure of what to do.

I'd appreciate any help that you all can offer me.

Thanks,

Jon

  • I had this exact same problem about 6 months ago. I can't remember how I got it working off the top of my head, but looking through some of my changes, I disabled two components from the kernel config:

    CONFIG_DRM_OMAP=y >> CONFIG_DRM_OMAP=n
    CONFIG_DRM_OMAP_NUM_CRTCS=2 >> should just be removed

    Maybe try that out. I'll keep digging through my stuff. I remember it was driving me nuts for a while.
  • Thank you for your reply!

    As a note, I've been following TI's Linux Core LCD Controller User Guide in trying to figure out DRM and how to properly configure it into my kernel/dts.

    Here's a more complete list of config options that I pulled from my defconfig:

    #

    # Graphics support

    #

    # CONFIG_IMX_IPUV3_CORE is not set

    CONFIG_DRM=y

    # CONFIG_DRM_DP_AUX_CHARDEV is not set

    CONFIG_DRM_KMS_HELPER=y

    CONFIG_DRM_KMS_FB_HELPER=y

    CONFIG_DRM_FBDEV_EMULATION=y

    # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

    CONFIG_DRM_GEM_CMA_HELPER=y

    CONFIG_DRM_KMS_CMA_HELPER=y

    #

    # I2C encoder or helper chips

    #

    # CONFIG_DRM_I2C_CH7006 is not set

    # CONFIG_DRM_I2C_SIL164 is not set

    CONFIG_DRM_I2C_NXP_TDA998X=y

    # CONFIG_DRM_HDLCD is not set

    # CONFIG_DRM_MALI_DISPLAY is not set

    #

    # ACP (Audio CoProcessor) Configuration

    #

    # CONFIG_DRM_VGEM is not set

    # CONFIG_DRM_EXYNOS is not set

    # CONFIG_DRM_UDL is not set

    # CONFIG_DRM_ARMADA is not set

    # CONFIG_DRM_OMAP is not set

    CONFIG_DRM_TILCDC=y

    CONFIG_DRM_TILCDC_SLAVE_COMPAT=y

    # CONFIG_DRM_FSL_DCU is not set

    CONFIG_DRM_BRIDGE=y

    #

    # Display Interface Bridges

    #

    # CONFIG_DRM_ANALOGIX_ANX78XX is not set

    # CONFIG_DRM_DUMB_VGA_DAC is not set

    # CONFIG_DRM_NXP_PTN3460 is not set

    # CONFIG_DRM_PARADE_PS8622 is not set

    # CONFIG_DRM_SII902X is not set

    # CONFIG_DRM_TOSHIBA_TC358767 is not set

    # CONFIG_DRM_I2C_ADV7511 is not set

    # CONFIG_DRM_STI is not set

    # CONFIG_DRM_ARCPGU is not set

    # CONFIG_DRM_LEGACY is not set

    #

    # Frame buffer Devices

    #

    CONFIG_FB=y

    # CONFIG_FIRMWARE_EDID is not set

    CONFIG_FB_CMDLINE=y

    CONFIG_FB_NOTIFY=y

    # CONFIG_FB_DDC is not set

    # CONFIG_FB_BOOT_VESA_SUPPORT is not set

    CONFIG_FB_CFB_FILLRECT=y

    CONFIG_FB_CFB_COPYAREA=y

    CONFIG_FB_CFB_IMAGEBLIT=y

    # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set

    CONFIG_FB_SYS_FILLRECT=y

    CONFIG_FB_SYS_COPYAREA=y

    CONFIG_FB_SYS_IMAGEBLIT=y

    # CONFIG_FB_FOREIGN_ENDIAN is not set

    CONFIG_FB_SYS_FOPS=y

    CONFIG_FB_DEFERRED_IO=y

    # CONFIG_FB_SVGALIB is not set

    # CONFIG_FB_MACMODES is not set

    # CONFIG_FB_BACKLIGHT is not set

    # CONFIG_FB_MODE_HELPERS is not set

    # CONFIG_FB_TILEBLITTING is not set

    #

    # Frame buffer hardware drivers

    #

    # CONFIG_FB_EFI is not set

    # CONFIG_FB_OPENCORES is not set

    # CONFIG_FB_S1D13XXX is not set

    # CONFIG_FB_SMSCUFX is not set

    # CONFIG_FB_UDL is not set

    # CONFIG_FB_IBM_GXT4500 is not set

    # CONFIG_FB_DA8XX is not set

    # CONFIG_FB_VIRTUAL is not set

    # CONFIG_FB_METRONOME is not set

    # CONFIG_FB_BROADSHEET is not set

    # CONFIG_FB_AUO_K190X is not set

    CONFIG_FB_SIMPLE=y

    # CONFIG_FB_OMAP2 is not set

    # CONFIG_FB_SSD1307 is not set

    CONFIG_BACKLIGHT_LCD_SUPPORT=y

    # CONFIG_LCD_CLASS_DEVICE is not set

    CONFIG_BACKLIGHT_CLASS_DEVICE=y

    # CONFIG_BACKLIGHT_GENERIC is not set

    CONFIG_BACKLIGHT_PWM=y

    # CONFIG_BACKLIGHT_PM8941_WLED is not set

    # CONFIG_BACKLIGHT_ADP8860 is not set

    # CONFIG_BACKLIGHT_ADP8870 is not set

    # CONFIG_BACKLIGHT_LM3630A is not set

    # CONFIG_BACKLIGHT_LM3639 is not set

    # CONFIG_BACKLIGHT_LP855X is not set

    # CONFIG_BACKLIGHT_GPIO is not set

    # CONFIG_BACKLIGHT_LV5207LP is not set

    # CONFIG_BACKLIGHT_BD6107 is not set

    # CONFIG_VGASTATE is not set

    CONFIG_VIDEOMODE_HELPERS=y

    CONFIG_HDMI=y

    #

    # Console display driver support

    #

    CONFIG_DUMMY_CONSOLE=y

    CONFIG_FRAMEBUFFER_CONSOLE=y

    CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y

    # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set

    CONFIG_LOGO=y

    # CONFIG_LOGO_LINUX_MONO is not set

    # CONFIG_LOGO_LINUX_VGA16 is not set

    CONFIG_LOGO_LINUX_CLUT224=y

    # CONFIG_SOUND is not set

    I also wanted to point out that several DRM related directories do show up in /sys/:

    root@custom:~# find /sys/ -name drm'*' -print
    /sys/class/drm
    /sys/module/drm_kms_helper
    /sys/module/drm
    root@custom:~# ls -l /sys/class/drm/
    -r--r--r--    1 root     root          4096 Jan  1  2000 version
    root@custom:~# ls -l /sys/module/drm_kms_helper/
    drwxr-xr-x    2 root     root             0 Mar  3 20:48 parameters
    --w-------    1 root     root          4096 Mar  3 20:48 uevent
    root@custom:~# ls -l /sys/module/drm_kms_helper/parameters/
    -rw-r--r--    1 root     root          4096 Mar  3 20:48 dp_aux_i2c_speed_khz
    -rw-r--r--    1 root     root          4096 Mar  3 20:48 dp_aux_i2c_transfer_size
    -rw-------    1 root     root          4096 Mar  3 20:48 fbdev_emulation
    -rw-------    1 root     root          4096 Mar  3 20:48 poll
    root@custom:~# ls -l /sys/module/drm/
    drwxr-xr-x    2 root     root             0 Mar  3 20:48 parameters
    --w-------    1 root     root          4096 Mar  3 20:48 uevent
    root@custom:~# ls -l /sys/module/drm/parameters/
    -rw-------    1 root     root          4096 Mar  3 20:48 debug
    -r--------    1 root     root          4096 Mar  3 20:48 edid_fixup
    -rw-------    1 root     root          4096 Mar  3 20:48 timestamp_monotonic
    -rw-------    1 root     root          4096 Mar  3 20:48 timestamp_precision_usec
    -rw-------    1 root     root          4096 Mar  3 20:48 vblankoffdelay

  • Just looking through my config here. I have the same config under  DRM. I don't have CONFIG_DRM_TILCDC_SLAVE_COMPAT or CONFIG_DRM_BRIDGE enabled. But other than that mostly the same. Maybe you didn't post it in here, but there is also a section called OMAP display device drivers. Mine looks like this:

    #
    # OMAP Display Device Drivers (new device model)
    #
    # CONFIG_DISPLAY_ENCODER_OPA362 is not set
    CONFIG_DISPLAY_ENCODER_TFP410=y
    CONFIG_DISPLAY_ENCODER_TPD12S015=y
    CONFIG_DISPLAY_ENCODER_SII9022=y
    CONFIG_DISPLAY_ENCODER_TC358768=y
    CONFIG_DISPLAY_CONNECTOR_DVI=y
    CONFIG_DISPLAY_CONNECTOR_HDMI=y
    CONFIG_DISPLAY_CONNECTOR_ANALOG_TV=y
    CONFIG_DISPLAY_PANEL_DPI=y
    CONFIG_DISPLAY_PANEL_DSI_CM=y
    CONFIG_DISPLAY_PANEL_SONY_ACX565AKM=y
    CONFIG_DISPLAY_PANEL_LGPHILIPS_LB035Q02=y
    CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01=y
    CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1=y
    CONFIG_DISPLAY_PANEL_TPO_TD043MTEA1=y
    CONFIG_DISPLAY_PANEL_NEC_NL8048HL11=y
    CONFIG_DISPLAY_PANEL_TLC59108=y

    I definitely don't need all of them enabled, but I think specifically the connectors and encoders were key. Have you had any luck?

  • I haven't had any breakthroughs as of yet, but I'm very thankful that you continue to respond to this thread.

    I don't have any of those options in my config. What version of the kernel are you using and are you using the standard yocto kernel or ti's kernel?

    Perhaps I don't have another omap related option enabled and that's why I'm not seeing the options that you listed?
  • I'm sorry Chris. I I believe I see how those options are enabled now.

    CONFIG_DRM_OMAP=y appears to be the first step.

    Would you mind telling me what your other omap drm related options are set to (e.g. CONFIG_DRM_OMAP_NUM_CRTCS=2, CONFIG_OMAP2_DSS_DPI, etc.) if they're set at all?

    Was there anything special you had to do with your configuration for the yocto project, like making changes to DISTRO_FEATURES or IMAGE_INSTALL in your local.conf or anything else like that?
  • With the following omap drm related options selected (these are what appear to be equivalent options to what Chris specified earlier) ...
    #
    # ACP (Audio CoProcessor) Configuration
    #
    # CONFIG_DRM_VGEM is not set
    # CONFIG_DRM_EXYNOS is not set
    # CONFIG_DRM_UDL is not set
    # CONFIG_DRM_ARMADA is not set
    CONFIG_DRM_OMAP=y
    CONFIG_DRM_OMAP_NUM_CRTCS=2
    CONFIG_OMAP2_DSS_INIT=y
    CONFIG_OMAP2_DSS=y
    # CONFIG_OMAP2_DSS_DEBUG is not set
    # CONFIG_OMAP2_DSS_DEBUGFS is not set
    CONFIG_OMAP2_DSS_DPI=y
    CONFIG_OMAP2_DSS_VENC=y
    CONFIG_OMAP2_DSS_HDMI_COMMON=y
    CONFIG_OMAP4_DSS_HDMI=y
    CONFIG_OMAP5_DSS_HDMI=y
    CONFIG_OMAP2_DSS_SDI=y
    CONFIG_OMAP2_DSS_DSI=y
    CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
    CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y

    #
    # OMAPDRM External Display Device Drivers
    #
    # CONFIG_DRM_OMAP_ENCODER_OPA362 is not set
    CONFIG_DRM_OMAP_ENCODER_TFP410=y
    CONFIG_DRM_OMAP_ENCODER_TPD12S015=y
    CONFIG_DRM_OMAP_CONNECTOR_DVI=y
    CONFIG_DRM_OMAP_CONNECTOR_HDMI=y
    CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=y
    CONFIG_DRM_OMAP_PANEL_DPI=y
    CONFIG_DRM_OMAP_PANEL_DSI_CM=y
    CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=y
    CONFIG_DRM_TILCDC=y
    CONFIG_DRM_TILCDC_SLAVE_COMPAT=y
    # CONFIG_DRM_FSL_DCU is not set
    CONFIG_DRM_BRIDGE=y

    I get the following output for drm on startup:
    [ 0.843359] [drm] Initialized
    [ 0.847525] Error: Driver 'tfp410' is already registered, aborting...
    [ 0.856084] tilcdc 4830e000.lcdc: no encoders/connectors found

    Nothing has really changed from before other than the error message about the tfp410 driver.
    Also, as a correction/append to my first post, there is no /dev/dri/ directory. I believe, based on newer information, that I was mistaken to have said /dev/drm/ earlier.
  • Ok its slowly coming back to me... here's my output when the kernel boots:

    [ 1.540837] [drm] Initialized drm 1.1.0 20060810
    [ 1.545664] Error: Driver 'tfp410' is already registered, aborting...
    [ 1.553155] panel panel: found enable GPIO
    [ 1.560261] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 1.567137] [drm] No driver support for vblank timestamp query.
    [ 1.592740] Console: switching to colour frame buffer device 100x30
    [ 1.607144] tilcdc 4830e000.lcdc: fb0: frame buffer device
    [ 1.612774] tilcdc 4830e000.lcdc: registered panic notifier

    If think the problem was that it wasn't finding a panel and it couldn't for some reason. Either I hadn't enabled the panel, or the panel wasn't coming up properly. Can you turn on all the debugging for DRM/TILCDC. I am running kernel 4.1.18. I am not using yokto, I am building directly from the TI kernel git repo that comes with the SDK.
  • Actually yes, I think I remember now. I had not set up the panel correctly in the device tree. In either ./drivers/gpu/drm/tilcdc/tilcdc_panel.c or ./drivers/gpu/drm/tilcdc/tilcdc_crtc.c there was some validation function failing. If you enable the debugging or just put in your own you should be able to find exactly why. It was the porches that were wrong. That was it. Sorry for the disjointed email.. But I am writing and looking at code at the some time. I remember now. The way the LCD manufacturer defined fp bp etc... was different than TI did, and there are some checks to make sure it works. I had to play around with those in the device tree. You can look in the device tree panel documentation for exactly how the TI driver expects them to be defined.
  • I suppose that does make sense. The only "panel" related dmesg message I get is:

    [ 1.474059] panel panel: found backlight

    How do you turn on all of the debugging for the drm/tilcdc? I had looked for options to do this earlier today, but all I found was:
    Kernel hacking --->
    printk and dmesg options --->
    Show timing information on printks = y
    Default message log level (1 - 7) = 7 (Messing with this number didn't change the verbosity of the drm/tilcdc printks)
    Enable dynamic printk() support = y (I don't think this option really matters in this case).

    Thank you for the clues on where to look in the tilcdc C files.

    I'll include the panel node from my dts below. Would you mind looking it over for me to see if there's anything glaringly wrong?

    panel {
    	compatible = "ti,tilcdc,panel";
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&lcd_pins>;
    	backlight = <&backlight>;
    	panel-info {
    		ac-bias           = <255>;
    		ac-bias-intrpt    = <0>;
    		dma-burst-sz      = <16>;
    		bpp               = <32>;
    		fdd               = <0x80>;
    		sync-edge         = <0>;
    		sync-ctrl         = <1>;
    		raster-order      = <0>;
    		fifo-th           = <0>;
    	};
    
    	display-timings {
    		native-mode = <&timing0>;
    		timing0: 800x480 {
    			clock-frequency = <30000000>; /* was 30000000 from evm */
    			hactive = <800>;
    			vactive = <480>;
    			hfront-porch = <16 210 354>;
    			hback-porch = <16 210 354>;
    			hsync-len = <1 39 40>;
    			vback-porch = <7 22 147>;
    			vfront-porch = <7 22 147>;
    			vsync-len = <1 2 20>;
    			hsync-active = <1>;
    			vsync-active = <1>;
    		};
    	};
    };
    



    The documentation on the particular LCD I have is terrible and that is why I chose to use ranges for the porch and len parameters, which the display-timings.txt[1] state are valid options but I don't know how the tilcdc driver handles them.

    Thank you again for responding to this thread and for helping me get through this.

    [1] - lxr.free-electrons.com/.../display-timing.txt

  • So it looks like the issue was that I needed to compile the DRM and TILCDC drivers as modules instead of compiling them into the kernel.  I'm sure that a setting for udev or wayland/weston is to blame, but I don't know which one it is yet.

    The other oddity is that the responsiveness of a USB mouse with the core-image-weston image is significantly slower than with a core-image-sato image.

  • That sounds super strange, but as you said maybe udev is the cause. Glad to hear you figured it out. Sorry can't help you much with the core-image-weston issue since I am not familiar with all the openembedded core modules.
  • No worries Chris. Thank you for your help and for being the only one to respond to this thread!