summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-07-25 15:41:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-09 20:07:56 +0200
commit6f2f65ee027b305db5dc2fe0e3ccb6f34766e17d (patch)
tree539c052c7c34402f18ed3f15b4741affbd58e2e8 /include
parent76391112d8abeadfa8641b38c2917170fea8520c (diff)
downloadlinux-stable-6f2f65ee027b305db5dc2fe0e3ccb6f34766e17d.tar.gz
linux-stable-6f2f65ee027b305db5dc2fe0e3ccb6f34766e17d.tar.bz2
linux-stable-6f2f65ee027b305db5dc2fe0e3ccb6f34766e17d.zip
udlfb: set optimal write delay
commit bb24153a3f13dd0dbc1f8055ad97fe346d598f66 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 <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/video/udlfb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/video/udlfb.h b/include/video/udlfb.h
index f9466fa54ba4..2ad9a6d37ff4 100644
--- a/include/video/udlfb.h
+++ b/include/video/udlfb.h
@@ -87,7 +87,7 @@ struct dlfb_data {
#define MIN_RAW_PIX_BYTES 2
#define MIN_RAW_CMD_BYTES (RAW_HEADER_BYTES + MIN_RAW_PIX_BYTES)
-#define DL_DEFIO_WRITE_DELAY 5 /* fb_deferred_io.delay in jiffies */
+#define DL_DEFIO_WRITE_DELAY msecs_to_jiffies(HZ <= 300 ? 4 : 10) /* optimal value for 720p video */
#define DL_DEFIO_WRITE_DISABLE (HZ*60) /* "disable" with long delay */
/* remove these once align.h patch is taken into kernel */