Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5955574pxb; Thu, 27 Jan 2022 03:23:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4++hzrvf6CDesXabs/egrPioqbG9cabYHvMQ+iBftPrkF6Z3rwyprnOI/VNTAoGia0/gZ X-Received: by 2002:a17:90b:3648:: with SMTP id nh8mr3739939pjb.145.1643282597889; Thu, 27 Jan 2022 03:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643282597; cv=none; d=google.com; s=arc-20160816; b=qxX0SfAX5BYTgXu2PLz6ee9NI+qNXcPvZ9LOi4VQ6+xK95cKR3MkL0OYtfUwhDRhiP ZUBUBNVyr/funOQfni2PnGA0qKu+i1ELHQ3ZbHF4AJfpgsDciK5nRbpadT/RovHydwDC +xU4sYEmuTkJitI/enDP3T8CJ3i9QcyxNJ+FuibrkVigvwPL5Uf6trKmHfEZTqS8ackP mTlPMTkcGv/BhajLyHGmNiNm80YbYtvv2zBeufIQ8N8oWXrpvID2OFK2jTGZ3VjhaTZg PaNLUvqKyKDXzt1rnmsgyJNRnhq9l/VZN9vKI3jsdr7Hs1uWyIEJa4EwlAfPce4pqr8v xA+A== 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=kijqoOwlh2nBinX5T4jaToM6MBMxe8W6w3/1AdS3Yq4=; b=ibHDht/Ucif3nxb9blFbA8KYreE88gl15wzfAuxOAQElcJu1YizNdfWLAlflCXMwjV lflau5a2nJMsb3t4oW0wl/nwcwztJTd8e/609746YZDX1bgSSCCbCk15DDzQ8xUp6efW 3FaDoruonElotCIZT6kI44Gw4AWXv4qNObBF4kHZX4/FeD3wI2d9cUAoskQm6q03seS7 TTEtFCMpir0P6StiONmUcedSs4YuxBqjzxAur7haEDq0sar8HJC4kBNuDFjoXtTXrnEZ irfp/tcof+TI73n2S+MWpAFSUQ4MO+w0Hp/kDnXzFz0pRQNtAy3+lVcDSuyP809w39MQ MgRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b="UZ/5sgr0"; 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 s1si2195781pfg.171.2022.01.27.03.23.06; Thu, 27 Jan 2022 03:23:17 -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="UZ/5sgr0"; 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 S235521AbiA0DZy (ORCPT + 99 others); Wed, 26 Jan 2022 22:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbiA0DZw (ORCPT ); Wed, 26 Jan 2022 22:25:52 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3367C06161C for ; Wed, 26 Jan 2022 19:25:52 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id my12-20020a17090b4c8c00b001b528ba1cd7so1590817pjb.1 for ; Wed, 26 Jan 2022 19:25:52 -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=kijqoOwlh2nBinX5T4jaToM6MBMxe8W6w3/1AdS3Yq4=; b=UZ/5sgr03EHCHuKWtyXr3V6fpDy0NQnn2m8IOrHrEIpwrXMhmlcleuv3c66PXbvwGm eTEfreUdGDHQHMzxgMMhHmYHYdPbdbyG/R3F0b0lGmHkAMWK6erVFMHU2NEGI4MU2X3h E3DD4PLRhTR7xYsYhpS8/K8UOKyLizlmg9d8btyW4pYji/92OuvsZNaef8qwIsu5R0ir qR94W7u2/of6FedsP1qR0u+uhm+NtIRMi0xul1S7dqty0VRimsPLf2HtFITMtzqrHeJL +gsRsF6L1O0jt1sWX8AvhnvLa09oQ+VsNLoRkI3A33w6dACWp5uaErUPSPWCgAU+eLGI MNQA== 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=kijqoOwlh2nBinX5T4jaToM6MBMxe8W6w3/1AdS3Yq4=; b=ONJDPF4pUGzxhWeJxG8vTsd22l8agB33N0Gg4AVcDUwCp8A+Hfb4JltuGY1pgwhe5Y FT5i2Okjin9kahGNcoEcQYEXfZqVI4zFu+lP8myLw7kU15ScilPVxhBiRF63pgnmv/UK oRiiXsb/Svnl+bVbKAZd1zgFOjQqAvOFyjkSSTJ+d7OJxz7Z5L6O+5mOk8jlbLcc8Cz9 CUY/nn/LVRv+jPhtys+iVGxU6DUZA0Yhgrj39G78CVov+tdPSmKj8xDHBYVfj0U4HkTf TzmLV19i5VaQWIuGTiv+t7mMnBeU+3PQqhew9+QN0u8PuN5moNoIZD7Z95yreSQ65GhA 08OQ== X-Gm-Message-State: AOAM533gFiRVEvL64YsrD1VuPP3bFpWG+0KBdAuPEk7SOO3XAFOWdiYO Vh+WU9WiNXasf5KLJUudloNEuA== X-Received: by 2002:a17:902:be14:: with SMTP id r20mr1677757pls.97.1643253952215; Wed, 26 Jan 2022 19:25:52 -0800 (PST) Received: from aqua.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id t15sm4203111pjy.17.2022.01.26.19.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 19:25:51 -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 v5 0/3] Add support modifiers for drivers whose planes only support linear layout Date: Thu, 27 Jan 2022 12:25:36 +0900 Message-Id: <20220127032539.9929-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 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