From patchwork Wed Dec 15 10:15:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1830 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 C24213F18E for ; Wed, 15 Dec 2021 11:16:01 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id lt10-20020a17090b354a00b001a649326aedsf16892739pjb.5 for ; Wed, 15 Dec 2021 02:16:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639563359; cv=pass; d=google.com; s=arc-20160816; b=pkCS0ks+nCtK2tA4HXjMAgqLnPnfZGJJJW5VjNBdi2yvWuVf83nZTokWekcqPy7EFH fwfVNriveW3yt42UUcK1Bk4E94VXJq65GWIDXtw6MqsrZ04HGjPpbJ3k/HaPzCfciidl +G9jWCbABdplevdnGpeKk4mV4yOV1Rq8i9Cafe5zRKLq5nZQQ4UMGIQDqUBIO+qC238v RpZNw3zNxF7UssZMiaNDPqIQ0ldrTDJxEAAFKWuVj62oIKKsBWBjY+5wfs58oRKFX4Ig uiNnQ0i+lvV/oh+m+2yHbUPhHZ/dE0byQCkYgUupJqLBxp3QY43u9HK9hM1+0eNUAVSJ Iw1Q== 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=RmupOorVur8nb0PCFW2hO8t3ae0BK1YQGBFk/DZThec=; b=Hg5ztpxU4TEl6ZwCQ78APwhQAKYF41++p0d8GaNQs4Ymn7N3Pbqh5Cx7lpknUsrJk6 Ke5OrClx4w2P+YMV/F2PxfMOIuhyNJbFMGbDtqZ8abdGIQoZZGnyZUJ8mw8MrXCEosll 9/tniuObJhJyxl8GcoE19x1YMKAiCHMVS95el+wqyCP9oKfP9IfGgdv/ptg7cxR2T3F+ WMnaq2qSNKamTjAlhIEkjRn4m/yGYZc9iC/ibibcHV9mMeaPoAnM4FZnLTYB8ZXRWgdl V+QGJfrYjwI0HiBhzH4E4TG3qtkXYF4HYjmF1ubK+R4gyr4Z9MDaSJHlQSRs22MHuFNR kePQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HiXQKeyS; 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=RmupOorVur8nb0PCFW2hO8t3ae0BK1YQGBFk/DZThec=; b=ikIgkd6L3JT9dublNA/KMdwSNmwqnEjHDzKR5rDO7sMnY6BSeYEZYIRzLSptVZKjuT wiZkROLERiNrttkFOnmgFk45DHwg2UDuQBAj1/weJ9zYBy59ec7Su7MuJ1Lhme5F/h1p UOHXjS/TyJ8fEskpwnogp01LJUv1RyMTc+t7g= 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=RmupOorVur8nb0PCFW2hO8t3ae0BK1YQGBFk/DZThec=; b=0B41fdFS9/Td2DQzRkScK0a8qMdciMyppivcdi0pIa1zZ2G2jN8NMKXrO8jJQ2rh1X jvgB0TsfoMSQTpGQjAF5AGWLYBMlpzAKhlxDv3arGpgW0ZTDZtlKQAAf9GGxQNckmNOb AP8O1VKle3g55loxSmkQrtr95gMzcu+jEA0wvoo5+0X3+T3nwRlrFnsLvJRuqbwgP/30 wOWs1q1nG58j8o3f3dRfnFtQrNdvAWsVJ85V+PbAWpXhwBG4fRhOPnDdnfx5PbmfMgV4 NltMaHWJl7QYZjByhK6D6XptVcGmk2NQL+DPJ3+ZsudFljZf8U6dWriBB+u8wDmwuykC W/HQ== X-Gm-Message-State: AOAM531nK7sjIawG3jC/xk+O0fgmkE0iHlxesSVXO+O2LAhV0xosUXIN 2ahS+iu7aZyUuSXtO9hDEoXX1ZgG X-Google-Smtp-Source: ABdhPJycBoBKJbx2xEhphnfBFTJ21ydqISG/rDISCc61lZWfDOugOADnTfZSc/ASjBDRZvt5YudOZQ== X-Received: by 2002:a17:90b:3ec2:: with SMTP id rm2mr11180647pjb.1.1639563359179; Wed, 15 Dec 2021 02:15:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7804:: with SMTP id t4ls696238pgc.3.gmail; Wed, 15 Dec 2021 02:15:58 -0800 (PST) X-Received: by 2002:a63:10a:: with SMTP id 10mr7417006pgb.172.1639563358461; Wed, 15 Dec 2021 02:15:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639563358; cv=none; d=google.com; s=arc-20160816; b=bkHpINN+ckVxORdqeafyO2rIh/H2fKtb3GxlFC1F260PSpSEJ0rEzasYHUr6elx0mq fzo6jVDbpX4kGHjuWY14PiCXh4wJkg3CfoFOrJLCiChOG068jOWropUPMKQoOuaLe0fe 9GFwz8VF909+gak+tRZXZOvzP15KkcTyjvfV6tkuXcP2qh70poooQeefQ1UsaBf7axpA USXMjS32m7jQqBx+f6b6AA316JgiJfVnplkfFiWnoyWmh3VYPssP+T0dBU+/vwXw9PWN a1AIKmuKREpyfKFj1e0XHbp4UT1VL8pk23Rr5PYST4FGHReCB1U0exfhVWnvYcQAHJ3R tsNw== 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=+ZAOBOL9rgasMXWW86nZAQEbYkZElrISjQDknTY4WUs=; b=MbP+9ThLeTgmfDHo+7bbqTf0tlmy9gEiypIw5uoCKCPvZQUAFLmXoJXybJEWH1/xvP hMI/lgqcPvPQRtPYyXaDWY7W8U3AJIs8Fs35BzhPi2kPd0dBRzvXM4tEKNQtU4TCuB49 jKgR9cUgEXOmkr2LLQvOIdeAlziYVt0MA8ciQjuCLmIicQuJSxoFlhL6Lduyuy9TQ46F MDHVvujApYWYs3reo2PKcU2x/0TTfOiMueBieCe0SGvg9j+tn3TcCERAc+m14zUUXa3I GgPewxHCOIP3PS7CkgsMSKPdBFut7BMeyIa8p3UHy7BYarWHivSRM0TE/14ySO24UzbA +qLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HiXQKeyS; 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 v24sor755056pgl.65.2021.12.15.02.15.58 for (Google Transport Security); Wed, 15 Dec 2021 02:15:58 -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:2b88:: with SMTP id r130mr7480830pgr.80.1639563358174; Wed, 15 Dec 2021 02:15:58 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:a7:8328:d9c4:5bc9]) by smtp.gmail.com with ESMTPSA id v11sm2408149pfu.184.2021.12.15.02.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 02:15:57 -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 v4 4/6] drm: exynos: dsi: Switch to atomic funcs Date: Wed, 15 Dec 2021 15:45:32 +0530 Message-Id: <20211215101534.45003-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215101534.45003-1-jagan@amarulasolutions.com> References: <20211215101534.45003-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=HiXQKeyS; 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 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 29c68379e6be..983e7cb65e2a 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); @@ -1433,10 +1437,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); }