From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Leela Krishna Amudala <l.krishna@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/exynos: fimd: calculate the correct address offset
Date: Tue, 05 Mar 2013 20:54:19 +0900 [thread overview]
Message-ID: <5135DCEB.8060704@samsung.com> (raw)
In-Reply-To: <1362482725-27143-1-git-send-email-l.krishna@samsung.com>
Hi Leela,
On 03/05/2013 08:25 PM, Leela Krishna Amudala wrote:
> Calculate the correct address offset values for alpha and color key
> control registers
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 9537761..71f4176 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -41,7 +41,7 @@
> /* size control register for hardware window 0. */
> #define VIDOSD_C_SIZE_W0 (VIDOSD_BASE + 0x08)
How about just use VIDOSD_C(win) instead of this macro for size control
register of windows0?
I think it's better if writes comments properly here.
> /* alpha control register for hardware window 1 ~ 4. */
> -#define VIDOSD_C(win) (VIDOSD_BASE + 0x18 + (win) * 16)
> +#define VIDOSD_C(win) (VIDOSD_BASE + 0x08 + (win) * 16)
> /* size control register for hardware window 1 ~ 4. */
> #define VIDOSD_D(win) (VIDOSD_BASE + 0x0C + (win) * 16)
>
> @@ -50,9 +50,9 @@
> #define VIDWx_BUF_SIZE(win, buf) (VIDW_BUF_SIZE(buf) + (win) * 4)
>
> /* color key control register for hardware window 1 ~ 4. */
> -#define WKEYCON0_BASE(x) ((WKEYCON0 + 0x140) + (x * 8))
> +#define WKEYCON0_BASE(x) ((WKEYCON0 + 0x140) + ((x - 1) * 8))
> /* color key value register for hardware window 1 ~ 4. */
> -#define WKEYCON1_BASE(x) ((WKEYCON1 + 0x140) + (x * 8))
> +#define WKEYCON1_BASE(x) ((WKEYCON1 + 0x140) + ((x - 1) * 8))
>
> /* FIMD has totally five hardware windows. */
> #define WINDOWS_NR 5
> @@ -782,7 +782,8 @@ static void fimd_clear_win(struct fimd_context *ctx, int win)
> writel(0, ctx->regs + WINCON(win));
> writel(0, ctx->regs + VIDOSD_A(win));
> writel(0, ctx->regs + VIDOSD_B(win));
> - writel(0, ctx->regs + VIDOSD_C(win));
> + if (win != 0)
> + writel(0, ctx->regs + VIDOSD_C(win));
If use VIDOSD_C(win) macro for size control register of windows0 then
this fix will be unnecessary.
Thanks.
next prev parent reply other threads:[~2013-03-05 11:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 11:25 [PATCH] drm/exynos: fimd: calculate the correct address offset Leela Krishna Amudala
2013-03-05 11:54 ` Joonyoung Shim [this message]
2013-03-05 12:04 ` Leela Krishna Amudala
2013-03-05 12:17 ` Joonyoung Shim
2013-03-06 5:05 ` Leela Krishna Amudala
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=5135DCEB.8060704@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=l.krishna@samsung.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 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.