From 90e6f7dd37abaec9d95f89ce51c6cf72b62ab707 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 3 Jan 2016 17:49:51 +0100 Subject: [PATCH] fbaccel: add debug code in mark() for hard cases Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/46bff48d0c3adc9ee45e75c4e64d10453b17dcca Author: Stefan Seyfried Date: 2016-01-03 (Sun, 03 Jan 2016) --- src/driver/fbaccel.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/driver/fbaccel.cpp b/src/driver/fbaccel.cpp index 51ec943cd..cab2efc34 100644 --- a/src/driver/fbaccel.cpp +++ b/src/driver/fbaccel.cpp @@ -978,6 +978,18 @@ void CFbAccel::mark(int xs, int ys, int xe, int ye) else to_blit.ye = ye; } +#if 0 + /* debug code that kills neutrino right away if the blit area is invalid + * only enable this for creating a coredumo for debugging */ + fb_var_screeninfo s; + if (ioctl(fb->fd, FBIOGET_VSCREENINFO, &s) == -1) + perror("CFbAccel "); + if ((xe > s.xres) || (ye > s.yres)) { + fprintf(stderr, "CFbAccel::mark: values out of range xe:%d ye:%d\n", xe, ye); + int *kill = NULL; + *kill = 1; /* oh my */ + } +#endif } #else void CFbAccel::mark(int, int, int, int)