Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3789073ybi; Mon, 29 Jul 2019 12:39:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAvnLiQlHyXKFh6OyVpbHmA9vEeoMF6tzMX77KGBEmRJH+s5Eq41i5teigO7KxQL2LSD2p X-Received: by 2002:a65:690e:: with SMTP id s14mr92862910pgq.47.1564429144530; Mon, 29 Jul 2019 12:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429144; cv=none; d=google.com; s=arc-20160816; b=zEoveSg8QRxz9+04w8QcMHlLkUdmhzbJy2U8YEZIVsayTnc6fWYsAfacu6ZL43mmah noZV0Y0ECz2iEM7Q18GitnwM8taOd1wE/JOYfoiKcRZGGshRdwcjkVSWFlPM5Tm6g0sP Xff6OgZ8EobeE9FQ7h8KCkSHYgCL2M2OpHzGtoZJ7sruXYNzoUGw3W4DvL9VizM8E7cu jDjU3QHWpPuL/PEoUnoaJRxbkuw366suf4Vk/Vwh8m5iGvVXQYpE9tb78lld6TYxV6X4 xaw+ClYyt+IVzPwiAWOfmzR4Ox6xi8H/nJqF+leJ6IstmNNLACDLpnHzKiI27Q1vaSv3 vqDw== 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=kNSFDZNDguaD4JiSFO/aCcZUBxJphpSJ6b6+1Sn5z0M=; b=baXLY/Dbi8a0NnmTTP+eWvM6vJPdEUqbHDmqM5trzqmP/pYqmF+dmZy5KPXnDiScyX NcL1HMdDDN9LKnMCK7hTSgngaNBHb5QRfRZz+2PWq/CEnYJd1n/q0nbpA2f9Yzr/Lhto d76aScnoJ5W3RYf+FhTpbxAyK0fai+eBHOaqTRuhVbSGdhEzb2905j6J0KFSduTOeQaI 2Aha7Rdm4J2ot864oWA5476oCVNyd9oeBncLMlBhOw52cfWLcYw4GMbjzJyj+ETRVD2f r//lCkHEbXKUZZINP4c3xOk04FNVOFXhPU5TIX1AA4smuUCSzkTw029Bc6ezv7S0+V5x xFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gJoKi8uH; 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 a14si24207806pjo.102.2019.07.29.12.38.49; Mon, 29 Jul 2019 12:39:04 -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=gJoKi8uH; 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 S2388715AbfG2Th3 (ORCPT + 99 others); Mon, 29 Jul 2019 15:37:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:52238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388711AbfG2Th2 (ORCPT ); Mon, 29 Jul 2019 15:37:28 -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 53E15217D4; Mon, 29 Jul 2019 19:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429046; bh=HDtr9Pswu4IuOYjYw5mYDl+rU29gSip/6fkssNdw3ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gJoKi8uHqun/LzcbiF4gRcXTMJrgDI7DrF4VVS/1H7YDonSdNLU1eB1QIMWvt5G/b cMGObzid3rUPxL6y7BaXv2tk5B1Xhr8TdXCRWiq72/8mft+YXHLcIWYPnios3ESp5C mS0meTeTMc0iASNyD/80eYIi5jo2MwiCRr1O6Hhk= 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 4.14 230/293] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Mon, 29 Jul 2019 21:22:01 +0200 Message-Id: <20190729190842.100590728@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 60373d7eb220..109ab4c3df50 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -261,10 +261,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