From patchwork Wed Aug 14 19:43:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2844935 Return-Path: X-Original-To: patchwork-dri-devel@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 6CFD9BF546 for ; Thu, 15 Aug 2013 00:29:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CEFC2054D for ; Thu, 15 Aug 2013 00:29:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7AC2E204FB for ; Thu, 15 Aug 2013 00:29:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53A59E6FF5 for ; Wed, 14 Aug 2013 17:29:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 48EBCE5F32 for ; Wed, 14 Aug 2013 12:43:40 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id d51so4991695eek.23 for ; Wed, 14 Aug 2013 12:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hcJN/do153/5nH5htwYoupOr1UPXGdn6bczgK2995ek=; b=aIz8sxUOk7ADnW2lt27okojtremlZcIB9Fq9U729/BXoW3GF+Nc0x2cuZNIFqkUV9n 2XaqkaF9tbAmMX6q9q73IYyrT4ak4V9muXe3gvg9A0XGDGVGlIqhfkAuGSDv2zTpXgK9 qKmibYAnJYPIChHJmWWFSLUS+Nx10YWfjA2v/Ta2FxtCZvgmET+fAqgkR0RJF1ovA3W/ WzRJyal7cCK3Ywm2TWgsYb/Oytovv0T/+SmRPak/tlD81CC1EZynbXK29DeViHDMV+eQ 6o2dHi1tUCjZ546+mQKuK6aScuZZh0PJZWBVdlt6q7LOe/xpRgKkCepQooBpt2ny2taC YUzQ== X-Received: by 10.14.104.130 with SMTP id i2mr210774eeg.120.1376509419418; Wed, 14 Aug 2013 12:43:39 -0700 (PDT) Received: from topkick.lan (dslc-082-083-214-189.pools.arcor-ip.net. [82.83.214.189]) by mx.google.com with ESMTPSA id n48sm77973149eeg.17.2013.08.14.12.43.37 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 12:43:38 -0700 (PDT) Received: from edge.lan (magicgate.lan [192.168.1.1]) by topkick.lan (Postfix) with ESMTPSA id 82D7D60697; Wed, 14 Aug 2013 21:41:06 +0200 (CEST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH v2 3/8] drm/i2c: tda998x: fix npix/nline programming Date: Wed, 14 Aug 2013 21:43:28 +0200 Message-Id: <1376509413-1462-4-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1376509413-1462-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1376509413-1462-1-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailman-Approved-At: Wed, 14 Aug 2013 17:11:06 -0700 Cc: Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Russell King X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Russell King The npix/nline registers are supposed to be programmed with the total number of pixels/lines, not the displayed pixels/lines, and not minus one either. Signed-off-by: Russell King Tested-by: Darren Etheridge Tested-by: Sebastian Hesselbarth --- Cc: David Airlie Cc: Darren Etheridge Cc: Rob Clark Cc: Russell King Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index cb9b13a..a701411 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -587,8 +587,8 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg_set(encoder, REG_VIP_CNTRL_3, VIP_CNTRL_3_H_TGL); reg_write(encoder, REG_VIDFORMAT, 0x00); - reg_write16(encoder, REG_NPIX_MSB, mode->hdisplay - 1); - reg_write16(encoder, REG_NLINE_MSB, mode->vdisplay - 1); + reg_write16(encoder, REG_NPIX_MSB, mode->htotal); + reg_write16(encoder, REG_NLINE_MSB, mode->vtotal); reg_write16(encoder, REG_VS_LINE_STRT_1_MSB, line_start); reg_write16(encoder, REG_VS_LINE_END_1_MSB, line_end); reg_write16(encoder, REG_VS_PIX_STRT_1_MSB, hs_start);