From patchwork Sun Oct 25 19:35:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Abrecht X-Patchwork-Id: 11855395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6F1C388F7 for ; Sun, 25 Oct 2020 19:35:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D65B420885 for ; Sun, 25 Oct 2020 19:35:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=danielabrecht.ch header.i=@danielabrecht.ch header.b="j0E3ZjnF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D65B420885 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=danielabrecht.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CBA96E090; Sun, 25 Oct 2020 19:35:22 +0000 (UTC) Received: from abrecht.li (75-128-16-94.static.cable.fcom.ch [94.16.128.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B4626E090 for ; Sun, 25 Oct 2020 19:35:21 +0000 (UTC) Received: from mail.abrecht.li (unknown [10.60.1.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by abrecht.li (Postfix) with ESMTPSA id B7C632D97C5F; Sun, 25 Oct 2020 19:35:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 abrecht.li B7C632D97C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danielabrecht.ch; s=mail; t=1603654517; bh=a5efiLUDrkeTEsCKZAvnApXCBqioTFwxOtE4nY4KXVA=; h=From:To:Cc:From; b=j0E3ZjnFRJ/ZkcZm/ZKW6XW8BpyKYFZ0LH4FeGsbmY0Q3+vSNHm0z73x2IBFSVNPj PvVWL7j4C0TFMYvW6TqpDvIOnShMqjdKJ/9Ak0QJSK8AQFQtPjYzf9llVKFvTa9id/ QDf42zvnIHT2YcZkmTM/hJzMFk/umD2ELCp+/P6k= MIME-Version: 1.0 Date: Sun, 25 Oct 2020 19:35:17 +0000 From: Daniel Abrecht To: dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm: mxsfb: Implement .format_mod_supported Message-ID: X-Sender: freedesktop-linux-dri-devel@danielabrecht.ch User-Agent: Roundcube Webmail/1.3.15 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: Marek Vasut , =?utf-8?q?Guido_G=C3=BCnther?= , kernel@pengutronix.de, linux-imx@nxp.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This will make sure applications which use the IN_FORMATS blob to figure out which modifiers they can use will pick up the linear modifier which is needed by mxsfb. Such applications will not work otherwise if an incompatible implicit modifier ends up being selected. Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper"), the DRM simple display pipeline helper took care of this. Signed-off-by: Daniel Abrecht Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper") --- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++ 1 file changed, 8 insertions(+) .atomic_check = mxsfb_plane_atomic_check, .atomic_update = mxsfb_plane_primary_atomic_update, @@ -495,6 +502,7 @@ 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, diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 956f631997f2..fc4b1626261b 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -484,6 +484,13 @@ 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 = {