Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2327228imm; Fri, 7 Sep 2018 14:44:07 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbw/DIIqB1BClznnbPQOTm6pbyONXuKDkDNa/Wa9t8Jt2hbM9/k/OIC5y5u9ZieyUN4xhY4 X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr10846319pfj.9.1536356647889; Fri, 07 Sep 2018 14:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356647; cv=none; d=google.com; s=arc-20160816; b=RiCfDrxRRBzfylS28ZMZlwGP2aTNspHDidFrRkslYAryV4qpVi2qMiC99s42SIhz16 AwV6atIWHUINFeAEpYWMzzXYK9QRfb+5jWSgGl5X5/APJCC3s7w37Gk+BkhJZA0xpvfW HX0+7kP4WZKI34aWhGg0sSqb0h+V0nLJNmS3eTUvhYk3iLRDVFN4a/VdMMNGMbTPqH7A 1pZE1Bt/vMZQP/lPlfrW4FSytIQ7WL25ayPY4XISaDsGJot1Htm81Gj/BkXNK4BOC1pA LAMOIbZnqVykEQoIIPsroaEdT5aJ+wUWl24KNu+bI4AbTuOBg8JVfl1MCeQqPpm791JD 5fpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from; bh=8jMFUKbBs9TF3BmwDeD5kxH6P5u23OyVJaynbzp66Zs=; b=JYU+SANxZSVoELMfmflV/Jb39c5YA9sr66c35olFET7I1vws6yx9D02U+5tZRogSXS FlnEm1RNfDKmkoDDO4HzL7SpJeEfCiDwSYFOE17T5974/aMKioS8YLtLx1G5BNU5lGIP q/1cm6YYdbNMzDVGBRjNxR1Eg6xfcY0+G3r5q6aqwmaxsJcEj+OrKpRwe8sevLB7zxMb 6uocQ4U+pk687Y+OhFpHxcOPdwCYavaoO9S/wqdKq9yQOm7Y2Y1tWWuhSTELQ4EG8Z2m lFMsn3Y08ubhCOH1DCLEoQojAsoaxoNaFxYOuNxUx3V8bz39b4xprymMfpbVGacuWE+1 qpFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si10161792pgl.554.2018.09.07.14.43.52; Fri, 07 Sep 2018 14:44:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730582AbeIHCZU (ORCPT + 99 others); Fri, 7 Sep 2018 22:25:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56510 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbeIHCZT (ORCPT ); Fri, 7 Sep 2018 22:25:19 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CE194BBF; Fri, 7 Sep 2018 21:42:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Bartlomiej Zolnierkiewicz Subject: [PATCH 4.4 41/47] udlfb: set optimal write delay Date: Fri, 7 Sep 2018 23:10:37 +0200 Message-Id: <20180907210908.862095955@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907210904.607934824@linuxfoundation.org> References: <20180907210904.607934824@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikulas Patocka 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 Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- include/video/udlfb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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 */