From patchwork Wed Jun 12 06:44:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2708051 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 2A7EFC1459 for ; Wed, 12 Jun 2013 06:45:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A4552018C for ; Wed, 12 Jun 2013 06:45:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D7D72018B for ; Wed, 12 Jun 2013 06:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755132Ab3FLGpu (ORCPT ); Wed, 12 Jun 2013 02:45:50 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:40809 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755101Ab3FLGpu (ORCPT ); Wed, 12 Jun 2013 02:45:50 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5C6jjLS000310; Wed, 12 Jun 2013 01:45:46 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5C6jjlG004669; Wed, 12 Jun 2013 01:45:45 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Wed, 12 Jun 2013 01:45:45 -0500 Received: from deskari.tieu.ti.com (h64-7.vpn.ti.com [172.24.64.7]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5C6jimT031978; Wed, 12 Jun 2013 01:45:44 -0500 From: Tomi Valkeinen To: Jean-Christophe PLAGNIOL-VILLARD , CC: Tomi Valkeinen , NeilBrown Subject: [PATCH] OMAPDSS: DPI: Fix wrong pixel clock limit Date: Wed, 12 Jun 2013 09:44:52 +0300 Message-ID: <1371019492-4582-1-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.1.2 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.1 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 DPI is supposed to skip odd dividers in the clock path when the pixel clock is higher than 100MHz. The code, however, defines the pixel clock limit as 1MHz. This causes the driver to skip valid clock dividers, possibly making the pixel clock to be further away from the requested one than necessary. Fix the clock limit to 100MHz. Signed-off-by: Tomi Valkeinen Cc: NeilBrown --- This is for 3.10. drivers/video/omap2/dss/dpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 757b57f..0bdcd41 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -129,7 +129,7 @@ static bool dpi_calc_dispc_cb(int lckd, int pckd, unsigned long lck, * shifted. So skip all odd dividers when the pixel clock is on the * higher side. */ - if (ctx->pck_min >= 1000000) { + if (ctx->pck_min >= 100000000) { if (lckd > 1 && lckd % 2 != 0) return false; @@ -156,7 +156,7 @@ static bool dpi_calc_hsdiv_cb(int regm_dispc, unsigned long dispc, * shifted. So skip all odd dividers when the pixel clock is on the * higher side. */ - if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 1000000) + if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 100000000) return false; ctx->dsi_cinfo.regm_dispc = regm_dispc;