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: 11248021 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 6AD24913 for ; Sun, 17 Nov 2019 07:11:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C2D120740 for ; Sun, 17 Nov 2019 07:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725880AbfKQHLF (ORCPT ); Sun, 17 Nov 2019 02:11:05 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50884 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfKQHLE (ORCPT ); Sun, 17 Nov 2019 02:11:04 -0500 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 Cc: Tony Lindgren , Merlijn Wajer , "H. Nikolaus Schaller" , linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Sebastian Reichel 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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