From patchwork Wed Dec 22 09:05:47 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: 12691315 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 2876AC433F5 for ; Wed, 22 Dec 2021 09:06:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88FBC10FE0F; Wed, 22 Dec 2021 09:06:00 +0000 (UTC) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6ACDA10FF49; Wed, 22 Dec 2021 09:05:59 +0000 (UTC) Received: by mail-wm1-x333.google.com with SMTP id i12so1086918wmq.4; Wed, 22 Dec 2021 01:05:59 -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=4JUlyn+OB9q/nAkx157+4tz8tby5UzCmjnk2cgpU7/E=; b=bu3nJO8MFxa2c3oQBbJ83GmuDcUoW/SXO45yCpT+W+biCuOoDSCSUHLDaLok8S5hJO AGIc638dQmhbYpVFO3fcT9cyc67PGfn2OhQTD/r1mPw1TTpNMQjoh0TYQr+U02yOW+tu X442JQhjJcoe+krNyki1Sg1bJOTF9j3gNtXaGIIPkZZp3cmiigPYVLCFUFLhsYanQnie TuzmHfDaVWrRYXrnE27kVoBZrfZiA2Sk8z72o7/mpw+6dFQl8nVHTQNcderx02plvF5i nSPpg9Ra28b5DwLGb8L/YCKoscQfG/MHB4XsUEBcGl83DyyOnlwlpLq4zhH15So0AFvo r8sw== 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=4JUlyn+OB9q/nAkx157+4tz8tby5UzCmjnk2cgpU7/E=; b=AQnsA2dwZZb1ibjhIxcETyVX5OBob6IniM4RtpSX6taadInSQt6PIYpMy+VYmtpkwC ebV9CIPo0nspdP4YSQDOe61fZQf7XUxax/Lc6/cMqa12YqEzq0/Is9DWsCntBvc5aOfA cB/azTmSFGsSG55hyl/x6yVjb79fx8aijqIJ2Q6Z2Jp11sAez3qDujtlCW+MA0M/dpI2 lLxjqNWMJBLpvXHbWsO33pVYaxYSz7Pfnx/yj2F5wy9iqZicHfBzRqU+SUbL9fpSRqBA sw9aDWl8Y7Y2kDcOw4uEysdqXvKN3SYCQVfmIlsuXsNOKmjd+yuQKEWwzGZDvsBHhlIf 4bow== X-Gm-Message-State: AOAM533VDibaxPo4A/jum0vNQb3tqZY9peP857tu1ZTbgbyzPPyLvarU hzz/8DLQ5yaiuJNhxET5I0Y= X-Google-Smtp-Source: ABdhPJytwBVNsRsjyCUwyNbd1c89P3F94MwHR3ncwRrz/bBC3+610uzB064VOeAclTRMoqfrorHsTQ== X-Received: by 2002:a05:600c:c6:: with SMTP id u6mr219660wmm.8.1640163957972; Wed, 22 Dec 2021 01:05:57 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:05:57 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 1/6] =?utf-8?q?drm/plane=3A_Make_format=5Fmod=5Fsupported?= =?utf-8?q?_truly=C2=A0optional?= Date: Wed, 22 Dec 2021 10:05:47 +0100 Message-Id: <20211222090552.25972-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 --- drivers/gpu/drm/drm_plane.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 82afb854141b..c1186b7215ee 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; } } From patchwork Wed Dec 22 09:05:48 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: 12691323 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 230C9C433F5 for ; Wed, 22 Dec 2021 09:06:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 519C510F917; Wed, 22 Dec 2021 09:06:17 +0000 (UTC) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAC9611276F; Wed, 22 Dec 2021 09:06:00 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id a9so3454422wrr.8; Wed, 22 Dec 2021 01:06:00 -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=qqsydkxhhK8OhNALZ+VHv5FZny2skJQWB82QtY63Q9s=; b=iD43qYAfHKgHEkC7nFjFdmgKXSLsUqD1tOX38fFtuZq3qwU1j0wOHmZyk7cmiVanwf giLn4KfQ9FO/4viWuK2riNg5PiCPdD4ewWsqhFlEkiTV3nTPKAyrcHFu7M1bsoRhNrHb DdjPxoxSwSl/T6YDCv1lW4ghDMwcvgq1aFQVMWAxSSg+mmGR6ivWF3EEl+DT2KkwejeC q4iVCkw85/sEWSRS0UaCHotTDsBlulj+yeCrxqRIlEoCSP9aawdEQovt91JUKIKS4xmj fwAYgHhTLBy0VF70R1A+BOhUwvuYUvC2NVVlPdorxD2IOIdOmjlLF/8qIHczAgPfW/R/ huXQ== 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=qqsydkxhhK8OhNALZ+VHv5FZny2skJQWB82QtY63Q9s=; b=CtYZlK6iKz3zTpZ628wljVUG3objanhn0GRgMjGbyPR2v60ZoRDKjgQ32oqMAUh7ql 47hpZT0oj9CGbdEtC99/wyXTrbLKVVrJN5bqAbm7NnOvmK9d6KQzG5xc/C4L0qBT13GM vBY4GOhN8yvX7Q+w5fkVn/Qwteej39jaqnqmjJHarcwF+4iiHV2jW+t4SLV1KFNbYI6V 9fb3OntygPtwG+5TAJgrDtxQtaNjj7DD2VQSqiRv31eVCS4IVYdgAEKqnTtQmg66xHfA i+pVtN9lyKWKPPMDYl407+OT6UYClII0fmWJ17TgrM91Wj2eLmzs1wVd3seBCAevHdmw YgKQ== X-Gm-Message-State: AOAM533Nk0BxYHG82HLlSZUJMh38BIO78MP4XffT+3sOBiC3dP34hxEN P3lOrc4rMi/NTO2I0od1180= X-Google-Smtp-Source: ABdhPJyT0Au4GEtGNae85W38GmiNwbKwrmg900dN5iNRMKkALJW8orth+l2K+OpmtdJEWYLlqaDVRg== X-Received: by 2002:a05:6000:1ac9:: with SMTP id i9mr1363329wry.531.1640163959472; Wed, 22 Dec 2021 01:05:59 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:05:59 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation Date: Wed, 22 Dec 2021 10:05:48 +0100 Message-Id: <20211222090552.25972-3-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 Wed Dec 22 09:05:49 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: 12691321 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 C2A75C433FE for ; Wed, 22 Dec 2021 09:06:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADD3010F8FA; Wed, 22 Dec 2021 09:06:08 +0000 (UTC) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by gabe.freedesktop.org (Postfix) with ESMTPS id 745D51128BD; Wed, 22 Dec 2021 09:06:02 +0000 (UTC) Received: by mail-wm1-x329.google.com with SMTP id bg2-20020a05600c3c8200b0034565c2be15so3421747wmb.0; Wed, 22 Dec 2021 01:06:02 -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=E3MxQbgD6jp8QTL0eeprZVCT29X4TsAZ9rSxABqoJKJws7UxtL3y3Rb2aRJp575Ctn hesvkKOolE8pblgflzdy9N9arwD4TLsVdHjcz4j1NzcMqlx9cge1sYvwMWt+PDGrEnZv Y5i0OTQsxOJNGvY9tnt72sq1D1nlChs/Dlk7DLlupN28xGHToNFRR3dsa0SwxLOuKQbY 5utUtrQy+t8z0vA8wy2xlzgyZq7k4kWhzakGbvKVtthnxoUy3g+/ce/GXp3eUfCWGNTv 3YHSQ7vjPxoH+APQRxDnNB3K64KnRQzbtCWTUulgJeyw5GEOzsGQN3ujO/QZQbujfoWg PFhA== 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=tAwpO8bPqxM6RNVQCueNwYto5rJ9gX70q2yK7B8eDsAQ9HTb8x0GWPyGvX132DDO4J IY+a3srXAcg0JbfuBB/D9Rzlb/7oJjfCKx9oQOl4haQ1r7znJKnWMe+WbYQkQBijs/cP OURDSlXKVKdzpvmCrjq9U0k6RR0lJIe1p7p9UCug37w+yGTJCdGN9FHyWYCk+azwaAui ef7uRJHigQY58BvrMsMSR+Lx8VWlV2OJfI0GnZ7AuyIvbQeJ+v5vEDVIiQ3P9Vps05Yf GS3O/I263i5CG7nuSfZ9GqNg2uXgbDJFoitzX2Bv7ZkX2YvIjs2kIiv5m6vJrNbHBrSj u8Gw== X-Gm-Message-State: AOAM532dYxRxqR6Akyz24IM/30k3Ld8xxtVC19H/QWOvazbJtQAwE+3D MREHMBdET+N3FtkaP8CnUNY= X-Google-Smtp-Source: ABdhPJyucSE6tLj1nZatpMDhi96s0rRJ4voGBbwV+cnaaT+IgfOg7RVHe2BjZm9f/hkIq7HlprLhNQ== X-Received: by 2002:a1c:440a:: with SMTP id r10mr226427wma.4.1640163961031; Wed, 22 Dec 2021 01:06:01 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:06:00 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function Date: Wed, 22 Dec 2021 10:05:49 +0100 Message-Id: <20211222090552.25972-4-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 Wed Dec 22 09:05:50 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: 12691319 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 53D68C433F5 for ; Wed, 22 Dec 2021 09:06:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3BA71128C7; Wed, 22 Dec 2021 09:06:08 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id E86661128B9; Wed, 22 Dec 2021 09:06:03 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id a9so3454737wrr.8; Wed, 22 Dec 2021 01:06:03 -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=UipR0N0vfloKnycnLvsHhkmUXID+a0gQSazt/YOOR2lytH2a1gIPVbSVGExE0igs+r jekZBCIM4ERZoOESF8YT+xqxsPxjJX6ao8gc3DLIgEz6u4VxUZKP/QWvVLh2/k1tTFVF RqZI7l0W9CaC7Is+KWojXzkwg6U0Zk4C0Swdg3QHsoP9hxcvBAG6FSDnmL+KljKT0Vhu utXR9E+GV0l9WHj+A+wj+gZz8oUo7US1imEVJt0zSOfEv8XdF9HYFeplt3JgJSXAOc13 MQmKMU48hY+PocHZHlpYKnPWsE8PE0yiIUICdSV12SyCW2C+NB/bdWoMn+k6XUlky22m uEXQ== 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=kQPCKxR9E/9CWuA7e8mpEKubyZzq4HOjwA25Oqc2awSX4vl6QPRv2D9PF77rppMPC8 zuvwe3DC7g7FL8FyYI21xHQZ8zhhzdudP3qrX2phw4neKmGovmXr2O8rAHs6FrDsUkJ9 gebqZrDw8SeTkQkSnbCVHRP86BEqkd1lEKwe7oLy6R7Acfsd7IOsgZZ3EysY9iwnWtEg 5LZji7oLK0M4Gv02xY4HZ/wDr0zLTomQAyr5etz84+rCWRng4r+i4HW0Bc1zlj/7Uby6 taUoOzsFwB7yU1ndBQC0xoD1ycNTmDZ7LoMoDOFZ3z0L6mfhGvEBuxITRbGV75cGHFCG tG3g== X-Gm-Message-State: AOAM532o8bb/tyZp+kqhHmLyQFvs7wXvYlUQORPBCx98NUD4pDLuNyDt 2+wdTeBVpQuVn3LgwzZi++k= X-Google-Smtp-Source: ABdhPJw8+ku6Bbt0pa4KdLw4youWpS/O8Jg1GVf6A0XhbJGF74Z2ipnLZF9sGtjl6ocwS7qMUyGAzA== X-Received: by 2002:adf:e0c8:: with SMTP id m8mr1505861wri.113.1640163962523; Wed, 22 Dec 2021 01:06:02 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:06:02 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 4/6] drm/i915/display: Drop format_mod_supported function Date: Wed, 22 Dec 2021 10:05:50 +0100 Message-Id: <20211222090552.25972-5-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 Wed Dec 22 09:05:51 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: 12691317 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 5828EC433F5 for ; Wed, 22 Dec 2021 09:06:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 403CB10FCDE; Wed, 22 Dec 2021 09:06:08 +0000 (UTC) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BEF01128F1; Wed, 22 Dec 2021 09:06:05 +0000 (UTC) Received: by mail-wm1-x335.google.com with SMTP id i12so1087168wmq.4; Wed, 22 Dec 2021 01:06:05 -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=DN/hezu8BpvlioFiGvPzdpBnLgh7II07BN9W7INVCzSlG/W+L+9oRlBVBOiyDVwRzN BxgyMTO/wmtmvNY2yXs/gCKyTnr8BxUmdvjzLD3hV1ZGJ2BdB+8MLPEPziAae6wboQaN ct81mDMbeL8K1H6rjhaTxYKOMQmxKDQyYUYXFmLa6yleKnfY7pur/hrESfd4/7lXHtR0 67vFJ1qpR18/R1lSFtZJYGFK26vg4J3pntLCw3ctkAYE+u2xLA95KJ0zfx6oMhr99A2L qFh4JurVj8/5urKMAIyJ7sljhjX2t06BNLt5+W0Mw36NQiXYgzUd/f17GYlA+Edw5nP8 5XPQ== 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=yaThkAUy/ZBpVB/yOlto/dPvAqWexido9MQN++mHQBiR3ZzvNptbrtO0xm8oCAfZAe T/wCdwAjPib/UIW8GXsCdme+2W/4NsUdJSIeD9XwJNK77Pm3SrwP2/FoNF6qFltC5rvk hGThJTofsCpoYX81zwQCqoF4pUXsEtoH4fW6UuLeqShCsjDGvqR+awvvql22MhjOHPCr JhzkQvkoj7BI212VbaorLUmYfKWwLMD/yn/ds2tfZ1bv5ow1NKtzVNcqnsnWol0aZ3/5 1MdPFeEfWkL2NCd/deYuL9DC23sGnTsBdQv6rCobBF3x7HgS9KPlr3S5sToMEVZRXZoS x8vg== X-Gm-Message-State: AOAM53225kJmWoqltxAlVZVuwOY529XPlHrpAOw90GitzABZyOuHsgIR BmLOhweGRYLkKm8YWNwWhvk= X-Google-Smtp-Source: ABdhPJwjkqCU2eOiLPDiEpUgnr87YSHM9DTy3lNdv7hPr78L5Q1Nuo13SkbxfvjjlDc4nJ6/guabtA== X-Received: by 2002:a05:600c:296:: with SMTP id 22mr208645wmk.11.1640163964078; Wed, 22 Dec 2021 01:06:04 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:06:03 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 5/6] drm: mxsfb: Drop format_mod_supported function Date: Wed, 22 Dec 2021 10:05:51 +0100 Message-Id: <20211222090552.25972-6-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 Wed Dec 22 09:05:52 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: 12691325 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 3B86CC433F5 for ; Wed, 22 Dec 2021 09:06:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D25E10FCCE; Wed, 22 Dec 2021 09:06:22 +0000 (UTC) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0047D10F8FA; Wed, 22 Dec 2021 09:06:06 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id v7so3408910wrv.12; Wed, 22 Dec 2021 01:06:06 -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=NEDNLzUZDalAufNqiXzyuBQjnHZxUNBoilJQwQfvSmQgK0oXmC8vKCNkZDGX7QCj8f xtZzyOs2a4ZO48mM3oad8CfwltMMFIcPiw9yaL8xg/9DpqRIV3FNDYB0GPJABPvceZxx kb+Svls2Iyso/lECdtqN+cvpmhawKQYVVZBpiMmFxjnQmU2NcVbyHJ7NupEKBwKFI3ho D613SYOBjc53L3M2O+EvZ0JjMLv4xGMQSBGRP/udeR4ro3C7u0wcSuBmhIeGYE9Ll4AG aluM0K2Z0cWEqEmiUFyd6NsKVRlaxKgjp7izy4Q/4SvDFUhBRVosqYT/SgjFJ8S7hF33 7VHw== 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=HvkD+XxdyNAH94a9S+U3d9LQB7j1iO9Zuwo2NvrvmjHPWtNpiIhLhu7Cu2g8BLbny/ As4lPe0IbEGWtZ3RXUYVsfvHaI1rcMTRNLImsGcT1FTxEshQM3m/z9mMxwFGwHFKfJ3n s5sfG4SF8Wtb62DQF/+afOAXcVcjKckXvtm/K4V3Xj6eS1j09nfIRpMcc58WM7rcTvRm aFznAuzgPvhe/OfcTc8whm9c198G0cZ6CqNUQT4WC5yIEcKOYDXTIoNl5E+EF0+z4s4l 8awDkeuMoIk1X1bpkAiXRRqBFI7A64wQFoFANbm+qAuxo11RpMsyUIDpuD3veBtzZZEM /zjw== X-Gm-Message-State: AOAM530XVdo67hPHSWwahZVhBUy7DkBu5jzhDOzHMTw/t7IaMOI63ggu 7o1fEj0pgbRdkalELBXdhLE= X-Google-Smtp-Source: ABdhPJwXgYqNw9Ycsv3CDZ5xTjRbry7kIK14E/x21CpPObe+VU0LvZpNi+zwa4CuFTHChyhAaxTF8Q== X-Received: by 2002:a5d:51c9:: with SMTP id n9mr1419745wrv.694.1640163965465; Wed, 22 Dec 2021 01:06:05 -0800 (PST) Received: from localhost.localdomain ([217.113.240.86]) by smtp.gmail.com with ESMTPSA id a22sm1139775wme.19.2021.12.22.01.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 01:06:05 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: contact@emersion.fr Subject: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function Date: Wed, 22 Dec 2021 10:05:52 +0100 Message-Id: <20211222090552.25972-7-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222090552.25972-1-jose.exposito89@gmail.com> References: <20211222090552.25972-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, tzimmermann@suse.de, s.hauer@pengutronix.de, rodrigo.vivi@intel.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, 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 Reviewed-by: Yannick Fertre Tested-by: Yannick Fertre Reviewed-by: Jagan Teki Tested-by: Jagan Teki # i.Core STM32MP1 --- 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 = {