Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3133878ybi; Thu, 18 Jul 2019 21:41:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLGXn9c8rX1LICesDaOXw/v0i5CE16nEOOlJMHXmc28uLMOVoiBvFoe7AGvKiw8sVjvl3m X-Received: by 2002:a17:90a:9a83:: with SMTP id e3mr54354123pjp.105.1563511295422; Thu, 18 Jul 2019 21:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511295; cv=none; d=google.com; s=arc-20160816; b=URS16xZW/tRDF7VbM7h+GHwYAys7fiH6q4EE4VVk6bUhUIAm50bomWJtyGgUqARDUt myyIt11DDIFbWG2P90z88J9mjPgYB6FsEzONvcW8CiVsLxvKCViGCLKO9NtP/rtQ/v38 uhmLNNWNLbjB82SmULshay/J1gLN9lM8SJOryjPfTJLuOducMPpFLcPMBhIXlhLTlHMV 2s7PRWzhg5bi1l0FK5aqZbEJyfN9zpT+VTQmhzJO46GtLvqaKmVExg61wnst9Yv0g4ec pF2jIsRc4zZsNqCuFy+6h89bTORG8UavLVpfbzcN/BD59sMyLYmnlJ1LEkdrDP7FyKaf M4+Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GVLPwbEwbRQjK1OyCeyIqJsyypMvAJUbnMHTAk/vvUw=; b=Sdh1Kma8HPj8cWPquoqKVhi37S2Hf4Jjuy044F1gAoXE0CUalUxRWZRv7+CTKEnL1l 8Sim97pUSNq3bx4gl43A5BBnRRM499zxH6JGjs8uHzCyCGFEmnYwuvir9Z+gMkBWIdfF 3dciUck0ADMFvop1o2BIQMGV9a0XfQU/mchOckdc68xBCjEDmtv7K9A9pVycG6hqjEZv nw5cHPA4BG8nVUsEp7T1vYpF+a0gJjWh3pV8hWBdazMjLBGnQs1gA0+pbefopICszHIY Jg+yRecLNGYiYjxl6e23H4QRgGe+4S1id6O7VTcVxHLbX39/dWz7oxd0J1TnKFLX4xVH ghuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZEJ22q0t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si233346pld.385.2019.07.18.21.41.19; Thu, 18 Jul 2019 21:41:35 -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=ZEJ22q0t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbfGSEkT (ORCPT + 99 others); Fri, 19 Jul 2019 00:40:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbfGSD6I (ORCPT ); Thu, 18 Jul 2019 23:58:08 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B55AB21874; Fri, 19 Jul 2019 03:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508687; bh=nyPEZoxcySmG3qU+j7jKjkix4XJJ13Q4z1YW8s3FJkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZEJ22q0tHm9Hu1Jef5KpmPtKEWbLoQnVUOqbw09OqfaGQ3snL1jDPst2hLjptIc00 GeG221rSFQuH8cQCEXCt16PpDGyTPxBFk22KaxACdeu8csktPJC8OhZk8QvyLxpsSI TUoiSyED1aC8B7OM2VV5O1V7yfYxXqpsbhBj74mM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jyri Sarha , Andrzej Hajda , Laurent Pinchart , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 034/171] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Date: Thu, 18 Jul 2019 23:54:25 -0400 Message-Id: <20190719035643.14300-34-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jyri Sarha [ 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