Message ID | 20220117084225.125868-6-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBEOYSSHQMGQEFFF2ZPQ@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6ED733F067 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jan 2022 09:42:58 +0100 (CET) Received: by mail-pj1-f70.google.com with SMTP id ij17-20020a17090af81100b001b498904910sf868243pjb.5 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jan 2022 00:42:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642408977; cv=pass; d=google.com; s=arc-20160816; b=FjJW4ivTOViCwi2CUxZ0KXr7xRn3e90UtRAQoc9y206e1ctrh8FTixobgAs0UiPAZQ kmfwWOOfn/PwZ9ZFk1P7VwVPxNlJcIaFAxVjjqEf+ok99pIB0zKucK22jus6r7HXwHcC L1TWs7AUcsaJzqOiI+UBuAfGT7KIc80w3TwMnQf8fBCRbLmDQa1rZ/mFJClYafRne70j dXOyDXRCtWYEImx1cy9AYqUi8l1ATk0K9Do7SKl2lg+6GN79sRxS0VB49Vx4xc8+NUD9 zk/s16XNfCGjFG5CfkqWyI+jVnnTk0oMhsDds8Zc0Kx8sbwM8ZlRg9zy1Nlyc/dzndsv 7e/A== 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=qnYuZzozT5eEGrue6FC0o6JsPLAHQ3gnedPbjPzlmts=; b=LcohqXlFXs4YTCUPAlvtUhhwQyqi09z18He5bcuugmxWYKhx9PZdIv8AAsfvawu8de mD5uLaYhQNq9VmhHgNzLlczT+kj+xaiWjCn0adZR5I3ApJz/6Y/L2HhZObDEhNt/fFuP 6fVffjcueR3dkn5z8jJTwOh8ZlDnE+YRmfv06F1JkWgxBy55GbKE7LhunE3OhWI43JKk fvXz4EiibjhYBs0EoeCkg/4I8Oqalk7crws6vpipE9hpL8Pk42Z+nYmGtnxcJeOSTYBS zYJfwnOOHup92i+645H+ivb0cTr/RgJfjx6DC0C/K2si6uQGcVONT28zDXaX18tg8flK QRvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=o4hBzWZm; 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=qnYuZzozT5eEGrue6FC0o6JsPLAHQ3gnedPbjPzlmts=; b=CpmDE8pQLZaAi4r1abpZm7ERq17+sVooXghJ2Mdrr8o6zugh1TwgrF0xRt0OLwI1lc qXQVHmEIvSV3SiYOiJV1w5hu8S9rXaYzDVpkjPKddysBuTKZduncPZkGfri4eUEUIG5G qYQtCBdZMZTsNKtWSjUo1kVcliySnIhp15XhE= 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=qnYuZzozT5eEGrue6FC0o6JsPLAHQ3gnedPbjPzlmts=; b=5wzVd5HKqjgq1hqRedVLD8b7D5uj5Vmro8DqMofT/AzFg5181VLwKM3HsVBKnf9hTL wMN9NU486L80i0KOE7RZc6RtKKybg+zIkDOHcc5so4X99lY/FrowFUuNHThRN1mfH15Z U9ugGRlnRaIqnos5dwGrflaZynO4jKJl+LO5+LmamfE98rXcnPYrEZ49Pcm2kJae9HpL xn4Y576Hn5I5OP59IbEPyTm7Y7UpTL2428T2uT3sHEm8f0obRPgqFGHONgdltpOY+13a KSSNaaWyjh1oEDxDJMPVfEOjosB+iYe4lgpbFGD+dzNw4e5TBaO9ATjnf/amRw3dmL9F GCjw== X-Gm-Message-State: AOAM533kFvey1HE0nGk6imGeMoIPmn546jONEWsZi2iIPVhjn3uNo9/I a2117X30SQutS6fYtC2xzEJLYN3p X-Google-Smtp-Source: ABdhPJwwclt9vyfYpQOdXeRgokjuefSymOlmbSOzG2mt/k7RWrn5cTI5Vsi9sblrHtHHZhrR8rxTjw== X-Received: by 2002:a17:90a:348c:: with SMTP id p12mr33040340pjb.90.1642408977235; Mon, 17 Jan 2022 00:42:57 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:f68a:: with SMTP id l10ls9776299plg.11.gmail; Mon, 17 Jan 2022 00:42:56 -0800 (PST) X-Received: by 2002:a17:90b:180d:: with SMTP id lw13mr20649408pjb.215.1642408976527; Mon, 17 Jan 2022 00:42:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642408976; cv=none; d=google.com; s=arc-20160816; b=tf5mu9tPGKfF0ShxhIV0arXHFWbmJs0x3jFEE8Z57fAl3ewLK3apTDv97PXa7ZSHms qjvaeNOtxdH4GQpOkk1gqzskaGQcrh5IJFpfI4fSFy3SkrqFPKd22bEBSmb/yYgKNja1 DVll8c+EBpeuWJHiBPx8UZghbKtlW14wsj+LaEgZ1m/5srZON27ogk9nHnIVNregP9Nh SEPWsTwW+Qlae9yrF0nq9kvlFLAOnlI0bzOsVFa7IoOwvJphGiIpusR4zROmfy6AZBx/ JbgrM7KNOPLwNiBjOOm4UTnJ70uuZFdPc3brcNhTOrM7biiuxHYbFZHKaAmsvtm48mYV mahA== 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=aLlYG57QFItoYuZcxPFo4KFDVccBN9d8QTsSjRhhKIQ=; b=tB2YVSl44hsdbPuo8m/2sbqUuL2wCMjDFK5AomBVhc8d5PIE6/HZY6dEWamqAoz3a1 TR8uC19nB5Nw0rXn8EccvKFsirQ8rY3Zx+6cf2xluKNo1Wu8HcHvP8L+bbJn4bxznQIU pB6zdlCB93IEyCHe1bLqTP5lR5pitvkk3R+5wt1vyV2Vd9ZWAfZONChLiBTGIklPIzaG +pTAhFLQLjUA7i7RbZNFzUuprY0kFaI3+zKOmwAjnXTTuwdsfzA4So9iKbYJZTlT1zGN AvStG7n436IV2SUGVyPAHh4YMNjIcRrBk/hv3k7BtlnEz0jdKn/0aiAuO4aCdjccV8Dr wd+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=o4hBzWZm; 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 ng16sor2366216pjb.2.2022.01.17.00.42.56 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 17 Jan 2022 00:42:56 -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:90b:3ec4:: with SMTP id rm4mr4135719pjb.120.1642408976214; Mon, 17 Jan 2022 00:42:56 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 00:42:55 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Marek Szyprowski <m.szyprowski@samsung.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <narmstrong@baylibre.com>, Robert Foss <robert.foss@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Sam Ravnborg <sam@ravnborg.org>, Michael Nazzareno Trimarchi <michael@amarulasolutions.com>, Inki Dae <inki.dae@samsung.com> Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v5 5/5] drm: exynos: dsi: Move DSI init in bridge pre_enable Date: Mon, 17 Jan 2022 14:12:25 +0530 Message-Id: <20220117084225.125868-6-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=o4hBzWZm; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 891b5c984f0c..1c3633f9982d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1391,6 +1391,13 @@ static void exynos_dsi_atomic_pre_enable(struct drm_bridge *bridge, } dsi->state |= DSIM_STATE_ENABLED; + + if (!(dsi->state & DSIM_STATE_INITIALIZED)) { + ret = exynos_dsi_init(dsi); + if (ret) + return; + dsi->state |= DSIM_STATE_INITIALIZED; + } } static void exynos_dsi_atomic_enable(struct drm_bridge *bridge, @@ -1539,13 +1546,6 @@ static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, if (!(dsi->state & DSIM_STATE_ENABLED)) return -EINVAL; - if (!(dsi->state & DSIM_STATE_INITIALIZED)) { - ret = exynos_dsi_init(dsi); - if (ret) - return ret; - dsi->state |= DSIM_STATE_INITIALIZED; - } - ret = mipi_dsi_create_packet(&xfer.packet, msg); if (ret < 0) return ret;
Host transfer in DSI master will invoke only when the DSI commands sent from DSI devices like DSI Panel or DSI bridges and this host transfer wouldn't invoke I2C based DSI bridge drivers. Handling DSI host initialization in transfer calls might miss the controller setup for I2C configured DSI bridges. So, move the DSI initialization from transfer to bridge pre_enable as the bridge enable API as it is common across all classes of DSI device drivers. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- Changes for v5: - init dsi in pre_enable Changes for v4: - none Changes for v3: - new patch drivers/gpu/drm/exynos/exynos_drm_dsi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)