Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2329658imm; Fri, 7 Sep 2018 14:46:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYcfClRk642MQTWJ7oSaCDkPsuMo4v/YGYPTb8WPlOyGL7TCCTkttZvmnQutP7Et7eJlLAH X-Received: by 2002:a17:902:5481:: with SMTP id e1-v6mr10086022pli.309.1536356812737; Fri, 07 Sep 2018 14:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356812; cv=none; d=google.com; s=arc-20160816; b=KSod5SyyDQKisXN8a/RmR+NuQm1bcXxLdksRcMBns5DxbPll4WIOtxfD6c4bb9OQui RNpU80GMrSebrgJVRsjyIC6OmjnsT0Aq8gkC5lSLujSWbj3G2vde933XZfbB/9vc12Kn WrzQA9qiBinVEt2gyTnjOnk1XURexHDK+hnaREmjUckjrM6M3+u8cq+5EWtu8e9FxLjH KOtXTDhUspcMsvJCKta7XTsXrTiEtCX9tC/6AXzbLbKeYqbw+qCEIrddHYcm3zGCYEYO qpSzl6AHXVnASVzs6euXsLtKE9uOKMY7nDX0TRDaylWGYkS3uwxVQK1atwqPMxuoM0cD bAfg== 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=AUOYLdmXuVhljYFYd9TWsXAYeKqPdII2a5gmxdSDjdc=; b=gD/74LdqdsXHwjNIIclguVpCsrBIx7C6V5BCKRXWbRPGCFs0XheXcKtZ5BPygxxkAr 9KdfPOi2q8QQQJVcPln2Sd8P1rUq8d8iM+hTKVUhG55PE5/kDACPOaQWL3I9UOa6ONSe gVP75r5bzfIA612VRNTSlMbczmBziRk/Cs1ONGiyciLv/w4PjHp+VFJAkF+XG8WzIiXB 1SANPRpbvBdQbg22p4mjLRjVlWPg8HR+nRxYheetNSLt6WO2Q0Url96ivgFvn2EuaK7i I9+DncQfzaHrHhE8Wb09G0F2AfcTVe/o5Z0dq53AAw+TSBQFLpzN8qEa5eU3nT0WLzPX aEDQ== 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 m21-v6si9720510pgh.664.2018.09.07.14.46.37; Fri, 07 Sep 2018 14:46:52 -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 S1731019AbeIHC1i (ORCPT + 99 others); Fri, 7 Sep 2018 22:27:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57826 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbeIHC1h (ORCPT ); Fri, 7 Sep 2018 22:27:37 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9860E100B; Fri, 7 Sep 2018 21:44:41 +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 3.18 27/29] udlfb: set optimal write delay Date: Fri, 7 Sep 2018 23:10:48 +0200 Message-Id: <20180907210911.310806868@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907210909.523240901@linuxfoundation.org> References: <20180907210909.523240901@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 3.18-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 */