diff options
| author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-01-17 21:15:44 -0800 | 
|---|---|---|
| committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-01-17 21:15:44 -0800 | 
| commit | ee2073d4e411555aba878277131b56f7eb562c84 (patch) | |
| tree | fe7a497b5b7853b16749748a8d6d9fa8f405e7ea | |
| parent | f9f580747bd73a6010165337514d165a0f69d879 (diff) | |
fb: require 2+ pages in fb_new()
If NUM_FB_PAGES was redefined to 1 rototiller would hang, since 1 is
insufficient for page-flipping.
| -rw-r--r-- | fb.c | 4 | 
1 files changed, 4 insertions, 0 deletions
| @@ -280,6 +280,10 @@ fb_t * fb_new(int drm_fd, uint32_t crtc_id, uint32_t *connectors, int n_connecto  	_fb_page_t	*page;  	fb_t		*fb; +	/* XXX: page-flipping is the only supported rendering model, requiring 2+ pages. */ +	if (n_pages < 2) +		return NULL; +  	fb = calloc(1, sizeof(fb_t));  	if (!fb)  		return NULL; | 
