From patchwork Fri Dec 10 19:19:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1814 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 D2DE33F075 for ; Fri, 10 Dec 2021 20:20:47 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id x6-20020a17090a6c0600b001a724a5696csf6488924pjj.6 for ; Fri, 10 Dec 2021 11:20:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639164046; cv=pass; d=google.com; s=arc-20160816; b=ZgVh1Gb4+RHAW46EH1AGdJjTISoZcvUwYkvT8o/4mCA06ZTLCS58lKN8f0BhlpBnn5 XN6uqqpS1Rf9chpaJ/BwJmb1AqPl3d97ahJm2pQqbbdT/61PxGvWRdi+xlw+7lbHk7wq yP9mdYSgd5rODKPz5lS/ErFiNE+wijvRmXVAVWVNL2m4R9eifyiRiKKNgFMwTZYTA38D Rpg3IxY/QtaDp43EFTUyWNcauTj1I4sqIsFKFKax+1GwRaZJw9YjBe0WJfLHhNBgkc4L g0rrQy0uFHlW2t6vUg1sxa0Kt6pWyzy6BV269gNBmH+SYsehnvEaOryRVcRqY7zQiOI1 RfZw== 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=BFr6VbpRqKwSnZ73v1bEeuZPZ9jASDX0j6VMiNi+tSs=; b=AyyxyP8X+Sm1D2z7Quhtv3gLE8Oqf5VsA5aWp9iltGK3pwuqm95rKclwltIn1t6joz ot9m09MFpHAG+PRTxAYnZRrbUI6j8qFYCj7YDRRFUPJwROKbHHZaMSeVVXBLoZOWLyK2 bidHgUkE5hlnZET7oUtTfWnpaA4D5OsKdSk/RoO1zjI1vJTOvfi2HCYPsbNS5nh2FXeO PVG9CqR9f+Vyys67nHGUd7zWmkXVDgdr/ULFMaI+p9iKr1v+4iD3j4ODV0ObpCYErx9y Z5Pp0YY7Z66RUDuI15citiXTRk44UGrF9CxCnIp6KUAerowervTDK7vnUg1DUd7c8s3D Ssbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Y+rDwOdM; 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=BFr6VbpRqKwSnZ73v1bEeuZPZ9jASDX0j6VMiNi+tSs=; b=nh+7YHaqBysghHmcN9dj11YKLdJYE0As6t2AJg0QJXWbRrnh2rVg9pZNUkYTLW1saK FeZLo6CEkpWPIhDCPAOpVndqmLXuIjQXVkr4YK85lZim9ajmZM0xK9OVQ6VLlxyNn5l5 FlRmF7X1ha1eFOrwqIDaTzoivOlrBncHZv8tM= 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=BFr6VbpRqKwSnZ73v1bEeuZPZ9jASDX0j6VMiNi+tSs=; b=WH+LZ1wL3aItnEPFZ4ZdLWJ2RmR+7JriVZumqty2s7LUqGf5jg1asIOknb3YwR7w7O PEUcmY7oCvWMVhQoZh5cZfZ+BAK2z7zmp9MRX1cdK968BWP/I9kdfzVawkha8uh6RKqA SlrbYwpvnxAetuMgWZEnrrMM6TM+FyHFM/zfcgAmFumvLbZhE283uF9LHIDiXO/foURl 7FcZ6am/voOeawS72ctP7Vt1L9P+AxoKfGjZcsqXWm9iLxvN7MhX9WDToc+iW/9+AZfC 0mdsenevZpv8uss3YaDo2XH2mNjvfrB/e4shHRKa2QYbGacnPVqsUiHKQwwDSN4x7l8f AJLw== X-Gm-Message-State: AOAM531rSl6Y1mZ5a6nJuEMxsmQ2vT6cqVPdgAJNxrcxcRvDt7gGYTS1 WAxH0ycDd1Ez7CXYltoeaWWpNHkc X-Google-Smtp-Source: ABdhPJyXO3lrPSqrl23d8jVMLlKbhgDwlG19WrEEaNwWJqqTJ1rXqe1kwzuBKrDWq8EDxUGSVuhHng== X-Received: by 2002:a17:90a:bb84:: with SMTP id v4mr26485887pjr.4.1639164046651; Fri, 10 Dec 2021 11:20:46 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7152:: with SMTP id b18ls2967934pgn.7.gmail; Fri, 10 Dec 2021 11:20:46 -0800 (PST) X-Received: by 2002:a63:161f:: with SMTP id w31mr20341558pgl.14.1639164045945; Fri, 10 Dec 2021 11:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639164045; cv=none; d=google.com; s=arc-20160816; b=aA6BZr7w0I/H70YtJKU9yF0eSAuU+go2RbPn8K3z3Wqaxsvk+SNzblgVeyxABIzM32 SpuT/VUTRk8dK2cLLfrK1q8plKX16wEKSNoLUFuXOEL4TutaYZBOCpdYdJgc4NLH5WJk 5kkKrf6irz4UPK7QOq530xe+KCSIOn6qIoQiDoIHAjv+172sOEniMs0n4UwueB362wam TX/THWmACqGOKz7VxIpAxWsdIXMljvmvgMRo5kibok30dAa7SlbchcRvdgr5xI2cakyP aBe7oi4OSlIAWp+KrXxXNaXQYfJyIXgK6a/TIgu3094b4nnLEK7xBySwpN1N/13qOgz0 Mb0w== 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=LJL7M/YkR4k8VZB5K5AMyhwtJ9pwnvBOZ1XLM0mNSl0=; b=ZZoj1+bNyUs5b5RM/pji62ktxWuBURHJH1ywq54ZLmtDkGfgb5jwPD3w0hZ9mBryV0 JGoYuToRGG7KEwFGJP5ECqroHGWmPxkWShsTS7yUsY8/CBgfuTxdR8Z6aL0kb/KRIRbw LNYR0910E4BFu2ei4sg7wy35M59r/c/mAs0nrSQBB8a6orXd9i9PQH6EX6IWoBAWvoqF Ofw/U/E/zaJOSFExvW3L5yyct62ud+09SrHdY+l9YIqWAEP6u6a0I54RDk7Qn2Qm1IDt z+ClAI2EBjRbOYJ2KCnvFGUySuIHnzMtWXbemyOi2NyjsXZXP+Ye0WeSWxiDPTEHooFi BpAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Y+rDwOdM; 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 b1sor2372606pgh.79.2021.12.10.11.20.45 for (Google Transport Security); Fri, 10 Dec 2021 11:20:45 -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:4f42:: with SMTP id p2mr41362855pgl.381.1639164045711; Fri, 10 Dec 2021 11:20:45 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:28d6:2bae:633e:b110]) by smtp.gmail.com with ESMTPSA id o62sm3493022pfb.211.2021.12.10.11.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 11:20:45 -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 v2 4/4] drm: exynos: dsi: Switch to atomic funcs Date: Sat, 11 Dec 2021 00:49:22 +0530 Message-Id: <20211210191922.2367979-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211210191922.2367979-1-jagan@amarulasolutions.com> References: <20211210191922.2367979-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=Y+rDwOdM; 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 v2: - new patch drivers/gpu/drm/exynos/exynos_drm_dsi.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 37ad94b563c4..f2c12a356952 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1372,7 +1372,8 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) } } -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); const struct drm_bridge_funcs *funcs = dsi->out_bridge->funcs; @@ -1390,19 +1391,20 @@ static void exynos_dsi_enable(struct drm_bridge *bridge) dsi->state |= DSIM_STATE_ENABLED; if (dsi->out_bridge) - funcs->pre_enable(dsi->out_bridge); + funcs->atomic_pre_enable(dsi->out_bridge, old_bridge_state); exynos_dsi_set_display_mode(bridge); exynos_dsi_set_display_enable(dsi, true); if (dsi->out_bridge) - funcs->enable(dsi->out_bridge); + funcs->atomic_enable(dsi->out_bridge, old_bridge_state); dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; 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); const struct drm_bridge_funcs *funcs = dsi->out_bridge->funcs; @@ -1413,12 +1415,12 @@ static void exynos_dsi_disable(struct drm_bridge *bridge) dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; if (dsi->out_bridge) - funcs->disable(dsi->out_bridge); + funcs->atomic_disable(dsi->out_bridge, old_bridge_state); exynos_dsi_set_display_enable(dsi, false); if (dsi->out_bridge) - funcs->post_disable(dsi->out_bridge); + funcs->atomic_post_disable(dsi->out_bridge, old_bridge_state); dsi->state &= ~DSIM_STATE_ENABLED; pm_runtime_put_sync(dsi->dev); @@ -1433,8 +1435,11 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { - .enable = exynos_dsi_enable, - .disable = exynos_dsi_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_enable = exynos_dsi_atomic_enable, + .atomic_disable = exynos_dsi_atomic_disable, .attach = exynos_dsi_attach, }; @@ -1605,7 +1610,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); }