From patchwork Mon Jan 27 10:56:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 182972 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3630179ile; Mon, 27 Jan 2020 02:56:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyS+nsLI1/j3WGFAUSjSYYVjCs9IvVO9jpbSnzQaOJcQ9fcGHK9YMaltn7t1b5Q37ZT4Ouo X-Received: by 2002:a63:6d05:: with SMTP id i5mr19592319pgc.120.1580122568613; Mon, 27 Jan 2020 02:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580122568; cv=none; d=google.com; s=arc-20160816; b=mCpd5ysR6jFr/juKR1GjRvN+f9RVL0OAVs2y4BeGmtfuc8YTpBzwDMt0bbUpZDU07E UBDNNUKLfNd8734qnAdOVucxfNk72Ne889JRbaszMTMc5G6IrzC8nZN5Ijou1dlYfDNz snZu+F+v9/fszciCrXB4HcRRCPDt7UnbZNbtBiBRcQbMBs3XUfV6Fie12M9SKDH9WfYd WmEkTHRLWx6Y9/kjaDwjJz9ojkwHo7C+g5lwvtqmzew3R4kMWIugaPTlJkQEReDBuIfo ry4clnY6uwzYXYbT8OiTX7z4a2xxniBd1wtarDQL6a7c8fmFGZz0N7/1Fn2Qd+3S22cc NS/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=zEEk76RJS7NlG3l8R9RaCYyGIhTBlHOoifeHvsIFvPQ=; b=NNCfjJdj9A01XnVwQzmN880REMIAhUxNkO0QaUikqHSE2SifpLQqzrQaZNh4/fj+zj 0ReQ3LxgoWPavCpei30qPC/tJ/0LppwmIhZxEkKZPciZvx5UBcbEE5qUKmGgmcoibAlV UV0HrHYJZyrssYLjppbPGlIdUl70JP7akCLWME4qYGAewUIMWDcbI1+bYXaEuNQ5xsup SoYrn9rBMU1GIUulCgtXlqCyq/BnI4lf+w5iDk5shklc6W1MYz+RYOuUC502YPMDoNmk vu1MiIkY43tP/PmFdOmITo2Ph/Y6Dd8axoHb43kg5LUyTfrwMG1S0vTXYdMt5sYyu74V 9Kfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YKz8X54P; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id y8si10898650pfg.55.2020.01.27.02.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 02:56:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YKz8X54P; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4ACD46EAF4; Mon, 27 Jan 2020 10:56:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E0B36EAF5 for ; Mon, 27 Jan 2020 10:56:04 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00RAtrIj121310; Mon, 27 Jan 2020 04:55:53 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1580122553; bh=TrRlOwLc/tdMiEvgIjVuZLGeEAB4WdRX1AogQQheS8A=; h=From:To:CC:Subject:Date; b=YKz8X54PMvkl6NmNNnRwgUQQDfm1ZzIkhsYMMrNLt9BF4gpk1qOlRqt6wdD1PUE5d 9yjhK0dQk396EzPq8jcf1uO+0DafyjiJyERCpK97Frx8ZqCj4GlNwl+vRYUQaLoYyB P9xHMywnXERuBISBNp/K2MxDMsvyZe2/jm95Zxx0= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 00RAtrX6044123 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Jan 2020 04:55:53 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 27 Jan 2020 04:55:51 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 27 Jan 2020 04:55:51 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00RAtmOY079625; Mon, 27 Jan 2020 04:55:48 -0600 From: Peter Ujfalusi To: , , , , , Subject: [PATCH v3 0/2] drm/bridge: Support for Toshiba tc358768 RGB to DSI bridge Date: Mon, 27 Jan 2020 12:56:32 +0200 Message-ID: <20200127105634.7638-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tomi.valkeinen@ti.com, Laurent.pinchart@ideasonboard.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Changes since v2: - Implement pre_enable and post_disbale callbacks and move code from enable and disable callbacks. - hw_enable/disable is removed from tc358768_dsi_host_transfer() - Defines for DSI_CONFW accesses - breakout from the loops (the check for it) is moved one level up in tc358768_calc_pll() Changes since v1: DT bindings document: - Removed MaxItems for the regulators - additionalProperties: false added to port@1 Driver: - Year is now 2020 - Includes shorted - The three letter members of the private struct documented 0 they are named as in the datasheet - Error handling for the IO functions is following what sil-sii8620.c does - regmap regcache is disabled along with refcache_sync() and volatile callback for regmap - The hw enable and disable functions got separated - Taken the suggested simplifactions from Andrzej for tc358768_calc_pll() and tc358768_dsi_host_transfer() - The driver no longer stores the drm_display_mode, it relies on priv->bridge.encoder->crtc->state->adjusted_mode where it needs it - tc358768_calc_pll() can be used for verification only to not modify the state - refcounting added for hw enable state as a dsi transfer was shutting down the bridge when it was already enabled. Tested on top of drm-next + LED backlight patches + DT patches on dra7-evm with osd101t2045 (panel-simple) and osd101t2587 panel drivers. Cover letter from v1: TC358768 is a parallel RGB to MIPI DSI bridge. The initial driver supports MIPI_DSI_MODE_VIDEO, MIPI_DSI_FMT_RGB888 and only write is implemented for mipi_dsi_host_ops.transfer due to lack of hardware where other modes can be tested. Regards, Peter --- Peter Ujfalusi (2): dt-bindings: display: bridge: Add documentation for Toshiba tc358768 drm/bridge: Add tc358768 driver .../display/bridge/toshiba,tc358768.yaml | 158 +++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 1040 +++++++++++++++++ 4 files changed, 1209 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml create mode 100644 drivers/gpu/drm/bridge/tc358768.c -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel