From: Mark Zhang <nvmarkzhang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
Cc: Thierry Reding
<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Dave Airlie <airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm: tegra: fix front_porch <-> back_porch mixup
Date: Wed, 12 Dec 2012 16:44:06 +0800 [thread overview]
Message-ID: <50C843D6.3020707@gmail.com> (raw)
In-Reply-To: <1355259101-17815-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
Acked-by: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tested-by: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On my Tegra 30 cardhu. Thanks, Lucas.
Mark
On 12/12/2012 04:51 AM, Lucas Stach wrote:
> Fixes wrong picture offset observed when using HDMI output with a
> Technisat HD TV.
>
> Signed-off-by: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
> ---
> Captions are a bit confusing here. As the porch is always relative to
> the sync pulse, the left picture margin is actually the back_porch.
> ---
> drivers/gpu/drm/tegra/dc.c | 8 ++++----
> drivers/gpu/drm/tegra/hdmi.c | 6 +++---
> 2 Dateien geändert, 7 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-)
>
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 0744103..54683e4 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -102,12 +102,12 @@ static int tegra_dc_set_timings(struct tegra_dc *dc,
> ((mode->hsync_end - mode->hsync_start) << 0);
> tegra_dc_writel(dc, value, DC_DISP_SYNC_WIDTH);
>
> - value = ((mode->vsync_start - mode->vdisplay) << 16) |
> - ((mode->hsync_start - mode->hdisplay) << 0);
> - tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
> -
> value = ((mode->vtotal - mode->vsync_end) << 16) |
> ((mode->htotal - mode->hsync_end) << 0);
> + tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
> +
> + value = ((mode->vsync_start - mode->vdisplay) << 16) |
> + ((mode->hsync_start - mode->hdisplay) << 0);
> tegra_dc_writel(dc, value, DC_DISP_FRONT_PORCH);
>
> value = (mode->vdisplay << 16) | mode->hdisplay;
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index ab40164..81ea934 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -479,7 +479,7 @@ static void tegra_hdmi_setup_avi_infoframe(struct tegra_hdmi *hdmi,
> return;
> }
>
> - h_front_porch = mode->htotal - mode->hsync_end;
> + h_front_porch = mode->hsync_start - mode->hdisplay;
> memset(&frame, 0, sizeof(frame));
> frame.r = HDMI_AVI_R_SAME;
>
> @@ -634,8 +634,8 @@ static int tegra_output_hdmi_enable(struct tegra_output *output)
>
> pclk = mode->clock * 1000;
> h_sync_width = mode->hsync_end - mode->hsync_start;
> - h_front_porch = mode->htotal - mode->hsync_end;
> - h_back_porch = mode->hsync_start - mode->hdisplay;
> + h_back_porch = mode->htotal - mode->hsync_end;
> + h_front_porch = mode->hsync_start - mode->hdisplay;
>
> err = regulator_enable(hdmi->vdd);
> if (err < 0) {
>
prev parent reply other threads:[~2012-12-12 8:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 20:51 [PATCH] drm: tegra: fix front_porch <-> back_porch mixup Lucas Stach
[not found] ` <1355259101-17815-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2012-12-12 8:44 ` Mark Zhang [this message]
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=50C843D6.3020707@gmail.com \
--to=nvmarkzhang-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.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.