From patchwork Thu Mar 3 16:36:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1860 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 34A603F236 for ; Thu, 3 Mar 2022 17:38:29 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id v127-20020a622f85000000b004f3dfd386e8sf3449988pfv.16 for ; Thu, 03 Mar 2022 08:38:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646325508; cv=pass; d=google.com; s=arc-20160816; b=mnysilQslmgcF58eInFeqFas7fPxuwbTHfQmIV9lLA6xCMwwCjECy0gizte9J1wDm+ 6jjuow6eDenBJmLT11PQ+0MpVhFamspvwzXD9yDy6mZf8goC79ZMzdbLgGlAwePlg8g8 HbqZkA2tt1+88uWTSZhCV55CPryvhqO+HuPk5XXBkFUgZHPMjXExvvIqpLrBmyV36cTz 3wkgQSDu5vmvbXAI7lCNR2zB5xRGNw0KzsqowG0GpzSB/3yFgDTVxysOpugs6RNIjT3x 7el4Ia1g1dX3WGrC1UNEeE5fU6+eUszqQIhC+mCuiLPsDQQ+2YEGBO1NFJqv/tlBkCVN AUNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=MfNJCjDF0Uw6zp8MWKhEX2qTrZ8GIMRv+/2Fz5qbyFc=; b=BcfbeP5kBCm+xvl2DE/MEZk8C+2ASMf7NfNM8OMGiX+hAGPetLGlXanifXhOk1jsfn gToDhNexOwC3qCayBc2iClTQT9oxz+djddheTBrZcPBBjXzwrKsVFbg6FQtbkIsLjKQm R6dWhyX0LlxkKltV0TiIPFGgBl9Nq6eZwbZpAfSDlxEM602gzWS01UIi8o86/gw3Kfkl myPvYCMGMfatpkLhsDMUWaCLimxBAzSjPhiCEbO+kl5s5lccKQQPW7W9nFrOS6ZoAvHt hY9cHWGh6ecAyYzFjV4RkaFlxJjqsQk8TzKp7iejxR1nJXADFMJarTfbjeT+xpf/uKYz gElA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNhMYmsg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=MfNJCjDF0Uw6zp8MWKhEX2qTrZ8GIMRv+/2Fz5qbyFc=; b=dgy9VShvTSaNQaMvz7NELHkDgxLDaoE1b2lauHXiVqW+D+PPZZetCtgU+NTuf/0oIe pr1ZUUE47Veoco28aSixejTCciZ570vOvSV1UXU68m+lB6MxXD5YU7yMj0G3Me7tqyL4 aTInyfLyzG4l2GNq3QAWNc3Tby/moKKEHjh/o= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=MfNJCjDF0Uw6zp8MWKhEX2qTrZ8GIMRv+/2Fz5qbyFc=; b=suzjwywQ11DdfJXYNCg5M/CZVuIaYHG+NbnrNNYMFmn59fxO9bvseVvquFfmGDx4hK uXoG9Eaifs2VlxkOolTjsk7QJ4Y9BQnntq92VIfI3EwThxD+qLS4j3PwWgEU+ty8Tg+/ R7eF+6N1HZ+KIdNH1Lc/xnuJsTY/UeiH7lEvuJrZU2IfQisCEZysdzV8bcQwIR/d1F3u Cwq72bbXfAVqiTXJ3B5wPCGq2VIVR8A4l6jaoVyJltaxDlXWXcusqKorXFF2a5jdIY2i D3VVjGriG9bqg7I4ZwFQ4Z5OBJ8wlV3qzyn8pS/6Qh6OfqPLX4G/LT+dHiiOZeGa32O/ RmWg== X-Gm-Message-State: AOAM532rjm61w+Oz2C1jcDBOP6+aMh6iIwR0uOFWIGitLNzoIEbZRba9 Y0r+VbDwFYBvkDxZXR/0NspzEUSd X-Google-Smtp-Source: ABdhPJxSftYWQL3BEZqcnJ/Aj2BlyAZN2FUTo56fvemDb74NaAvGWeFt5uCtG71A0nxhJ5ihuo44yg== X-Received: by 2002:a05:6a00:218a:b0:4e1:9ed6:c399 with SMTP id h10-20020a056a00218a00b004e19ed6c399mr38863953pfi.8.1646325508021; Thu, 03 Mar 2022 08:38:28 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:1da5:b0:4df:c6b0:2ef8 with SMTP id z37-20020a056a001da500b004dfc6b02ef8ls1345052pfw.4.gmail; Thu, 03 Mar 2022 08:38:27 -0800 (PST) X-Received: by 2002:a65:63d6:0:b0:375:7cc6:2b63 with SMTP id n22-20020a6563d6000000b003757cc62b63mr30828279pgv.598.1646325507299; Thu, 03 Mar 2022 08:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646325507; cv=none; d=google.com; s=arc-20160816; b=Yq1Z0bfEYlS/WpV5NZHbPwkuk9T2xg5qDyM+zRRsaeGhM/u4w0TLUhi6rgQEUAltzK qaaFHq6xHWwTYy5Hjv9otiHqZ4M5cSsEYZFLWpTrWI794qULtE8gLvcwMjcQj5/cpBDK 8ZYElGRqPFIoqp116ksr0/wfPVoEKWoFcV9ifRP1Br1eqfV4vN817H7SMRtwNmv4m2el EKUgqFTioxTi+7LA2sA9SYo7SC2h5J5z6KGxKB13EHP8ObwcIRJS5d+Ovjf0meryGJwB VtUe2e83Zu/MhX49h0pV0bXJlMJ8emDOlQEMKSYjWmJIXii4qQnbJdlwDHhJwj6IKzB3 sXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6JVjelDqCtnq6rwBigOzoJDvHv6ras97xpKYaywy2gI=; b=kCNU1n1XYBuSicToh+6smpFGgIvAXEnHs0y7/a/MxvA53IK1Ftj1JMIhwlS4/knKVW oRyhm3ygqbcG0EEGs+Pz6MkoYiLjzEy+1Iis77mc41sfROrK6XbtVllEMwjlmpr18AW7 EJ8+U3fl92fcvAQyNEE2M7taZ74VBexEL05EqrpJBsPE4XiS/E69mu0szI6XJ2tTPblm Ylj/ay6Ou41pRquFHTjyLnNijpvqtn8LzSTVHtdEq4KqvxSilbYnNu0HrYbEZfB6OzLy OOdNfon0+ouxSWW5q4EtCHaI5O1kCFMfKLFulJEQR+c0GBoB+pRTk92d/03jCn/irGYT aU3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNhMYmsg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id v14-20020a056a00148e00b004f3bc62a695sor10359285pfu.68.2022.03.03.08.38.27 for (Google Transport Security); Thu, 03 Mar 2022 08:38:27 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:8432:0:b0:4f6:6dcd:4f19 with SMTP id q18-20020aa78432000000b004f66dcd4f19mr4057761pfn.53.1646325507004; Thu, 03 Mar 2022 08:38:27 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:4526:5253:a010:63f4]) by smtp.gmail.com with ESMTPSA id j20-20020a056a00235400b004e192221ec2sm3220983pfj.14.2022.03.03.08.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 08:38:26 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Sam Ravnborg , Michael Nazzareno Trimarchi , Inki Dae Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v6 6/6] drm: exynos: dsi: Switch to atomic funcs Date: Thu, 3 Mar 2022 22:06:54 +0530 Message-Id: <20220303163654.3381470-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303163654.3381470-1-jagan@amarulasolutions.com> References: <20220303163654.3381470-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNhMYmsg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The new support drm bridges are moving towards atomic functions. Replace atomic version of functions to continue the transition to the atomic API. Signed-off-by: Jagan Teki Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski --- Changes for v6, v5, v4, v3: - none drivers/gpu/drm/exynos/exynos_drm_dsi.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 59a4f7f52180..06130eee8df8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1358,7 +1358,8 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) } } -static void exynos_dsi_pre_enable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_pre_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); int ret; @@ -1375,7 +1376,8 @@ static void exynos_dsi_pre_enable(struct drm_bridge *bridge) dsi->state |= DSIM_STATE_ENABLED; } -static void exynos_dsi_enable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); @@ -1387,7 +1389,8 @@ static void exynos_dsi_enable(struct drm_bridge *bridge) return; } -static void exynos_dsi_disable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); @@ -1397,7 +1400,8 @@ static void exynos_dsi_disable(struct drm_bridge *bridge) dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; } -static void exynos_dsi_post_disable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_post_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); @@ -1425,10 +1429,13 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { - .pre_enable = exynos_dsi_pre_enable, - .enable = exynos_dsi_enable, - .disable = exynos_dsi_disable, - .post_disable = exynos_dsi_post_disable, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .atomic_pre_enable = exynos_dsi_atomic_pre_enable, + .atomic_enable = exynos_dsi_atomic_enable, + .atomic_disable = exynos_dsi_atomic_disable, + .atomic_post_disable = exynos_dsi_atomic_post_disable, .mode_set = exynos_dsi_mode_set, .attach = exynos_dsi_attach, }; @@ -1597,7 +1604,7 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master, { struct exynos_dsi *dsi = dev_get_drvdata(dev); - exynos_dsi_disable(&dsi->bridge); + exynos_dsi_atomic_disable(&dsi->bridge, NULL); mipi_dsi_host_unregister(&dsi->dsi_host); }