From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1970EC433FB for ; Thu, 16 Jul 2020 09:43:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8FCA2071B for ; Thu, 16 Jul 2020 09:43:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8FCA2071B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=v3.sk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92A7B6EC3B; Thu, 16 Jul 2020 09:42:49 +0000 (UTC) Received: from v6.sk (v6.sk [167.172.42.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id E99656E575 for ; Wed, 15 Jul 2020 07:30:18 +0000 (UTC) Received: from localhost (v6.sk [IPv6:::1]) by v6.sk (Postfix) with ESMTP id 8175060D19; Wed, 15 Jul 2020 07:30:15 +0000 (UTC) Date: Wed, 15 Jul 2020 09:30:10 +0200 From: Lubomir Rintel To: Noralf =?iso-8859-1?Q?Tr=F8nnes?= Subject: Re: [PATCH v3 0/6] Generic USB Display driver Message-ID: <20200715073010.GA41046@demiurge.local> References: <20200529175643.46094-1-noralf@tronnes.org> <20200709163235.360054-1-lkundrak@v3.sk> <1280ec51-7528-b993-3110-f6c28e98832c@tronnes.org> <20200714174008.16272.qmail@stuge.se> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Thu, 16 Jul 2020 09:42:42 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: balbi@kernel.org, linux-usb@vger.kernel.org, Peter Stuge , dri-devel@lists.freedesktop.org, sam@ravnborg.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jul 14, 2020 at 09:03:14PM +0200, Noralf Tr=F8nnes wrote: > = > = > Den 14.07.2020 19.40, skrev Peter Stuge: > > Hi Noralf, > > = > > Noralf Tr=F8nnes wrote: > >> I would like to keep the SET_BUFFER request since it will serve as a > >> syncing point between the host and the device. I'm no USB expert but I > >> assume that a bulk transfer can fail halfway through and result in the > >> next update starting where the previous one failed and thus writing > >> beyond the end of the display buffer. > > = > > Transfers either succeed completely (possibly after many retries), > > time out (after zero or more transfered bytes) or fail catastrophically > > (e.g. from device disconnect). > > = > > In all cases, the driver on the host knows/has available how many bytes > > were successfully transfered. > > = > = > I was thinking about the device, that it could get out of sync. Let's > say the host sends a 1k framebuffer and half of it gets transferred and > the rest fails for some reason. Lubomir's MCU implementation has an > endpoint max size of 64 bytes and a callback is called for each packet. Note that 64 bytes was chosen totally arbitrarily, without any thought. Perhaps the full frame of 1024 bytes would work just fine. I'm not familiar with USB at all. > If the 1k transfer fails at some point, will the device be able to > detect this and know that the next time the rx callback is called that > this is the start of a new framebuffer update? > = > Noralf. Lubo _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel