From patchwork Sun Nov 17 02:40:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 11248175 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 563D314DB for ; Sun, 17 Nov 2019 11:46:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B18020730 for ; Sun, 17 Nov 2019 11:46:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B18020730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07A386E370; Sun, 17 Nov 2019 11:45:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 823626E25F for ; Sun, 17 Nov 2019 07:11:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 0007028FC55 Received: by earth.universe (Postfix, from userid 1000) id 3E7593C0CAC; Sun, 17 Nov 2019 03:41:40 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Laurent Pinchart , Tomi Valkeinen Subject: [RFCv1 32/42] drm/omap: dsi: convert to drm_panel Date: Sun, 17 Nov 2019 03:40:18 +0100 Message-Id: <20191117024028.2233-33-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191117024028.2233-1-sebastian.reichel@collabora.com> References: <20191117024028.2233-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 17 Nov 2019 11:44:18 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com, Tony Lindgren , "H. Nikolaus Schaller" , Merlijn Wajer , Sebastian Reichel , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This converts the DSI module to expect common drm_panel display drivers instead of dssdev based ones. This commit is WIP. We somehow need to know the panels resolution in omap_dsi_host_attach(), so that we can properly configure the DSI bus clock before enabling the bus. The control bus must be enabled at this point, so that the panel can use it. Other drivers run drm_panel_attach() in their dsi host attach, which makes it possible to call drm_panel_get_modes() afterwards and the get the correct mode from the connector. Signed-off-by: Sebastian Reichel --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 217 +++++++----------- drivers/gpu/drm/omapdrm/dss/dsi.c | 141 ++++++++++-- .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 1 - drivers/gpu/drm/omapdrm/dss/omapdss.h | 22 +- drivers/gpu/drm/omapdrm/omap_crtc.c | 17 +- 5 files changed, 205 insertions(+), 193 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 18020ac43a83..84b0e79c025e 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -6,8 +6,6 @@ * Author: Tomi Valkeinen */ -/* #define DEBUG */ - #include #include #include @@ -20,11 +18,14 @@ #include #include +#include +#include +#include +#include