Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3799026ybi; Mon, 29 Jul 2019 12:51:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1iFd/HETeCrw05ozMm9K68ZcLPegKJwXBONnF9+Pp+pumBmnr/KC/pUdhr3Mt60UPwVlk X-Received: by 2002:a63:2b0c:: with SMTP id r12mr105674094pgr.206.1564429889110; Mon, 29 Jul 2019 12:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429889; cv=none; d=google.com; s=arc-20160816; b=hqfFkE8GjcNx9w0+y4O56NlmPVpG8S4Z0ZdTv0JC+GY2ng9gml5+C3mWJtJCKAsSxf YknEz1f5VcumiCtM+e3K2R2VU3DHFB15gRXv+JXtnLj4/KtXUcFj4DQj/lGcvNhuo/SR WaiJ6lVScz1+ltPj1vKlh3IMhjtdxCZCL+GUi4/V1qZam9Evh4rJfXlQjiNGFrQnK6xQ 37e6DnM9RkSoj5uHnvxtqmmTOpocc56dxrCtxcPGJb8cFfqjSz6l3D63OYkboG49RqRg yA87YWhZPJsbUtsVuycJAxTg9rUsSiqvpuOdwL0srq7tK3c3Z4ZlEYX/hAutloeT2nBm crMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+m/8jbV43a6jNOt62iIwBMgK2GLt6qLCYck7mX4ooFk=; b=0/tejCG1+su62s7X25Op9ipGnxKBsnZVvu1IcZF+UQdiLD3WgixbK2edm3rtRIl7rZ zo0OJdXo+MsU57G9HrBKeSzykdCGPRIGr+Ts/2ndD61z0/OU4z8G6jJhpq+xQnXaSy80 wbRCQ4YHJY3vl1E397NVTOamLlyBIqWW/YfGeCNiby/MbNrswPYJzisQy4rbS+fQReij H0mjXmIyZMAZl7HSasgCCRwIOIrBmXMW0DWvUaadZ6OJxvYFSaQkXT+mJhIHKypiK/pu XBmRFVgWT9xT5aVWuy4dk2bjSx0CnD0L6YpFBw3OFGXrzmxOnYaUaivpbKy6ZNh53ZMt WNMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2H9PCbCo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si55712360ple.240.2019.07.29.12.51.14; Mon, 29 Jul 2019 12:51:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=2H9PCbCo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390438AbfG2Tst (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:39098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390175AbfG2Tsq (ORCPT ); Mon, 29 Jul 2019 15:48:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 76005205F4; Mon, 29 Jul 2019 19:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429725; bh=ZGf008XEa+kzs0eBia5rOSkXGPa3AC0rjdIVA6F6TUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2H9PCbCoxmKmR3tu/vqsDyh/7PMuly11Mnp8LSO+SvCe/2/jYg8KydbETsZJ11DL5 P4IBibspF004XIlIxHZ9jJqq6HsPQpgRv1bQ7kS8sdG8py3uibbToRkJjNa5XTdcgV ysAuL4VP2dXKJdKsJYf+LeNe0XayYMbb+85HjxIA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jyri Sarha , Andrzej Hajda , Laurent Pinchart , Sasha Levin Subject: [PATCH 5.2 036/215] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Mon, 29 Jul 2019 21:20:32 +0200 Message-Id: <20190729190746.612168217@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8dbfc5b65023b67397aca28e8adb25c819f6398c ] 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 Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1a2a8eae0b9d6333e7a5841026bf7fd65c9ccd09.1558964241.git.jsarha@ti.com Signed-off-by: Sasha Levin --- 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 1211b5379df1..8e3c5e599eba 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -229,10 +229,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; -- 2.20.1