From patchwork Thu May 8 09:15:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 4134021 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6B836BFF02 for ; Thu, 8 May 2014 09:16:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78AD1201C0 for ; Thu, 8 May 2014 09:16:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69C7620266 for ; Thu, 8 May 2014 09:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753470AbaEHJQd (ORCPT ); Thu, 8 May 2014 05:16:33 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44870 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbaEHJQb (ORCPT ); Thu, 8 May 2014 05:16:31 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s489GVuH011923; Thu, 8 May 2014 04:16:31 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s489GVAW031251; Thu, 8 May 2014 04:16:31 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 8 May 2014 04:16:30 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s489GUaB017297; Thu, 8 May 2014 04:16:30 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.145.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id s489GTt15305; Thu, 8 May 2014 04:16:29 -0500 (CDT) From: Archit Taneja To: CC: , , Archit Taneja Subject: [RFC 3/6] omapdss: DT: Get source endpoint by matching reg-id Date: Thu, 8 May 2014 14:45:14 +0530 Message-ID: <1399540517-17883-3-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1399540517-17883-1-git-send-email-archit@ti.com> References: <1399540517-17883-1-git-send-email-archit@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 In omapdss_of_find_source_for_first_ep, we retrieve a source endpoint's DT node, and then see what omapdss output has the matching device_node pointer in omap_dss_find_output_by_node. For all DPI and SDI outputs, the device_node pointer is set as the parent's DSS device_node pointer. If the source is one of these outputs, the above method won't work. To get the correct output for ports within DSS with the existing omapdss DT framework, we check in omapdss_of_find_source_for_first_ep, whether the source node is of the DSS parent device. If so, we take an extra step of extracting the 'reg' property from the port corresponding to the endpoint source, and get the omap_dss_device output by matching both device_node and reg-id. We would want to get rid of this eventually, and support multiple ports in general. That would involve making some more changes the omapdss DT framework. Signed-off-by: Archit Taneja --- drivers/video/fbdev/omap2/dss/dss-of.c | 41 ++++++++++++++++++++++++++++++---- drivers/video/fbdev/omap2/dss/dss.c | 6 +++++ drivers/video/fbdev/omap2/dss/dss.h | 2 ++ drivers/video/fbdev/omap2/dss/output.c | 15 +++++++++++++ include/video/omapdss.h | 6 +++++ 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/dss-of.c b/drivers/video/fbdev/omap2/dss/dss-of.c index a4b20aa..4261c14 100644 --- a/drivers/video/fbdev/omap2/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/dss/dss-of.c @@ -19,6 +19,7 @@ #include #include