From patchwork Mon Sep 24 06:38:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrabhanu Mahapatra X-Patchwork-Id: 1496301 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 488DBDF280 for ; Mon, 24 Sep 2012 06:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753196Ab2IXGko (ORCPT ); Mon, 24 Sep 2012 02:40:44 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:46696 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752246Ab2IXGkm (ORCPT ); Mon, 24 Sep 2012 02:40:42 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8O6eghC006522; Mon, 24 Sep 2012 01:40:42 -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 q8O6egaj021839; Mon, 24 Sep 2012 01:40:42 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 24 Sep 2012 01:40:42 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8O6efCQ005728; Mon, 24 Sep 2012 01:40:41 -0500 Received: from localhost (uda0131936.apr.dhcp.ti.com [172.24.136.230]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q8O6eew10750; Mon, 24 Sep 2012 01:40:40 -0500 (CDT) From: Chandrabhanu Mahapatra To: CC: , , Chandrabhanu Mahapatra Subject: [PATCH] OMAPDSS: DISPC: Add predecimation limit for TILER based rotations Date: Mon, 24 Sep 2012 12:08:27 +0530 Message-ID: <1348468707-5142-1-git-send-email-cmahapatra@ti.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org In OMAP4 and OMAP5 when TILER 2D burst mode is used, a maximum of one line can be skipped as per the respective TRMs. The MBlockStride OCP signal, which is sum of ROWINC and image width in memory, is only 17 bits wide. In 2D mode TILER supports 8192, 16384, 32768 and 65536 values of MBlockStride. In case when 2 or more lines are skipped the ROWINC value exceeds 65536 resulting in OCP errors. So, maximum vertical predecimation achievable is 2. Signed-off-by: Chandrabhanu Mahapatra --- drivers/video/omap2/dss/dispc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index d512c38..61f8369 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -2195,7 +2195,8 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane, const struct omap_video_timings *mgr_timings, u16 width, u16 height, u16 out_width, u16 out_height, enum omap_color_mode color_mode, bool *five_taps, - int *x_predecim, int *y_predecim, u16 pos_x) + int *x_predecim, int *y_predecim, u16 pos_x, + enum omap_dss_rotation_type rotation_type) { struct omap_overlay *ovl = omap_dss_get_overlay(plane); const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE); @@ -2210,7 +2211,8 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane, return -EINVAL; *x_predecim = max_decim_limit; - *y_predecim = max_decim_limit; + *y_predecim = (rotation_type == OMAP_DSS_ROT_TILER && + dss_has_feature(FEAT_BURST_2D)) ? 2 : max_decim_limit; if (color_mode == OMAP_DSS_COLOR_CLUT1 || color_mode == OMAP_DSS_COLOR_CLUT2 || @@ -2306,7 +2308,8 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi, r = dispc_ovl_calc_scaling(plane, channel, mgr_timings, in_width, in_height, out_width, out_height, oi->color_mode, - &five_taps, &x_predecim, &y_predecim, oi->pos_x); + &five_taps, &x_predecim, &y_predecim, oi->pos_x, + oi->rotation_type); if (r) return r;