From patchwork Sun Dec 26 11:24:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22237C4332F for ; Sun, 26 Dec 2021 11:25:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 40B3810E950; Sun, 26 Dec 2021 11:25:17 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73F6210E951; Sun, 26 Dec 2021 11:25:16 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id a83-20020a1c9856000000b00344731e044bso6946317wme.1; Sun, 26 Dec 2021 03:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9LTDPcsLit3ZltGpmydxyhDaBvNBfOjBIIApsVidYlU=; b=ejlSnBRYPWQDz4Nz+pf/Ob69zbAjcqMfijxXsTWcXhySEQRzUT3JCExyZ5Q1SIvA3c kQEyhuRzvpXKwr0S+/rKlCIT/w8ncJ+aQzdm7jpMBRPCQQr/da5ZGlqL/VYyn43hxxCv CHtfylV68MCTsg4AhrkoS7zKdwb4IMm7OEpKDU3FaIoEA3fCSGm4fcRNK4c54Tcqvr6/ zq9E1bBZJSI6Mp+0nnb2zUxeSOTTcaPXWRQkOYUc5TBf57vUoysacqIO7xX3ytpTmfP5 OepQvrBjQUOgumuDejvOFTQ3kmvegmDblhp3SxIv7Bir6Vv/VhSt9Mkh5t4Y/gKXUW3F iQmw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9LTDPcsLit3ZltGpmydxyhDaBvNBfOjBIIApsVidYlU=; b=7/FHMxO5Cz8fw21vy64Ee0kzYe5glbJ9OyVmBOuAcwGWzN6tJ5nNkp96GPpCypyEKI FMtJHttGbjCo+1pE4ji8vDZmRBkrF5zDDfKRrwSZyZAVZ0LxmkLl7DVETRS4rZ2c2Wm/ C2KwlcaK+ZncQbQmDAqRduvAw4q2rK7cKVgGfDWZem9m+4Dp/qwM4f1t6iUV6m3VE981 tZnC9iv5j2sw9LV3DBJu0tHJPTvhEtLdq+HEp02pH7sJPls13cZV/mnlajc3x/ciJl05 UDJ90J3/UzqUGz0q56AqAF6Jn468vc6U9LJMTSZzuUDw3CosCgVfwQAwlzMsteiVAqV3 b0KQ== X-Gm-Message-State: AOAM530D04rLiXl8oYLoem3SgsagdVMnHLMhuAzOUAYJtv2odZ7LF6ah KSA/nKbRi1ByiNdgp3GEQ/E= X-Google-Smtp-Source: ABdhPJxzOeTdg3Sm90f1frrXzLRCNKL4Q9YDL0ikNej0GhBsklk2qdNprmmmNirl5P7CW0Jv6ObHPQ== X-Received: by 2002:a05:600c:209:: with SMTP id 9mr10183053wmi.145.1640517915050; Sun, 26 Dec 2021 03:25:15 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:14 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 1/6] =?utf-8?q?drm/plane=3A_Make_format=5Fmod=5Fsupported?= =?utf-8?q?_truly=C2=A0optional?= Date: Sun, 26 Dec 2021 12:24:58 +0100 Message-Id: <20211226112503.31771-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The documentation for "drm_plane_funcs.format_mod_supported" reads: This *optional* hook is used for the DRM to determine if the given format/modifier combination is valid for the plane. This allows the DRM to generate the correct format bitmask (which formats apply to which modifier), and to validate modifiers at atomic_check time. *If not present*, then any modifier in the plane's modifier list is allowed with any of the plane's formats. However, where the function is not present, an invalid IN_FORMATS blob property with modifiers but no formats is exposed to user-space. This breaks the latest Weston [1]. For testing purposes, I extracted the affected code to a standalone program [2]. Make "create_in_format_blob" behave as documented. [1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431 [2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c Signed-off-by: José Expósito Reviewed-by: Simon Ser --- v2: - Remove unused "done:" label to fix compile warning Reported-by: kernel test robot - Add Reviewed-by (thanks to Simon Ser) --- drivers/gpu/drm/drm_plane.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 82afb854141b..deeec60a3315 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane memcpy(formats_ptr(blob_data), plane->format_types, formats_size); - /* If we can't determine support, just bail */ - if (!plane->funcs->format_mod_supported) - goto done; - mod = modifiers_ptr(blob_data); for (i = 0; i < plane->modifier_count; i++) { for (j = 0; j < plane->format_count; j++) { - if (plane->funcs->format_mod_supported(plane, + if (!plane->funcs->format_mod_supported || + plane->funcs->format_mod_supported(plane, plane->format_types[j], plane->modifiers[i])) { - mod->formats |= 1ULL << j; } } @@ -223,7 +219,6 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane mod++; } -done: drm_object_attach_property(&plane->base, config->modifiers_property, blob->base.id); From patchwork Sun Dec 26 11:24:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90393C433F5 for ; Sun, 26 Dec 2021 11:25:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47B2B10E952; Sun, 26 Dec 2021 11:25:22 +0000 (UTC) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 060EB10E951; Sun, 26 Dec 2021 11:25:17 +0000 (UTC) Received: by mail-wm1-x32f.google.com with SMTP id e5so7505360wmq.1; Sun, 26 Dec 2021 03:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JVsPYyeSs0Z89jpnz+/jWObtkdsoENnAN2PsMGBB0X8=; b=Ay89gIcMZst8GS6tyGXp98KOAC6Qgvu1V13cw/bSJfQ0fXJgZG1CyQSXYBVYyvR85x chNrltN4WsAL+D/E3LN61lFu800OdW4YqE6Db671ZbGItmrxctjiekoTQY0QMokGJw5/ dFUWjTEqmeu7+zjUpWpFiuLEq/JaQFOlkPTQPKbBf+sB0HwATkpJjBjYCpHkXvy3l+LB Xg+NBHYtfxiRQwHcnYXOynDBNnmRXqt1Y9sodZKjUdDsfBRynMJBPd+bt21AhRYc69WM DOS4WhO6K4Oo4XOYxTYk8cqZyoBIkjRq7c4O3pNViYg5skoeqHc5uCCEZq03e9AUZ3xI FgVw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=JVsPYyeSs0Z89jpnz+/jWObtkdsoENnAN2PsMGBB0X8=; b=lW9y++n25D+JNPIlDdWDItzzhkqExz97hfu3/xXtVCdHEdkTO0xZkEGi7r01zYz64T pWK/7Jke4tPmrK4V6jAEM1dh9+LXrO84IWmThF0fwoi66mJAhqLVaGtX6q3SGg5tz887 Bw+9lp7xRonNxoX25DXd1wxNoppi1o3oNoxfS2H01bgL3PicQsW8gwx08GiKHnTc8l/K M89Dm5Gybpn+uCHdXewQSyYIoiQK3fEbD6/qBWyPEYnBuHQtA+TvEEDmvKOslqwKvhQs 9xnHyEdZMhDayTDNaigBPdd1/Nd0mXEgDSLwoO9vQaN3s1DdjbyC56WIA777mVO3HYGz HDmQ== X-Gm-Message-State: AOAM533psaPzHbWsUuo5S9xqMYNYea4+cMdvpFDilxLlRLudikKkGLW/ 9Wn6rsEFn00kvguM5j5N22Q= X-Google-Smtp-Source: ABdhPJw57VZXKuh209lrx9BjCOI+QhODbcZjFyWAqCKVxPAtqvffXu2BoHojbDQtI0Ncc1Ggqfq3oA== X-Received: by 2002:a05:600c:6018:: with SMTP id az24mr9821191wmb.103.1640517916521; Sun, 26 Dec 2021 03:25:16 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:16 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 2/6] drm/plane: Fix typo in format_mod_supported documentation Date: Sun, 26 Dec 2021 12:24:59 +0100 Message-Id: <20211226112503.31771-3-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix minor typo: "valdiate" -> "validate". Signed-off-by: José Expósito Reviewed-by: Simon Ser --- include/drm/drm_plane.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 0c1102dc4d88..06759badf99f 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -516,7 +516,7 @@ struct drm_plane_funcs { * This optional hook is used for the DRM to determine if the given * format/modifier combination is valid for the plane. This allows the * DRM to generate the correct format bitmask (which formats apply to - * which modifier), and to valdiate modifiers at atomic_check time. + * which modifier), and to validate modifiers at atomic_check time. * * If not present, then any modifier in the plane's modifier * list is allowed with any of the plane's formats. From patchwork Sun Dec 26 11:25:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9255C433F5 for ; Sun, 26 Dec 2021 11:25:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1094410E951; Sun, 26 Dec 2021 11:25:22 +0000 (UTC) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9686510E952; Sun, 26 Dec 2021 11:25:19 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id j18so26537903wrd.2; Sun, 26 Dec 2021 03:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=udzgSr2XOO8m43wZrlgxQCrOrIrYf8SlPUnoZjFzTYk=; b=aCJzevHTBUPOKcQPw7hm+UB6JT/t1Fj3BW8O/jb392wnD0zkTkz+ZRTgelV2Yqg4MX W56GKzMk7Dzv9jaWuj28ZGU0lVkjYx9uNQh/0FadJ8JoyS4D8EWW4CIAYW1tl0U9P7Lu lOPPBpLonGHs296MrSx6PHecvp6ye/GIP5RQ4mgs54meCrWhzDzzmfoqLTwl5T4r5ib9 Pu/3qMSp+gxIEeM+eE+BXjRwq2tGWwY7trJ/lA3Gq2QHZqATUNoI4JMtTWT95wDJflmL miGdPBFBHeeWcNJEd7MBupYAO07XGQ5e+OUbtSazNCYnC5IefApuP8gZt5MQQnVdZSo+ V4aw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=udzgSr2XOO8m43wZrlgxQCrOrIrYf8SlPUnoZjFzTYk=; b=YqMN3hxjGl2FEE4SJGY4wQBliT5XTCu+htwIUW+fEZRljjopNNtdKPhvCN3AcmwrmQ 2A4IyVOK65I8jBPAh65jqBCTntgBJ8Fjo5LwqpAJgf6l+mkHYm5wWZNvigjr5EuAECkM 8QsPAzQth+r2or/NDHBZoE76E4kGU7uVp8Y83Hm4k02/LB7iP8mn87UXDckgU7kzki6Y ZxnDWRhlxKjEsMo37CjFoDz61+DwuaD1sqmV6iDbEquVbzXB62W/BUnmZb9O5JhOWTAu lDfL8A03xvDaECZBDrGd25XiUc/psxq4GLGEpsGziPk3QTyiTEHgrR/5Rgdi03lGnJmI vAYA== X-Gm-Message-State: AOAM530JwtOwy7NubWTCtIbNzaMLWwCcFy4JtBmveGIjAsxtclLJ+phC YcclAJYyFP2ZVJU3Fkt5yJA= X-Google-Smtp-Source: ABdhPJxUGkExUZ7jGhhIux0K+s4/ECaFhn9zxSixHZY9ABIuQhk4H3r2v0oZ1KM30IAWTvYNQ1yqjg== X-Received: by 2002:a05:6000:1845:: with SMTP id c5mr9492151wri.499.1640517918125; Sun, 26 Dec 2021 03:25:18 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:17 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 3/6] drm/simple-kms: Drop format_mod_supported function Date: Sun, 26 Dec 2021 12:25:00 +0100 Message-Id: <20211226112503.31771-4-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "drm_plane_funcs.format_mod_supported" can be removed in favor of the default implementation. Signed-off-by: José Expósito --- drivers/gpu/drm/drm_simple_kms_helper.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index 72989ed1baba..2c6aa67c6956 100644 --- a/drivers/gpu/drm/drm_simple_kms_helper.c +++ b/drivers/gpu/drm/drm_simple_kms_helper.c @@ -284,13 +284,6 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane, pipe->funcs->cleanup_fb(pipe, state); } -static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane, - uint32_t format, - uint64_t modifier) -{ - return modifier == DRM_FORMAT_MOD_LINEAR; -} - static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = { .prepare_fb = drm_simple_kms_plane_prepare_fb, .cleanup_fb = drm_simple_kms_plane_cleanup_fb, @@ -339,7 +332,6 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = { .reset = drm_simple_kms_plane_reset, .atomic_duplicate_state = drm_simple_kms_plane_duplicate_state, .atomic_destroy_state = drm_simple_kms_plane_destroy_state, - .format_mod_supported = drm_simple_kms_format_mod_supported, }; /** From patchwork Sun Dec 26 11:25:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79621C43219 for ; Sun, 26 Dec 2021 11:25:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ACB5710E954; Sun, 26 Dec 2021 11:25:28 +0000 (UTC) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A6AD10E952; Sun, 26 Dec 2021 11:25:21 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id g7-20020a7bc4c7000000b00345c4bb365aso6755542wmk.4; Sun, 26 Dec 2021 03:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2sH9LpoHKM1nYuCNdjrxssHqCL8Z5G+nLzADIXmtmn8=; b=mAetoydiC9DFErqK91+G/B0kP4LJaIEX6wTtFjgxIx2puQBkWT35g7OEs0I6Wxm4eT DIS4O5D0u43xloptLbFpnamIbkbZp4QW1A5pN+Ad2pADFD6SEdOMQyLza03nFZ8lW8/3 Eesto4lZJ3IicDl5rRiAAttyieCY8P8S5nM1MM/+1js3SzqevyK2awp22JsgoAOcP7eZ OptHCawHlqbW35aAG3+Wq4go/qCvwqqXt16SSXCJoYAnFMvUPqjB4E0JWPAhZRvtpJr8 /sV2Bn9XrAl+tgezM0TeuEPuu3A4TNULvoMGSlh58yjiIkGU3uZ6N06sfsiT5q/eDeSa /v2g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=2sH9LpoHKM1nYuCNdjrxssHqCL8Z5G+nLzADIXmtmn8=; b=eyxmBHkJF5DeJmIE1WmfU5k1Ce5rEUO9hOFJCU4nHe2BPu9q+wAumkOeb//HbI1zNA iwzJCcSc7Ce9qflx5F3nKW7eO0NSm+HWncqQ+K9tv6V0ottuJWI9106P4Gfqk8ZbyAr9 NHiphYd6z/bQSPC3T2qa0FJBBwsI4K49bAviFpodu5PBWXAdWM2Sv31KPtm3D5AHG6Md urJ7ExUrwwHuSdHL0wQjT4LIl/66kXsH6/eGuxkX5IYjbzWpnqNGLo4rcoKawBizX8Ui Qpwu9qO3dplGqMGOTA4tYXzC/n0MPpNmcGKYsLgCWHmssXeHwYFuGlIn5pO9epZyG7g9 cpvw== X-Gm-Message-State: AOAM532y2MkXVsaUJRkXkaAGZ6sYMo67Rq7TqauGT+wraa+EbO7JcWIR B0SEdqW1D46hPq4PnfhdD0k= X-Google-Smtp-Source: ABdhPJz4lUyJV89AeASjgwh8PQuZGePew9x5IF62xdHwLSvNvHxbwPsKoabWCJpDvO3twBCqWu015Q== X-Received: by 2002:a05:600c:3787:: with SMTP id o7mr10046954wmr.110.1640517919698; Sun, 26 Dec 2021 03:25:19 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:19 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 4/6] drm/i915/display: Drop format_mod_supported function Date: Sun, 26 Dec 2021 12:25:01 +0100 Message-Id: <20211226112503.31771-5-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "drm_plane_funcs.format_mod_supported" can be removed in favor of the default implementation. Signed-off-by: José Expósito --- drivers/gpu/drm/i915/display/intel_cursor.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c index 11842f212613..6a5e022f5e21 100644 --- a/drivers/gpu/drm/i915/display/intel_cursor.c +++ b/drivers/gpu/drm/i915/display/intel_cursor.c @@ -602,13 +602,6 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane, return ret; } -static bool intel_cursor_format_mod_supported(struct drm_plane *_plane, - u32 format, u64 modifier) -{ - return modifier == DRM_FORMAT_MOD_LINEAR && - format == DRM_FORMAT_ARGB8888; -} - static int intel_legacy_cursor_update(struct drm_plane *_plane, struct drm_crtc *_crtc, @@ -745,7 +738,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = { .destroy = intel_plane_destroy, .atomic_duplicate_state = intel_plane_duplicate_state, .atomic_destroy_state = intel_plane_destroy_state, - .format_mod_supported = intel_cursor_format_mod_supported, }; struct intel_plane * From patchwork Sun Dec 26 11:25:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81EADC433F5 for ; Sun, 26 Dec 2021 11:25:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DFFF10E95B; Sun, 26 Dec 2021 11:25:29 +0000 (UTC) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id B7B4010E953; Sun, 26 Dec 2021 11:25:22 +0000 (UTC) Received: by mail-wr1-x42d.google.com with SMTP id v11so26499463wrw.10; Sun, 26 Dec 2021 03:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3uC+zpueN0jaqztWM7eUqBfpEMbmsR8tb66iIJAnvGU=; b=RwDE0YPkDLqtqo7Dvnlm/ydiYanOQlnAMem2isy3ndgorcODT7JcvNFIyr443LTwSg WliRTsg8U5K6xpvrcgejsyGKhya4NPPV1Uea3wAuINZpe69Qi4Co3GCY8+RCvB5zICJN 79sCOX7fKsf0zNbAvzhCEj30xYFAmhu4mxWkaRe0EvJkW/pW8fygcR8ybIZ/WTrgKhBW WcMktKG4ZIskNlW/H43GfZIK16XeZawEhw7iKEf6idJrc9oK20T4+HFBD3es+GpMVzr9 czP8Xc5f78UoC+IsRP3PfKQz9Rc6Zl71pPJ9HwZfuNpEHKkQuf3Bn8gfrACtKdQA8/At oNXQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3uC+zpueN0jaqztWM7eUqBfpEMbmsR8tb66iIJAnvGU=; b=Lx1iPFsobjOJGaIatNfrO4a8bmx8wQaawc2hY7bh2PonVN98q0mzY6gxz9wFL1vI3Y rSEMGl3qi3od8bQ8CYzD6VkcUv4F2FXIBwEekaJQsSVEaunx4r0MAHBRJuXwRbDKavhN zvRn7FcpUN5RKZ4GtEgHe3QZopn/NhTLaEAklyo9O5oX4IvDhlM2EuBkKUDUTFRQI0eu jVDygJak0V0qNvmgl/Qsfx/Bm+ihfv1nR/HUZ5xyPa6ITAbqU0iI+Zjj1MbnKUK9EOY5 PRR2IEXuyvgIOcp1okFvYk4l/VyXYi/2jpyRGAVhdacKlR73iccQoBK8qk7vT/nRhr5U /wuQ== X-Gm-Message-State: AOAM531+E1hXlhTRmPjX+Wd7F4ciQDaB7oFTDr8Zf+xrz8qm0Ffkk4+g KFojVVFJEY/PptXoJVMYC1Q= X-Google-Smtp-Source: ABdhPJwPiaAlI5ue8SBY/hNuXdX5I1LiZxPv2bA/DypMkY+1VW51yINEbKM/DxTgrTs1AI5TJvkxhw== X-Received: by 2002:adf:9004:: with SMTP id h4mr9898117wrh.593.1640517921215; Sun, 26 Dec 2021 03:25:21 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:20 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 5/6] drm: mxsfb: Drop format_mod_supported function Date: Sun, 26 Dec 2021 12:25:02 +0100 Message-Id: <20211226112503.31771-6-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "drm_plane_funcs.format_mod_supported" can be removed in favor of the default implementation. Signed-off-by: José Expósito --- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 0655582ae8ed..df32e1c3cc5d 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -554,13 +554,6 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane, writel(ctrl, mxsfb->base + LCDC_AS_CTRL); } -static bool mxsfb_format_mod_supported(struct drm_plane *plane, - uint32_t format, - uint64_t modifier) -{ - return modifier == DRM_FORMAT_MOD_LINEAR; -} - static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = { .atomic_check = mxsfb_plane_atomic_check, .atomic_update = mxsfb_plane_primary_atomic_update, @@ -572,7 +565,6 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = { }; static const struct drm_plane_funcs mxsfb_plane_funcs = { - .format_mod_supported = mxsfb_format_mod_supported, .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, From patchwork Sun Dec 26 11:25:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 12699328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DB30C433F5 for ; Sun, 26 Dec 2021 11:25:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AD3510E955; Sun, 26 Dec 2021 11:25:28 +0000 (UTC) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id 61C4210E954; Sun, 26 Dec 2021 11:25:24 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id a9so26462465wrr.8; Sun, 26 Dec 2021 03:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3w0cyRxbnflG1Lzaa+D9LFgBBXj2WLi8B2+0IaB0cco=; b=PwXLZV+6O9zswzpPoQeLANPNLyAa5j9TTefYDsBvxzJHw7hsiT7vgEJO67viIuaBiK joS9USvBHQU7W3SIlSlVlgL1mYDZ9GdAj6OOVHGzOLhwrXOtxouH24D1FvTOcNPBx1hu cgYJFZ0JNDK45DRlTqL7+hohi4LKCBmpHJMZ7FYsBeaLfb3+QvZpNbnybehWxIYzAW9A zIdhrscxtU7zpauASJezylBL9be5Gt7PrhZ4YGNwtTDe/dk3r/8eHOBjzyS88i2wv2vz I6dy2YgPWM+zzpAj2FRI6ftDhWK37okU082jWiQr1P8b2ZnvThZubK2qMqrpGqHTwjcb AcZQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3w0cyRxbnflG1Lzaa+D9LFgBBXj2WLi8B2+0IaB0cco=; b=e5sxsSBV8f/zG2WRSOqjURPEVHCodY3HiF7fP/xCSg9gospQ6J4K+JnUkAn80I0JBe mphW1ZSODNA652cDdxCRGP3QHVyprIGOsLixdtG4WmU+fhO5dFODeKDj1hA+pSbPcfh1 g3H2TvEdVCeNBySGuTgjXjbESpLsHKu0bQgqfnqj6LuztreUHWqKBlTqZ/MRdlhGK8y2 Slv3L/D9mLt4z0F1lRK7yb8ylO3C6jIZ5fEUeROn7RR8n3My852yM8NDhTvTjgaT+uoR peC5xbw/f4/mbSNydF9hBYDpm7lj2qDaNCVqbAHSU00G5+XG8pAu6LKLAwkhIZb2rJdX jtgg== X-Gm-Message-State: AOAM532D7Z+mebfpcGw671qZc7HMEfj5iBZDkLk1gqbOGlTsVrxJn2UW JfNhY0Bsfyx+zpfXdF7ZcUg= X-Google-Smtp-Source: ABdhPJyMMwBvN0I/TVcPJvi99lJUbcE0uky0CFSE//bOHq3fI8piG76lCpdID1rhkzRsL/yanK1mSw== X-Received: by 2002:a5d:638b:: with SMTP id p11mr9352371wru.241.1640517922894; Sun, 26 Dec 2021 03:25:22 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id g12sm13654743wrd.71.2021.12.26.03.25.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 03:25:22 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v3 6/6] drm/stm: ltdc: Drop format_mod_supported function Date: Sun, 26 Dec 2021 12:25:03 +0100 Message-Id: <20211226112503.31771-7-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211226112503.31771-1-jose.exposito89@gmail.com> References: <20211226112503.31771-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org, linux-stm32@st-md-mailman.stormreply.com, marex@denx.de, linux-imx@nxp.com, intel-gfx@lists.freedesktop.org, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, yannick.fertre@foss.st.com, linux-kernel@vger.kernel.org, philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com, dmitry.baryshkov@linaro.org, =?utf-8?b?Sm9zw6kg?= =?utf-8?b?RXhww7NzaXRv?= , shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "drm_plane_funcs.format_mod_supported" can be removed in favor of the default implementation. Signed-off-by: José Expósito --- drivers/gpu/drm/stm/ltdc.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index dbdee954692a..ef909e50f0e4 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p, fpsi->counter = 0; } -static bool ltdc_plane_format_mod_supported(struct drm_plane *plane, - u32 format, - u64 modifier) -{ - if (modifier == DRM_FORMAT_MOD_LINEAR) - return true; - - return false; -} - static const struct drm_plane_funcs ltdc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, @@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = { .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_print_state = ltdc_plane_atomic_print_state, - .format_mod_supported = ltdc_plane_format_mod_supported, }; static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {