From patchwork Sun Dec 12 18:14:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1820 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C91AB3F071 for ; Sun, 12 Dec 2021 19:15:02 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id x18-20020a17090a789200b001a7317f995csf12110373pjk.4 for ; Sun, 12 Dec 2021 10:15:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639332901; cv=pass; d=google.com; s=arc-20160816; b=cSImiP/c972QMRPQglOpiHv1mCMQtTqGHVZ8ybxN2ptp5sZiz1zhz92Bu1QYofhki/ 4NoNf4K6uc1Gkb0Gd7gyJKaQPYOl7gy2lRdPS3WU0yY2elWb0szEHSzxMRiK9U7FrnCn 3rlJSzr0RXjhPA3rw/sBhzH6UcQ4fb9NkK1ya1gzldgoGCU2Iq5HZaHlPRjCtrEk6/Yl emnnAdFSzq/2h3VkcP0tBFDlRB+IxzgRm0hYvogRXbhk1YdW2n+/qbItFYEnZVc7/dMO XcYGtjn3AdDZtlZHMZzzL/fQ7lVzH+H2gPY2H5/puG3DjeI43F4mD9NgdwVRlGTFvIu6 2QWg== 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=NqI5w3jPrIiHw+Ql1ZvraydQw5GuZto2M1dMy27CdSw=; b=cMOH8fwLmK0+b3br+NlhGmgYeS1pAgVzkHfKPMfw1GCwgRUNM+v/44VZG5qHdUV2nI sD506Yc3MZVdhihxUmGLCd/R3vLcDjzZgB7YF1FzE1vEWJ+Sx9oU45oE3fmC4KV4i1mI QYF8yTj30tv4treBU0/yMLuzQtfK9DxPe3ZZM+UbJ7isxyMDU2AfmCTcLnFQBvZZ67ir Ce1JpbePRcTUSnNDJIf9Rf3nWfFOxqK+5mU9VtiXvWacr1ThKbAC23hQqvYzT60PFx+p AQ5xnqgh7pKoWGruYrTc1T69cItVm1GTQ+4I7fTWA7e24woGJowPor2m+M/T9mbMQEqp 5h1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=q9mnqUDF; 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=NqI5w3jPrIiHw+Ql1ZvraydQw5GuZto2M1dMy27CdSw=; b=OcGx+lX2u+7EkkuY1ROuuS++I+u/laoPdNxl4j5iBHB4AF++S+YWtFaSdlLGD9Zdpo qQ+P1Y2EoHgcCy9EeCC0iTvZyXM9qObungxbqDRh2R2V5iQow8sBhfAzEA41jvP8fIDn Y2NAigmVuWVUKWTJgw4zU0WYDhxkaFd6pC/M0= 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=NqI5w3jPrIiHw+Ql1ZvraydQw5GuZto2M1dMy27CdSw=; b=cV9jX9Zz21aedFCcGwPbS2pcamnNZk1Pm4MMYJJKJ/uhhR0WlNJVOJoqsaNWeFhYyv R8X4/c/9AwBhDZ0wcOK/1hHtDFmArkXINj8lWT9PgrfKWHvTEgsVptCdBsirPQL5j1Zm TowxhnmIA22kBcX8QsoY3RE3SCI50q81F3mVZm2UmQGRHu9Gr73VPdwMOKawLtJ56uhA 8fOzGdyKuQEDHcGecEeKuvFVu5tHRqLOB9TdUiK6wq0d1JAA4jPY4rKB/D0H9ErX7yQK 2HL0m5+E+avY8q5kMygrkyZkpv/VCNg1SYF/0p+lOTKFgLcGyr8EUdXWWWasxYb1ZXpt ockw== X-Gm-Message-State: AOAM533/gFXkyyGZhprdQpcKZ4I64yEQgYAqvwkVxo2jx/o3Vmwc/FJe uM28uUr2AKeVjQZ3PKP7qbyd9xZ9 X-Google-Smtp-Source: ABdhPJxGm2tMQNRpoLO+piKqpcqgLJ+28TyYaggBw/3X/8nuWkWs/xISuayb1fV8wjNyYEYd8lpjvA== X-Received: by 2002:a62:7952:0:b0:4ac:9a13:5563 with SMTP id u79-20020a627952000000b004ac9a135563mr29876725pfc.17.1639332901492; Sun, 12 Dec 2021 10:15:01 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:3ece:: with SMTP id rm14ls7885279pjb.2.canary-gmail; Sun, 12 Dec 2021 10:15:01 -0800 (PST) X-Received: by 2002:a17:902:744b:b0:142:46fe:7fbf with SMTP id e11-20020a170902744b00b0014246fe7fbfmr89930314plt.83.1639332900796; Sun, 12 Dec 2021 10:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639332900; cv=none; d=google.com; s=arc-20160816; b=oXn4kIs5IIegVzLrxtvTY6ssb+A9lN2y5KXE+o334ieWa90bk2gUZQl48ZbTnbKB+S ntZOPC5+nfCyD7lDy635EjTCIOn23WuJyM50QNp4PctzCHFkgdFw9WCZvfUnp41OQigu ydBPXqCoA5ILdHnCqtV5VfQinrbKCGdwIx05lhBdy/Isu+NuRFlojIEOu5OA7XzcSiim hcYaEadjinlkobwDlTghOjxfJ9TKaYfnHQNtaQoFj4Dpc7u+mKdNn+XLfmQwjdhf6Wep 436JhiLXxyIOPfNNGYY/Au56j6ENUoVc+ldRX5uEyJ2EPrNuNcpjoYIDKU6zWhrLy5m8 69CA== 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=N1uoqDXeyfdCAC0lQdnBUabP+VrBthgp4IIjRoUqZK8=; b=BCBvrCaLv5xa3ih7qeuF4Q9mwgo9yz8BYQZZutrqnZPRH2afQnYutIAcnL4aVoCB6V OXdmT2Ff4iGGBzZXIQl6brOl8rgBTKWxNKhEOnweIRFrbddxo95anfCNIve7uRlOGB0c UbMsam1SMznKwLOizCxyFAIGm9uzNOHwJadUy2zUMs5i2sX1/PRuY0fd56BR78Mr+0eb YtT+SAMnJGdLMGXl0dZgYRjaaUFI7OhvHniMRoyofYokxwVfSMcbKN9RRd6B+yO3nVZU ZwKZpd1NzsV/nokkpqas1K8KOm/eWIQI6OnnDgTVoiycsmvawAVhB9/+NSx1eabqdYFP +k/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=q9mnqUDF; 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 y14sor2033643pjr.1.2021.12.12.10.15.00 for (Google Transport Security); Sun, 12 Dec 2021 10:15:00 -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:a17:90a:9a8e:: with SMTP id e14mr38986185pjp.231.1639332900479; Sun, 12 Dec 2021 10:15:00 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:264b:de7a:bc69:cfbd]) by smtp.gmail.com with ESMTPSA id bt2sm4567904pjb.33.2021.12.12.10.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Dec 2021 10:15:00 -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 v3 5/7] drm: exynos: dsi: Switch to atomic funcs Date: Sun, 12 Dec 2021 23:44:14 +0530 Message-Id: <20211212181416.3312656-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211212181416.3312656-1-jagan@amarulasolutions.com> References: <20211212181416.3312656-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=q9mnqUDF; 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 --- Changes for 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 07083a545948..feb36a5dc646 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1377,7 +1377,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; @@ -1394,7 +1395,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); @@ -1406,7 +1408,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); @@ -1416,7 +1419,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); @@ -1435,10 +1439,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, .attach = exynos_dsi_attach, }; @@ -1614,7 +1621,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); }