Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5279540pxb; Wed, 19 Jan 2022 15:08:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXPF82QE1Ogy2gsFK53+LPYrYfHCdmR0qccw2nVYmZxwtaAGmDshJjEW5N3RZdFfLlNPWi X-Received: by 2002:a17:90b:3d3:: with SMTP id go19mr6993939pjb.163.1642633729600; Wed, 19 Jan 2022 15:08:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642633729; cv=none; d=google.com; s=arc-20160816; b=GNuO/8UqLlG0+rTp5SjoKoU8q3BKIAAg8TNHOdlIyApKsyx46e+RdkOJX55MV1BrBI XyXH6Fjy/SCW+a+IzZIis0zPedkOytbT9o7NeTHxuiwVPSDBDEUj+tC/SIIgP8r62vqd 3YcTrZu3UyCRYqHgQIzuGrvzq2tGsxFlgKQEnzpnNeSmXBiLgRcMbBSm4lNkw767Ub7o xct3WZyEhEFzfJX9qQtkEwRhFAUOPqirIvQdnOKiolqEEKDljZqsmXKsYNEAYv6r0Mrs UGcXXuBPjpnLc3pqneQ/JZJ4G78RFg+ObgJav5KCvwJ7roE0FYKnFFsa9jhFDWfQ2Wqt xRmQ== 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=tclGn/FiRJQbwpHi1/YABi2ORnKVDKyi6q1jYS35leY=; b=kNpAl1tn5sK1dxcPb2yPtB+GHdwdyYhysEBxghsvLpqJUlMYavUFiRF4qPHbYdAKyi 4716msrwI5ytNZaDv7x6yHDC7GSTfL8/Q/INvFWftmvO1kOkrwAC/qSAdfaH2UgqBGal jc03dEqYiqVEoYAm8GcXjqF83rpXEXc11Swg5AAGp5UjGkj5idqRaTgUnFycFLIuD0Oz 5bCYvXQaYOqtrBrw02ft0vhJxOFrLPt6vd73pumVihzHyCqJaaKhVnk2DCLZ/+J2awpL OTfWyZobQOB1r6B+Eaqs8QmR22N4XGN8TlfuL7dfbRhnB4EmQAe6cXcuiycXOxpdy6PQ KWgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=GcqAKeMV; 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 e2si1459398pgi.83.2022.01.19.15.08.37; Wed, 19 Jan 2022 15:08:49 -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=GcqAKeMV; 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 S1344479AbiARIhJ (ORCPT + 99 others); Tue, 18 Jan 2022 03:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343864AbiARIhI (ORCPT ); Tue, 18 Jan 2022 03:37:08 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79B1C061574 for ; Tue, 18 Jan 2022 00:37:08 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id l6-20020a17090a4d4600b001b44bb75a8bso2135134pjh.3 for ; Tue, 18 Jan 2022 00:37:08 -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=tclGn/FiRJQbwpHi1/YABi2ORnKVDKyi6q1jYS35leY=; b=GcqAKeMVa6/4IkNacCw9otDzRpDX28nVEv5OF1TpqZZmJ1ZQb6TtCcfLTuGFsSu1hO phW4KAfvQTwiSSYwxeFoyrjrRaa7gUIKxv1vw8SVXmyLt/vJ/ZMUX9x+FXizkJ4rEJ0f pjNyCl4EhDmUQkBWi6rcWCTktIfwVgruK8aQWY8NTRVkJiPYNd9AHtPD4wAH2IR8+07t p+hLd47qhOrNOTkQHGmwuV/WoQVtSjhKtDExWoSOMCeiMtfScXXmj8HtHmloHDtqEV0w hLWBD6nlL5jPFFS7HE8id7wChtC7OVwufUwqS1i4cYOU9VXcC7k45L4aXnauGeepsS/Y dedg== 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=tclGn/FiRJQbwpHi1/YABi2ORnKVDKyi6q1jYS35leY=; b=OZes7L9MtLhX9H8Uf3DIvN2b8cM+e2M3+T23If4DdVHLYV3pg5XvHN3COIzJjbfc9O b1rbBhxQj2uYj39Rzr0/Kd7sjB0SztVfUqMuF24hPWtV14vLbh0TQIzX9+l9YqokSYr+ Kbs1/Mf62YB7I/cMgIv43OSxfYM8AE33YfD9ao/8Hn4UqFd0N0dPJi8AKZtzYunXwBb/ uIl3v+PsF2gh4AOEiq8oUFrHjrH/PpSuMvuZrBX1S8P4GpBZg/nmny2IAenQUnfhEpoo mEIybfMvgTMer6Ha/cFrc6dO20kjVY+zo+YmrzXiyax2SPbYC+YhIKiCsRcUzf28x8CC 0mlA== X-Gm-Message-State: AOAM532od/tekeVQtpuDlP/ZU0riYam0nn3x68EQhJICdwngMadsf5LY EhHpJmzLYyb/amEOPU1dMmMnOA== X-Received: by 2002:a17:902:d483:b0:14a:58c5:3bf3 with SMTP id c3-20020a170902d48300b0014a58c53bf3mr26390855plg.106.1642495028323; Tue, 18 Jan 2022 00:37:08 -0800 (PST) Received: from aqua.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id c6sm1775615pjo.39.2022.01.18.00.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 00:37:07 -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 v4 0/3] Add support modifiers for drivers whose planes only support linear layout Date: Tue, 18 Jan 2022 17:36:49 +0900 Message-Id: <20220118083652.16335-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 v4: * 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] [2] https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3 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 | 22 +++++++++---------- 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, 43 insertions(+), 33 deletions(-) -- 2.25.1