From patchwork Fri Apr 26 13:23:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 162914 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp748018jan; Fri, 26 Apr 2019 06:23:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVDJCSctngghHVBrQkz3SWW93ymzqPuj+StxKSqIo88BjvgL14s84RqIjJsCHmlAJ2N/4K X-Received: by 2002:a63:d256:: with SMTP id t22mr1617926pgi.80.1556285026644; Fri, 26 Apr 2019 06:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285026; cv=none; d=google.com; s=arc-20160816; b=qaErtQ3RffxZo5B/NDO7idUjtzISjmKzOWaOZO3W+/nehA3yDmuew6/Yd8XM9tG5J+ reV4/1h6l9gTn4SdS1D+hqz5qH2lKVhXR5zqrJe89XCwKdnzK67d9uaFRXgc+1MDngUf OzH0Tz7JDah4xutEP+/PTForkmYZ+eYsZRXt7oyvlH2kkkymVnQZHnOl2JYjTHi3VDNA Ah2DkcAoBCVUqoTRgDDdlmdojH+qqWhqU7P2pTpB7jRiK7NMAVYugVnjbeGICOomKSwF HkJnjqNuD57JbeozT7xxRKhvtVIjIR5gfYdSHn/Dc79G0FZgS5b4qlj81mew8rJYk9YX Vhag== 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=YU21NqtIpmdEX7r0H3rNpNL1udpsklFyqoI+1/lZt5I=; b=N9DclBFr8jWdN3pu7KCDzUEB/k4iahfQjkZkKb+a10kJ62FhB/Mr+dc5CS3wDGS+z6 S1EK22kv3YmM8fPAJtBzHZVK3VnwW1S84bT5G3Vb39F5Yy9yAKi++7TPRkp333pKViTn 9hFggFlyhL9FZ7VZCDtDvq7E66F+IOePuojP1Rn3ksk4XTuxh21mtDj+cAPQymfmWUgz bjGzhj/udK/fcfHgE10qOc+nZzYeGYDnJObS/4IriuxbVZAArgHGxIVwxlKkzKS53SIn 460qfmU2bUysfXtDxe+4R7Zui8S7WpJ5D/31SMA3OnZomKKxJm7taHdgvKwmTm4Mc//z Fi/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pxCQ4AwO; 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 o4si23183021pgp.160.2019.04.26.06.23.46; Fri, 26 Apr 2019 06:23:46 -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=pxCQ4AwO; 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 S1726069AbfDZNXq (ORCPT + 7 others); Fri, 26 Apr 2019 09:23:46 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:39798 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbfDZNXp (ORCPT ); Fri, 26 Apr 2019 09:23:45 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3QDNTBm026057; Fri, 26 Apr 2019 08:23:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556285009; bh=YU21NqtIpmdEX7r0H3rNpNL1udpsklFyqoI+1/lZt5I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=pxCQ4AwO2+CK4cr+WeXMtzJ30QJBny2eKT4KlQuFjdfPbio+JFJlub7q37W0ofEBX z+SqH3UJgORcziR2W3vBubsgDn531Ww3rOhZvxO4nV0NtFLY3yHdhr+LFLhp0a8gxP vzwd0UtqJgJ2pMYFT2BKZSNWjWtxGS6XTlRF2s90= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3QDNTif018312 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 26 Apr 2019 08:23:29 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 26 Apr 2019 08:23:26 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE111.ent.ti.com (157.170.170.22) 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; Fri, 26 Apr 2019 08:23:26 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3QDNFsN024078; Fri, 26 Apr 2019 08:23:24 -0500 From: Jyri Sarha To: , , CC: , , , , , , , , Subject: [PATCH v7 3/6] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Fri, 26 Apr 2019 16:23:12 +0300 Message-ID: <79d8bb11ab712740982f73394dca8c046dc3f8f0.1556284767.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 f73eaa6d729a..358cf81c5ea4 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -248,10 +248,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;