From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
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
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 [thread overview]
Message-ID: <1397764427dcf0603d14165cf500ff614de2231e.1552562385.git.jsarha@ti.com> (raw)
In-Reply-To: <cover.1552562385.git.jsarha@ti.com>
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 <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
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;
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-14 11:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 11:27 [PATCH v4 0/6] drm/bridge: sii902x: HDMI-audio support and some fixes Jyri Sarha
2019-03-14 11:27 ` [PATCH v4 1/6] drm/bridge: sii902x: add input_bus_flags Jyri Sarha
2019-03-14 11:27 ` [PATCH v4 2/6] drm/bridge: sii902x: Set output mode to HDMI or DVI according to EDID Jyri Sarha
2019-03-14 11:27 ` Jyri Sarha [this message]
2019-03-14 11:27 ` [PATCH v4 4/6] dt-bindings: display: sii902x: Remove trailing white space Jyri Sarha
2019-03-15 23:38 ` Rob Herring
2019-03-14 11:27 ` [PATCH v4 5/6] dt-bindings: display: sii902x: Add HDMI audio bindings Jyri Sarha
2019-03-17 16:16 ` Laurent Pinchart
2019-03-19 14:38 ` Jyri Sarha
2019-04-20 23:12 ` Laurent Pinchart
2019-03-25 19:20 ` Rob Herring
2019-03-14 11:27 ` [PATCH v4 6/6] drm/bridge: sii902x: Implement HDMI audio support Jyri Sarha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397764427dcf0603d14165cf500ff614de2231e.1552562385.git.jsarha@ti.com \
--to=jsarha@ti.com \
--cc=Songjun.Wu@atmel.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabrizio.castro@bp.renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=peter.ujfalusi@ti.com \
--cc=tomi.valkeinen@ti.com \
--cc=voice.shen@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).