From patchwork Tue Jun 16 10:16:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 6617101 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C4189C0020 for ; Tue, 16 Jun 2015 10:17:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E31D7205C6 for ; Tue, 16 Jun 2015 10:17:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E39F7207AF for ; Tue, 16 Jun 2015 10:17:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932897AbbFPKRS (ORCPT ); Tue, 16 Jun 2015 06:17:18 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:48360 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932915AbbFPKRO (ORCPT ); Tue, 16 Jun 2015 06:17:14 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t5GAGhiJ008348; Tue, 16 Jun 2015 05:16:43 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5GAGhBZ005952; Tue, 16 Jun 2015 05:16:43 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 16 Jun 2015 05:16:43 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5GAGVre016197; Tue, 16 Jun 2015 05:16:42 -0500 From: Tomi Valkeinen To: Laurent Pinchart , , , CC: Tomi Valkeinen Subject: [PATCH 6/7] OMAPDSS: componentize omapdss Date: Tue, 16 Jun 2015 13:16:28 +0300 Message-ID: <1434449789-13812-7-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434449789-13812-1-git-send-email-tomi.valkeinen@ti.com> References: <1434449789-13812-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP omapdss kernel module contains drivers for multiple devices, one for each DSS submodule. The probing we have at the moment is a mess, and doesn't give us proper deferred probing nor ensure that all the devices are probed before omapfb/omapdrm start using omapdss. This patch solves the mess by using the component system for DSS submodules. The changes to all DSS submodules (dispc, dpi, dsi, hdmi4/5, rfbi, sdi, venc) are the same: probe & remove functions are changed to bind & unbind, and new probe & remove functions are added which call component_add/del. The dss_core driver (dss.c) acts as a component master. Adding and matching the components is simple: all dss device's child devices are added as components. However, we do have some dependencies between the drivers. The order in which they should be probed is reflected by the list in core.c (dss_output_drv_reg_funcs). The drivers are registered in that order, which causes the components to be added in that order, which makes the components to be bound in that order. This feels a bit fragile, and we probably should improve the code to manage binds in random order. However, for now, this works fine. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 28 ++++++++++++++--- drivers/video/fbdev/omap2/dss/dpi.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/dsi.c | 25 ++++++++++++--- drivers/video/fbdev/omap2/dss/dss.c | 59 ++++++++++++++++++++++++++++++++--- drivers/video/fbdev/omap2/dss/hdmi4.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/hdmi5.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/rfbi.c | 28 ++++++++++++++--- drivers/video/fbdev/omap2/dss/sdi.c | 27 +++++++++++++--- drivers/video/fbdev/omap2/dss/venc.c | 27 +++++++++++++--- 9 files changed, 234 insertions(+), 38 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index e3417af63451..c8e34163211a 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -39,6 +39,7 @@ #include #include #include +#include #include