From patchwork Thu Nov 10 18:38:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13039145 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 538B5C433FE for ; Thu, 10 Nov 2022 18:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xSlcUOapz8zs9m/znoztlm5XjknYovTHIPySObu8dMA=; b=c2OSFjNyz0xuvr H+tQVQlcOBjMWnejMa0QBv7Qi4+tL//bbbjDQEfI2WedfzCwfCKhN72AxiS3ybHedD9wWXGH6by4p EsUyWiaBQ4cTK+2cwB7Gq5/jwzn204EAmMQnq93EFO6x/FicQl4P3or4uWXrRmPxJqcvS9sPremxv Sm3AJ8tkJZSntRXm5ZNOkfGal7PAq5upVzL/y2xcDWK8RlCpMcJc7HzbdwmtKIiO2VY2JGw88ga/S pTPimODob68079WzuY0cMO6tReBDAQpQKPHqc+gpzwy2AIHD/0ExmO1r1cWxhj/QcIIbaCC0GQTQB od5gvd6ZGUWtE0m3DmIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otCWb-008Ekf-U0; Thu, 10 Nov 2022 18:43:43 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otCUT-008D4k-Fs for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 18:41:31 +0000 Received: by mail-pg1-x533.google.com with SMTP id q71so2512080pgq.8 for ; Thu, 10 Nov 2022 10:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=+uQe3bmrV0zmghe9Tre6aGt5ad4Xsr/J3KkGBkCAzjo=; b=kW6ySL9n+9McJX1vufvewvJWt6Ghf7ABWg4WL9I+w6MnWhduVB35BPxbNF1DaBapee lfJ2uSLRVSEoWJB5nvBm4mtKhHomnYDQbNe7H8xgpYtr2N7idFdkXbj0B3ovQWpgCClF eeI5A8w8WVPOzrU0FPTCuuWwjaduiJ9GSTt5k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=+uQe3bmrV0zmghe9Tre6aGt5ad4Xsr/J3KkGBkCAzjo=; b=PNCb2+34yYhwky7EJYmWcJTNrnOKzBEaDWHtj8Ejsmpay4dZENuJOg60c2mE7VY3Qy /j2V17nTg6D1dGXYk0GT6e76xnYGSDdiUO4m9vqxr+zU4pxw/43CNy2GMX4PQLq+6dT7 4yD8cIRDZDSj4o3sLVNArK6aYcfeIhiDVFsxCNkc7EYNhtbJSiUL+yzeQHQxDSqlmytm /GFS9H5gHHuDeVOVnEXiurJ4p+0wOeIIz6QOnJeLzlGQh+ltVmBqrackrv3ocNwLKk2+ 4rSQfXu+8ihYCiSrcOXsnlAP3LlLyEmj+k6Fvi+7AACxjD7K+0Cx1ycV5B03svqUZSqY iJIQ== X-Gm-Message-State: ACrzQf2JJGbMQvILKNGTxZNgcSoMKOU1Y+eSKMCLlRnpi5ygchrFk+p7 9hERHJaQAgk0DkTNv9LQJmpLnA== X-Google-Smtp-Source: AMsMyM51ddcMMgzfIkx+DjiizwQGBjkpQqu0oehnqrEhCTJv0lFzNgYTi3y88dbmqpHoCNlaI1zW3w== X-Received: by 2002:a63:1053:0:b0:439:4c73:821c with SMTP id 19-20020a631053000000b004394c73821cmr2977955pgq.109.1668105686267; Thu, 10 Nov 2022 10:41:26 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:b5a4:486a:f07:f67e]) by smtp.gmail.com with ESMTPSA id c2-20020a170903234200b001869efb722csm11635627plh.215.2022.11.10.10.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 10:41:25 -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 v8 10/14] drm: bridge: samsung-dsim: Add input_bus_flags Date: Fri, 11 Nov 2022 00:08:49 +0530 Message-Id: <20221110183853.3678209-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110183853.3678209-1-jagan@amarulasolutions.com> References: <20221110183853.3678209-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_104129_558553_F41CB16B X-CRM114-Status: GOOD ( 13.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. v8: * add DE_LOW for i.MX8M Mini/Nano platforms. v7, v6: * none v5: * rebased based on updated bridge changes v4, v3, v2, v1: * none Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 33e5ae9c865f..65f7d8522bc1 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1627,6 +1627,10 @@ static const struct samsung_dsim_host_ops samsung_dsim_generic_host_ops = { .unregister_host = samsung_dsim_unregister_host, }; +static const struct drm_bridge_timings samsung_dsim_bridge_timings_de_low = { + .input_bus_flags = DRM_BUS_FLAG_DE_LOW, +}; + int samsung_dsim_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1709,6 +1713,10 @@ int samsung_dsim_probe(struct platform_device *pdev) dsi->bridge.of_node = dev->of_node; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + /* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */ + if (dsi->plat_data->hw_type == SAMSUNG_DSIM_TYPE_IMX8MM) + dsi->bridge.timings = &samsung_dsim_bridge_timings_de_low; + if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) ret = dsi->plat_data->host_ops->register_host(dsi);