Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1885245ybb; Fri, 29 Mar 2019 13:23:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRTgn28pR7tZnfr6Be6deZZVzOXhkuqnCDIyQH3IgUacAzyktan/1slaBJayikYNppvMVu X-Received: by 2002:a17:902:7081:: with SMTP id z1mr9816647plk.252.1553891031837; Fri, 29 Mar 2019 13:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553891031; cv=none; d=google.com; s=arc-20160816; b=q6DvvJDi1eyNeR1KyK7YIAtba9RKqqu3rtWAVFlRw3p3WIKs8UnOBu3fKt6JWWnJjf Dhhbr2E3932VtPL9IVAz+fJ8yaTTg/8DNovnBNyD95NQQfBRklWymkXuqYdiwT2TrPJn 4iD+gKTb8dfqRBZeKoP9G2v0pcjrgX9ml2CE+0AHQz/T92tcoyUQumw44T8dqVvoGpWU PRgToVaOfrIS8AXTGxyjaSYxRFQtFf3V1Z4QtrfqIswtOCwHz8dX+lecT+iwGLK4vjz/ UlELE5NslSVjhzcwGj4rCGt+QKJzjyC+I9NWvDYe3wXS+I0DltYWWp+wcI1tl9+pM0zf IfMw== 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:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=ZVa93lc54p+dAtqDWcSjhbGdwjEy/zigmZzG0JatSVY=; b=VFEjIIuGFLp3rzxH5f7B2W4+5sYPWhNBF09JamQsTOIztCCP2CYS07ePNsUVID36Uj SJY5kM0qdXF312yw+TBFe5GBvPi38rDcFX7yEIZLwILViE9mQq4liU06xg/g5CTZFRp5 i3HVRL4tciIVMycj04TKNTqK2rrN5Jfr3VVt9zCG1eElFOknDgwPHc64K0DqXR3fe0Ij rSrxgRHBFZSR3lM0Kkd86Q4CX+CxKa0zLsWQqJE3EqKI3lpM3DbrVw37gwkuKv4aRdhj Zsro83X0jhxD+YpCtBLzcK6/rjh0WS6jchXS2CNXmQGIbcvKZZdVgMphKOMb7WC1C4OD GSKw== 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 t6si2563609pgt.476.2019.03.29.13.23.35; Fri, 29 Mar 2019 13:23:51 -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 S1730114AbfC2UVn (ORCPT + 99 others); Fri, 29 Mar 2019 16:21:43 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38447 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730094AbfC2UVn (ORCPT ); Fri, 29 Mar 2019 16:21:43 -0400 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1C9CEC0003; Fri, 29 Mar 2019 20:21:38 +0000 (UTC) Message-ID: <22030c6eab5b054290ccce433e9a30d27af09c2c.camel@bootlin.com> Subject: Re: [PATCH v2 1/2] drm/file: Rehabilitate the firstopen hook for non-legacy drivers From: Paul Kocialkowski To: Daniel Stone , Eric Anholt Cc: Daniel Vetter , dri-devel , Linux Kernel Mailing List , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Eben Upton , Thomas Petazzoni Date: Fri, 29 Mar 2019 21:21:37 +0100 In-Reply-To: References: <20190320154809.14823-1-paul.kocialkowski@bootlin.com> <20190320154809.14823-2-paul.kocialkowski@bootlin.com> <87zhpph4c2.fsf@anholt.net> <82618ee8c2a2380a62b1fb894e5c35c602e20f3d.camel@bootlin.com> <20190328185307.GZ2665@phenom.ffwll.local> <5ed7c5f361bca47d3f9771f9ed27e28e2fccb179.camel@bootlin.com> <20190329152502.GO2665@phenom.ffwll.local> <901ea65c770c80e22c69032affe3b1a22652b608.camel@bootlin.com> <87r2appmz2.fsf@anholt.net> Organization: Bootlin Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, 2019-03-29 at 18:42 +0000, Daniel Stone wrote: > Hi, > > On Fri, 29 Mar 2019 at 18:14, Eric Anholt wrote: > > Paul Kocialkowski writes: > > > I'm not totally convinced that it's okay to have a delay outside of > > > init/enumeration, even if it's a smaller delay. > > > > You'll have non-dumb buffers created during GL context creation, so > > early in xserver or other KMS-and-GL-using application init anyway. > > Seems like a perfectly fine plan to me. > > Yeah. The alternative is doing it once when Plymouth starts, and then > maybe again when Weston/GNOME/Xorg/... starts, which isn't really > ideal (or maybe even udev helpers). Doing it on probe also complicates > profiling startup for those: if GL context or surface creation takes a > long time, that's easy to reason about. If opening an FD takes ages, > that makes figuring out why stuff is slow a lot more complicated. This > used to happen with RPM resume for PCI devices to read the device ID & > revision, which is why we now have an API that persists that to avoid > the delay. Sounds like we have a plan then, I'll spin up a new series allocating the binner BO at the first non-dumb BO alloc. Thanks for your input! > Sorry this feedback is coming quite late into development. The feedback is definitely quite welcome! I tried a few things that didn't pan out before using firstopen/lastclose and it's really interesting to refine the implementation based on the shortcomings of previous ideas. Cheers, Paul -- Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com