UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
775 Views
Registered: ‎10-19-2017

libGL error: unable to load driver: xilinx_drm_dri.so

Jump to solution

Hi all,

 

I'm having a problem running a Qt application on my zcu102. I'm getting the following errors launching a demo application I've put together:

 

# ./demo
libGL error: unable to load driver: xilinx_drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: xilinx_drm

 

Now I searched and found the same question was asked by a gentleman earlier last month, but there was actually no resolution listed: https://forums.xilinx.com/t5/Embedded-Linux/unabe-to-load-driver-xilinx-drm-dri-so/td-p/849308

 

Here is my configuration: I'm running essentially on the 2017.4 release. Which means I'm on Linux 4.9.0. I have enabled DRM in my kernel configuration. Here is a grep from .config with all DRM entries:

 

$ grep DRM .config
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
# CONFIG_DRM_I2C_ADV7511_LEGACY is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_HDLCD is not set
# CONFIG_DRM_MALI_DISPLAY is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
# CONFIG_DRM_VIRTIO_GPU is not set
CONFIG_DRM_BRIDGE=y
# 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_XILINX=y
CONFIG_DRM_XILINX_DP=y
# CONFIG_DRM_XILINX_DP_DEBUG_FS is not set
CONFIG_DRM_XILINX_DP_SUB=y
# CONFIG_DRM_XILINX_DP_SUB_DEBUG_FS is not set
# CONFIG_DRM_XILINX_MIPI_DSI is not set
CONFIG_DRM_XILINX_SDI=y
# CONFIG_DRM_ZOCL is not set
# CONFIG_DRM_XYLON is not set
# CONFIG_DRM_ARCPGU is not set
# CONFIG_DRM_HISI_KIRIN is not set
# CONFIG_DRM_LEGACY is not set
CONFIG_DRM_XILINX_HDMI=y
CONFIG_DRM_XILINX_XVMIXER=y

So based on the wiki post (http://www.wiki.xilinx.com/Xilinx+DRM+KMS+driver) regarding building the driver, I believe I've covered all of the necessary configurations to get it build. And indeed, when I build my kernel I see the DRM drivers being built, but I never see anything that produces a xilinx_drm_dri.so or anything "DRM DRI" related.

 

  CC      drivers/gpu/drm/xilinx/xilinx_drm_crtc.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_connector.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_drv.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_encoder.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_fb.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_gem.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_plane.o
  CC      drivers/gpu/drm/xilinx/xilinx_cresample.o
  CC      drivers/gpu/drm/xilinx/xilinx_osd.o
  CC      drivers/gpu/drm/xilinx/xilinx_rgb2yuv.o
  CC      drivers/gpu/drm/xilinx/xilinx_vtc.o
  LD      drivers/gpu/drm/xilinx/xilinx_drm.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_dp.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_dp_sub.o
  CC      drivers/gpu/drm/xilinx/xilinx_drm_sdi.o
  LD      drivers/gpu/drm/xilinx/built-in.o
  LD      drivers/gpu/drm/built-in.o
  LD      drivers/gpu/built-in.o
  CC      drivers/staging/xilinx/hdmi/xilinx_drm_hdmi.o
drivers/staging/xilinx/hdmi/xilinx_drm_hdmi.c: In function ‘hdcp_keys_configure’:
drivers/staging/xilinx/hdmi/xilinx_drm_hdmi.c:1745:67: warning: passing argument 3 of ‘XV_HdmiTxSs_HdcpSetKey’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   XV_HdmiTxSs_HdcpSetKey(HdmiTxSsPtr, XV_HDMITXSS_KEY_HDCP22_SRM, Hdcp22Srm);
                                                                   ^~~~~~~~~
In file included from drivers/staging/xilinx/hdmi/xilinx_drm_hdmi.c:50:0:
drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitxss.h:449:6: note: expected ‘u8 * {aka unsigned char *}’ but argument is of type ‘const u8 * {aka const unsigned char *}’
 void XV_HdmiTxSs_HdcpSetKey(XV_HdmiTxSs *InstancePtr, XV_HdmiTxSs_HdcpKeyType KeyType, u8 *KeyPtr);
      ^~~~~~~~~~~~~~~~~~~~~~
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitx.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitx_sinit.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitx_intr.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitxss.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitxss_log.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitxss_coreinit.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitxss_hdcp.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xv_hdmitx_vsif.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xvtc.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xvtc_intr.o
  CC      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx/xvtc_sinit.o
  LD      drivers/staging/xilinx/hdmi/xilinx-hdmi-tx.o
  LD      drivers/staging/xilinx/hdmi/built-in.o
  LD      drivers/staging/xilinx/built-in.o
  LD      drivers/staging/built-in.o

I did note the HDMI warnings, but I'm not using the DisplayPort right now so that shouldn't be relevant. 

 

I should also note that the kernel modules are built and installed properly, but all of the DRM stuff is built-in anyhow. I did attempt to build the DRM as modules, but hit all kinds of issues with that so I'm stilling with building it into the kernel... that's what I want anyhow.

 

Any ideas?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
974 Views
Registered: ‎10-19-2017

Re: libGL error: unable to load driver: xilinx_drm_dri.so

Jump to solution

I resolved this issue. Qt had not been cross-compiled with the -opengl es2 option. 

0 Kudos
1 Reply
Highlighted
Contributor
Contributor
975 Views
Registered: ‎10-19-2017

Re: libGL error: unable to load driver: xilinx_drm_dri.so

Jump to solution

I resolved this issue. Qt had not been cross-compiled with the -opengl es2 option. 

0 Kudos