From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] drm/i2c: tda998x: fix sync generation and calculation
Date: Thu, 20 Jun 2013 22:28:16 +0200 [thread overview]
Message-ID: <51C365E0.1060000@gmail.com> (raw)
In-Reply-To: <20130620200624.GQ2718@n2100.arm.linux.org.uk>
On 06/20/2013 10:06 PM, Russell King - ARM Linux wrote:
> On Thu, Jun 20, 2013 at 09:46:03PM +0200, Sebastian Hesselbarth wrote:
>> + ref_pix = 3 + mode->hsync_start - mode->hdisplay;
>> + de_pix_s = mode->htotal - mode->hdisplay;
>> + de_pix_e = de_pix_s + mode->hdisplay;
>> + hs_pix_s = mode->hsync_start - mode->hdisplay;
>> + hs_pix_e = hs_pix_s + mode->hsync_end - mode->hsync_start;
>
> Correct, however, these can be simplified.
[...]
> These calculations are the same as what was originally in the driver:
>
> + de_start = mode->htotal - mode->hdisplay;
> + de_end = mode->htotal;
> + hs_start = mode->hsync_start - mode->hdisplay;
> + hs_end = mode->hsync_end - mode->hdisplay;
>
> when it was first committed.
>
> This is otherwise exactly what I came up with which gets my TV working
> again in HDMI mode.
Russell,
I am fine with any way to describe de/hs but you should notice that
I also modified refpix/refline and added interlaced sync. With the
original sync calculation, on some modes there was source blanking
captured by TDA998x which was also visible in the output image. I
chose the above description to make it more readable.
Also the patch takes care of input sync and output sync inversion
while the original driver always expected positive HS/VS.
I tested these sync settings on 4 DVI monitors and TV sets all
accepted each mode perfectly. Especially, not-so-cheap TV sets
are very picky about wrong sync.
Sebastian
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: David Airlie <airlied@linux.ie>,
Darren Etheridge <darren.etheridge@gmail.com>,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] drm/i2c: tda998x: fix sync generation and calculation
Date: Thu, 20 Jun 2013 22:28:16 +0200 [thread overview]
Message-ID: <51C365E0.1060000@gmail.com> (raw)
In-Reply-To: <20130620200624.GQ2718@n2100.arm.linux.org.uk>
On 06/20/2013 10:06 PM, Russell King - ARM Linux wrote:
> On Thu, Jun 20, 2013 at 09:46:03PM +0200, Sebastian Hesselbarth wrote:
>> + ref_pix = 3 + mode->hsync_start - mode->hdisplay;
>> + de_pix_s = mode->htotal - mode->hdisplay;
>> + de_pix_e = de_pix_s + mode->hdisplay;
>> + hs_pix_s = mode->hsync_start - mode->hdisplay;
>> + hs_pix_e = hs_pix_s + mode->hsync_end - mode->hsync_start;
>
> Correct, however, these can be simplified.
[...]
> These calculations are the same as what was originally in the driver:
>
> + de_start = mode->htotal - mode->hdisplay;
> + de_end = mode->htotal;
> + hs_start = mode->hsync_start - mode->hdisplay;
> + hs_end = mode->hsync_end - mode->hdisplay;
>
> when it was first committed.
>
> This is otherwise exactly what I came up with which gets my TV working
> again in HDMI mode.
Russell,
I am fine with any way to describe de/hs but you should notice that
I also modified refpix/refline and added interlaced sync. With the
original sync calculation, on some modes there was source blanking
captured by TDA998x which was also visible in the output image. I
chose the above description to make it more readable.
Also the patch takes care of input sync and output sync inversion
while the original driver always expected positive HS/VS.
I tested these sync settings on 4 DVI monitors and TV sets all
accepted each mode perfectly. Especially, not-so-cheap TV sets
are very picky about wrong sync.
Sebastian
next prev parent reply other threads:[~2013-06-20 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 19:46 [PATCH v4] drm/i2c: tda998x: fix sync generation and calculation Sebastian Hesselbarth
2013-06-20 19:46 ` Sebastian Hesselbarth
2013-06-20 19:46 ` Sebastian Hesselbarth
2013-06-20 20:06 ` Russell King - ARM Linux
2013-06-20 20:06 ` Russell King - ARM Linux
2013-06-20 20:28 ` Sebastian Hesselbarth [this message]
2013-06-20 20:28 ` Sebastian Hesselbarth
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=51C365E0.1060000@gmail.com \
--to=sebastian.hesselbarth@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.