Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8398878imu; Fri, 28 Dec 2018 17:32:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN5O0HnIgO/SXit9D51M24hVfbnLRk5RqoxZaof0wqrg7NkLbIPmLLMsuBoQO/CPWKBq4LG6 X-Received: by 2002:a17:902:32c3:: with SMTP id z61mr29584122plb.114.1546047150809; Fri, 28 Dec 2018 17:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546047150; cv=none; d=google.com; s=arc-20160816; b=YXLMFnbI+wQ2FOW/70aT9dQLeitXqYNnCIkDS1ZWWt5O6qXifG+wif51o5mHmK9TlX 7zZ3gQV/E+cI1WqHVZV6c3XUljeh65R212dHnmJVFHsnsdkWggsLdmBIEnQcbLmffV+n uEwZAFQa3cHpPqgnmibdgmB+Fh1z77rTjTRW/8K2uL/d4nVZ4RsFcii9ROQQ3RHjFGmE ZD230ex+8bgAQKQNcMi8QPBak6eFwmxCI2i6TylpSEbO03oC90GkbU0YlH8cEp7vLmTh 20b0ae/1Cb/bBxgbyk1Wg7YAnYKIi1yLBy1j3v7rl2f2+LgclPS2JGrk1sRov/UApSGK sJxg== 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=c0SmjyLYLgd4flZKkz9d6UXV3gDAGZ03PfnvEVo9ymw=; b=jsw/0ohp9ug8A+ewuUi8NMWVVw4BTPHuWiuuZmzuvu9eYmcc55Ei9gnGI7n8Bx9Q8K qoJjXLbaj6KjCsudYd0bN3aX/cAAYeUkVsxF8OF3YttaufvV1XrTZ4xeBjMirK+vwvNA 0pTjqJB3B5tYmOKT8Ov3BsgctaLgG8ftkXhKntiq/SKJGqQISfBoaO+fPHKvFa6/9an8 CtSkbnrKdZhCzmZUmp4Nidmh38Q9ZnO/1k9j6kFwZt8V8yzKap4kVNUyMA4A00rmBICZ H7GsKA8bjMVo1VyiRzlQrFGFTj41PVT6LzIDjwqxTq6MiAHwiER7QKdRPIl8RhLQzwPA 5WjA== 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 d40si23791921pla.427.2018.12.28.17.32.15; Fri, 28 Dec 2018 17:32:30 -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; 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 S1731370AbeL1PJl (ORCPT + 99 others); Fri, 28 Dec 2018 10:09:41 -0500 Received: from mail.bootlin.com ([62.4.15.54]:47131 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbeL1PJl (ORCPT ); Fri, 28 Dec 2018 10:09:41 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 13082209ED; Fri, 28 Dec 2018 16:09:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from aptenodytes (aaubervilliers-681-1-80-230.w90-88.abo.wanadoo.fr [90.88.22.230]) by mail.bootlin.com (Postfix) with ESMTPSA id C6C5C2070E; Fri, 28 Dec 2018 16:09:28 +0100 (CET) Message-ID: Subject: Re: [PATCH] drm/vc4: Allow fb modifiers early enough to fill IN_FORMATS property From: Paul Kocialkowski To: Daniel Vetter , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, David Airlie , Maxime Ripard , Thomas Petazzoni , Eben Upton Date: Fri, 28 Dec 2018 16:09:28 +0100 In-Reply-To: <20181228120848.GS9058@dvetter-linux.ger.corp.intel.com> References: <20181224122551.9912-1-paul.kocialkowski@bootlin.com> <878t0amtjf.fsf@anholt.net> <20181228120848.GS9058@dvetter-linux.ger.corp.intel.com> Organization: Bootlin Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3 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 On Fri, 2018-12-28 at 13:08 +0100, Daniel Vetter wrote: > On Thu, Dec 27, 2018 at 03:36:20PM -0800, Eric Anholt wrote: > > Paul Kocialkowski writes: > > > > > The KMS mode_config elements are currently configured in vc4_kms_load, > > > that is called after all components are binded (component_bind_all). > > > However, the CRTC component (for the Pixel Valve) needs to access the > > > allow_fb_modifiers element at bind time, when initializing its planes > > > through drm_universal_plane_init. > > > > > > This helpers checks allow_fb_modifiers to decide whether to fill the > > > IN_FORMATS property. Because allow_fb_modifiers is still set to false > > > at this point, the property is never filled and userspace cannot > > > retrieve the combination of supported formats and modifiers. > > > > > > Fix this by setting allow_fb_modifiers right after calling > > > drm_mode_config_init (which initializes the structure), before binding > > > the components of the driver. > > > > This makes me wonder if the flag could be removed and replaced with "did > > non-NULL modifiers get supplied to plane init?" I think I've tripped > > over this flag in other KMS hacking, too. > > Sounds like a good idea to me. Just setting it in plane_init should work I > think ... Yeah, we probably need to keep the flag around since it's used in various places, but we could totally have it auto-set as soon as a plane is registered with a list of modifiers. I was also thinking of allowing the core to fill-in the IN_FORMATS prop even without this flag set, which would only list formats (but not modifiers). What do you think? Cheers, Paul -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com