From patchwork Fri Dec 9 15:23:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2520 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 A8DAC3F039 for ; Fri, 9 Dec 2022 16:24:48 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id p6-20020a170902e74600b001896ba6837bsf4454451plf.17 for ; Fri, 09 Dec 2022 07:24:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599487; cv=pass; d=google.com; s=arc-20160816; b=EoVvAdZxLXpc1owwdfk+nDqYhd8E5NjIeQ5r0xMDQlhSzR895Hal8PNhacnvqeeHKj XLGFK9kqDXaNPYfDHit1oPmYwTYbXE9uVHhICP+R99J7AmYWXkzP1plL51wSEokYoHY/ 1yI55uW6B8RVsByraA1Xo5jWopt3PIcVhoeQTKDFCjsw0pPNQ8YjkPXLt6FelkhMcIPR hsiXLSKxbgSfM0gLY1W13alnMw7HjAoffHCxreiLYwezowyZMQze9aznIBgBwh4AK5Ez Mxk26ndLmW18GWyKOJb+FEHMiMsCyY6X6eYvTChvxAMr43d+YAp0VIc1UlErrNc9gDKV awaw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4sdUwTbbknpCeb4QukR+Wyh7x9pQRct/CHcFAjtLc9M=; b=XILIIKrcX6YElPofbhOk8b5V+g8wGZSbncWaT+OOPkpPcdjGrlOTEtjQWSjGcwPLOC gbhSHDJSxSCViboe1/JNoeryykXVFFBvoDwraQyTMaM28xSsJuKTblqqF4DqrVZidpZ3 chnln9bQ6m7y4otkSD65F2C6rz+C8SAoVBnFkwEIUwWf7Dimx8THHN3PMLGLig9Er7qT M60r1IFbby+7O494PBif9XWTOEtlA7eWTKkGD2yd1apLi1PyPMgalbKQEhtvC3Fz6G5D h5HVgFyr1dqdQujecfVeiei3NSSVVp0UisrcDqZ28JIOlrlD2zCtCOnkpc603CNUW6OJ JsYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g1b6XAl8; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=4sdUwTbbknpCeb4QukR+Wyh7x9pQRct/CHcFAjtLc9M=; b=W8pTiN9q8E41vuZBpTHskTSDzLIsgU1c2gAGbLW4IJ6TGmz/VK7r8kmc0PMTqOKZxL K+FA3CwsCvF7k871FoqhOR08b/0C5duS9/yIfF6EuOInvnfosBQwB2QLKzgMiPfytl4D oJxZFpCdaPGhowYAymIEYP4wwEhGsrQlRQrsI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4sdUwTbbknpCeb4QukR+Wyh7x9pQRct/CHcFAjtLc9M=; b=ByOCO26tHlinyl9xzgB8QHrD8smPyWORkZGv76xPCnhenwRoq7j+lDpo68zDP1ubEP g7ObYEtZtqDJ4UiNsKozVxudCaGohGogQ+H6TnvRxnnq8w2iftfKvTfrLwBrLi6mBfCf 2UZ6rzApC5lsLwk0J463RhjBrHWdGZMHRxNIIpzx65CHfrEReTHxYrILZ08ifHEiwUzb R2opfx2K+Qk545xUW7DhTZemUgvOw6RkHPdDtXAOJx9oR5QQPVQjtV5p27Hn9RMKNxx1 Ge4xakt0U0aMCjue6M0z/os/GZVWqYmnJUA078Bm4byYrD0DPGJFXQJJwhTGkJR8ric1 qXoA== X-Gm-Message-State: ANoB5pkow2VwRIlMdApF5Fw/T3nOfaL+M5ttewUO4tSu+2rbeMfZXDWC Qo7l+nlsZ5lH8vA1zYQ1nyooqX1p X-Google-Smtp-Source: AA0mqf5AoRdE34LisYNVEjto3z562mon+SVeXZjIn/z7cPLpr16XZ8QA2thlVQVvUrVsVQV+IKZ/SQ== X-Received: by 2002:a17:90b:3c4e:b0:219:e628:acf0 with SMTP id pm14-20020a17090b3c4e00b00219e628acf0mr16293354pjb.149.1670599487335; Fri, 09 Dec 2022 07:24:47 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9f97:b0:186:9fc5:6c01 with SMTP id g23-20020a1709029f9700b001869fc56c01ls8481085plq.6.-pod-prod-gmail; Fri, 09 Dec 2022 07:24:46 -0800 (PST) X-Received: by 2002:a17:902:744b:b0:189:9cfd:be72 with SMTP id e11-20020a170902744b00b001899cfdbe72mr6326954plt.8.1670599486380; Fri, 09 Dec 2022 07:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599486; cv=none; d=google.com; s=arc-20160816; b=t2IwqIG2n5Bb6exXMb/6LvnNn6Evx7sqhtWSiEHVwEQJrMjYhvzXndpQXnkd6FFjze LAzrD2K1m/xvMmmjS9ozjiR3KPjSGcvB6FiDF14ntVVZW1CjYmthUpFBTSnchDYofx6Q 7wAgr6sM+gXRxPcy8H/HeWGq1LdpZ+vIRVDNYzDqbvFmP70zPMZ/8zNvwmsSdmVPCcfr +ezejhKjb85kB8aEAS21hejrR9I7FreNvbrOdTXO4noxzwFKrE32Is6fe+AePSAOMwVk ZE363Vq3Se5BmDxph6lgUUi1E2rIqwpFepZiMDoFjr/Chpg+unVFqQZ3p+fhBiiJpXFE PKhw== 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=eTlIC0zI1Wi04nUSq7MlTOuX//tM1g/xJ2R4VB/eGys=; b=Yi79NOJnV1iLodXOpXy10xz0975zo698uZA9zu4ZEhF6yg/hnnc1qEGZHqLWrD3aee irh8YW86syhEKakL0LfXTka36BjB8KhfUHlfQe3G76fZEQdY/slwaSTp27T4KZ3m3ifb cu+7SckxQqa+VvHPnBmw+YOl7zzjqnb4qR4YpYGiYn0G4JAvTeP5AIYuux+JI9x2N7YM tjV9YjPA6lpElaxE492D3FpHifaO2rp/pfxIKp4QAY5KtVpkx3wuW+W3+4+gKWJ6bGHc Bksq5+LperM8H6Yge2XDAen8Zc/mB98UmECGDxKfSbhggbIPNcGAP04pAh0Mijf+FM99 3yrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g1b6XAl8; 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 iy4-20020a170903130400b00189b50a0598sor1000623plb.179.2022.12.09.07.24.46 for (Google Transport Security); Fri, 09 Dec 2022 07:24:46 -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:902:a9c6:b0:189:e7e:7843 with SMTP id b6-20020a170902a9c600b001890e7e7843mr5805033plr.32.1670599486009; Fri, 09 Dec 2022 07:24:46 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:24:45 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v9 01/18] drm: panel: Enable prepare_prev_first flag for samsung-s6e panels Date: Fri, 9 Dec 2022 20:53:26 +0530 Message-Id: <20221209152343.180139-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g1b6XAl8; 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 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: , Enable the drm panel prepare_prev_first flag so-that the previous controller should be prepared first before the prepare for the panel is called.     samsung-s6e3ha2, samsung-s6e63j0x03 and samsung-s6e8aa0 are the effected samsung-s6e panels for this change.     This makes sure that the previous controller, likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- Changes for v9: - new patch drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 5c621b15e84c..1355b2c27932 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -731,6 +731,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e3ha2_drm_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; drm_panel_add(&ctx->panel); diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index e06fd35de814..3223a9d06a50 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -462,6 +462,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e63j0x03_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; ctx->bl_dev = backlight_device_register("s6e63j0x03", dev, ctx, &s6e63j0x03_bl_ops, NULL); diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index 54213beafaf5..362eb10f10ce 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -1018,6 +1018,7 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e8aa0_drm_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; drm_panel_add(&ctx->panel); From patchwork Fri Dec 9 15:23:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2521 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6E53C3F039 for ; Fri, 9 Dec 2022 16:25:06 +0100 (CET) Received: by mail-pl1-f197.google.com with SMTP id j18-20020a170902da9200b00189b3b16addsf4471444plx.23 for ; Fri, 09 Dec 2022 07:25:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599505; cv=pass; d=google.com; s=arc-20160816; b=JnEJDWQFsgU9PKD8I9jqeJK/yMNxmdtpUXgVxyXs2D+DHSMwc1d5tngFBWGh4lUz5p UbCrvpQfNavnQ2ROOdrczHCnvWXJtVqAmON3Rtx1Z7NPQHrwylGkKtt6ZM21YDk8LzGx iUAiU0am+UGi+VTasOg3fxqXxXNTwC2aaTtxfdqTrWzcxTfu00DO7cnLQY/swPPkVvA1 CA5szVsdQTJlh/RYhadIRHUwio8FVi7up+FfEAy6qR0VCoxXG1FcAyCUFs7NEObWYvoP zlvLIZFRvz+G8L2OVFrGw3R9RlDf5XcTbH3V/k19rbHDDS7dnQpQESTVp42lGeZGMDF5 NgVw== 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=nHq15XfSwneU6KQEH/GSigagtsW+DP8ne+dRhEE2k28=; b=lU0ScAkETuLVOUz2IKBtRztupcStt+iqgNnSJtFe89fyRY0co5okLORNWO9vNEkTy6 jMOZJ5tDJiz+G6QHWZNNT0SZdiq3srtx24u3uEpjBdl9b7pr+2e292x7MsTf2uJlh/J/ gzOLt4Z9iCOojajlvO6B4an9FNtu0k48nhloqPUnpIvRtNC4UJRRBCAq6wztErfgPuLY 7CevwTB3OnZT9inb35iCRC/dvAgM1OrCM6lcwo7WH/84pZvgj8rGXIR6nK9NDcRL3AyE LpmxadbmWWayWn/4Fnuna6wvndobRg3AC8IRlcAIW6pEvlhjDOBSk/KcE9dD8MXHtosr dDLw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="eJ9/BncM"; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nHq15XfSwneU6KQEH/GSigagtsW+DP8ne+dRhEE2k28=; b=TjpUgQ0AplpKmErM9bttwN5scX1YFmXwPpdsqx37g7wL6HLEPRKmn7gH6tzr/tJ/E8 v+3HQKDc9KMxAAylD0Ewtz+0ebEtFfF+/SxmxUlCJC4bD6CoHGBx8mBSGcJN1wRR510L b9fzpINXNQ6LM/eD+T9jx4KqhYGsJuzzYWs/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nHq15XfSwneU6KQEH/GSigagtsW+DP8ne+dRhEE2k28=; b=bCNjeMBaTfExrRi3ft1cBI6BXE3JpBTSoN57BYEWh24KcbF7oc4bcQvEQeubQt5ywu swkHHum7xuO3e+2tgaAJFEjkPdqVOkL/vrhNHyKL4D9CpXE1PxlYQbfBvfLjk9Av++04 lbmcWBobj8C5wjSHYp4H5L6OUgOKIxoDtC3ze67myhIARtU23/WA+u+bOd5l9LTGN8NY dkWB5JRxEbkwDpUodv0TA3l+78eAbAheb9fqEaeNse+PIADftr6DWVE2ikf9bsEkMCHd 3WVOrUln/5uDo27CIFiyLdPD9x1y+Nnoup3Clk9ivQHjRIxMBwlWKW6cfZ1xRffGzlLa QeyQ== X-Gm-Message-State: ANoB5plGn2V2oH9hlPwIYEHG5OWqRAopDYYES5LD8zCB8kmcHgWBUKjp ZndfROyTkI94QQkuYRAVzfjuBGyf X-Google-Smtp-Source: AA0mqf4tUku6PmBHmmpEUnalbip6SX6LIfC2Ur4fhETIJLqpSPFTM1mlLN9uX+9WGWEaR6+5Dbw/8A== X-Received: by 2002:a65:5543:0:b0:477:dc7f:bf24 with SMTP id t3-20020a655543000000b00477dc7fbf24mr57993887pgr.555.1670599505187; Fri, 09 Dec 2022 07:25:05 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2a03:b0:219:84d6:9802 with SMTP id i3-20020a17090a2a0300b0021984d69802ls11209252pjd.3.-pod-canary-gmail; Fri, 09 Dec 2022 07:25:04 -0800 (PST) X-Received: by 2002:a17:903:130e:b0:189:8ca1:e641 with SMTP id iy14-20020a170903130e00b001898ca1e641mr6306635plb.60.1670599504258; Fri, 09 Dec 2022 07:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599504; cv=none; d=google.com; s=arc-20160816; b=bGi4dixQDXZ3oGqZAGQBXZvSJOTTyIU13cofBFAd1P4v+D604dIV4WrYzVNpdNak48 D6oxGmkuyUklWx4/zvXmA8I8vX4L1Y6Sqmy5gWn2u8IoDkSez4yYvWVardLSpECKCjye cPn3BWwnyTdqfSGxqrcH6TjBmIQtxn8QzcYTC6Fo+PHDYFQnH4eHD9I/8HQLNeLOWghA WU5FIGp26AsxP1/Z+kCZ/4/Is2YVFiuw8Uv/dh2wkEyP7ywRK1fcKfl0Ys3EdHT8agPq ftFOn2I+b2eUGL+BX5p+6PUiBGRWo21VoE4kg41eItAvTWlNPRiY26EhlLYP2GDilDFy v86g== 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=H0bkfE/NcofHpZ784ykKYOCGEROmx5jroWhn+xMWIFY=; b=g9ihavFZ2nZ5eC74aiHCLvNMCHYsQl+KwWCc/1XU4WKxWRJWBMKideBRxweYViCRkJ s9rGM4WRG7V3GDT2ZZnGJSvGClGrdGAbPamRMraSWP4nda7QK+wJCkzCaWzt8266wYKS NsonHNcT2klEN5MsN78zYEhbLsSzoEtjRx0o+3/7R8XeFNuBOoZZtIIbgwByb+mcqJLI oCJrbbnQER0uU8EsmDI0u11XvOdQg3MkOd3+Rl50gTBLOW3ns2GCzrcVc4YYdhlxNn1I buhEMLS/Z3z24pGjPp92ei6TeSCDBupbPmr2FZamE1PAl3VlWo2UeJMKHl7Y4A5H2ihV 6eGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="eJ9/BncM"; 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 h4-20020a170902748400b00189d96f2646sor1008774pll.78.2022.12.09.07.25.04 for (Google Transport Security); Fri, 09 Dec 2022 07:25:04 -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:902:6bcc:b0:186:d89d:f0c1 with SMTP id m12-20020a1709026bcc00b00186d89df0c1mr5247211plt.42.1670599503903; Fri, 09 Dec 2022 07:25:03 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:03 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v9 02/18] drm/bridge: tc358764: Enable pre_enable_prev_first flag Date: Fri, 9 Dec 2022 20:53:27 +0530 Message-Id: <20221209152343.180139-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-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="eJ9/BncM"; 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: , From: Marek Szyprowski Enable the drm bridge pre_enable_prev_first flag so that the previous bridge pre_enable should be called first before the pre_enable for the tc358764 bridge is called. This makes sure that the previous bridge should be initialized properly before the tc358764 bridge is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- Changes for v9: - new patch drivers/gpu/drm/bridge/tc358764.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c index 53259c12d777..f85654f1b104 100644 --- a/drivers/gpu/drm/bridge/tc358764.c +++ b/drivers/gpu/drm/bridge/tc358764.c @@ -369,6 +369,7 @@ static int tc358764_probe(struct mipi_dsi_device *dsi) ctx->bridge.funcs = &tc358764_bridge_funcs; ctx->bridge.of_node = dev->of_node; + ctx->bridge.pre_enable_prev_first = true; drm_bridge_add(&ctx->bridge); From patchwork Fri Dec 9 15:23:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2522 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 882B93F039 for ; Fri, 9 Dec 2022 16:25:23 +0100 (CET) Received: by mail-pl1-f199.google.com with SMTP id b17-20020a170903229100b00189da3b178bsf4433347plh.7 for ; Fri, 09 Dec 2022 07:25:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599522; cv=pass; d=google.com; s=arc-20160816; b=a5LkOaO2ltuchkZHwvBeCRs34AqFgbsgBUlinJrPL7qoIY4y5GdYt2GR4WE4Qy3tkJ IRixgTdK8zkFxf688K4aP2xje0Z6bLqSQo0rQMpSEstSAFEXlup/cz1+HjYRnvW8lXTI 7NT95VMy2WQl8beOf6nX91d9Crt7uipydWx7SWR+l1Bt5gqW46RMq6VIKoAMRerE/Nta TY+BfO3e3s2oi75YC2Q6FrznbFKaStnKFAV7uRj3OfUyw0WwtnFuyCI03ep06y77C0iv DKEq0NsZgF8BcxFH2lcJkxIODL0PXVGlO6Sph7pPJOoXWAV4is58waHYNzah1J+7WUAi eKXg== 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=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=RWAbbIfrRDr5gih5UgqKmGrGPB+JKsKKd/xpbPv/dXP3ddN6LoybdNV0o0hL8O+AuL ZB6ulLT006S6PJSXjpGjHAQwwyeJppL+T3zVC3r/WFSOLd1IJsKJigZ2P9ByhIKGqmiS Cf+z/vDH7sOuSn9c5fEer5QPuw1EJ76rQQs6yRbX0sa8GZvngYkLHfN/hosC/RqTf6gI XZSPdzrcHvWaKd1kfziUrpgmGXdcaQhOVvDHUTheYSdaf9QYxiO/e/T0BrKPHUKlZJqs TCBZGM2f0Ic1Fg2+EJAJn6NqgFyov/iXNSOHOCyQp2af0iOSgwXZwCknn0v42Mpy8oj5 nisA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fgweV2Uq; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=qtrvkBZUofyLYaVIfHNoWevaQH3vJuI0J9/iYDGtsTUr6vexBjcB2Z+Fx0oViPDLq4 bbC843MaCNG7sy9wQroOEH889dmpVcRIjUkADn72ZSQ7hBEf2kH+Rg5eWyHR5czqvO+F +zMfJaJ9L0XZW5rnnzW6IrH+MoDTwHYlQQr60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=tza1ExzQ3yMOSVOoo0xxx+RXXG7hdH5K7rOfzgczXCmUt5V6bnxnKhCPO/S/mo0QuO dvDMKZTEJohLzSb5vOpWIt0spUqthvUIpwK4k5cXbBXrp/uxzJC7IFDp3l/8MFCdgRCa 9HXKWw6dWf8sO8AABilCoWqquG3kJBap8mJxuv7+2vUlFWR7w+HR+YDxHsrjjqs/tjCV vwHD0/kvRPrMgJb+4j3SJwh+6OFAvTt6wUNvhmnMOIKUE635aD/+091OwEQQUx2KnDxc lawJ8OKWAi7w+bMLI0iBhkRRSXhbkMJhFKp/Vxd8fxjvPWoXE6xIuVTv9NXCcQ+W7ptm uybw== X-Gm-Message-State: ANoB5pmZXUYczSPQYXXnUHieXsJl5jHovure4WxnElO1cYdTQyMS44A6 LtBJO0mr7DkJeSa+ABqI09e6uQKH X-Google-Smtp-Source: AA0mqf49EuHji3NURm5c7dwQXloq0ARqZYuAh8/gdoyTdIe3iJTA9oQVGMyc5ieovbL5eNkv0nERWQ== X-Received: by 2002:a63:511f:0:b0:478:99a3:2885 with SMTP id f31-20020a63511f000000b0047899a32885mr22698518pgb.151.1670599522322; Fri, 09 Dec 2022 07:25:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2a03:b0:219:84d6:9802 with SMTP id i3-20020a17090a2a0300b0021984d69802ls11209959pjd.3.-pod-canary-gmail; Fri, 09 Dec 2022 07:25:21 -0800 (PST) X-Received: by 2002:a17:903:40c3:b0:18d:61f6:e254 with SMTP id t3-20020a17090340c300b0018d61f6e254mr319070pld.33.1670599521456; Fri, 09 Dec 2022 07:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599521; cv=none; d=google.com; s=arc-20160816; b=WY5ptEL6odRIqruCcmQlQ7nvnHj59QKILEp/I2PP0p0H1Dh2JhvPYicZr+cNVjhZoH Xwpehvlyj8ZhWAchaPT60bVtZbCNTPLfhoWAWHPGn/aHE+oR47L8uIZ2VfRF/tSX8nmz 2hql8fb8te+frHd9VOpjOANyeF/d5w3BghTUaLyIZbQNprWwW578t1HFUxucoKWAvAJL 1JarXis4aBuzQp4GNz3NEkbpRpSYQm3x4npaleEUjOvHpRPKoyyUG8nuaY4zJIaoOt9Z 0rJF2zJ0bT40FBUpaDJcBT5NplSU3cyf8VWIuguhqHs74krqlHB+I5nO7S6S7tWpGIbK NvjA== 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=PD94MxZvqnUHdTxMPOsMMefL4P5i3Lz9kxEOBEFMSCo=; b=XZhjJLU7yby6oFt/8N23KDRIuw+LYqhYxrceVHJr4ysp2jajHVR/aUapgrPg5No93W +zZXwtEwPiomf0DJGAoPu/Wix7VEzxAte0rjcxFnEBODmVpsmWnO/1lxId/RguUWGku2 0uHxYloHv7Z/trZOfqyAKsvx2rfy4bZh8AIOVLlJJ17yCeEcoIpVkZvp1iaCr5DiyIph 20BN90CJ/qm8P9VYkBwGgIWrSP15hOmlif5TlLiL/e5PownXAVO449B8F1EiLlWn4mpu qtP/9+sJ5nJ/xJ3WMeqxexXguEo9a5hT8dR6Ph5p7VK2+b20aPwZEjLPlrkzBkx7U6CR AkjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fgweV2Uq; 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 q15-20020a170902eb8f00b00189b235e347sor1031482plg.96.2022.12.09.07.25.21 for (Google Transport Security); Fri, 09 Dec 2022 07:25:21 -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:902:e845:b0:189:f8d0:7b8f with SMTP id t5-20020a170902e84500b00189f8d07b8fmr6620275plg.63.1670599521074; Fri, 09 Dec 2022 07:25:21 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:20 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v9 03/18] drm: exynos: dsi: Restore proper bridge chain order Date: Fri, 9 Dec 2022 20:53:28 +0530 Message-Id: <20221209152343.180139-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-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=fgweV2Uq; 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: , From: Marek Szyprowski Restore the proper bridge chain by finding the previous bridge in the chain instead of passing NULL. This establishes a proper bridge chain while attaching downstream bridges. v9, v4: * none v3: * new patch Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Marek Vasut --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ec673223d6b7..e5b1540c4ae4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1428,7 +1428,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, { struct exynos_dsi *dsi = bridge_to_dsi(bridge); - return drm_bridge_attach(bridge->encoder, dsi->out_bridge, NULL, flags); + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, bridge, + flags); } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { @@ -1474,7 +1475,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, drm_bridge_add(&dsi->bridge); - drm_bridge_attach(encoder, &dsi->bridge, NULL, 0); + drm_bridge_attach(encoder, &dsi->bridge, + list_first_entry_or_null(&encoder->bridge_chain, + struct drm_bridge, + chain_node), 0); /* * This is a temporary solution and should be made by more generic way. From patchwork Fri Dec 9 15:23:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2523 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DA4103F039 for ; Fri, 9 Dec 2022 16:25:40 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id q63-20020a632a42000000b0045724b1dfb9sf3255551pgq.3 for ; Fri, 09 Dec 2022 07:25:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599539; cv=pass; d=google.com; s=arc-20160816; b=gRG6lJxxdAJrvfzwmxPy3VN/u9uPnWgJKECaoTIkOIuXl62HspGmD6ODX30MM5A7/L AjIdJc87/ZqnPjkyyiQYEnpH/H8tzqFkgGSPv7s0zbetPSuH07Pcd4Iiy00LPoGhdmrc 1xW5bdJFv6l6644ntOGoNzZUfVvUi+nv+WzuglUZx2J8rmG4BzVuB8EXb2w5SUPZKtDW DzcI664TvAMfAzX+ptkelrTJafZQOj3zvNuAPHCFFYKwKT0b1hxJqQClHskx/b6CFsRj ICoPbi+eaf4W4TKKFO1OF+Swn17usBVf5hXaCXT+v81LjtHtOkB7s33KbuHuI8CqobTd FHTg== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=GbflCsp3VReIaIpMrJzg/86iW8NKhdJQFrX7vK2bn6luMsxYoqZw2tpGqD+CJGVx7G Zn9CKtft5DTq5Fw776ns5ynADJhtAZ0f0pQ3MZcjKLno6+M1pgEJmns6YqU6C23TRxJS a6TnuvgBLLaKeO3uD6GzVBb22t/6OrqSRizE3z780Czo5jmVUy8mNVPiK4ILQMgck+BH i5MUnAr7c8+UFLLb53Wn22X2+q4B2M19jLnbTr3uArVDn9N5pvPHhWbsWsoVgrDrU3OS PZCxgkmhB7Mb+OS/fwqDIbcjkHJn7ysTbRInptfws7DPtnO8WRQEmSkywekUm3ZUh1/X PGoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=ft0Mu2HWBBfBmIsXU2QvC1NZl0LgCd3iA4QWKlhFhPeY03DOLnMPpMfoHiV4bUyo/7 2fys1sA5re1SIsLXnmDNkaRaVyEP3LTiCc6qiwhHovU4u4OuUOvY1D9h1l94SqnUtk73 NjQEhusF1uBBQ9COYVfbgN0BEavXokFuAd8EA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=0Ii3jY2HNw08jGnG9CfIRq28YSRhxdZ2putjwMKj2JVntotLj4tdAGW8jMqw+l/JJj PbwTwhQ0qKgkmzwswBjgR94hOozrPqD6HDBd3W8fG8VRHuZIuKQyTUHIlc6M4Ts8MuXe I+kpj2cp/BiIpAgNoZ9rYm8PnCnyNlo8qko9Jg8qTT9nJMhd6ww10WCLD0Acrpi0LFNb 1TMxF3raG5xRps1lO6DAS2eNxQ78UNJDohoLWcUW4EHx58blS/ygQtDiWyqXvOwar7Ov IMi/Niv95OS464KfmtwLGfNP+U6HZLl31mKzfGd+aGK9K56+1uDoKUtgwoG0hsNR/PcZ M3sA== X-Gm-Message-State: ANoB5pnGCjfEcuuwyLJDA8WFeqr9AjkKCZj9qzlGj8BpRpm2YI6CHAD6 QHcS7tAZmqu8eJzhVoYUP9TykPBO X-Google-Smtp-Source: AA0mqf4HLc9mwjE8tn0IwTnsibp3p/dDYwSCwDrci9lyqFMDInDxSVaOzlKDpVCUvTPS7SbK4GlA6A== X-Received: by 2002:a17:90a:7896:b0:218:6fd6:b693 with SMTP id x22-20020a17090a789600b002186fd6b693mr9396522pjk.29.1670599539636; Fri, 09 Dec 2022 07:25:39 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8601:b0:189:b2b2:56d5 with SMTP id f1-20020a170902860100b00189b2b256d5ls8541939plo.0.-pod-prod-gmail; Fri, 09 Dec 2022 07:25:38 -0800 (PST) X-Received: by 2002:a05:6a21:3a86:b0:a7:9f6:b790 with SMTP id zv6-20020a056a213a8600b000a709f6b790mr8110708pzb.10.1670599538621; Fri, 09 Dec 2022 07:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599538; cv=none; d=google.com; s=arc-20160816; b=T/mOn5Ki1IIrVPirvMPkgmNG1eb4SR5sI85mU3VApjAz237gbt2fqUxYKCVytTRwv9 NoXlJq8tjoMpNzLUy0ZxSkhI3AMQ3F+yLoQr1C4G/lrvZVLAHI9dR7/QvdEIc0Tknyjd JdViMfUbCTibX5BLrl00ovo8sDbG8DostbRoKrSjuZhkwIH5n7opibP8Ow+FMX0gGgnF +9OOSKH3tNrzmC3sAzmLFBK9rIiluyM3teHhDX063WHbkCDPFw7IriAdPGZ//pnlBido FWyHM2rEtGqtQZnUchsNTd6D/hDXo9VFm+g5oxQOVi/2LWwlLoVIAa+KS0erPIktx6bt VmqA== 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=6CUJYu0PBu1wfIOC7kGOkRHJr7T1+ycl/j32CgnvDxw=; b=cJnszCvFCg+znl0yLL/nOo4PSn5f2JOpyaFZ9UmUc43fSp8Z+ft4SAr2tst7W4f7pv EDk6GRLjohMwYi7lXuJgrpclU/ltLMfIRMXzZGdtKuAFAsQLQzfs8x0IBnw2sE8rz+po aAdgx+sRclV9E/B5ARxGnv+0zNSVIAZLiixag9F4iblj7fWYWCI1nYzipu8qGM/xBV6w O1Pe7CeERSi2JGWvZXzvZl4YSQ6ntDUjYwEY5qgOHzNAI19J2nUdsCS6zDy62kRVz4o7 hE641CLQ15/RzVyfxKQe6P45MD3Rjonjf11Nj5F8LT3EBKTCzu5QzKyyfYt6o0pBZ5ww NUKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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 12-20020a170902ee4c00b00189680de09fsor1049490plo.183.2022.12.09.07.25.38 for (Google Transport Security); Fri, 09 Dec 2022 07:25:38 -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:902:c745:b0:189:9519:87b6 with SMTP id q5-20020a170902c74500b00189951987b6mr5017053plq.5.1670599538323; Fri, 09 Dec 2022 07:25:38 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:37 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki , Nicolas Boichat , =?utf-8?q?S=C3=A9bastien_Szy?= =?utf-8?q?manski?= Subject: [PATCH v9 04/18] drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags Date: Fri, 9 Dec 2022 20:53:29 +0530 Message-Id: <20221209152343.180139-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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 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: , HFP/HBP/HSA/EOT_PACKET modes in Exynos DSI host specifies 0 = Enable and 1 = Disable. The logic for checking these mode flags was correct before the MIPI_DSI*_NO_* mode flag conversion. Fix the MIPI_DSI*_NO_* mode flags handling. Fixes: <0f3b68b66a6d> ("drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features") Reviewed-by: Nicolas Boichat Reported-by: Sébastien Szymanski Signed-off-by: Jagan Teki Reviewed-by: Marek Vasut --- Changes for v9: - none drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index e5b1540c4ae4..50a2a9ca88a9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -805,15 +805,15 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi) reg |= DSIM_AUTO_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE) reg |= DSIM_HSE_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP) reg |= DSIM_HFP_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP) reg |= DSIM_HBP_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA) reg |= DSIM_HSA_MODE; } - if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)) + if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET) reg |= DSIM_EOT_DISABLE; switch (dsi->format) { From patchwork Fri Dec 9 15:23:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2524 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E5D933F039 for ; Fri, 9 Dec 2022 16:25:54 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id v23-20020aa78097000000b005748c087db1sf3487838pff.2 for ; Fri, 09 Dec 2022 07:25:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599553; cv=pass; d=google.com; s=arc-20160816; b=nByB2y02B6fPRzCMpuJLCGKv8FJr8Zgsk9QqFPHIJV3lrKH4/z0nmCXQN+Hgv32mVD UKFmqf3RdyTqT0JQJyqnyshYHIcI+N8hSP7D4Z2orp98a0SblKCg7TQnidvcLBiHn5YA O9SMqiAyV5Swah2JbOM07So17yJSORIW0LJaPTL7oDZLFjPldyz1OjLbrCfgjffu5zUG xf5xgDfCRlyVvvE1Pxsxa4hIJhBXVUC18APflAvoFNScR+R+jAiAO3RDCIfz7PZ5LIHL t4vkH1rh/+2MJf51vO1xXEp1NTTynU/lqKz7OYJmBCnUWrDRHymJzW5TmfFZsixJMB8f 24Cg== 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=t5SKFRy/NGGxTSHjVbUzpa7OYlt8D69a1EKWFggm+ak=; b=PtRtmfb2rlqmWMelv0qlz22gG6Fn7ozAlA2U7WbABnL0NrGWg3WKEc7qP+o4HwD/q9 cQ3yCcaFgiTCbImCUZILYnlhBswNzV0NmF1wtjZ7uYg0wa/X/itk6jgWC2mip4kmZBHI F2ohxBJs0KwxHQWn96cqZw2qphc/dZvtojVoVRvIYu324B0iVRbfOTv1RfnKVPXyy1JM 0wzgsbN04L04cG41Lam7ANo1ZiSGOJArhEbaZidHDcieTqDnT0VkVXmtkNhRR9B+FWbE tV/VMrT1WkLiGMqJJ+XAoyh6QRnt+HmpqvcsAnw304Pl0uotzckObJ3E59Q/h9OsUW// 4mfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ryEFa27h; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=t5SKFRy/NGGxTSHjVbUzpa7OYlt8D69a1EKWFggm+ak=; b=HGek7qir4n79375PM1wLUI7mjU1AC81eChOie6s7JOV2nbR6h04/Rjl4aGh6W1wox3 ogPnNTxgZH7vLPHBkiqHdVzAyIGukGncDk5FbDnIOevi04rYlm26V/z1ydS17uqyC/rC 2Lmg+uns2N3VOYqtpMDoHmQoHoUBkVmoWplrA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t5SKFRy/NGGxTSHjVbUzpa7OYlt8D69a1EKWFggm+ak=; b=UAn53fq9G+Jz9Qocyy3+H8VzlTQWq47OJZvKhLQyy6H9rMvIv6+LLjDY7wiu5zeGYc KVw7PSACsQx4yMlWgMttpXmRqUMStSEpEhqBqPfbhAPVM5abFEQoqaiNSFhsoSgbz75e km4EU++Rb+rlKa+MCZ+oh3VWCoinx69oxluScNawgOcbS81wNrpnCKK4QevmYKSQSK+r WfMQQTrHcuxYc1fAmPckA/ys6bZN0cWcokPnOnhAmvV0OH+swp0pjoqMiDeyHgOWaNah fUWuX2wFB51BcjG/C5ogE6pMlR7yVTAAKmESPAdGsFwbLWQDo1jM6JNHpf6hwpLQZL8w WSIw== X-Gm-Message-State: ANoB5pnhrs2gnEM/T6E/nj7h3FdmoUoR0U/mIDaZOWWYFjsVHeF+k6JI Ww92EENfRLK535Gigbm2RsYF9F/K X-Google-Smtp-Source: AA0mqf7exlC7ouI3+TIrpIjmSFr/HfQcg6FHO28NOerJpYBt0mDi/9owxmzv6BRP5ogL4eTbgpE+3Q== X-Received: by 2002:a05:6a00:4009:b0:563:2ada:30a3 with SMTP id by9-20020a056a00400900b005632ada30a3mr79265564pfb.27.1670599553567; Fri, 09 Dec 2022 07:25:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:ed49:b0:178:3881:c7e3 with SMTP id y9-20020a170902ed4900b001783881c7e3ls8465504plb.11.-pod-prod-gmail; Fri, 09 Dec 2022 07:25:53 -0800 (PST) X-Received: by 2002:a17:903:204d:b0:189:6453:f455 with SMTP id q13-20020a170903204d00b001896453f455mr5069119pla.35.1670599552734; Fri, 09 Dec 2022 07:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599552; cv=none; d=google.com; s=arc-20160816; b=cRT9+zldBB57BxJVg48sISiCbTCtlpAUXodMbe7t5DifeywyjH5XSN3h44a1LFbr9W z/3PvDtupH8iLcbdv6VTDNzI6V7+oQMXxlpKZd7dvGsFSL5gFJd8rX1CIcQTWTPi243a yIiVMgPsroJt2su2fVGGUjDpVId/uDcqaTP1bXIe7RMLwolopo0X/Ytwa2bSgcFt6qSe Voz7NYF6o0CXFeRahZR5S9abzQ+SP1SUSA3SJFWAm5h/3lhmyuYBhn4ikOMk0bCrq5uu TDm43Q1UKxK1zt9hJCcOBcwOOsmB1Co6xmh1mwF0ZaaXOjJG4ErG+TNvuHIwVFIld95I Z3rA== 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=LFDauSpXdcfcdulBlIlfj04e257Z0kmZtXLY+iJX2Pg=; b=OngnzR1N/PhgsYAUwF1SDUCjgAwZkti7PFGRxM3PUUHvIV7izNZjHU7hxiTay5DrxP UHeR5y3lb50ODBeVxBAyeWCw7AaMMngRG1EFeO7e57s1XvWtuDDmutQFEPuZd6Rl9wVu w8QcL9LVcHFZRkKdpd7+Zd3hm3byH7CWc6kx1KS7oaF0WiCDYZ+UZThd+0Znx7nsmM11 gMyDiq2EBkF/E6qNQBVN6oDCVKRQMj8AtizUOOknWIKRqwfyGAnWjv6B3wKrg+W9YQXQ AcUJ9cRFjjD9QJA9oFMx/fq3XaaogM6IzlkzTeF5f7wkJPhJbOIPSyhpsS6h1TbPGYkE 8vQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ryEFa27h; 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 y20-20020a170902e19400b00188fd910157sor1052582pla.107.2022.12.09.07.25.52 for (Google Transport Security); Fri, 09 Dec 2022 07:25:52 -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:902:e787:b0:187:1d13:f6d1 with SMTP id cp7-20020a170902e78700b001871d13f6d1mr5927784plb.52.1670599552412; Fri, 09 Dec 2022 07:25:52 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:51 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki , Nicolas Boichat Subject: [PATCH v9 05/18] drm: exynos: dsi: Properly name HSA/HBP/HFP/HSE bits Date: Fri, 9 Dec 2022 20:53:30 +0530 Message-Id: <20221209152343.180139-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-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=ryEFa27h; 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: , HSA/HBP/HFP/HSE mode bits in Processor Reference Manuals specify a naming conversion as 'disable mode bit' due to its bit definition, 0 = Enable and 1 = Disable. For HSE bit, the i.MX 8M Mini/Nano/Plus Applications Processor Reference Manual named this bit as 'HseDisableMode' but the bit definition is quite opposite like 0 = Disables transfer 1 = Enables transfer which clearly states that HSE is not a disable bit. HSE is named as per the manual even though it is not a disable bit however the driver logic for handling HSE is based on the MIPI_DSI_MODE_VIDEO_HSE flag itself. Cc: Nicolas Boichat Signed-off-by: Jagan Teki Reviewed-by: Marek Vasut --- Changes for v9: - new patch drivers/gpu/drm/exynos/exynos_drm_dsi.c | 33 +++++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 50a2a9ca88a9..b64bb6006b7d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -75,10 +75,27 @@ #define DSIM_MAIN_PIX_FORMAT_RGB565 (0x4 << 12) #define DSIM_SUB_VC (((x) & 0x3) << 16) #define DSIM_MAIN_VC (((x) & 0x3) << 18) -#define DSIM_HSA_MODE (1 << 20) -#define DSIM_HBP_MODE (1 << 21) -#define DSIM_HFP_MODE (1 << 22) -#define DSIM_HSE_MODE (1 << 23) +#define DSIM_HSA_DISABLE_MODE (1 << 20) +#define DSIM_HBP_DISABLE_MODE (1 << 21) +#define DSIM_HFP_DISABLE_MODE (1 << 22) +/* + * The i.MX 8M Mini Applications Processor Reference Manual, + * Rev. 3, 11/2020 Page 4091 + * The i.MX 8M Nano Applications Processor Reference Manual, + * Rev. 2, 07/2022 Page 3058 + * The i.MX 8M Plus Applications Processor Reference Manual, + * Rev. 1, 06/2021 Page 5436 + * named this bit as 'HseDisableMode' but the bit definition + * is quite opposite like + * 0 = Disables transfer + * 1 = Enables transfer + * which clearly states that HSE is not a disable bit. + * + * This bit is named as per the manual even though it is not + * a disable bit however the driver logic for handling HSE + * is based on the MIPI_DSI_MODE_VIDEO_HSE flag itself. + */ +#define DSIM_HSE_DISABLE_MODE (1 << 23) #define DSIM_AUTO_MODE (1 << 24) #define DSIM_VIDEO_MODE (1 << 25) #define DSIM_BURST_MODE (1 << 26) @@ -804,13 +821,13 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi) if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_AUTO_VERT) reg |= DSIM_AUTO_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE) - reg |= DSIM_HSE_MODE; + reg |= DSIM_HSE_DISABLE_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP) - reg |= DSIM_HFP_MODE; + reg |= DSIM_HFP_DISABLE_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP) - reg |= DSIM_HBP_MODE; + reg |= DSIM_HBP_DISABLE_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA) - reg |= DSIM_HSA_MODE; + reg |= DSIM_HSA_DISABLE_MODE; } if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET) From patchwork Fri Dec 9 15:23:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2525 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 99E683F039 for ; Fri, 9 Dec 2022 16:26:07 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id a33-20020a630b61000000b00429d91cc649sf3215995pgl.8 for ; Fri, 09 Dec 2022 07:26:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599566; cv=pass; d=google.com; s=arc-20160816; b=EOANOKG5T9hhD4QVKmX+bbSFT+GUWbWGw/t7Vn016+YWZRNguLDMrOK32leWa62v7C fJFmb8fizfGtmgxleCyC/nQ8gPxOBCpSxps5kcSdV+4witiTJgt774DPBCZeB3w4AfTv C7ceKkZnrnsiw2Xogjv8bkLcXKZTNcPDQq1JogEKiHCKguEGiQ6nbvHx06Jt4yrXiDYG KhNIoMivfydCkVToDDWFHVH7ADrLzNZsx5sRnwv3cZwNn3lMl/uq7kEexqxoJ1kwRcmU hJsMODwcGDt9en/CbyiVOrUD3k75JFD+7UaMxSm8/KsNss5mgWFMKsofboH02cFY2s3a 7GVA== 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=O7J4Cqe1ccyL9UGJ2B0eI5RcO8bW3TbUrAfUZxwUk9M=; b=W0x2ieshezDjYS0IEvC7FMcLKaOsDFc4ePOqloIADgR4phH5K8utHoptYTXnGS2w2L OjbT6Eg4nqA3/q1nrACQ+xV10IFi4D0VGfa+Bz+bDQBiruO0dZEOSD967XeGAnjMu+Nc 8U7+bV0CZUOlxuoyr9Yx/iE0TjJJi/HsbuRtqmovVpjUYxdx1PdIRdwheDsnQQzvea8o BlrMvSLyE3VkXXXHe3qt/lVIAdwgmr1GHelLu1VgWV9wCnr2upPp5X4+k+xQJpwIL+Pv n0giAT76wgKc/xLljhMu3RIZ7NKsxoqp2xPlIB3LjQlZB/YRtmSbGsM+rMsAHQbI/iYg TrLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=igKnf4vT; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=O7J4Cqe1ccyL9UGJ2B0eI5RcO8bW3TbUrAfUZxwUk9M=; b=nN3WRe/t0LDPNMDGb36Fe0JwzQicbLnurdrqw4gfLC61mI+mWPusr0xStmrPXnoNM3 EHRbHwlYL2b5t2Qg+YjK+ERY/MOu934j/se+9WT9VfBsuCm8B0YikxfCPQt/9QF1fydJ SH/WqtCntPH6IUjZPW+cyrgEQ4wlqwAB6TxeU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=O7J4Cqe1ccyL9UGJ2B0eI5RcO8bW3TbUrAfUZxwUk9M=; b=y7s2uAXpu9FFAFZZSUAVJRDfh7Cevf3hZqMfk8YZCquaGeKTyvwH29oRWJhiy4MJNl EYny5hb2Q1LLV3Ji8JFTd3NOkw/Ykp6S92IZrs9II7680A9mtzoInBhBZQmB8aFOV2D8 m/wvlaEDiBpV1uNB/eq2ccXaetaUEuZlvwfFljLyCXITnuPwhXJBOUrqPTQ0QRxjpzxi ucZPEuHRMTlEg5NfgjG7DGTyvDpuwKUv8XwqmJ62JHlc8El0irPzMvKfaTBuv5mLOqXS uZjTF2ta32vfGb8NE7GYoIgJeOYTeqkAN0aXtpM4UAYnXHNj7EpLZRnVc8wBPCzoSp7E fiWQ== X-Gm-Message-State: ANoB5plf1fUUhCAroYb9btQJc03Gqjx8l4lR37WW6UNCTFruq5bl0L0V FcrK1Ekib6H8cs1X0jOVi9lmkUN5 X-Google-Smtp-Source: AA0mqf6Cfy0tERDGYhR/tO2Kytyx3fBagri1r162d6/uMjX6MVtP1yeyV/Q03msxFduxq4nBT/cKAg== X-Received: by 2002:a63:5c65:0:b0:478:d6da:85d with SMTP id n37-20020a635c65000000b00478d6da085dmr11530664pgm.60.1670599566309; Fri, 09 Dec 2022 07:26:06 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:7b86:b0:188:62b8:814f with SMTP id w6-20020a1709027b8600b0018862b8814fls8511447pll.1.-pod-prod-gmail; Fri, 09 Dec 2022 07:26:05 -0800 (PST) X-Received: by 2002:a17:902:e04b:b0:189:b6af:ab22 with SMTP id x11-20020a170902e04b00b00189b6afab22mr5591726plx.43.1670599565054; Fri, 09 Dec 2022 07:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599565; cv=none; d=google.com; s=arc-20160816; b=N8W6X/kpY1vq9tyEtqOwL18uaCBqWAB4w9A5N59pqPoA3c+Nx9W6M0aTfUWjQJTF/5 8JuN2U9mIO7ns3Op8JaFH02/RaFqEsLKrRNhY998rwqYfx9PP2/gHrLIzu9O7OVBN2lf O3NIdhsmGbeZvvVOmLE7vsI4hPF9b7YO4yFaWioflKpAWFWU+sWhk9rbEkJghIkQLJD0 BPBKGRfYNmyJBBxoRXCvgi+bluwn9jAPSXFkGrwpC8SrpqRZzB6KPL89WpXMOH4E6QYg 8TK0o+Dbk5eAlzt79aGmUxWZbr81J07wFquqficltWYip7Gwv1DolYXNvPTRZ3tVfCWq dnvg== 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=r0GiuO1bGIhUx6aqMBPYCESC09+BB+9++Mb9QdFk6SQ=; b=Wnf2JHvwzbGooDv0V5ZyGYpYqIEM1ttfs+Qeq66zfwhnJPXCkDqQmhRyfroTZEgwKq LzvcnBVJJBgssG4Y6kHdYI+0y/eVjcpMnWNJveoAW0fXU/gPDg2aHcjLAKgXvyp7aAV8 gulVCYqrqQ6JebeeavbL0OLHYN9jqVsAGRgpmJrkEXt5IJ40Om4HdIvXWPpVrIzPvitJ 6Iir0eSgO55cjRIK209lT4/R+/KsEtOFV/S9Cci0bnlwDM83WeN/oQ9npM0aL5+s3Ogi Dy1kCF+6mGHKhTgVTMAQMHa70+FqgXXserY8JW5+OrhtOfcd3vladTWjCDlnDePFr9CY Wuwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=igKnf4vT; 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 x5-20020a170902ec8500b00189c2cc5142sor1041981plg.70.2022.12.09.07.26.05 for (Google Transport Security); Fri, 09 Dec 2022 07:26:05 -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:902:aa97:b0:186:cbf0:24c7 with SMTP id d23-20020a170902aa9700b00186cbf024c7mr5865426plr.12.1670599563713; Fri, 09 Dec 2022 07:26:03 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:26:02 -0800 (PST) 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 , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v9 06/18] drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge Date: Fri, 9 Dec 2022 20:53:31 +0530 Message-Id: <20221209152343.180139-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-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=igKnf4vT; 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: , Samsung MIPI DSIM controller is common DSI IP that can be used in various SoCs like Exynos, i.MX8M Mini/Nano. In order to access this DSI controller between various platform SoCs, the ideal way to incorporate this in the drm stack is via the drm bridge driver. This patch is trying to differentiate platform-specific and bridge driver code by maintaining exynos platform glue code in exynos_drm_dsi.c driver and common bridge driver code in samsung-dsim.c providing that the new platform-specific glue should be supported in the bridge driver, unlike exynos platform drm drivers. - Add samsung_dsim_plat_data for keeping platform-specific attributes like host_ops, irq_ops, and hw_type. - Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c. - samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and samsung-dsim.c. - plat_data hooks like host_ops and irq_ops are invoked during the respective bridge call chains. v9: * drop the bridge attach fix for Exynos v8: * update the commit message head v7: * fix the drm bridge attach chain for exynos drm dsi driver * fix the hw_type checking logic v6: * handle previous bridge pointer for exynos dsi v5: * [mszyprow] reworked driver initialization using the same approach as in drivers/gpu/drm/{exynos/exynos_dp.c, bridge/analogix/analogix_dp_core.c}, removed weak functions, moved exynos_dsi_driver back to exynos_drm_dsi.c and restored integration with exynos_drm custom initialization. * updated the commit message [Jagan] v4: * include Inki Dae in MAINTAINERS * remove dsi_driver probe in exynos_drm_drv to support multi-arch build v3: * restore gpio related fixes * restore proper bridge chain * rework initialization issue * fix header includes in proper way v2: * fixed exynos dsi driver conversion (Marek Szyprowski) * updated commit message * updated MAINTAINERS file v1: * don't maintain component_ops in bridge driver * don't maintain platform glue code in bridge driver * add platform-specific glue code and make a common bridge Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- MAINTAINERS | 9 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1703 ++++++++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1784 ++--------------------- include/drm/bridge/samsung-dsim.h | 113 ++ 7 files changed, 1952 insertions(+), 1671 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h diff --git a/MAINTAINERS b/MAINTAINERS index f3edff6b1cad..9a37cce05062 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6675,6 +6675,15 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml F: drivers/gpu/drm/panel/panel-samsung-db7430.c +DRM DRIVER FOR SAMSUNG MIPI DSIM BRIDGE +M: Jagan Teki +M: Marek Szyprowski +M: Inki Dae S: Maintained diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 57946d80b02d..8e85dac9f53e 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -231,6 +231,18 @@ config DRM_PARADE_PS8640 The PS8640 is a high-performance and low-power MIPI DSI to eDP converter +config DRM_SAMSUNG_DSIM + tristate "Samsung MIPI DSIM bridge driver" + depends on COMMON_CLK + depends on OF && HAS_IOMEM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL_BRIDGE + help + The Samsung MIPI DSIM bridge controller driver. + This MIPI DSIM bridge can be found it on Exynos SoCs and + NXP's i.MX8M Mini/Nano. + config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 1884803c6860..dae843723991 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o +obj-$(CONFIG_DRM_SAMSUNG_DSIM) += samsung-dsim.o obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c new file mode 100644 index 000000000000..baad09b2daeb --- /dev/null +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -0,0 +1,1703 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung MIPI DSIM bridge driver. + * + * Copyright (C) 2021 Amarula Solutions(India) + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * Author: Jagan Teki + * + * Based on exynos_drm_dsi from + * Tomasz Figa + */ + +#include + +#include +#include +#include +#include +#include + +#include