Skip to content

Commit 19b9971

Browse files
Mikulas Patockagregkh
authored andcommitted
udlfb: set optimal write delay
commit bb24153 upstream. The default delay 5 jiffies is too much when the kernel is compiled with HZ=100 - it results in jumpy cursor in Xwindow. In order to find out the optimal delay, I benchmarked the driver on 1280x720x30fps video. I found out that with HZ=1000, 10ms is acceptable, but with HZ=250 or HZ=300, we need 4ms, so that the video is played without any frame skips. This patch changes the delay to this value. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d0f2eb3 commit 19b9971

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/video/udlfb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct dlfb_data {
8888
#define MIN_RAW_PIX_BYTES 2
8989
#define MIN_RAW_CMD_BYTES (RAW_HEADER_BYTES + MIN_RAW_PIX_BYTES)
9090

91-
#define DL_DEFIO_WRITE_DELAY 5 /* fb_deferred_io.delay in jiffies */
91+
#define DL_DEFIO_WRITE_DELAY msecs_to_jiffies(HZ <= 300 ? 4 : 10) /* optimal value for 720p video */
9292
#define DL_DEFIO_WRITE_DISABLE (HZ*60) /* "disable" with long delay */
9393

9494
/* remove these once align.h patch is taken into kernel */

0 commit comments

Comments
 (0)