compositor-fbdev: Instead of less than 1 Hz use default refresh rate
authorOliver Smith <ollieparanoid@bitmessage.ch>
Mon, 17 Apr 2017 11:11:00 +0000 (11:11 +0000)
committerQuentin Glidic <sardemff7+git@sardemff7.net>
Tue, 23 May 2017 09:30:27 +0000 (11:30 +0200)
commita5066e00e8fdd8775d3c784a1c0cf1a07fa6dacb
tree678e45e151a5ec4cee91d52d646083ac55b81452
parent47bbdc72967faf1cca2ca8b8bbeefab4fee67d95
compositor-fbdev: Instead of less than 1 Hz use default refresh rate

I ran Weston on a Nexus 4 mobile phone, with a native GNU/Linux userland,
and the latest Android kernel for that device from LineageOS [1].

calculate_refresh_rate() returned 1 (mHz), which gets rounded to 0 Hz later
and results in nothing being drawn to the screen.

This patch makes sure, that there is at least a refresh rate of 1 Hz, because
it returns the default refresh rate of 60 Hz otherwise.

[1]: https://github.com/LineageOS/lge-kernel-mako

Signed-off-by: Oliver Smith <ollieparanoid@bitmessage.ch>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
libweston/compositor-fbdev.c