rpi: avoid vc_dispmanx_set_wl_buffer_in_use without EGL
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 22 Nov 2013 15:30:39 +0000 (17:30 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 28 Nov 2013 06:49:31 +0000 (22:49 -0800)
commitd5fbfb2e3587629497286fe0a715dcc8f6a7e807
treebb86f47259eec3b301cec1e8198f5a07470b1145
parent234c5242ab9680f62cde775808f7f9036ce0d262
rpi: avoid vc_dispmanx_set_wl_buffer_in_use without EGL

The symbol is needed only for the EGL buffer path. If --disable-egl is
given to ./configure, there is no need for it, so fix it to actually not
look for that symbol needlessly.

This should fix the runtime error:

Failed to load module: .../rpi-backend.so: undefined symbol:
vc_dispmanx_set_wl_buffer_in_use

when you use --disable-egl and do not have a recent enough
libraspberrypi package (/opt/vc, a.k.a userland.git) that would provide
vc_dispmanx_set_wl_buffer_in_use. Apparently no released version of
userland yet provides this.

The calls are organized into two helper functions to avoid a boolean
argument, and put the #ifdefs away from the main parts of the code.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
src/rpi-renderer.c