From patchwork Tue Dec 22 12:26:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 7904331 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9328BEEE5 for ; Tue, 22 Dec 2015 12:26:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD47020503 for ; Tue, 22 Dec 2015 12:26:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E969420462 for ; Tue, 22 Dec 2015 12:26:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755144AbbLVM0U (ORCPT ); Tue, 22 Dec 2015 07:26:20 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35816 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751833AbbLVM0T (ORCPT ); Tue, 22 Dec 2015 07:26:19 -0500 Received: by mail-wm0-f42.google.com with SMTP id l126so108167505wml.0 for ; Tue, 22 Dec 2015 04:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ccp2KukkM8+wHu2kQWfi+DKZk5NTp7qsk/1DG+W4Uho=; b=o0VphffgIgBpGuVGolsNtQ6+54WM6PqUSe3DI19QVVHzbUq0xXtU8IsM9Ks7t0lMW2 ncChZ74tidSkDVn0WRA61wTX2Uydi9LfkgRBre3bvoVsNLwlTsb8VdfZJ52Y4I/iYACE bD9YAmoiCymbCliQMTk5+ZSbXe2iLeMGmMIZQ0dEiImVChjGDHqMiq2OBZ3r0R6tVvve qxWedEwcUyYjZoIW6EtuJyUvtjLh0V8tsaOJNVJiXOV/JgV3JR8vDjA+NUdmv+k6sZU0 P586bpE6TXJWEg5yScazPorOCuf7m8+bgiXhFgcSk7f8Q5BifEjZ/gNxWSpjJBoKvhFZ vP5w== X-Received: by 10.194.184.210 with SMTP id ew18mr11287302wjc.79.1450787178717; Tue, 22 Dec 2015 04:26:18 -0800 (PST) Received: from NewMoon.humanoids.iit.it (host240.iit.it. [90.147.26.240]) by smtp.gmail.com with ESMTPSA id l20sm24742730wmd.20.2015.12.22.04.26.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 04:26:18 -0800 (PST) From: Andrea Merello To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, stefan.kristiansson@saunalahti.fi Cc: linux-fbdev@vger.kernel.org, francesco.diotalevi@iit.it, claudio.lorini@iit.it, andrea.merello@gmail.com Subject: [PATCH] ocfb: fix tgdel and tvdel timing parameters Date: Tue, 22 Dec 2015 13:26:11 +0100 Message-Id: <1450787171-22429-1-git-send-email-andrea.merello@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 According to the ocfb documentation: Fix tgdel HW param should be left margin, not right. Fix tvdel HW param should upper margin, not lower. This seems to fix lock issues on certain monitors (tested on a slightly customized IP, but the FPGA guy said that it should be the same wrt this changes). Signed-off-by: Andrea Merello diff --git a/drivers/video/fbdev/ocfb.c b/drivers/video/fbdev/ocfb.c index c9293ae..a970edc2 100644 --- a/drivers/video/fbdev/ocfb.c +++ b/drivers/video/fbdev/ocfb.c @@ -123,11 +123,11 @@ static int ocfb_setupfb(struct ocfb_dev *fbdev) /* Horizontal timings */ ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 | - (var->right_margin - 1) << 16 | (var->xres - 1)); + (var->left_margin - 1) << 16 | (var->xres - 1)); /* Vertical timings */ ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 | - (var->lower_margin - 1) << 16 | (var->yres - 1)); + (var->upper_margin - 1) << 16 | (var->yres - 1)); /* Total length of frame */ hlen = var->left_margin + var->right_margin + var->hsync_len +