From patchwork Wed Feb 27 21:54:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 159297 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4939349jad; Wed, 27 Feb 2019 13:54:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IYbReFVK9tHF2ohNbOTn55BV5cPZLQCkzV4ImizdClRYW98SWeLGwFfoHOy+ZJlaXP/rxZ5 X-Received: by 2002:a62:1e82:: with SMTP id e124mr3930994pfe.258.1551304489590; Wed, 27 Feb 2019 13:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551304489; cv=none; d=google.com; s=arc-20160816; b=f5zms1ENpexKUhMNFNhf7gwDHvtIm7SJQ12rFXkvxRo4omG+XB9f9Aj7Q7Et69hV+j XwRJ3hV599mq6nThl2Uf9VdQQh4u7t7T8VTSYyWXRtMjHHX1Mw/LjmyEYdPKb0EYWR+r J6EsdADbKZ6xD2SMzXRh2eq4buT7Qal2r57t8a4dBniUKoJuipgnJD8RLdNWRTVi4fsl 6eVS+eVBC0/iFq5+XYbD5jJLrRdoALDM0KypSk38p7q/DpQzJv1xpGfxDnk46zhu2dRo mw0PBAg1SMEPGuwSnXpYRdnMDj5uOGj68vFUxoNH7ZWGsP1fiasTg8KG1aiSpD22p9wR zMAQ== 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=aeZI37GFnyma8X2vPjVtuNaWX5uyfHRYc610foJkr9U=; b=ouZc4r9sQ3z9BQCq47dZV8SMD1IsMAENRchxHzGRzxI6TAo4o6tPIaJ+ZTbAOMoznc 1OLN9guRqwUisOs2jX7Zr4HH3gOiYHYyoaDtDpKIJatd8GvEyyYkoUDdv2/13bCRDdEF hN8ugJBcx3JS2pmR8teJlOgw9Bh9XF+HAjqEngZ1wONysIf/CWq7QWz7Ktf194M+T90o HQ9UtsrD8oWGDiBQEoaKW/lQSRbHx0n4EKoLCpsyJB0QDKZ7Vwo5JHlaR5cIj9r2sMUu a42x16lKy/QDZColVIka/boV8DfECiryVq6Rtu7OWkKueAwSeGZNECbPD1kmzpAtBlML apng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=c2pesg3l; 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 g84si6132260pfd.187.2019.02.27.13.54.49; Wed, 27 Feb 2019 13:54:49 -0800 (PST) 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=c2pesg3l; 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 S1729825AbfB0Vyt (ORCPT + 7 others); Wed, 27 Feb 2019 16:54:49 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:48094 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728397AbfB0Vys (ORCPT ); Wed, 27 Feb 2019 16:54:48 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x1RLsamJ007183; Wed, 27 Feb 2019 15:54:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1551304476; bh=aeZI37GFnyma8X2vPjVtuNaWX5uyfHRYc610foJkr9U=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=c2pesg3l1qYdWlGa5d67tOJdfYFLfpywrGzoMRs6OLcGfl05rBnV5u59b158Y4PrB B+8XoDuT6S9PHdD8O080E+F2NHsgYeXJjHNNyR6PTnagE10SgxU37vYsHq4o4OvLI4 dOrhjohODRdk2FmvgsCL4ov0JRpGU4l8ftnRxNTU= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x1RLsatX040626 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 Feb 2019 15:54:36 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) 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.1591.10; Wed, 27 Feb 2019 15:54:33 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 27 Feb 2019 15:54:33 -0600 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 x1RLsNee017712; Wed, 27 Feb 2019 15:54:31 -0600 From: Jyri Sarha To: , CC: , , , , , , , , Subject: [PATCH v2 3/5] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Wed, 27 Feb 2019 23:54:21 +0200 Message-ID: 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 --- 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 Reviewed-by: Laurent Pinchart diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 0e21fa419d27..1e917777ed72 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;