From patchwork Fri Apr 8 16:21:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1905 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 798973F066 for ; Fri, 8 Apr 2022 18:22:43 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id a5-20020a170902ecc500b00156762be487sf4697643plh.10 for ; Fri, 08 Apr 2022 09:22:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649434962; cv=pass; d=google.com; s=arc-20160816; b=QR6K9I6rWy8SrEraQ/k9biYyjZRuCK2HpvOyioaDTVebmJvZa9USjQjG/Y7qpZuCHo hFZ68/Q5aXVkGMIiiqpqrxT3cZCTSUPUVMrvz2zvZZUR0zcEcGE3LXDEvnhksyzl5xDl qcvSUqBRRKuuCHP5Lw7sc0iroczRy2lhhf44lVVLmmSsBEZ5Mv3priaeJH/q5ZNF5esi up5vrWLZ7FyrXzmmqIbQiHb+Ov4AGe53TnAZMz+lXnoovOaF7NOjtB70PC9Pw1PaxiNf 1Srgt1Y/3PxHf+PpO3mPzuxNc5KaJ+1YTASnhKyIKXSgNgo4VpOhpe/lX8QqVRQ/T/y3 s23A== 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=K/jM7xGdy1ItY73okRpqqBtg+Iyu2bGJE5sY+pL2zho=; b=l0EGNz62kLWSsgv8jbHG97BYpzemMUpU/D+VszQnMfbsejZ87aFDILtGt0WgaeO0PD jG6DK+xo+kbDtZOETI8m9Ys0B6UXfaFgTSI4t7fQ/ADWSnLTLw6hNFt9cruBOCIde4zH UaosBXLPUFdxLhh0lMGH0j71ZaCZmITjBkStRPUtOKTHwz1BoBAQkygVh+rlaSQEr+km 3STkL4IvcI2v1sSUXk+m0JYFia1s96dsIRuVqqdQtue8b3Q/vKE9EV9CxW1FLU+R9eGy 7lR9XXpMRuUDraWgrd5lvgzMEvfB98VuAyRaj5pCyTCBESog/flmCLVBtH1R4T/SRcmC f43g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="qGFgE8d/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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=K/jM7xGdy1ItY73okRpqqBtg+Iyu2bGJE5sY+pL2zho=; b=KrNQL2B1ly8oAWdNGF8t+h99LhW0IDgraVERV+tX0Rj6tQ7xDa84ymfiHXbEQrHFn4 19zi6tTUFf43kve7W648llvCBYAfaF9HbLjlys2mdu6AHhn6oO25ixHR2KuEGOZN8Hm4 ayRQiX7ap/COcFyd4dR0Ce/dMEBQPddDN5qmw= 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=K/jM7xGdy1ItY73okRpqqBtg+Iyu2bGJE5sY+pL2zho=; b=7YFk7+FBPY27ylDY4uciswpuZMpTOBuAXEKh0NqXhSk2r0ZolbIooJqImP1QWqnz0z KUDENepBuY4C9zES2L6ohEwUnbQoTUfZjSNQuQIoZejEz576HcSMJdf4hweg6Y02r+BI ZEJNWwLseMzCG9HxygjrEGILfTy8xZcMzNGJKmW4Xpfk+tT56PVJzfwhlxl790NuWW66 8cpsGY142iQpZrL1zKk/5CtLDwxDL1WeC5FpyasZYf4RPD+lFHkQ0Oa7i+Tft/Quc/2L 5/s+jc59wXk2vt2p1TGTKdvtcIj4nPE+4T6xWE06C+pSJcNBPz1gIOXlBozErtbzAXcl 6mog== X-Gm-Message-State: AOAM530X3XpB/oO97+vKnqZpi1KDk5w6Kzo6KDZpQbFxknSvWEi73xpw 7KGiowSL7F/8JGjhb+cZmR3PJP7R X-Google-Smtp-Source: ABdhPJy+72Cix8iAlIOR5U0fotAdNhxfjuPa5Qy64Y+OhF17hOmwY9en/4pnKjRc1pEjh3B0fE/E5A== X-Received: by 2002:a05:6a00:b47:b0:4fd:a5b5:a279 with SMTP id p7-20020a056a000b4700b004fda5b5a279mr20369344pfo.19.1649434962207; Fri, 08 Apr 2022 09:22:42 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:420a:b0:4fa:f605:3bb3 with SMTP id cd10-20020a056a00420a00b004faf6053bb3ls1445665pfb.1.gmail; Fri, 08 Apr 2022 09:22:41 -0700 (PDT) X-Received: by 2002:a62:5b44:0:b0:4fd:e026:f4ba with SMTP id p65-20020a625b44000000b004fde026f4bamr20300570pfb.55.1649434961423; Fri, 08 Apr 2022 09:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649434961; cv=none; d=google.com; s=arc-20160816; b=dtT71yFl/Q0VNZMhwbhXkUYYoKcETRGhG9WdOGL1nGAx1tgyvf1Z8GwTCvWfiGGVms tUVVgbdSqFheJYV0R+co97S37QfoBZMJvKxQSKOE6TlkMm5QSIHq3fj2vfutuVEhFP1b 53sF8WzRU1gVE/M6SZKkAeHBmpI5YuG6G0uTQCv41rw06sxQCPVfAIWZ/PdO/JE4TlNF K4dgRM4IcEwbD5XtVAc+Ap3RX+VScRSqwHBcSUq16kRdOptU/mFIP1H6rkwqWHFUMF1V CL/oNZuczcrSh7j+fiS00hMuB3Y5Aandpvw5Mwgey4d2kbpDa/+eeQBRWe/x+NAlzQlt mwBQ== 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=cgQ5H26dXpBSM4rzqEEf72CNZpQ5iTR6sOekInJL9nA=; b=bMjCgUxAJhocYn0s1lbA8TU1baWtDrVD+X2t69vZ0N5q6I0rCfgxKSXJu/4R/NN0L+ H7gnuYC527HAPV1wMI++DNjQ+rIr4psjUrp4vXxcM3Khu7DvJRyqI/xeL8sjg81vMwf1 tv2YmoSk1BYU7aB00/rVAWd5+5LRDVOUV9fMHITSOJWxuGIJ9MQgjGUcMZpG7Oussa9L J0mWkTZ0I4V2Fwy38MGpjIA7mB0Nlbt9b/OBiR9WY0TOWjTZ1hGxbfSZH8OKWcBkNwjh 4SqcOuEftqo+N0JUzVO6W46RZBXvyMRwyFrK0eInlNEqymQ7iEL4rFsO7rB90gaX2x7D iAIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="qGFgE8d/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 z10-20020a63190a000000b00379066bb477sor995291pgl.48.2022.04.08.09.22.41 for (Google Transport Security); Fri, 08 Apr 2022 09:22:41 -0700 (PDT) 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:c00e:0:b0:398:a2b7:be6 with SMTP id h14-20020a63c00e000000b00398a2b70be6mr1775772pgg.214.1649434961113; Fri, 08 Apr 2022 09:22:41 -0700 (PDT) Received: from j-ThinkPad-E14-Gen-2.domain.name ([45.249.78.214]) by smtp.gmail.com with ESMTPSA id n18-20020a056a0007d200b004fdac35672fsm24929863pfu.68.2022.04.08.09.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 09:22:40 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Rob Herring Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH 04/11] drm: bridge: samsung-dsim: Add DSI init in bridge pre_enable() Date: Fri, 8 Apr 2022 21:51:01 +0530 Message-Id: <20220408162108.184583-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220408162108.184583-1-jagan@amarulasolutions.com> References: <20220408162108.184583-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="qGFgE8d/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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: , Host transfer() in DSI master will invoke only when the DSI commands are sent from DSI devices like DSI Panel or DSI bridges and this host transfer wouldn't invoke for I2C-based-DSI bridge drivers. Handling DSI host initialization in transfer calls misses the controller setup for I2C configured DSI bridges. This patch adds the DSI initialization from transfer to bridge pre_enable as the bridge pre_enable API is invoked by core as it is common across all classes of DSI device drivers. v1: * keep DSI init in host transfer Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/samsung-dsim.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index ff05c8e01cff..3e12b469dfa8 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1290,6 +1290,13 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge, } dsi->state |= DSIM_STATE_ENABLED; + + if (!(dsi->state & DSIM_STATE_INITIALIZED)) { + ret = samsung_dsim_init(dsi); + if (ret) + return; + dsi->state |= DSIM_STATE_INITIALIZED; + } } static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,