From patchwork Mon Jan 17 08:42:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1843 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B16CA3F067 for ; Mon, 17 Jan 2022 09:42:53 +0100 (CET) Received: by mail-pj1-f69.google.com with SMTP id x14-20020a17090a8a8e00b001b3b14c53afsf14366413pjn.6 for ; Mon, 17 Jan 2022 00:42:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642408972; cv=pass; d=google.com; s=arc-20160816; b=ieQ6MYLkJUqO9U7n3d9cmikjlp/rRjL/51w+C4rVT5VtEWSKHJa2og1MuuOjm4aGp7 1JHH9HFdRTg3NQqiLvrOGSB5S6acqbwfyv679jqIyH8o/Fmo7b1TB2zkj7URk5ychwi8 wWdl1Yo8u5/U61gnFz/Ys4TJdbP4LfBzZ0VHfXdl0P9IcvYziHDtqbyXQm4mQ47tMMPd sEx/kXDwUrGRSAXefeuMA7zq8cqnx4FbGqKjX1/10wx55IFiZ1zxgpHcZkDUQYKNtNuu fBUPkcURdZYjKXlgkxAm9LrycCSQF/Q8pBlQw2h5+Lu+ouuR8PPV0MB+MH/VSCzs4LvR Sg8g== 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=UZ2Us7xSevoPewXAICGGSlggGmfX4/Ud8PWXrNe+whY=; b=zIx518wAkInHwzilIemcs3RnpFPRBFc+me/9TEd8cqmaEq+h0JuQ8+UbDzRs6nBJjt S+qT1HKYklXCGTLM0CpurDWXWbx+3UJGrjwHj+aJ3bKl0USpXmjrjbrkgqfDbGbwLMsg Bu++28rOhL8Y7Zv0F7WxLSGKDdLWc9uiD4OIc3gO8dM/rAQoChhK4kJPGz3AapmFnMML wjEZGMgtVYbfUBYP4HihGnABqe7NxnoYKCA3z12vjh5vOyxxDW4QpGQxfhzP4n2TPI77 amANnXY3jcu26/mLL/lwSEMGV1DdkNOytFVN2ALAcLvpX5he04cGyRl1N41AEsdyn58y R3Gg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q4hm+8My; 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=UZ2Us7xSevoPewXAICGGSlggGmfX4/Ud8PWXrNe+whY=; b=Z8EWUKIJ3CXrhHgwPtZndsN6CjIgCGPhGrfJ6RmF46AE/vct10mokFvgOQg6N4rip8 UNhx8cTc4RnfohHwsnrzK0yDWeRpJE6UQTIegbTsRimbmxQN/VWD5MQiG0jQGIlnhS0R 4btHh51z9M4uUvVPuWIYWsZa09F8L4jYUu1A0= 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=UZ2Us7xSevoPewXAICGGSlggGmfX4/Ud8PWXrNe+whY=; b=WgKbt7bKbjPx0kFJQc2Xk/4Zbgc3ol3puTgXasqcvhnPvtNKtogcroPXgu5oBRFvkU TAP3DqYC0FMhwaDmLy0pLZ8nxfyaTjErW/SdbxhGbXiFNgbq8PcQPCsipOQ7DLXr8VSM KZci9jHL6vdPvAYx854SAMAxRAZ/pNhMqM5Cz/fq4uxBqdFPsWY+vqeQKXcoMoYyEc3S XOi0VHJFY+FsRI7do5iSiIXNtULbJdoyw+CDwRFMAtFR/ZjCML9J3X7uEH2BH6+kiXV7 kmB3rGLTO/oLEOp2R4xPPZsHb75a/RGQQ5dyLNUx2AVxJVsVhWxbM6T9BGp7YZ8Iiu+Z UpbQ== X-Gm-Message-State: AOAM532vhcgZczMYPabR+ih5WtGH0VYb6I6MuHtxhQfXC4IJzKlR30kg sKwlp6ongxKg8SO481PrmbU8Mxkz X-Google-Smtp-Source: ABdhPJwNerRBmH9mxUFhSZthZqbm6kNzpUGtRbcSejpQU1Mi9B3XicMnOZN92Ndq+A8h040EpYi0ng== X-Received: by 2002:a63:2c81:: with SMTP id s123mr18276669pgs.511.1642408972520; Mon, 17 Jan 2022 00:42:52 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:5c1b:: with SMTP id q27ls4474632pgb.3.gmail; Mon, 17 Jan 2022 00:42:52 -0800 (PST) X-Received: by 2002:a63:5607:: with SMTP id k7mr15305596pgb.190.1642408971836; Mon, 17 Jan 2022 00:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642408971; cv=none; d=google.com; s=arc-20160816; b=xd2hCWUY7u2z8KRe+9o9H/iKI342cVdnnDWHC3LDobp/hcmIBdz4mmibzumB1HK08+ MMn5hKhqS/sRXlaxFqDcveYGJ6YqIqrPz36BBc40sCj1ZRMXlss/FGUh++OUWN2I0SCV 1QUSwfjrUJq/0qkfsyLVEpwajKBr/tj/RVZyQRbCqRB+B/Id8ImtZrHkBvkWOjvIqqLe 4bHzqxRKvGDssZYze4cjMSj2XMXD7dM4LH6ShdwUDlHvoGlXPNGuoWyj06RbP/UjOuST Qemt7JVaQj4PnF5mpYFCAzTC3uhMSCZvx9h0E2O8HoCKTi2q5WsfvBpRlQ0l9x+jZs7J xptw== 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=IhmCFvkAszHgt3WyWtiQC+FGRY8uffNwxLOd3YDOkC8=; b=lgwUa6MiKpG3B3I7+6ON2/VbZ3d4nFsVULaRiS1HqfsW2jvaZzAB4E5g2gqJtBL8FS uDuffZpQJBMaz9uehAYUmp8MybVm5pLtR1M+5z7vFfIVSVVKCICrKfyNeIF0Flj0+gdI Yb5GoEDSIvhLg/V6E2eDN1CbTJKO1E3NYkdngzw2uhFI14z+bPspTr8kOEdGKYi3mJYR zpNTHTPg1ko/y9Pi/AN4rDtk43pMhS1GkSZ9Kj7vFKImE6XP5Se/8zfr0TQxLYh/BEKS XsXBAy+3atA9pXpqheiH/Ptt5fmVydQbtVfCEg+Vo127S42z8rwpQkRiZlJTsZXXkTwh uoMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q4hm+8My; 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 c15sor7535620pfl.15.2022.01.17.00.42.51 for (Google Transport Security); Mon, 17 Jan 2022 00:42:51 -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:a63:7543:: with SMTP id f3mr18191438pgn.360.1642408971597; Mon, 17 Jan 2022 00:42:51 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:955a:760d:bbf3:5d4b]) by smtp.gmail.com with ESMTPSA id z3sm11763423pjq.32.2022.01.17.00.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 00:42:51 -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 v5 4/5] drm: exynos: dsi: Switch to atomic funcs Date: Mon, 17 Jan 2022 14:12:24 +0530 Message-Id: <20220117084225.125868-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117084225.125868-1-jagan@amarulasolutions.com> References: <20220117084225.125868-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=Q4hm+8My; 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 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 8ca95c72ef18..891b5c984f0c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1375,7 +1375,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; @@ -1392,7 +1393,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); @@ -1404,7 +1406,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); @@ -1414,7 +1417,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); @@ -1442,10 +1446,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, }; @@ -1624,7 +1631,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); }