Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6245596pxb; Thu, 27 Jan 2022 09:25:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMMGwXkXFCWOjztUgiJ+psB7ijN2T0u+zASQJRqNLowCfteXKzXObvdv1foD88LrawMy7y X-Received: by 2002:a17:907:a426:: with SMTP id sg38mr3744615ejc.229.1643304320411; Thu, 27 Jan 2022 09:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643304320; cv=none; d=google.com; s=arc-20160816; b=qSZM/UFKE9SsZgsY955iDl74IMz9HRVHKHqjzhc+0QjAeuUxpD5jBM47KmcKA1mihr IblGNi7h5r3zoVz4TbTZiQJe5k6FZ1WKC4dXln63c/X13v3ezwbmmdytksrBd31wqe+4 VSEYDKlFwMkQS7NWgzp5ep2VZ2Pfq17wAG6c8Y80RbUfe8cVvY9OhlpajjGQSzCpcrB8 aBY589TxG0F9PLUzBVzCWKuYODtVCxMg/AdopJQFmTcSd+FDdq5RV126YglWwrj4S2Sg /Z2F7Q10NNFXnA7SYzQaz6fNc0Q4CpvSlXuqGsuyD/auuHhGH0Ae7MCC1wWei8XRWZ5y JKSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hgAj8AjMrz1A7BDxAJfFuQ4EGSqn2ucoZeTxIYc92rk=; b=Wsy4R3BOtA4sTvlGUdl/qVaYwkEAhVcAnCjKlCXhk3VB6Ad9C531GtnJOSXXwJOxwJ dn2tQkXqwaRCT+SCGBEB7eN1VB2QgzPfguJHHqRwqCMGUCLfywtvVjiwGKt2pTnUISUc vhRo9emMcteDo5/lo3BU/SZh7u+/d5S0UgN/MjPI6t4pD9T1M138RQhDmF58CgsHN8b1 LZRzHwv9kDMiQO/ia/Qi6wh5QN047iHHHFXVPaT+DW9ja25vw3PtZw+qpNJvIygeLRcu HyC4yNj10RZsh8OogwuNmhQKtstwkUBtJVbjm5XWX0BCBQyCoqhcDbgHRE+NWtHbEZmV Jnqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Q6vOh8E4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji16si1810147ejc.261.2022.01.27.09.24.55; Thu, 27 Jan 2022 09:25:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Q6vOh8E4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238875AbiA0KDd (ORCPT + 99 others); Thu, 27 Jan 2022 05:03:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238131AbiA0KDc (ORCPT ); Thu, 27 Jan 2022 05:03:32 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21362C06173B for ; Thu, 27 Jan 2022 02:03:32 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id r126so1543098wma.0 for ; Thu, 27 Jan 2022 02:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=hgAj8AjMrz1A7BDxAJfFuQ4EGSqn2ucoZeTxIYc92rk=; b=Q6vOh8E4uR7I456lRL9xd46Oxh3hEA4vw9DMBgAJlBFtPFLc2lys7DZQTXZA3Weh2T 0ZCv0WZK46pzIyXAbmjOFG5AJ3peSyMI2Er0qQC/Md1poCrDjupHiiq08TIHvhriXkRP QFcc5vS4ZI++Fea3tzi88TKsVzXqwdeIiDBaU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=hgAj8AjMrz1A7BDxAJfFuQ4EGSqn2ucoZeTxIYc92rk=; b=yszr+Lic0ApF/wnQsrIzgVut4A/JwtuKTDIo/4SwO8YCzSUU1hkYKrzPyZln+cXKKN BUR0VmLoUzHnItEKERrkhavUWyFi3uJvIUN7pgI/wSkhX9ZlfoAis1zacjZAkaGrwdEL 4VRuNB0SXh97mazZ8WbhN9ABdVCrA6hZpX3JowKzrIOxtOuqzuQicTJMBqtMVOPpSzqR jeakzYxqOi5lfhVcjhKElyrXeiQAld5ohJr3q78WJBpx7KU9Qmt1sOoo7slFZwVRJJJP EajJoU2Vea3haqgM0gOOS3FMsnd8TRXNcBZLAThDxcbOK2vzOPJLDz50ziqJ94G9Xgbs 5y9g== X-Gm-Message-State: AOAM531bOT0Tf2WuIkS8lYlGmbPwcRT1sWVcakTze1aGDysNKoTRSXFb kfG/aO+lL1e4dzEryLCntNz8WA== X-Received: by 2002:a1c:4b13:: with SMTP id y19mr10758110wma.129.1643277810650; Thu, 27 Jan 2022 02:03:30 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s9sm1699065wrr.84.2022.01.27.02.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 02:03:30 -0800 (PST) Date: Thu, 27 Jan 2022 11:03:27 +0100 From: Daniel Vetter To: Tomohito Esaki Cc: dri-devel@lists.freedesktop.org, Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Ben Skeggs , Michel =?iso-8859-1?Q?D=E4nzer?= , Simon Ser , Qingqing Zhuo , Bas Nieuwenhuizen , Mark Yacoub , Sean Paul , Evan Quan , Andy Shevchenko , Petr Mladek , Sakari Ailus , Lee Jones , Abhinav Kumar , Dmitry Baryshkov , Rob Clark , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Daniel Stone , Laurent Pinchart , Damian Hobson-Garcia , Takanari Hayama Subject: Re: [RFC PATCH v5 0/3] Add support modifiers for drivers whose planes only support linear layout Message-ID: Mail-Followup-To: Tomohito Esaki , dri-devel@lists.freedesktop.org, Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Ben Skeggs , Michel =?iso-8859-1?Q?D=E4nzer?= , Simon Ser , Qingqing Zhuo , Bas Nieuwenhuizen , Mark Yacoub , Sean Paul , Evan Quan , Andy Shevchenko , Petr Mladek , Sakari Ailus , Lee Jones , Abhinav Kumar , Dmitry Baryshkov , Rob Clark , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Daniel Stone , Laurent Pinchart , Damian Hobson-Garcia , Takanari Hayama References: <20220127032539.9929-1-etom@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220127032539.9929-1-etom@igel.co.jp> X-Operating-System: Linux phenom 5.10.0-8-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 12:25:36PM +0900, Tomohito Esaki wrote: > Some drivers whose planes only support linear layout fb do not support format > modifiers. > These drivers should support modifiers, however the DRM core should handle this > rather than open-coding in every driver. > > In this patch series, these drivers expose format modifiers based on the > following suggestion[1]. > > On Thu, Nov 18, 2021 at 01:02:11PM +0000, Daniel Stone wrote: > > I think the best way forward here is: > > - add a new mode_config.cannot_support_modifiers flag, and enable > > this in radeon (plus any other drivers in the same boat) > > - change drm_universal_plane_init() to advertise the LINEAR modifier > > when NULL is passed as the modifier list (including installing a > > default .format_mod_supported hook) > > - remove the mode_config.allow_fb_modifiers hook and always > > advertise modifier support, unless > > mode_config.cannot_support_modifiers is set > > > [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20190509054518.10781-1-etom@igel.co.jp/#24602575 Two procedural things: - There's an r-b on all the patches from Andy from the last round, please include that. - Please also include a changelog per-patch (at least going forward), that helps with judging where a patch series is. But aside from this I think this looks ready. Cheers, Daniel > > v5: > * rebase to the latest master branch (5.17-rc1+) > + "drm/plane: Make format_mod_supported truly optional" patch [2] > [2] https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3 > > * change default_modifiers array from non-static to static > * remove terminator in default_modifiers array > * use ARRAY_SIZE to get the format_modifier_count > * keep a sanity check in plane init func > * modify several kerneldocs > > v4: https://www.spinics.net/lists/dri-devel/msg329508.html > * modify documentation for fb_modifiers_not_supported flag in kerneldoc > > v3: https://www.spinics.net/lists/dri-devel/msg329102.html > * change the order as follows: > 1. add fb_modifiers_not_supported flag > 2. add default modifiers > 3. remove allow_fb_modifiers flag > * add a conditional disable in amdgpu_dm_plane_init() > > v2: https://www.spinics.net/lists/dri-devel/msg328939.html > * rebase to the latest master branch (5.16.0+) > + "drm/plane: Make format_mod_supported truly optional" patch [2] > > v1: https://www.spinics.net/lists/dri-devel/msg327352.html > * The initial patch set > > Tomohito Esaki (3): > drm: introduce fb_modifiers_not_supported flag in mode_config > drm: add support modifiers for drivers whose planes only support > linear layout > drm: remove allow_fb_modifiers > > drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++--- > drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 ++ > drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 ++ > drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + > drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 ++ > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ > drivers/gpu/drm/drm_framebuffer.c | 6 ++--- > drivers/gpu/drm/drm_ioctl.c | 2 +- > drivers/gpu/drm/drm_plane.c | 23 +++++++++++-------- > drivers/gpu/drm/nouveau/nouveau_display.c | 6 +++-- > drivers/gpu/drm/radeon/radeon_display.c | 2 ++ > .../gpu/drm/selftests/test-drm_framebuffer.c | 1 - > include/drm/drm_mode_config.h | 18 +++++---------- > include/drm/drm_plane.h | 3 +++ > 14 files changed, 45 insertions(+), 32 deletions(-) > > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch