From: alexander.stein@systec-electronic.com (Alexander Stein)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mx3fb: Fix parameter to sdc_init_panel
Date: Thu, 10 Feb 2011 14:01:17 +0100 [thread overview]
Message-ID: <201102101401.18331.alexander.stein@systec-electronic.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1102101337310.18510@axis700.grange>
On Thursday 10 February 2011, 13:48:23 Guennadi Liakhovetski wrote:
> > Ok, i will just write about HSYNC the problem about VSYNC is similar.
> > Let's assume we have a display with the following properties.
> > left_margin = 38
> > right_margin = 32
> > hsync_len = 20
> > width = 800
> >
> > Without the patch we get the following arguments on sdc_init_panel
> > width = 800
> > h_start_width = 38 (left_margin)
> > h_sync_width = 20 (hsync_len)
> > h_end_width = 52 = 32 + 20 (right_margin + hsync_len)
> >
> > So we will write into SDC_HOR_CONF:
> >
> > reg = ((h_sync_width - 1) << 26) |
> >
> > ((width + h_start_width + h_end_width - 1) << 16);
> >
> > reg = ((20 - 1) << 26) |
> >
> > ((800 + 38 + 52 - 1) << 16);
> >
> > So the value SCREEN_WIDTH get written is
> > width + left_margin + right_margin + hsync_len
> >
> > which is IMO wrong. The description in the reference manual states:
> > > Screen width minus 1. Specifies the number of pixel clock periods
> > > between the last HSYNC and the new HSYNC.
> >
> > It should just be: width + left_margin + right_margin
> > I fell accross it, as I have a display with 800 px width and rather big
> > left_margin. The sum got greater than 1023 which is what SCREEN_WIDTH can
> > hold at maximum.
> >
> > I don't know which display you used, but I guess your right_margin (and
> > lower_margin) needs to be adjusted.
>
> Ok, agree. But then you need to adjust all current users and have them
> tested... Otherwise, of course, you can just adjust your platform panel
> data to work with the current calculations, even though in principle your
> patch seems to be doing the right thing (tm), according to the manual. But
> if applied as is without fixing all the users, it can very well break
> them...
Ok, I've just seen there are some model defines in mx3fb.c which would also be
affected.
I'll try to find all mx3fb users and fix their videomodes and repost a new
patch.
Alexander
next prev parent reply other threads:[~2011-02-10 13:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1297332330-21964-1-git-send-email-alexander.stein@systec-electronic.com>
2011-02-10 10:44 ` [PATCH] mx3fb: Fix parameter to sdc_init_panel Guennadi Liakhovetski
2011-02-10 11:00 ` Guennadi Liakhovetski
2011-02-10 11:27 ` Alexander Stein
2011-02-10 12:48 ` Guennadi Liakhovetski
2011-02-10 13:01 ` Alexander Stein [this message]
2011-02-14 7:46 ` Alexander Stein
2011-02-14 7:57 ` Guennadi Liakhovetski
2011-02-14 12:06 ` Alexander Stein
2011-02-16 13:47 ` Guennadi Liakhovetski
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=201102101401.18331.alexander.stein@systec-electronic.com \
--to=alexander.stein@systec-electronic.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).