From patchwork Thu Sep 13 12:14:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 1451831 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 582823FE79 for ; Thu, 13 Sep 2012 12:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757963Ab2IMMPp (ORCPT ); Thu, 13 Sep 2012 08:15:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:52140 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757956Ab2IMMPm (ORCPT ); Thu, 13 Sep 2012 08:15:42 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8DCFfRf001457; Thu, 13 Sep 2012 07:15:41 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8DCFfDT030951; Thu, 13 Sep 2012 07:15:41 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Thu, 13 Sep 2012 07:15: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 q8DCFfCH018629; Thu, 13 Sep 2012 07:15: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 q8DCFdw07794; Thu, 13 Sep 2012 07:15:40 -0500 (CDT) From: Archit Taneja To: CC: , , Archit Taneja Subject: [PATCH 13/21] OMAPDSS: DISPC: Pass dummy scalar output rates for writeback pipeline Date: Thu, 13 Sep 2012 17:44:57 +0530 Message-ID: <1347538505-25359-14-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347538505-25359-1-git-send-email-archit@ti.com> References: <1347538505-25359-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 The scalar output rate for writeback pipeline when configured in memory to memory mode isn't a fixed rate, it can increase or reduce based on the time it needs to downscale. It also depends on the rate at which it can receive and push out data from/to the interconnect. Set the scalar output rates for writeback to a low dummy value(set to 1) to represent that it can output at low rates, this is done so that maximum downscaling is possible in memory to memory mode. Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/dispc.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 8673a33..1d5dddf 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3011,21 +3011,30 @@ unsigned long dispc_core_clk_rate(void) static unsigned long dispc_plane_output_rate(enum omap_plane plane) { - enum omap_channel channel = dispc_ovl_get_channel_out(plane); + if (plane != OMAP_DSS_WB) { + enum omap_channel channel = dispc_ovl_get_channel_out(plane); - return dispc_mgr_pclk_rate(channel); + return dispc_mgr_pclk_rate(channel); + } else { + return 1; + } } static unsigned long dispc_plane_lclk_rate(enum omap_plane plane) { - enum omap_channel channel = dispc_ovl_get_channel_out(plane); - if (dss_mgr_is_lcd(channel)) - return dispc_mgr_lclk_rate(channel); - else - return dispc_fclk_rate(); + if (plane != OMAP_DSS_WB) { + enum omap_channel channel = dispc_ovl_get_channel_out(plane); + if (dss_mgr_is_lcd(channel)) + return dispc_mgr_lclk_rate(channel); + else + return dispc_fclk_rate(); + } else { + return 1; + } } + static void dispc_dump_clocks_channel(struct seq_file *s, enum omap_channel channel) { int lcd, pcd;