From patchwork Wed Mar 8 16:39:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 661453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2403C64EC4 for ; Wed, 8 Mar 2023 16:41:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229580AbjCHQlI (ORCPT ); Wed, 8 Mar 2023 11:41:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjCHQlH (ORCPT ); Wed, 8 Mar 2023 11:41:07 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F77B9BD9 for ; Wed, 8 Mar 2023 08:41:05 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id l1so17054348pjt.2 for ; Wed, 08 Mar 2023 08:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678293664; h=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=5uifEp0NbegnY+0fHyacboXPZ1//0/dD+ZvuB6kybZM=; b=gLVZ9B2id2TGNA73o4SbWd+gSleFNhHU5J1GOfn44Ll48NxHFMuHHzdjXQwjt59dyp SikxKeOxgLvoyx6iNXM2EUieacNbbSSI5ZYmRgDAl53qu/54GFpUCFDptXwaquKAeLDm Q55eysFkFqVhcT7gdLlCZGPrPvaG7xaO2loH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678293664; h=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=5uifEp0NbegnY+0fHyacboXPZ1//0/dD+ZvuB6kybZM=; b=S6s3ZYW/PRE6i8GPJ4vAge74vqanOyfNePTVaM3VLXn1PLX8D2Y6EXSBccq8tfDl96 W43JP9N2JrzCe+MqCJQkB5bVmHNKlotMGW2HYNiHYx4FbzYfyTLDWq2xZXWqx4uK9Hpb uY5JeZN4ym9Ol6dlE++G4/ySaiw5RpgYCtsMWj4BUujcPQlt91VQcL0zIJud/AtWycJ5 c0Dvl6xciVreffkjcsD2Bt46+RX5foOMbmsjb5QABy6JMv0W6JvJk5a9q2kOqXzUBehj 1GRgfvdTf5Y9RGbxfcV0i2a8VQlQLEj/UCkW0eQXPdcQ2+KhOSLnbF+fOE29kyAq0OGW sXig== X-Gm-Message-State: AO0yUKWqljhg0+gjyhAMrV/IVPUwl2QJI/z/v45gSJYvla7AaWB+54rv Qs4UJohXcPcWoscQ1wflama+Ew== X-Google-Smtp-Source: AK7set8sWU4P3d6UTEGJeT1Vc+X1pMVPeXyXvAXNHaaKMJxaX2kRJAhSt7ObvbjuPZpAm2ohEQ2xWg== X-Received: by 2002:a17:903:24f:b0:19e:7a2c:78a7 with SMTP id j15-20020a170903024f00b0019e7a2c78a7mr20928369plh.57.1678293664454; Wed, 08 Mar 2023 08:41:04 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a8a1:b545:91cc:80b2:f9fe]) by smtp.gmail.com with ESMTPSA id kq3-20020a170903284300b0019b9a075f1fsm10046540plb.80.2023.03.08.08.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 08:41:03 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Neil Armstrong , Marek Vasut , Maxime Ripard Cc: Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH v16 08/16] drm: exynos: dsi: Add input_bus_flags Date: Wed, 8 Mar 2023 22:09:45 +0530 Message-Id: <20230308163953.28506-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230308163953.28506-1-jagan@amarulasolutions.com> References: <20230308163953.28506-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org LCDIF-DSIM glue logic inverts the HS/VS/DE signals and expecting the i.MX8M Mini/Nano DSI host to add additional Data Enable signal active low (DE_LOW). This makes the valid data transfer on each horizontal line. So, add additional bus flags DE_LOW setting via input_bus_flags for i.MX8M Mini/Nano platforms. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Suggested-by: Marek Vasut Signed-off-by: Jagan Teki --- Changes for v16: - collect TB from Marek S Changes for v15, v13: - none Changes for v12: - collect RB from Marek Changes for v11: - collect RB from Frieder Changes for v10, v9: - none Changes for v8: - add DE_LOW for i.MX8M Mini/Nano platforms. Changes for v7, v6: - none Changes for v5: - rebased based on updated bridge changes Changes for v4 - v1: - none drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index df4d95ae8aad..0c480be5f070 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1736,6 +1736,10 @@ static const struct component_ops exynos_dsi_component_ops = { .unbind = exynos_dsi_unbind, }; +static const struct drm_bridge_timings dsim_bridge_timings_de_low = { + .input_bus_flags = DRM_BUS_FLAG_DE_LOW, +}; + static int exynos_dsi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1822,6 +1826,10 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; dsi->bridge.pre_enable_prev_first = true; + /* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */ + if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM) + dsi->bridge.timings = &dsim_bridge_timings_de_low; + ret = component_add(dev, &exynos_dsi_component_ops); if (ret) goto err_disable_runtime;