Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1154207imu; Fri, 21 Dec 2018 13:38:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN75XJjhRZvhR63BQyA3ZdPr+BjdvAyp5VY1ROVBXelxZKgw6xOdjYNEeyBW5RQcM0pDC702 X-Received: by 2002:a63:d655:: with SMTP id d21mr4002411pgj.280.1545428316346; Fri, 21 Dec 2018 13:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545428316; cv=none; d=google.com; s=arc-20160816; b=DYhlF2Um3ywtipcsF1I2b92NpJIp1HE1WumI6SAF3v3aFaYfvNjmiI6JYK3JeBx8gp Yh7AfLrfIOlv3q8a66RML3jTMGJOPvHPkzba2q2Re5Vf1+n/ynvNESmcE/zFWidxLyM8 qRRxlKg72+62onSI2K6pWm1+063mQBKzt9KLDcGhqdgtlfajxU/tdtYzePhaHf++YWZb /9nLoEJAyFfXk68uS3ArS7UsrV8hN79UbvyNlFvA+Hfg+H0Xx3D6HMa6bBziNqi3CdwD ZCF5P1x33nAa6uFML64IIOPxrvdT45Mk2Cid7NeZR3N1XEBtX54e8rL4Ul9Ffj+ysgCf i2mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KIMbLSZDM+OnARH9pcTusJfIrW+7RdQTCXOT5ZWrBy0=; b=T3ArAK2eh/hcw0Kbe1PU73KUBveYTsXFBbs3yNzoDTfXLyXkQXyX0s1sjhQk7bNPwK t94eeALpi510s19CMG+lpmac4GXduo7GcGYGswrTXEmPlJOrcmoteqMjv6S8pB9ffeZ7 xKep6ddj/C1tNuLk0GhVROaGFMiWBKfUFprTaOLRPbqF0+a83t/3Q+WQuXCoRHyGofr7 F+fXlIG/eWNxi8hODeJ7FAN5x8Un2h1myYTho4o8sbYWF2cxJWm/gb+BBfGTmwilzJ2a mTnSpj5JARckkmDwLlvqMs3Yw3HHjPLIm0uiJ+fyZCWfyy/59AHpHlcL0+ZErA4HiEf/ L/9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=lwzzkMxr; 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 v9si22200524pgo.23.2018.12.21.13.38.21; Fri, 21 Dec 2018 13:38:36 -0800 (PST) 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; dkim=fail header.i=@ffwll.ch header.s=google header.b=lwzzkMxr; 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 S2390627AbeLUN0n (ORCPT + 99 others); Fri, 21 Dec 2018 08:26:43 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:40061 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387909AbeLUN0n (ORCPT ); Fri, 21 Dec 2018 08:26:43 -0500 Received: by mail-ed1-f66.google.com with SMTP id g22so4659198edr.7 for ; Fri, 21 Dec 2018 05:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=KIMbLSZDM+OnARH9pcTusJfIrW+7RdQTCXOT5ZWrBy0=; b=lwzzkMxr1nATM/bD8mQ8BRogGKxeUoYx23FEhII/ubrNwOUZiSwyyEdMQZ/JCxWSTF 26kG2d/WBlvTgbR3fMRDsq5UDY8dzK+GCD9LNN/UNvaWV5N5lTviL/RRtoFg4914RmzY hYqS4VsajbNwvFDGiS4ludoTHttHqPJNQlPKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=KIMbLSZDM+OnARH9pcTusJfIrW+7RdQTCXOT5ZWrBy0=; b=b4HNYXUAMgngWw7uBIDWg9zxIHx5r1aRgJJGDsoZml9SIOfT1WdVxiuamVr9+0Bixt Optsi6iy9sENoFCfpWRSfeVtX4QZooCUYWqv08bCtrz6eFJC/j/YtHJE5OZ9o7t1Fe5Z RlL4NR1CUQt8mDky5WvrOGjOOotkVIMhFH6zBWKX7ki/JsBAHqM3K1E54pp4lScE9dpG U8POjqsVzAGYOCkD+zmUBfNZlLUeBOgHvSEFkfI/07vjeYwiVSDAtahihYc/EjK66c9c 1D3ttUvg4oQtXaYqmpsuUaXcDEKaHdT7VzaXb0Irc6CP1YpLslihiXBG7uV6zvwjW/89 IJXg== X-Gm-Message-State: AA+aEWZeHP0yXzuUH8cw8Od18/kzcLfVLplWpGvIDbaZmF366e3xLG2O Y8X2705M1GTzImE5v3jqxcht1A== X-Received: by 2002:a50:91a8:: with SMTP id g37mr2364426eda.216.1545398801563; Fri, 21 Dec 2018 05:26:41 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id y53sm6899911edd.84.2018.12.21.05.26.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Dec 2018 05:26:40 -0800 (PST) Date: Fri, 21 Dec 2018 14:26:37 +0100 From: Daniel Vetter To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: Daniel Vetter , Alex Deucher , dnicoara@chromium.org, =?iso-8859-1?Q?St=E9phane?= Marchesin , Sean Paul , Alexandros Frantzis , David Airlie , Linux Kernel Mailing List , dri-devel , Tomasz Figa , Gustavo Padovan , Helen Koike , kernel@collabora.com, "Kazlauskas, Nicholas" Subject: Re: [PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE Message-ID: <20181221132637.GR21184@phenom.ffwll.local> Mail-Followup-To: Michel =?iso-8859-1?Q?D=E4nzer?= , Alex Deucher , dnicoara@chromium.org, =?iso-8859-1?Q?St=E9phane?= Marchesin , Sean Paul , Alexandros Frantzis , David Airlie , Linux Kernel Mailing List , dri-devel , Tomasz Figa , Gustavo Padovan , Helen Koike , kernel@collabora.com, "Kazlauskas, Nicholas" References: <0a0a35bf-69e4-8dcd-46fc-7053081480d5@collabora.com> <9be83a7f-aa5f-8d8f-0486-db68e12c5feb@daenzer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9be83a7f-aa5f-8d8f-0486-db68e12c5feb@daenzer.net> X-Operating-System: Linux phenom 4.18.0-2-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 10:47:27AM +0100, Michel D?nzer wrote: > On 2018-12-20 6:16 p.m., Michel D?nzer wrote: > > On 2018-12-20 6:09 p.m., Daniel Vetter wrote: > >> On Thu, Dec 20, 2018 at 6:03 PM Alex Deucher wrote: > >>> On Thu, Dec 20, 2018 at 11:54 AM Daniel Vetter wrote: > >> > >>>> Not sure about the gamma thing since we had opposite bugs on i915 > >>>> about gamma not being vsynced and tearing terribly. Cursor is special > >>>> since it tends to be too small to notice tearing. > >>> > >>> Our cursor hw (and possibly gamma as well Nicholas? Harry?) is double > >>> buffered, so we can update it any time for the most part and the > >>> changes won't take affect until the next vupdate period. > >> > >> Hm, I guess we could make the gamma update optionally async, and let > >> drivers deal. The issue is that the current async helper stuff won't > >> cope with gamma updates (it's aimed at plane updates only, not at crtc > >> property updates). Or we get userspace to do proper atomic updates. Or > >> we do some faking in the kernel, e.g. waiting with the gamma update > >> until the next atomic update happens. But that kinda breaks > >> ->atomic_check. > > > > Would it be possible to merge gamma changes into a pending commit, if > > there is one, and create a new commit otherwise? > > > > Otherwise the atomic API just moves this same problem to be solved by > > userspace. > > Actually, I'm not sure this is even solvable in a Xorg driver. When it > gets called to update the gamma LUT: > > 1. If there's a pending atomic commit, it cannot amend that, can it? Yup, but on the kernel side we kinda have the same problem. > 2. It has no way of knowing when the next atomic commit would be > submitted e.g. for a page flip, so it kind of has to create its own > commit for the gamma update. Block handler is what I had in mind for the fallback commit, if no other commit happened meanwhile (which would need to include it). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch