From: Florian Echtler Date: Mon, 25 May 2015 12:04:13 +0000 (-0300) Subject: [media] reduce poll interval to allow full 60 FPS framerate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca27ab31597c9e3c75f0dd46d85087c0627d748c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] reduce poll interval to allow full 60 FPS framerate The SUR40 hardware can deliver images at up to 60 FPS; at full USB2 bandwidth, one raw frame will take about 11 ms to transmit. If the poll interval is above 5 ms, fully handling one frame will take longer than 16 ms and the overall frame rate will drop below 60 FPS. To get the full frame rate without blocking all the time and still allowing for a bit of timing jitter, we reduce the poll interval to 4 ms. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index a24eba5ea843..e707b8dce8ed 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -125,7 +125,7 @@ struct sur40_image_header { #define VIDEO_PACKET_SIZE 16384 /* polling interval (ms) */ -#define POLL_INTERVAL 10 +#define POLL_INTERVAL 4 /* maximum number of contacts FIXME: this is a guess? */ #define MAX_CONTACTS 64