Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1573471pxb; Sat, 29 Jan 2022 09:57:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYC66ioAyMMJjg9+qRqzhtDRn3EDts/jeEmR1xF9Qlnt1wgg/b3IhvoB7VUxEmYoljwP6o X-Received: by 2002:a17:906:bc97:: with SMTP id lv23mr11524507ejb.154.1643479049864; Sat, 29 Jan 2022 09:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643479049; cv=none; d=google.com; s=arc-20160816; b=dH+aIIcPFqB5mmWNQOXfGTO2gwBNk7c6xXiEDSXHg4GN0c3d4qmkp52hzDKEGf0J3r SQKTzmbFuJjM4IkHzBe59ipeb1FZLjlMrmvitqdokATJiM+tLW9NK16DiTjHtb5h0kNn xOK9trFxc9GAqzKBky2pUAn6AFVzU78wpnA/+aVphP3wFHQxC8byBYxtvPvImeDvcmap PxQfsUXNsAwH/6yEv2/VzyY6eWnARBiUxbSBPMeQuBDM5rDA0HYLZnYkYbwyTnVXV/Nn FnQg+kgVUyd9r+rikKWHclzERKyKhBVMnub3EyLpffSteHVQdhro6spmTvA4TpnBlPZH QNZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=q8wXsNp/7NMbRFs+KLl+rPu9p3ssQkCHhvOJ6uRH2qs=; b=sGByjTTdhdKGHnBC8dWRGq3Pf1wvR1jzsTai+bQov/Rj2J3X0BdoCZIBI/3xCvhi7n AiQ8vP51t7hYjEaTuW9IaTJdVZ3HELoXkURY5wmYlm+Xe56+oN0ZkDqTNVSRlhb/PLKJ eQwblC767BKxq53WrZPjMOz9ztCqPmUXhSaN6AXFW0o184Vy9EWdrHb+ChZB0nZbbfgs WfG071SukxUyDa4u6Jh2gpV4lFKdhMmp1r35UmnGjh0KTgaPuEMUx7ZItkc14KzBcudy 5Ya9an82Q7lM3SUzTstKRz/mzastT17lDJVR5bWDlZOVPs96yALjyKHrnp+EA67AqjkE ondA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=af44G74t; 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 sg34si5171522ejc.780.2022.01.29.09.57.05; Sat, 29 Jan 2022 09:57:29 -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=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=af44G74t; 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 S1346295AbiA1GI5 (ORCPT + 99 others); Fri, 28 Jan 2022 01:08:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242323AbiA1GI4 (ORCPT ); Fri, 28 Jan 2022 01:08:56 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BF81C061714 for ; Thu, 27 Jan 2022 22:08:56 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id oa14-20020a17090b1bce00b001b61aed4a03so4163100pjb.5 for ; Thu, 27 Jan 2022 22:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8wXsNp/7NMbRFs+KLl+rPu9p3ssQkCHhvOJ6uRH2qs=; b=af44G74taUkSTN7Cnz4Is52cMn2hLoiNiNoJndFVUqlIY3GigsPlPhih37LyhnvlC5 ptQfCP91Dbd6K9wa0+mtPLICSBhi2E/4R+pduM6HnW6XzyhxRwLgkVyJ4n2BoIW64JAG vdrLL/8LoyhE5Lub+9n/p592qgQFtu+KmcNTpTe2RtPqk/rp3+LkOPgXJ46NGXU4z7Hx UHeJqRIbQPlCCtSZZ530Zl9jXN5P1jPzkAF3vtB2xgoSHD44nlIAJ2PBq0EKh/ogP//J 37YkCWirFHWDCnJMX+hTTRqURCME9yJ2C/t52saYZaFSqB98xNv7Fc6Es+BaeW5Mgps/ ZN8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8wXsNp/7NMbRFs+KLl+rPu9p3ssQkCHhvOJ6uRH2qs=; b=rYNsZsEHSK0RbALz36zB3trqw9EzkpsqqZ+F8uJPPfZmhCyHeugGF7Wrizjzd8jnAC uqIuQbTZKIWScA4cj8iFt2eUdq8HqPgwDr32rZQlam0uPgLTaINzyX8Ng9JG1iEINXI5 HcKlCOMaSEgHjMayO7tKMH8Ocm1X9sV9Vjv7xRJzYsEqcFllr88YApvgioX/mOkdSgjj e+jbxyRn01zmGuRLgCzDemEtNoOwKrTPJHjHWMwpPPPV29PzO75nf2vlk0+3way0JTrK kqxe9KXkRWtv839gE6iWqwX72rlpjAhxJsfN2T3GBTUIycbWSCkuyorIgO490K+Q+zJx XYDQ== X-Gm-Message-State: AOAM532N4OXcYpuSc/woYiaMsZwU4q18v+k4qvEzZCm3O5VZgHTav2pM vdtBUxW3Vjj72Yq/rg81yNoQfQ== X-Received: by 2002:a17:902:7e05:: with SMTP id b5mr6770780plm.27.1643350135555; Thu, 27 Jan 2022 22:08:55 -0800 (PST) Received: from aqua.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id h5sm7743182pfi.111.2022.01.27.22.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 22:08:55 -0800 (PST) From: Tomohito Esaki To: dri-devel@lists.freedesktop.org Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Ben Skeggs , =?UTF-8?q?Michel=20D=C3=A4nzer?= , 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 , Tomohito Esaki , Damian Hobson-Garcia , Takanari Hayama Subject: [RFC PATCH v6 0/3] Add support modifiers for drivers whose planes only support linear layout Date: Fri, 28 Jan 2022 15:08:33 +0900 Message-Id: <20220128060836.11216-1-etom@igel.co.jp> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v6: * add Reviewed-by and Acked-by * add a changelog per-patch v5: https://www.spinics.net/lists/dri-devel/msg330860.html * 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