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/BEAGLEBK: LCD error

Part Number: BEAGLEBK

Tool/software: Linux

I'm using a BBB and a FT6236 LCD controller.  The LCD is 18-bit RGB and the BBB is configured for 24-bit.  I am running Kernel 4.9.59 (a75d8e93056181d512f6c818e8627bd4554aaf92)

I am building using Arago tisdk-rootfs-image

When I boot the Beaglebone, Weston starts and displays "Please wait...".  I can run qt5 example applications only using -platform linuxfb  When I try running with -platform wayland or without the platform option, I see nothing on screen and the console reports:

[  903.201554] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same

I've tried looking at the driver code, but I'm not exactly sure what it's checking:

        drm_fb_get_bpp_depth(state->fb->pixel_format, &depth, &bpp);
        if (state->fb->pitches[0] != crtc_state->mode.hdisplay * bpp / 8) {
                dev_err(plane->dev->dev,
                        "Invalid pitch: fb and crtc widths must be the same");
                return -EINVAL;
        }

fbset reports:

mode "240x320"
    geometry 240 320 240 320 16
    timings 0 0 0 0 0 0 0
    accel true
    rgba 5/11,6/5,5/0,0/0
endmode

Modetest reports:

Encoders:
id      crtc    type    possible crtcs  possible clones
25      24      LVDS    0x00000001      0x00000000

Connectors:
id      encoder status          name            size (mm)       modes   encoders
26      25      connected       LVDS-1          0x0             1       25
  modes:
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  240x320 72 240 278 288 298 320 328 332 336 flags: nhsync, nvsync; type: preferred, driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0

CRTCs:
id      fb      pos     size
24      29      (0,0)   (240x320)
  240x320 72 240 278 288 298 320 328 332 336 flags: nhsync, nvsync; type: preferred, driver
  props:

Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
23      24      29      0,0             0,0     0               0x00000001
  formats: RG16 RG24 XR24
  props:
        5 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1

Frame buffers:
id      size    pitch

My weston.log and device tree are attached.

weston.log.txt
Date: 2018-05-17 UTC
[00:37:43.297] weston 1.11.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.11.0
               Build: 1.10.93-2-g2d825ed configure.ac: bump to version 1.11.0 for the official release (2016-05-31 17:10:40 -0700)
[00:37:43.297] OS: Linux, 4.9.59-ga75d8e9305, #4 PREEMPT Fri May 18 23:50:38 UTC 2018, armv7l
[00:37:43.299] Using config file '/etc//weston.ini'
[00:37:43.301] Output repaint window is 7 ms maximum.
[00:37:43.316] Loading module '/usr/lib/weston/drm-backend.so'
[00:37:43.351] initializing drm backend
[00:37:43.376] using /dev/dri/card0
[00:37:43.380] Loading module '/usr/lib/weston/gl-renderer.so'
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
[00:37:43.475] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
[00:37:43.528] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[00:37:43.528] Retrieving EGL client extension string failed.
[00:37:43.554] input device 'EP0230M09', /dev/input/event0 is tagged by udev as: Touchscreen
[00:37:43.555] input device 'EP0230M09', /dev/input/event0 is a touch device
[00:37:43.583] EGL version: 1.4 build 1.14@3699939 (MAIN)
[00:37:43.584] EGL vendor: Imagination Technologies
[00:37:43.584] EGL client APIs: OpenGL_ES 
[00:37:43.584] EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image
               EGL_KHR_image_base EGL_KHR_gl_texture_2D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
               EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync
               EGL_IMG_context_priority EGL_IMG_hibernate_process
               EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context
               EGL_KHR_wait_sync EGL_KHR_create_context
               EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import
[00:37:43.584] GL version: OpenGL ES 2.0 build 1.14@3699939 (MAIN)
[00:37:43.584] GLSL version: OpenGL ES GLSL ES 1.00 build 1.14@3699939 (MAIN)
[00:37:43.584] GL vendor: Imagination Technologies
[00:37:43.584] GL renderer: PowerVR SGX 530
[00:37:43.584] GL extensions: GL_OES_rgb8_rgba8 GL_OES_depth24
               GL_OES_vertex_half_float GL_OES_texture_float
               GL_OES_texture_half_float GL_OES_element_index_uint
               GL_OES_mapbuffer GL_OES_fragment_precision_high
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image
               GL_OES_EGL_image_external GL_OES_required_internalformat
               GL_OES_depth_texture GL_OES_get_program_binary
               GL_OES_packed_depth_stencil GL_OES_standard_derivatives
               GL_OES_vertex_array_object GL_OES_egl_sync
               GL_OES_surfaceless_context GL_EXT_discard_framebuffer
               GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_multisampled_render_to_texture GL_EXT_shader_texture_lod
               GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg
               GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc
               GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888
               GL_IMG_read_format GL_IMG_program_binary
               GL_IMG_uniform_buffer_object
               GL_IMG_multisampled_render_to_texture GL_KHR_debug
[00:37:43.584] GL ES 2 renderer features:
               read-back format: RGBA
               wl_shm sub-image to texture: no
               EGL Wayland extension: yes
[00:37:43.584] Chosen EGL config details:
               RGBA bits: 8 8 8 8
               swap interval range: 1 - 1
[00:37:43.584] cursor buffers unavailable, using gl cursors
[00:37:43.585] Initialized backlight, device /sys/class/backlight/backlight
[00:37:43.586] Applying calibration: 12.800001 29.599998 -7764.000000 12.800001 9.599998 -3504.000000 (normalized -32.349998 -10.950000)
[00:37:43.586] Output LVDS-1, (connector 26, crtc 24)
               mode 240x320@71.9, preferred, current
[00:37:43.587] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
[00:37:43.589] Loading module '/usr/lib/weston/desktop-shell.so'
[00:37:43.594] launching '/usr/libexec/weston-keyboard'
[00:37:43.596] launching '/usr/libexec/weston-desktop-shell'
[00:37:43.783] set mode failed: No such file or directory
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
[00:37:44.466] set mode failed: No such file or directory
[00:37:47.161] set mode failed: No such file or directory
[00:37:47.161] unexpectedly large timestamp jump (from 22746 to 25459)
[00:37:47.199] set mode failed: No such file or directory
[00:37:47.219] set mode failed: No such file or directory
[00:37:47.240] set mode failed: No such file or directory
[00:37:47.263] set mode failed: No such file or directory
[00:37:47.290] set mode failed: No such file or directory
[00:37:49.050] set mode failed: No such file or directory
[00:37:49.101] set mode failed: No such file or directory
[00:37:50.566] set mode failed: No such file or directory
[00:37:50.621] set mode failed: No such file or directory
[00:37:51.069] set mode failed: No such file or directory
[00:37:51.168] set mode failed: No such file or directory
[00:37:51.528] set mode failed: No such file or directory
[00:37:51.566] set mode failed: No such file or directory
[00:37:51.605] set mode failed: No such file or directory
[00:37:51.639] set mode failed: No such file or directory
[00:37:51.674] set mode failed: No such file or directory
[00:37:51.709] set mode failed: No such file or directory
[00:37:51.741] set mode failed: No such file or directory
[00:37:51.775] set mode failed: No such file or directory
[00:37:51.805] set mode failed: No such file or directory
[00:37:51.828] set mode failed: No such file or directory
[00:38:13.951] notify_touch: weston_compositor_pick_view(-1312, 658) failed to find a view!
[00:38:17.932] notify_touch: weston_compositor_pick_view(-4648, -1430) failed to find a view!
[00:38:22.402] notify_touch: weston_compositor_pick_view(2057, 3210) failed to find a view!
[00:38:23.870] notify_touch: weston_compositor_pick_view(1161, 2016) failed to find a view!
[00:38:24.811] notify_touch: weston_compositor_pick_view(963, 1792) failed to find a view!
[00:38:26.002] notify_touch: weston_compositor_pick_view(1769, 2867) failed to find a view!
[00:38:26.792] notify_touch: weston_compositor_pick_view(1027, 1877) failed to find a view!
[00:38:28.392] notify_touch: weston_compositor_pick_view(-441, 1219) failed to find a view!
[00:38:29.212] notify_touch: weston_compositor_pick_view(2121, 3296) failed to find a view!
[00:38:30.290] notify_touch: weston_compositor_pick_view(-3923, -563) failed to find a view!
[00:38:30.883] notify_touch: weston_compositor_pick_view(166, 709) failed to find a view!
[00:38:31.472] notify_touch: weston_compositor_pick_view(-926, 1332) failed to find a view!
[00:38:32.342] notify_touch: weston_compositor_pick_view(204, 760) failed to find a view!
[00:38:32.895] notify_touch: weston_compositor_pick_view(-1164, -4) failed to find a view!
[00:38:35.296] notify_touch: weston_compositor_pick_view(-3031, -454) failed to find a view!
[00:38:36.072] notify_touch: weston_compositor_pick_view(1409, 2526) failed to find a view!
[00:38:36.819] notify_touch: weston_compositor_pick_view(-1022, 945) failed to find a view!
[00:38:37.349] notify_touch: weston_compositor_pick_view(-1117, 857) failed to find a view!
[00:38:37.761] notify_touch: weston_compositor_pick_view(1238, 2499) failed to find a view!
[00:38:38.352] notify_touch: weston_compositor_pick_view(-1643, 76) failed to find a view!
[00:38:38.616] notify_touch: weston_compositor_pick_view(-4302, -588) failed to find a view!
[00:38:38.916] notify_touch: weston_compositor_pick_view(-5717, -935) failed to find a view!
[00:38:39.349] notify_touch: weston_compositor_pick_view(-3813, 3) failed to find a view!
[00:38:40.340] notify_touch: weston_compositor_pick_view(-2894, 308) failed to find a view!
[00:38:40.583] notify_touch: weston_compositor_pick_view(-3160, 274) failed to find a view!
[00:38:44.119] set mode failed: No such file or directory
[00:39:44.118] set mode failed: No such file or directory
[00:40:44.119] set mode failed: No such file or directory
[00:41:44.117] set mode failed: No such file or directory
[00:42:44.118] set mode failed: No such file or directory
[00:43:44.118] set mode failed: No such file or directory
[00:44:44.118] set mode failed: No such file or directory
[00:45:44.118] set mode failed: No such file or directory
[00:46:44.118] set mode failed: No such file or directory
[00:47:44.117] set mode failed: No such file or directory
[00:48:44.118] set mode failed: No such file or directory
[00:49:44.117] set mode failed: No such file or directory

beagle-dens28.dts.txt
/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include <dt-bindings/display/tda998x.h>

/ {
	model = "TI AM335x BeagleBone Black";
	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};

&ldo3_reg {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	regulator-always-on;
};

&mmc1 {
	vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
	vmmc-supply = <&vmmcsd_fixed>;
	pinctrl-names = "default";
	pinctrl-0 = <&emmc_pins>;
	bus-width = <8>;
	status = "okay";
};

&cpu0_opp_table {
	/*
	 * All PG 2.0 silicon may not support 1GHz but some of the early
	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
	 */
	oppnitro@1000000000 {
		opp-supported-hw = <0x06 0x0100>;
	};
};

&am33xx_pinmux {
	lcd_pins: lcd_pins {
		pinctrl-single,pins = <
				0x20 0x01	/* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
				0x24 0x01	/* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
				0x28 0x01	/* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
				0x2c 0x01	/* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
				0x30 0x01	/* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
				0x34 0x01	/* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
				0x38 0x01	/* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
				0x3c 0x01	/* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
		        AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data0.lcd_data0 */
			AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data1.lcd_data1 */
			AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data2.lcd_data2 */
			AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)		/* lcd_data3.lcd_data3 */
			AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data4.lcd_data4 */
			AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data5.lcd_data5 */
			AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data6.lcd_data6 */
			AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data7.lcd_data7 */
			AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data8.lcd_data8 */
			AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data9.lcd_data9 */
			AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data10.lcd_data10 */
			AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data11.lcd_data11 */
			AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data12.lcd_data12 */
			AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data13.lcd_data13 */
			AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data14.lcd_data14 */
			AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data15.lcd_data15 */
			AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad15.lcd_data16 */
			AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)		/* gpmc_ad14.lcd_data17 */
			AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_vsync.lcd_vsync */
			AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_hsync.lcd_hsync */
			AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_pclk.lcd_pclk */
			AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_ac_bias_en.lcd_ac_bias_en */
			AM33XX_IOPAD(0x878, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	backlight_pin: backlight_pin {
	        pinctrl-single,pins = <
		        AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLUP | MUX_MODE6)
		>;
	};

        bb_spi0_pins: pinmux_bb_spi0_pins {
                pinctrl-single,pins = <
                        0x150 0x30      /* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
                        0x154 0x30      /* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
                        0x158 0x10      /* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
                        0x15c 0x10      /* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
                >;
        };

	edt_ft5x06_pins: pinmux_edt_ft5x06_pins {
	        pinctrl-single,pins = <
		        AM33XX_IOPAD(0x980, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpio0_14 I2C_RST P9_26 */
		        AM33XX_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE7)  /* gpio1_17 / Linux GPIO 49 */
		>;
	};

        i2c2_pins: pinmux_i2c2_pins {
	        pinctrl-single,pins = <
		        AM33XX_IOPAD(0x97C, PIN_INPUT_PULLUP | MUX_MODE3)
			AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3)
		>;
	};

};

&i2c2 {
        status = "okay";
	pinctrl-name = "default";
	pinctrl-0 = <&i2c2_pins>;

	clock-frequency = <100000>;

	#address-cells = <1>;
	#size-cells = <0>;

	polytouch: ft6236@38 {
	        compatible = "focaltech,ft6236";
		reg = <0x38>;
		pinctrl-names = "default";
		pinctrl-0 = <&edt_ft5x06_pins>;
		reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio1>;
		interrupts = <17 2>;

		touchscreen-size-y = <320>;
		touchscreen-size-x = <240>;
		touchscreen-inverted-x;
		touchscreen-inverted-y;
	};
};


&spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&bb_spi0_pins>;


        channel@0 {
                #address-cells = <1>;
                #size-cells = <0>;

                compatible = "spidev";

                reg = <0>;
                spi-max-frequency = <16000000>;
        };
};

&lcdc {
	status = "okay";
};

&epwmss1 {
	status = "okay";
};

&ehrpwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&backlight_pin>;
	status = "okay";
};

&rtc {
	system-power-controller;
};

&sgx {
	status = "okay";
};

/ {

	lcd0: display {
		status = "okay";
		compatible = "ti,tilcdc,panel";
		label = "lcd";
		pinctrl-names = "default";
		pinctrl-0 = <&lcd_pins>;

		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <24>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};

		display-timings {
			native-mode = <&timing0>;
			timing0: 240x320 {
				clock-frequency = <7200000>;
				hactive = <240>;
				vactive = <320>;
				hfront-porch = <38>;
				hback-porch = <10>;
				hsync-len = <10>;
				vback-porch = <4>;
				vfront-porch = <8>;  
				vsync-len = <4>;
				hsync-active = <0>;     // Low active
				vsync-active = <0>;     // Low active
				de-active = <1>;        // The data DB17-0 is written when ENABLE = “1”. Disable data write operation when ENABLE = “0”.
				pixelclk-active = <1>;  // The data is input on the positive edge of DOTCLK
			};
		};
	};

	fb {
		compatible = "ti,am33xx-tilcdc";
		reg = <0x4830e000 0x1000>;
		interrupt-parent = <&intc>;
		interrupts = <36>;
		ti,hwmods = "lcdc";
	};

	backlight {
		status = "okay";
		compatible = "pwm-backlight";
		pwms = <&ehrpwm1 0 500000 0>;
		brightness-levels = <
			0  1  2  3  4  5  6  7  8  9
			10 11 12 13 14 15 16 17 18 19
			20 21 22 23 24 25 26 27 28 29
			30 31 32 33 34 35 36 37 38 39
			40 41 42 43 44 45 46 47 48 49
			50 51 52 53 54 55 56 57 58 59
			60 61 62 63 64 65 66 67 68 69
			70 71 72 73 74 75 76 77 78 79
			80 81 82 83 84 85 86 87 88 89
			90 91 92 93 94 95 96 97 98 99
			100
		>;
		default-brightness-level = <100>;
	};
};

Any help is appreciated!

Thanks,
Matt

  • I added some debugging info in that kernel code:

    tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same 1024 != 960, 240, 32

    Where:
    crtc_state->mode.hdisplay = 240
    bpp = 32

    Which is strange because the device tree sets BPP to <24>
  • Hi Matt,

    When you mentioned that the QT application with linuxfb QPA runs well and as well display prints "please wait", I am assuming that LCD display is working well. You have trouble rendering the QT drawing on hardware.

    The issue could be at the wayland or SGX side. Are you able to run the QT application using "-platform eglfs" option? If you don't provide any argument to the application, it will pick the default which is wayland. 

  • The "Please wait..." shows up before I try to run anything. It looks like Matrix Browser is trying to run, but never shows anything.

    I can kill the matrix_browser process so only weston is running:


    root 1123 0.0 0.3 2680 1768 tty4 Ss+ 17:08 0:00 /bin/sh /usr/bin/runWeston
    root 1126 0.3 2.2 16960 11356 tty4 S+ 17:08 0:00 weston --idle-time=0
    root 1127 0.0 1.0 7052 5156 tty4 S+ 17:08 0:00 /usr/libexec/weston-keyboard
    root 1128 0.0 0.9 6828 4900 tty4 S+ 17:08 0:00 /usr/libexec/weston-desktop-shell


    Then when I run a Qt example like this:

    root@dens28:/usr/share/qt5/examples/gui/analogclock# ./analogclock
    Using Wayland-EGL
    wlpvr: PVR Services Initialised
    [ 472.437345] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same 1024 != 960, 240, 32
    [ 473.384413] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same 1024 != 960, 240, 32
    [ 474.435672] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same 1024 != 960, 240, 32

    Nothing appears on screen and I keep getting the Invalid pitch errors.

    Where does this variable "state->fb->pitches[0]" come from? Its value is 1024 (from the kernel log above), but I can't figure out why it is 1024...
  • Hi Matt,

    After kernel boots, the init scripts tries to launch the weston. Since weston fails to launch, the script falls back to default "please wait" message. Matrix launch depends upon successful launch of weston. Can you please run this instruction and let me know how it goes -

    root@dens28:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform eglfs
  • I have reverted my kernel and filesystem back to processor-sdk-linux-am335x-evm-04.03.00.05.  I am booting from an SD card created with ./bin/create-sdcard.sh using the pre-built binaries.  The only modification I am making is the device tree file.

    Testing with this DTS file that defines an 800x480 LCD (I have no LCD plugged in right now, but can probe LCD pins with an o-scope), I do not get the "Invalid pitch: fb and crtc widths must be the same" error.

    1033.am335x-boneblack.dts.txt
    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    /dts-v1/;
    
    #include "am33xx.dtsi"
    #include "am335x-bone-common.dtsi"
    #include <dt-bindings/display/tda998x.h>
    
    / {
    	model = "TI AM335x BeagleBone Black";
    	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
    };
    
    &ldo3_reg {
    	regulator-min-microvolt = <1800000>;
    	regulator-max-microvolt = <1800000>;
    	regulator-always-on;
    };
    
    &mmc1 {
    	vmmc-supply = <&vmmcsd_fixed>;
    };
    
    &mmc2 {
    	vmmc-supply = <&vmmcsd_fixed>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&emmc_pins>;
    	bus-width = <8>;
    	status = "okay";
    };
    
    &cpu0_opp_table {
    	/*
    	 * All PG 2.0 silicon may not support 1GHz but some of the early
    	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
    	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
    	 */
    	oppnitro@1000000000 {
    		opp-supported-hw = <0x06 0x0100>;
    	};
    };
    
    &am33xx_pinmux {
    	bb_lcd_lcd_pins: pinmux_bb_lcd_lcd_pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data0.lcd_data0 */
    			AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data1.lcd_data1 */
    			AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data2.lcd_data2 */
    			AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)		/* lcd_data3.lcd_data3 */
    			AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data4.lcd_data4 */
    			AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data5.lcd_data5 */
    			AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data6.lcd_data6 */
    			AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data7.lcd_data7 */
    			AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data8.lcd_data8 */
    			AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data9.lcd_data9 */
    			AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data10.lcd_data10 */
    			AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data11.lcd_data11 */
    			AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)		/* lcd_data12.lcd_data12 */
    			AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)		/* lcd_data13.lcd_data13 */
    			AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)		/* lcd_data14.lcd_data14 */
    			AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)		/* lcd_data15.lcd_data15 */
                            AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)
                            AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)
    			AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_vsync.lcd_vsync */
    			AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_hsync.lcd_hsync */
    			AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_pclk.lcd_pclk */
    			AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* lcd_ac_bias_en.lcd_ac_bias_en */
    		>;
    	};
    	nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr0 */
    		>;
    	};
    
    	mcasp0_pins: mcasp0_pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
    			AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
    			AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
    			AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
    			AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
    		>;
    	};
    };
    
    &lcdc {
    	status = "okay";
    
    	/* If you want to get 24 bit RGB and 16 BGR mode instead of
    	 * current 16 bit RGB and 24 BGR modes, set the propety
    	 * below to "crossed" and uncomment the video-ports -property
    	 * in tda19988 node.
    	 */
    	blue-and-red-wiring = "straight";
    
    };
    
    &rtc {
    	system-power-controller;
    };
    
    &sgx {
    	status = "okay";
    };
    
    / {
    
    
    			/* NHD-7.0-800480EF-ATXL# */
    			panel {
    				status = "okay";
    				compatible = "ti,tilcdc,panel";
    				pinctrl-names = "default";
    				pinctrl-0 = <&bb_lcd_lcd_pins>;
    
    /*
                    panel-info {
                            ac-bias           = <255>;
                            ac-bias-intrpt    = <0>;
                            dma-burst-sz      = <16>;
                            bpp               = <24>;
                            fdd               = <0x80>;
    			tft-alt-mode      = <0>;
    			stn-565-mode      = <0>;
    			mono-8bit-mode    = <0>;
                            sync-edge         = <0>;
                            sync-ctrl         = <1>;
                            raster-order      = <0>;
                            fifo-th           = <0>;
                    };
    
                    display-timings {
                            native-mode = <&timing0>;
                            timing0: 240x320 {
                                    clock-frequency = <7200000>;
                                    hactive = <240>;
                                    vactive = <320>;
                                    hfront-porch = <38>;
                                    hback-porch = <10>;
                                    hsync-len = <10>;
                                    vback-porch = <4>;
                                    vfront-porch = <8>;  
                                    vsync-len = <4>;
                                    hsync-active = <0>;     // Low active
                                    vsync-active = <0>;     // Low active
                                    de-active = <1>;        // The data DB17-0 is written when ENABLE = “1”. Disable data write operation when ENABLE = “0”.
                                    pixelclk-active = <1>;  // The data is input on the positive edge of DOTCLK
                            };
                    };
    */
    
    				panel-info {
    					ac-bias           = <255>;
    					ac-bias-intrpt    = <0>;
    					dma-burst-sz      = <16>;
    					bpp               = <24>;
    					fdd               = <0x80>;
    					tft-alt-mode      = <0>;
    					stn-565-mode      = <0>;
    					mono-8bit-mode    = <0>;
    					sync-edge         = <0>;
    					sync-ctrl         = <0>;
    					raster-order      = <0>;
    					fifo-th           = <0>;
    				};
    				display-timings {
    					native-mode = <&timing0>;
    					timing0: 800x480 {
    						clock-frequency = <45000000>;
    						hactive = <800>;
    						vactive = <480>;
    						hfront-porch = <40>;
    						hback-porch = <40>;
    						hsync-len = <48>;
    						vback-porch = <29>;
    						vfront-porch = <13>;
    						vsync-len = <3>;
    						hsync-active = <0>;
    						vsync-active = <0>;
    					};
    				};
    			};
    
    };
    

    With Wayland running:

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform wayland
    Using Wayland-EGL
    wlpvr: PVR Services Initialised

    Without Wayland:

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# systemctl stop weston

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform eglfs
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Invalid argument [0, ]
    EGL Error : Could not create the egl surface: error = 0x3003

    Aborted (core dumped)

    Using my 240x320 LCD configuration:

    With Wayland running:

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform wayland
    Using Wayland-EGL
    wlpvr: PVR Services Initialised
    [  101.014949] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same
    [  101.789485] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same
    [  102.809056] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same
    [  103.798719] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same

    Without wayland:

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform eglfs
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    [  153.037936] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same
    PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Invalid argument [0, ]
    EGL Error : Could not create the egl surface: error = 0x3003

    Aborted (core dumped)

    eglinfo reports:

    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# eglinfo

    eglGetConfigs():
    ======================================================================

    **********************************
    EGL config number: 0
    EGL vendor string: Imagination Technologie[  190.643655] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same
    s
    EGL version string: 1.4 build 1.14@3699939 (MAIN)
    EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import
    EGL client APIs are: OpenGL_ES

    EGL config Attributes:
     EGL_CONFIG_ID = 0x1
     EGL_BUFFER_SIZE = 0x20
     EGL_RED_SIZE = 0x8
     EGL_GREEN_SIZE = 0x8
     EGL_BLUE_SIZE = 0x8
     EGL_LUMINANCE_SIZE = 0x0
     EGL_ALPHA_SIZE = 0x8
     EGL_ALPHA_MASK_SIZE = 0x0
     EGL_BIND_TO_TEXTURE_RGB = 0x1
     EGL_BIND_TO_TEXTURE_RGBA = 0x1
     EGL_COLOR_BUFFER_TYPE = 0x308e
     EGL_CONFIG_CAVEAT = 0x3038
     EGL_CONFORMANT = 0x1
     EGL_DEPTH_SIZE = 0x18
     EGL_LEVEL = 0x0
     EGL_MAX_PBUFFER_WIDTH = 0x800
     EGL_MAX_PBUFFER_HEIGHT = 0x800
     EGL_MAX_PBUFFER_PIXELS = 0x400000
     EGL_MAX_SWAP_INTERVAL = 0xa
     EGL_MIN_SWAP_INTERVAL = 0x1
     EGL_NATIVE_RENDERABLE = 0x0
     EGL_NATIVE_VISUAL_ID = 0x0
     EGL_NATIVE_VISUAL_TYPE = 0x0
     EGL_RENDERABLE_TYPE = 0x1  EGL_OPENGL_ES_BIT
     EGL_SAMPLE_BUFFERS = 0x0
     EGL_SAMPLES = 0x0
     EGL_STENCIL_SIZE = 0x8
     EGL_SURFACE_TYPE = 0x5  EGL_PBUFFER_BIT  EGL_WINDOW_BIT
     EGL_TRANSPARENT_TYPE = 0x3038
     EGL_TRANSPARENT_RED_VALUE = 0x0
     EGL_TRANSPARENT_GREEN_VALUE = 0x0
     EGL_TRANSPARENT_BLUE_VALUE = 0x0

    Creating Window surface..
    PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Invalid argument [0, ]
    Unable to create surface
        egl error 'EGL_BAD_ALLOC' (0x3003)

  • Do you have any updates or suggestions on this?

    Is there a minimum resolution that the SGX supports? Just wondering if 240x320 is too small to use with hardware acceleration.
  • Hi Matt,

    I am checking with Weston and DDK driver experts if there's any restriction on width/height alignment or resolution and waiting for their response. It would have been helpful to focus on one of these components if you were able to run the application and share the results using "-platform eglfs" option.  I am not sure why it is failing for you. It works well using our SDK.  Did you killed Weston before running with eglfs QPA?

    Regards,

    Manisha

  • Here you go. It's in my previous post with all that other logging:


    root@am335x-evm:/usr/share/qt5/examples/gui/analogclock# ./analogclock -platform eglfs
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Invalid argument [0, ]
    EGL Error : Could not create the egl surface: error = 0x3003

    Aborted (core dumped)
  • Hi Matt,

    SGX on AM335x has requirement on the width (not bytes) to be aligned on 32. The width 240 is not aligned on 32 boundary so instead it would need to be 256 and probably that’s the reason for stride being 1024 bytes.

    LCDC has a requirement for screen width to be equal to framebuffer. With such requirement by LCDC, LCD resolution with 240 width can't be supported by LCDC driver and hence your observation.