Re: Testing VC4 on rpi2 with wayland and weston, weston fail to start with drm

Fabio Fantoni <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>

Il 25/10/2015 15:32, Fabio Fantoni ha scritto:
> Il 07/10/2015 00:01, Eric Anholt ha scritto:
>> Fabio Fantoni <[email protected]> writes:
>>
>>> Il 03/10/2015 00:50, Eric Anholt ha scritto:
>>>> Fabio Fantoni <[email protected]> writes:
>>>>
>>>>> Hi, I want try VC4 on rpi2 with wayland on debian (I used Sid).
>>>>> Following this howto:
>>>>> http://dri.freedesktop.org/wiki/VC4/
>>>>> I rebuild the kernel from
>>>>> https://github.com/anholt/linux/tree/vc4-kms-v3d-rpi2
>>>>> Base config modified with: CONFIG_DRM_VC4=y and
>>>>> CONFIG_CMA_SIZE_MBYTES=128, full .config in attachment.
>>>>> I did the 2 additions to rpi2 config.txt (full in attachment).
>>>>> New kernel is working, in kern.log about drm I saw only this about 
>>>>> drm:
>>>>> Oct  1 11:11:16 jessie-rpi kernel: [    1.577017] [drm] 
>>>>> Initialized drm
>>>>> 1.1.0 20060810
>>>>> I suppose that compiling with CONFIG_DRM_VC4=y should be present 
>>>>> but I
>>>>> not saw line about.
>>>> You should also have various lines in dmesg about:
>>>>
>>>> [    3.185410] vc4-drm soc:vc4@7e4c0000: bound 20902000.hdmi (ops 
>>>> vc4_hdmi_ops)
>>>> [    3.200606] vc4-drm soc:vc4@7e4c0000: bound 20206000.pixelvalve 
>>>> (ops vc4_crtc_ops)
>>>> [    3.220583] vc4-drm soc:vc4@7e4c0000: bound 20207000.pixelvalve 
>>>> (ops vc4_crtc_ops)
>>>> [    3.232884] vc4-drm soc:vc4@7e4c0000: bound 20807000.pixelvalve 
>>>> (ops vc4_crtc_ops)
>>>> [    3.250938] vc4-drm soc:vc4@7e4c0000: bound 20400000.hvs (ops 
>>>> vc4_hvs_ops)
>>>> [    3.263385] [drm] Supports vblank timestamp caching Rev 2 
>>>> (21.10.2013).
>>>> [    3.270162] [drm] No driver support for vblank timestamp query.
>>>> [    3.470743] Console: switching to colour frame buffer device 240x67
>>>> [    3.540179] vc4-drm soc:vc4@7e4c0000: fb0:  frame buffer device
>>>>
>>>> so something is going wrong and keeping you from probing. There's at
>>>> least one problem in your config -- you can't have
>>>>
>>>> CONFIG_FB_BCM2708=y
>>>>
>>>> since you're trying to run a proper graphics driver, instead.  I don't
>>>> think that would keep vc4 from probing, though.  Maybe you wouldn't 
>>>> have
>>>> hit any of those "bound" messages because HDMI fails first due to your
>>>> config being missing:
>>>>
>>>> CONFIG_I2C_BCM2835=y
>>>>
>>>> I've added that to the wiki page.
>>> Thanks for your reply and all your work.
>>> I recompiled the kernel and retried, now screen show only and always
>>> "initial image" but system with ssh is working.
>>> Strange thing is that I not found vc4-drm lines also in this case.
>>> Actual kernel .config and kern.log in attachment.
>>> I did something missed or wrong or there is problem or an unexpected 
>>> case?
>>> I suppose is probable that also kernel parameters may change something
>>> but I don't know if I must change something, actual cmdline.txt.
>>> config.txt already attached in previous mail is ok or other changes not
>>> present in wiki are present?
>>> I also saw the strange thing that kernel is launched with addition
>>> parameters (from kern.log) but I not know how and if can be a problem:
>>>> Oct  3 17:22:02 jessie-rpi kernel: [ 0.000000] Kernel command line:
>>>> dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1360 bcm2708_fb.fbheight=768
>>>> bcm2708.boardrev=0x2000010 bcm2708.serial=0x968d5adc
>>>> smsc95xx.macaddr=B8:27:EB:8D:5A:DC bcm2708_fb.fbswap=1
>>>> bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0
>>>> sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000
>>>> vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0
>>>> console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait
>>>> net.ifnames=1
>>> If you need more informations or tests tell me and I'll post them.
>> Looking through the logs again, I'm not sure what's going on. At this
>> point I think I'd start adding DRM_INFO()s in vc4_drm_register(),
>> vc4_platform_drm_probe() and vc4_drm_bind() to start bisecting where
>> things are going wrong.
>
> I saw update on vc4-kms-v3d-rpi2 branch, I build it and tried but I 
> had the same result.
>
> I created the .config with:
> make bcm2709_defconfig
> and did the changes of the wiki, full .config used is in attachment.
> looking the syslog (see attachment) I not saw vc4 even if enabled, I 
> suppose there is still something wrong or missed in .config.
>
> Thanks for any reply and sorry for my bad english.
>

I retried with many other changes, in latest kernel build (config in 
attachment) I was able to boot with screen output working and something 
about vc4 in logs but there are errors about it like:
> Oct 28 11:44:19 jessie-rpi kernel: [ 3.695517] vc4-drm 
> soc:gpu@7e4c0000: failed to bind 3f902000.hdmi (ops vc4_hdmi_ops): -517
> Oct 28 11:44:19 jessie-rpi kernel: [    3.713539] vc4-drm 
> soc:gpu@7e4c0000: master bind failed: -517
Full syslog in attachment.
I was able to boot weston with vc4 drm but screen output always freeze 
after terminal window draw.
 From log I saw a segfault but trying to take a backtrace with gdb 
strangely fails, weston log in attachment.

If you need more informations/tests tell me and I'll post them.

Thanks for any reyply and sorry for my bad english.

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
.config (text/plain, 125.1 KB) - not displayed
syslog (text/plain, 367.3 KB) - not displayed
weston.log (text/x-log, 4.9 KB)
mesg: ttyname failed: ioctl non appropriata per il device
Date: 2015-10-28 CET
[11:49:49.509] weston 1.9.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.9.0
               Build: 1.8.93-2-gb05cdb8 configure.ac: bump to version 1.9.0 for the official release (2015-09-21 18:11:26 -0700)
[11:49:49.510] OS: Linux, 4.2.3-v7+, #3 SMP PREEMPT Tue Oct 27 20:08:28 CET 2015, armv7l
[11:49:49.512] Using config file '/root/.config/weston.ini'
[11:49:49.515] Loading module '/usr/lib/arm-linux-gnueabihf/weston/drm-backend.so'
[11:49:49.566] Output repaint window is 7 ms maximum.
[11:49:49.566] initializing drm backend
[11:49:49.572] using /dev/dri/card0
[11:49:49.575] Loading module '/usr/lib/arm-linux-gnueabihf/weston/gl-renderer.so'
[11:49:50.828] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_EXT_platform_wayland
               EGL_EXT_platform_x11 EGL_KHR_client_get_all_proc_addresses
               EGL_MESA_platform_gbm
[11:49:50.830] warning: EGL_EXT_swap_buffers_with_damage not supported. Performance could be affected.
[11:49:50.844] input device 'DELL DELL USB Keyboard', /dev/input/event0 is tagged by udev as: Keyboard
[11:49:50.844] input device 'DELL DELL USB Keyboard', /dev/input/event0 is a keyboard
[11:49:50.906] input device 'Logitech USB Optical Mouse', /dev/input/event1 is tagged by udev as: Mouse
[11:49:50.906] Device 'Logitech USB Optical Mouse' set to 1000 DPI
[11:49:50.906] input device 'Logitech USB Optical Mouse', /dev/input/event1 is a pointer caps
[11:49:51.123] EGL version: 1.4 (DRI2)
[11:49:51.123] EGL vendor: Mesa Project
[11:49:51.123] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 
[11:49:51.123] EGL extensions: EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import
               EGL_KHR_create_context EGL_KHR_get_all_proc_addresses
               EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_image
               EGL_KHR_image_base EGL_KHR_image_pixmap
               EGL_KHR_surfaceless_context EGL_MESA_configless_context
               EGL_MESA_drm_image EGL_MESA_image_dma_buf_export
               EGL_WL_bind_wayland_display
[11:49:51.124] GL version: OpenGL ES 2.0 Mesa 11.0.2
[11:49:51.124] GLSL version: OpenGL ES GLSL ES 1.0.16
[11:49:51.124] GL vendor: Broadcom
[11:49:51.124] GL renderer: Gallium 0.4 on VC4
[11:49:51.124] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_format_BGRA8888
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
               GL_OES_element_index_uint GL_OES_fbo_render_mipmap
               GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8
               GL_OES_texture_3D GL_OES_texture_npot GL_OES_EGL_image
               GL_OES_depth_texture GL_OES_packed_depth_stencil
               GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary
               GL_APPLE_texture_max_level GL_EXT_discard_framebuffer
               GL_EXT_read_format_bgra GL_NV_fbo_color_attachments
               GL_OES_EGL_image_external GL_OES_EGL_sync
               GL_OES_vertex_array_object GL_EXT_unpack_subimage
               GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth
               GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers
               GL_EXT_map_buffer_range GL_OES_surfaceless_context
               GL_EXT_separate_shader_objects GL_KHR_context_flush_control
[11:49:51.125] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[11:49:51.125] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 0
[11:49:51.126] Failed to initialize backlight
[11:49:51.126] EDID data 'DEL', 'DELL P2311H', 'PT0PV1354L1L'
[11:49:51.127] Output HDMI-A-1, (connector 19, crtc 28)
               mode [email protected], preferred, current
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected]
               mode [email protected], preferred
[11:49:51.128] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
[11:49:51.131] Loading module '/usr/lib/arm-linux-gnueabihf/weston/desktop-shell.so'
[11:49:51.135] launching '/usr/lib/weston/weston-keyboard'
[11:49:51.138] launching '/usr/lib/weston/weston-desktop-shell'
ERROR loading icon from file '/usr/share/icons/gnome/24x24/apps/utilities-terminal.png', error: 'file not found'
Segmentation fault
child 1129 exited
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.