Received: by 2002:ac8:6d01:0:b0:423:7e07:f8e4 with SMTP id o1csp6627423qtt; Mon, 18 Dec 2023 01:57:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEa6AXs2E8BeEQrthMFPiIgum+EprHv4RZJAOiTcTnW5kbXV0eHparFJXWNHyTEoLrPxV76 X-Received: by 2002:a05:622a:5c8:b0:425:4042:f45b with SMTP id d8-20020a05622a05c800b004254042f45bmr26067983qtb.63.1702893478772; Mon, 18 Dec 2023 01:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702893478; cv=none; d=google.com; s=arc-20160816; b=VW0s2OWxbeag77b2j7mH30R38G/FTdosJ9LbidS7p05zJ8DYnMp0VKlvF14Gp/irXb 0pO7kQDjky952cCyfn+78QgDWb8SAf2ZaxckD9QX223j7rAnEabMuZHPCjdhovMvHrRo /sxgkuwXBuQpc1KroHq56n+2HjUb/JbSIyOEzGyW7PZW3YtD3tV+LZlrpMsfzbXRh3go IxJtZkng7rhqlA5h4YnpnPdlGLtQj5RBIPvTFbapbt8pU0aBXdLDL3+jvcQhYiD7M+vf UOwy0wjEZkSOGd7K77cZtBWXcwfCkXYfXvpoj2Gj+DEgOdWh38iPE19oEbgrXw+qCyzR D0tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :dkim-signature:dkim-signature:from; bh=b9B/dJhmZ1FQU1Ml+AeFKF1QKF+vHETnd8Coz1FtEOs=; fh=QzVGpuKq3ZJB4Va8FTyQ7L3YT0NyPMKiPm002x8leHU=; b=Hbfz7akN2LWIpi39b9aSmnk8UeTbqEodkkKNRdcARDoliKOoNsF8wHm55QzO9LjcPg o8Hh5Q7gyc0EPYuwdVEJOzyJU4aRSkalXXxdtlwSfE3SkjnvTUIxHwGrvGsQmFZQRMNB u7sLF+jtvzZ0IxfPBz0S4OoGVnZxroMv6wEXKSe2+dUucpPN2Dv/NxjrTb5IG3a4fTWh UBf+3S7/yEILZceUWmhuwJLvNwOD1ewGI3FyPBfsq/qkv/K9DJs3Do9rYJGmPnSRoY61 kpSxf7DpyOVunQ7QQG64K+sFU8wO38LsSlxROdSsYBKHBieon4sctvwF4YDl2t9pqVLA NU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qJt0FVa+; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fb24-20020a05622a481800b00423e4365c05si14116644qtb.409.2023.12.18.01.57.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:57:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qJt0FVa+; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9A4111C209BF for ; Mon, 18 Dec 2023 09:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 858E1125D3; Mon, 18 Dec 2023 09:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qJt0FVa+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iULYsgGL" X-Original-To: linux-kernel@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B907125A3; Mon, 18 Dec 2023 09:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702893460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=b9B/dJhmZ1FQU1Ml+AeFKF1QKF+vHETnd8Coz1FtEOs=; b=qJt0FVa+T5xF0c23SDHgq6oH8efKsuOHIpvSGOh5PZh7sS18QYv9sYs+rbCl2hUlt3bKmB vMKNOYTXB0HhUvBInth1H/Dz4ip7T0Mh7Ta3Wwe6WMM4s7ZXcWm3IJShUMtQ9wX1vReAwD 8Z5QG2XWpBSiVwGStwFmROYr7j//Lpb6RlSmiXamssiwsr+Ike4vHqKWhbJIVukrL1vkvO srdJ1GQEVfHoUUvmpvvPF3r3ohT78Cx69DJ+dR7Exc/R/O5er64Z7Ufh8cw/Ana6aFfZob UElghQGblGLF+FUvqxBzbjl7GHC4ACR3fw1xGHR06RcgiZcDh+w9M2g/MRMx+Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702893460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=b9B/dJhmZ1FQU1Ml+AeFKF1QKF+vHETnd8Coz1FtEOs=; b=iULYsgGLAjpNxsywH3DLqbO9R6yfT8uCby5NXhu/LjersaoceyLj+bMy8mKBmPQYycXE37 onivXZO+3yellrBg== To: Jaya Kumar , Daniel Vetter , Helge Deller , Antonino Daplas , Andrew Morton , Paul Mundt , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: bigeasy@linutronix.de, Nam Cao Subject: [PATCH 0/2] fix LCD diplays sporadically not work Date: Mon, 18 Dec 2023 10:57:29 +0100 Message-Id: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, While working with a framebuffer displays, I noticed that the displays sporadically do not show the image as I expect. After investigation: this is because my devices use deferred IO, and by closing the framebuffers, all pending deferred IO get cancelled. This causes the image I sent to the devices to just vanish. Using fsync() does not always help, because the driver's implementation of fsync() does not guarantee that all pending work is flushed on return. This series solves the problem by flush the workqueue in .release(). Also flush the workqueue in .fsync(), as it is supposed to do. Nam Cao (2): fb: flush deferred work in fb_deferred_io_fsync() fb: flush deferred IO before closing drivers/video/fbdev/core/fb_defio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --=20 2.39.2