From patchwork Tue Mar 5 11:25:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leela Krishna Amudala X-Patchwork-Id: 2218651 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 552D8DF24C for ; Tue, 5 Mar 2013 11:10:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E033E61C9 for ; Tue, 5 Mar 2013 03:10:56 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 76769E6415 for ; Tue, 5 Mar 2013 03:05:00 -0800 (PST) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJ600A7MPG16R10@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 05 Mar 2013 20:04:58 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 4D.15.17763.A51D5315; Tue, 05 Mar 2013 20:04:58 +0900 (KST) X-AuditID: cbfee690-b7f6b6d000004563-ff-5135d15ac8a1 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 24.89.03880.A51D5315; Tue, 05 Mar 2013 20:04:58 +0900 (KST) Received: from chrome-ubuntu.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MJ600C9PPG46320@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 05 Mar 2013 20:04:58 +0900 (KST) From: Leela Krishna Amudala To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/exynos: fimd: calculate the correct address offset Date: Tue, 05 Mar 2013 06:25:25 -0500 Message-id: <1362482725-27143-1-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.8.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsWyRsSkRjfqommgwZbtZhZXvr5nc2D0uN99 nCmAMYrLJiU1J7MstUjfLoEr49PTl0wFK/gqtjX/Y21gvMHdxcjJISFgIrH47xQ2CFtM4sK9 9WC2kMBSRon9pwJgao5P+cPYxcgFFF/EKLH27g0oZyOTxIzVF5lBqtgEjCXuz93MBGKLCChL /J24ihHEZhYwlNj5pZsFxBYWcJdYuOYKK4jNIqAqcWLGGrB6XgFXiQXNp1kgtslJfNjziB1k gYTAHjaJT1dvskE0CEh8m3wIqIgDKCErsekAM0S9pMTBFTdYJjAKLmBkWMUomlqQXFCclF5k olecmFtcmpeul5yfu4kRGFSn/z2bsIPx3gHrQ4zJQOMmMkuJJucDgzKvJN7Q2MTc1NjUzMjS 0tKUNGElcV75SzKBQgLpiSWp2ampBalF8UWlOanFhxiZODilGhhnH1k1mU9/+uWw93MWXDpc qf+zOuzEbbOsefUPU/9NZ/o+bYP8poWFfwvdUvnKfx9epyN99mnAw+/VvWkM7UEzOV5v/ZEj +0ukKr5Oe/IfhT/ysdUC/i+v7zxw3HRyjEh3/qtuxm8sJ15w75wl3np08pblZ3hFzFXKtlfU x70Jl/WR0fS/vypQiaU4I9FQi7moOBEAB8gSLEACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgG7URdNAg49zDSyufH3P5sDocb/7 OFMAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY8anpy+ZClbwVWxr/sfa wHiDu4uRk0NCwETi+JQ/jBC2mMSFe+vZuhi5OIQEFjFKrL17gxHC2cgkMWP1RWaQKjYBY4n7 czczgdgiAsoSfyeuAutmFjCU2PmlmwXEFhZwl1i45goriM0ioCpxYsYasHpeAVeJBc2nWSC2 yUl82POIfQIj9wJGhlWMoqkFyQXFSem5RnrFibnFpXnpesn5uZsYwUH7THoH46oGi0OMAhyM Sjy8DEdNAoVYE8uKK3MPMUpwMCuJ8C44YhooxJuSWFmVWpQfX1Sak1p8iDEZaPtEZinR5Hxg ROWVxBsam5ibGptamliYmFmSJqwkzst46kmAkEB6YklqdmpqQWoRzBYmDk6pBsZKucOubOVe hxcdqXVmvPcoX7Bt+b64AyltUYVCKzY8nL3Io148zd09WWzG4yhh/S8d/O0T11xX/xgZ96Hv LIsOj2JW3QmBuVtMP831qOOyjeyNvF7Nml2dWfs14Fj3xcf3G78fXfbd9gmz/L5svysTT3NF Tn10/JQ3u+aUuS1JvpfSOXeJzlNiKc5INNRiLipOBACMtbgnngIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Tue, 05 Mar 2013 03:10:45 -0800 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Calculate the correct address offset values for alpha and color key control registers Signed-off-by: Leela Krishna Amudala --- 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) /* 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 (win == 1 || win == 2) writel(0, ctx->regs + VIDOSD_D(win));