From patchwork Thu Mar 14 11:27:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 160323 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15385109jad; Thu, 14 Mar 2019 04:28:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFgbboIp0UJFwdQ2Gvm8MSrbZyI3aJ3CNBnLxE9g7e9UaFM+Lnc6+1pzW6YUCEvwa+J9nn X-Received: by 2002:a62:e719:: with SMTP id s25mr48342291pfh.12.1552562898595; Thu, 14 Mar 2019 04:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552562898; cv=none; d=google.com; s=arc-20160816; b=CtVNQAwCu8SMll8hsz6NKYSXipnZU0TVvjKHxCZhBvmeX/UQ4zsSlITr7D+9bgJgq1 nZijvK3EtwQx8Xl0RLMqGQKB7zibzQ2inWw21xY+1U5FpUKJgchDqP/JDWBiR4B2axXj OoLee1oOB4m+3xSaO54al/bQa39+qheKmS7YPkjJ46O7PdEVsskU02uHc0ULEMLcyi7L MJ4kVpdShjY67wLb2hImNb/n7SfATcoIbtkH340lhBSRHVporg5X3EFUYaxOcEfAjAjZ L0h2OGLQ4HXuzGMZdWs8WbVF6Fguz1Hq9H7Td0HkjmImZd6kVqvyg0QAFglrOulV0Etw xa/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=k7jKZalR1iOSEgKD0kbOxm0TkesHwCqeqjDLrmmhlhA=; b=y8xSooBWxnBwbMD9PfP5cdKCJaMp/jCzs3BoCRONJMJFdg1+0bM2I9UpIYdBPLnzNi XLW2c35IulXc+ZZd4mofoXVwJTFRKAxoUBtL+t72BCONssObqUhgh9CdRJ38kDfT/RgY fQwk/pwKTk6h4n0kT40ri/eML5zU5KZIv33em9Kyfo4p81Tf9SrmtX/ZoCgBtKCruZ4u 0xyB6I1SY4FGbqdn3R4yE7/AldJXuLUq080yyAePTpt4VJKBCl54aD/ECAN+cfIrDn3s iXdMj5dbxiVaWEaTHQWgl8gEzXJS/kqciAi2ei+l+o4wrSH1csShod+MSFGjqDEyA1F9 /LYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id i62si14009022pli.218.2019.03.14.04.28.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 04:28:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D05A6E1CD; Thu, 14 Mar 2019 11:28:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FEF56E1CD for ; Thu, 14 Mar 2019 11:28:16 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2EBS4CP128553; Thu, 14 Mar 2019 06:28:04 -0500 Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2EBS4UC029001 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Mar 2019 06:28:04 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 14 Mar 2019 06:28:03 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Thu, 14 Mar 2019 06:28:03 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2EBRrtw010136; Thu, 14 Mar 2019 06:28:01 -0500 From: Jyri Sarha To: , Subject: [PATCH v4 3/6] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Thu, 14 Mar 2019 13:27:49 +0200 Message-ID: <1397764427dcf0603d14165cf500ff614de2231e.1552562385.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 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1552562884; bh=quQxDF85ctJDFl2hagNnYE91jJAN6H8Tg8ZqelUlrRg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=bLkxnX8wjcYaSNRsiMPVNABz+Rmxk267yC8rzARhrRQEvBvoiev4pZh64sOZQmqZG rqdX0/7/mA7XVKdCLjAQMtlTCoSS+Fvpml7SurP53e0KmHSYusrsu4SRAnFCMWu6ku 2FGguNOPGpwhgLexuS5GdstXE8Zc76JGLdWWfATE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabrizio.castro@bp.renesas.com, Songjun.Wu@atmel.com, peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com, voice.shen@atmel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 0e21fa419d27..1d99108440c1 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;