Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1061023imu; Thu, 20 Dec 2018 09:27:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/VJhtmElgXG6c30D/dCrutl8j4iFtNBQotZNE1fROz0SunVzCN27JwEkVSGzH2A2HK11Ue9 X-Received: by 2002:aa7:8354:: with SMTP id z20mr24772553pfm.81.1545326832851; Thu, 20 Dec 2018 09:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326832; cv=none; d=google.com; s=arc-20160816; b=nZ4fS6KvcpHRPaHC5xkiWXUm1Gxy9V9BuBNyCtoqqQezbVoEPCu/NwKblsnAgkC9aX L7f/zGZt0e0lDhPlyTL09K9eO5AJaEIAb8P7Tsijsj37MbT3J0p9fXx2XujHJaN7pPhJ +a26eq6Lj7RMRK6EgUTgZg/834YjdUqdXv860xOqfPArqtCzGrZSxOC0fl0Uw/VT6/6M 8MyMeSJudUJ3kJRi7pznJagvAh65Z9zSQwQBTlgETA92uEExDq7P7BnvWFHSzY7bCp5D rvMTjIdCc+DusGDCKuQ670fl1epDfljkqV9mDltfJNJIoPMulpDrq+B98zaVBH0gSpun eRRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bSA5gs/ZifaYC4ma/nfmRciTJmrE2PXhZpn0M4qEG3s=; b=Q8ggqXq3yFXCZhCfR+Fr4LKbeZDHEAhEge+7QMke1asi8TVNlGRlpBXAVK4JD3QNuR o4mphr8lmBQUnkKv7+EdxtwKj6CDO/bAp0h0ve7ECXrgx4rWEXeqdM4xVM3rqGn4vrxS BdqLC4VCyviBhdnseB+cCJRGSdP6qUy92nCWYMQ/z/HCWLi6X0rIm4SK/ApdgVKGyfUu k7CpQBfBceWOzWnPJPG7x3isLuo37JVttf/suR7DAsqSGjnomyt1hrEITuLDqecBlUlu RrMl8Uq6G0xLzYQqcP0nRXAtD1aiQ9BBWOPJFUachbLmgDXo5GDkg2nCWPcQxodhY52y 2xHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=ZccyEPbJ; 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 b1si19258012plc.332.2018.12.20.09.26.56; Thu, 20 Dec 2018 09:27:12 -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=pass header.i=@ffwll.ch header.s=google header.b=ZccyEPbJ; 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 S2387564AbeLTRYz (ORCPT + 99 others); Thu, 20 Dec 2018 12:24:55 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:40783 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730172AbeLTRYz (ORCPT ); Thu, 20 Dec 2018 12:24:55 -0500 Received: by mail-io1-f65.google.com with SMTP id a11so668313ioq.7 for ; Thu, 20 Dec 2018 09:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bSA5gs/ZifaYC4ma/nfmRciTJmrE2PXhZpn0M4qEG3s=; b=ZccyEPbJCJ8z8RM1UJ4Gb1HiSb0QY1Kd4BZB2LpCo+ykbwcuBC4bOO3eUscfWDpfjP 8w+OKISwii9GJi1f+c/jb9fEyGci6XfG6IXbuAap9a6jsmqlMUxY1iTU3D0JprZTk2vn SuuCP/Tz1t0GIwwb68U2oHBIGoOYYXGtee4WQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bSA5gs/ZifaYC4ma/nfmRciTJmrE2PXhZpn0M4qEG3s=; b=lQeIKZhTxpbDmOFNH932oxjbvgbvL9CNUwS/235UB/jcfwjYkfLtzrMF+KPMEqunbc cmTDt7GgMdgnCsjUvE5pdrR0kvdi9p6p0JECd9k3LadPjT1GWhE/oQ3wr6LLd1Ul2DTK xRvplsgy4BGGTBiXFTwE5/Ip9Q20ersZgCgz46r0LbEP83kL9G7hgDqYSSEFDJIMoiB/ XgqFREGPlyEVdcpfSB72AKV+nB6DYP+ehJUomSUKZOi6HXN/s12g/hki5rru2CLQfHwJ ZsKYx7ylBl3MsKZR5i0aL4cXrvoZ+6y406Apee358Kg0dzkEE2IN4RjZNGy1SMR+9bHc 6Lzw== X-Gm-Message-State: AA+aEWZT4h2PtX3yjmM7UMouCELNTh0bLK1UopAnW60C4PN1Ekp7rjB0 Dj18tHqGPb1tp9vPJDa9ovP/x8fzgMqHmfvoZZTQYg== X-Received: by 2002:a6b:4001:: with SMTP id k1mr23302153ioa.34.1545326694110; Thu, 20 Dec 2018 09:24:54 -0800 (PST) MIME-Version: 1.0 References: <20181123215326.14274-1-helen.koike@collabora.com> <20181127133418.GT9144@intel.com> <6aa39654-6949-88b3-b949-b338d915ffd2@collabora.com> <0a0a35bf-69e4-8dcd-46fc-7053081480d5@collabora.com> In-Reply-To: From: Daniel Vetter Date: Thu, 20 Dec 2018 18:24:42 +0100 Message-ID: Subject: Re: [PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE To: =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: Alex Deucher , dnicoara@chromium.org, =?UTF-8?Q?St=C3=A9phane_Marchesin?= , Sean Paul , Alexandros Frantzis , David Airlie , Linux Kernel Mailing List , dri-devel , Tomasz Figa , Gustavo Padovan , Helen Koike , kernel@collabora.com, "Kazlauskas, Nicholas" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2018 at 6:16 PM Michel D=C3=A4nzer wro= te: > > On 2018-12-20 6:09 p.m., Daniel Vetter wrote: > > On Thu, Dec 20, 2018 at 6:03 PM Alex Deucher wr= ote: > >> 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. I guess possible, depending upon how much you want to type. The problem is: - stopping the current commit before it gets too far - without causing stutter in itself (we don't want a stream of cursor updates to livelock pageflips) - re-running atomic_check on the new combined commit (which I guess means you somehow need a clean starting state again and apply both updates, which currently isn't possible) - push it out as a commit Alternatively is some fudging in the backend like we do now have some support for for async plane updates. We'd need the full trickery with a dedicated async_update_check though, at least on i915 we need to (in some cases) make sure the gamma ramp is monotonic and stuff like that. Or we just give up on commone semantics on this and have legacy gamma updates bypass atomic in dc somehow (which would be the unstructured version of the above). -Daniel --=20 Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch