From patchwork Mon May 27 13:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 165213 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7193044ili; Mon, 27 May 2019 06:48:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1/sB3F5eJ6Vc1qtA8ipAEQDRu0rryDQ0/sAWK9VS4hfr3gtzwNIr4P+/HYHjf0IwF/Izi X-Received: by 2002:a63:9d8d:: with SMTP id i135mr126021778pgd.245.1558964898812; Mon, 27 May 2019 06:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558964898; cv=none; d=google.com; s=arc-20160816; b=z6ob1mXW0kn713Cosquc8aTebq0hyeIjKVdQaCKTt5MgFYvArc2jjGkAFja/zl2Sgu 6XV2Wat5GzW9vX7wEQJDrNbXzWFo4q8397ndnTmw6qQGmsB80f6KE32sZVIm+7QFihu0 B8eh/K6bXTHlLvrNJDydFLg4fqYbeJNuauTzeQvVKDsyTKSCM4vikOBCgy119NqoMc/k DBxytvU9hTz2MLJMkCzWy7MzEtRp7blswyFvKN048l2iUJnmaUKEgjFjd99/nRDYN3dQ re5XzTI2ueLDEWBon+sKNOGpi9xO4v8YupeQd/1xfxO92ezVGzyAD3fxNY3fzDXK/ITR rd9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Nb2UYYSLO8Mx+9pQxzErM264A56wP/rVqxDnQvP/ZL8=; b=pb1xNHSjSVpjq76roDblUaIokeLm7FR8davjLuFq7E9TL6HyyXPA+D12bM/+PmfsEC 8XgRAdk70TlYrGNB3oysBMr7Tct1NhHa/QtpJk35xy/Cy7xUwNf9MDUmfUVMN9oHEh6G 2dhrR8YqQlI+fIj2qd4tMLvdAY+08gur7vDqwylr60uyDPLut3c0ZguVXQOroUWnPzAh F1RjmwDw+Jta/faVQ69yaII+ps5L1eqTzEhYv/xtufJnzAbWjMoCoi1kADZY8SN8ICfF o6V5387Yxx4RpOwEWsi0duiKd7xiKxzA4xIhiw3coZDFDhFIioEz8wECcNxrSfm5+VHc JGXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4rb+for; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb12si18035478plb.37.2019.05.27.06.48.18; Mon, 27 May 2019 06:48:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4rb+for; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbfE0NsR (ORCPT + 7 others); Mon, 27 May 2019 09:48:17 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:35654 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfE0NsR (ORCPT ); Mon, 27 May 2019 09:48:17 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4RDm7S5042862; Mon, 27 May 2019 08:48:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1558964887; bh=Nb2UYYSLO8Mx+9pQxzErM264A56wP/rVqxDnQvP/ZL8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=H4rb+forsCbMKsppoPf89JwZzTbzMuk2d3GOK7cLUVymdRWsCnu3mONEE+YG29xz1 Xmxe+okvTGlQ1O666cOVltUDz4qjSw+L6aDMiYEO31/+I9hK7A32Jznmh/dptJ/8as ncC6CPz//4zxEYYpMfIpT4J/OhdaVP2VUtpE9XNc= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4RDm7vL096047 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 May 2019 08:48:07 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 27 May 2019 08:48:06 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 27 May 2019 08:48:06 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4RDlviG065947; Mon, 27 May 2019 08:48:04 -0500 From: Jyri Sarha To: , , CC: , , , , Subject: [PATCH v8 3/6] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Mon, 27 May 2019 16:47:54 +0300 Message-ID: <1a2a8eae0b9d6333e7a5841026bf7fd65c9ccd09.1558964241.git.jsarha@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The pixel clock unit in the first two registers (0x00 and 0x01) of sii9022 is 10kHz, not 1kHz as in struct drm_display_mode. Division by 10 fixes the issue. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/sii902x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 128d8fdb4ba6..19f982a00dba 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -249,10 +249,11 @@ static void sii902x_bridge_mode_set(struct drm_bridge *bridge, struct regmap *regmap = sii902x->regmap; u8 buf[HDMI_INFOFRAME_SIZE(AVI)]; struct hdmi_avi_infoframe frame; + u16 pixel_clock_10kHz = adj->clock / 10; int ret; - buf[0] = adj->clock; - buf[1] = adj->clock >> 8; + buf[0] = pixel_clock_10kHz & 0xff; + buf[1] = pixel_clock_10kHz >> 8; buf[2] = adj->vrefresh; buf[3] = 0x00; buf[4] = adj->hdisplay;