From patchwork Wed Aug 1 10:31:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 1263851 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id EE5E83FC71 for ; Wed, 1 Aug 2012 10:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820Ab2HAKdm (ORCPT ); Wed, 1 Aug 2012 06:33:42 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:39552 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753934Ab2HAKdl (ORCPT ); Wed, 1 Aug 2012 06:33:41 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q71AXfKJ020617; Wed, 1 Aug 2012 05:33:41 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q71AXf76003048; Wed, 1 Aug 2012 05:33:41 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Wed, 1 Aug 2012 05:33:41 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q71AXfGu016029; Wed, 1 Aug 2012 05:33:41 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.248]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q71AXcr26858; Wed, 1 Aug 2012 05:33:39 -0500 (CDT) From: Archit Taneja To: CC: , , , , Archit Taneja Subject: [RFC 10/17] OMAPDSS: HDMI: Add a get_timing function for HDMI interface Date: Wed, 1 Aug 2012 16:01:21 +0530 Message-ID: <1343817088-29645-11-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343817088-29645-1-git-send-email-archit@ti.com> References: <1343817088-29645-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add function omapdss_hdmi_display_get_timing() which returns the timings maintained by the HDMI interface driver in it's hdmi_config field. This prevents the need for the panel driver to configure default timings in it's probe. This function is just intended to be used once during the panel driver's probe. It makes sense for those interfaces which can be configured to a default timing. Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/dss.h | 2 ++ drivers/video/omap2/dss/hdmi.c | 6 ++++++ drivers/video/omap2/dss/hdmi_panel.c | 10 +++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 7e38ffd..df49c5d 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -485,6 +485,8 @@ static inline unsigned long hdmi_get_pixel_clock(void) #endif int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev); void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev); +void omapdss_hdmi_display_get_timing(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings); int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 01665fa..2de1f91 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -544,6 +544,12 @@ static void hdmi_power_off(struct omap_dss_device *dssdev) hdmi_runtime_put(); } +void omapdss_hdmi_display_get_timing(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + *timings = hdmi.ip_data.cfg.timings; +} + int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index 8dce206..8473193 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c @@ -41,13 +41,13 @@ static struct { static int hdmi_panel_probe(struct omap_dss_device *dssdev) { + struct omap_video_timings timings; + DSSDBG("ENTER hdmi_panel_probe\n"); - dssdev->panel.timings = (struct omap_video_timings) - { 640, 480, 25175, 96, 16, 48, 2, 11, 31, - OMAPDSS_SIG_ACTIVE_LOW, OMAPDSS_SIG_ACTIVE_LOW, - false, - }; + omapdss_hdmi_display_get_timing(dssdev, &timings); + + dssdev->panel.timings = timings; DSSDBG("hdmi_panel_probe x_res= %d y_res = %d\n", dssdev->panel.timings.x_res,