From patchwork Sat Dec 22 08:49:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eunchul Kim X-Patchwork-Id: 1905611 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 045B5DFB79 for ; Sat, 22 Dec 2012 08:56:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0160E609A for ; Sat, 22 Dec 2012 00:56:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 97B3FE5C95 for ; Sat, 22 Dec 2012 00:49:44 -0800 (PST) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFF0003BCINHOB0@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Sat, 22 Dec 2012 17:49:36 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.45]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 78.5D.12699.02475D05; Sat, 22 Dec 2012 17:49:36 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-cb-50d57420cdf2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 67.5D.12699.F1475D05; Sat, 22 Dec 2012 17:49:36 +0900 (KST) Received: from localhost.localdomain ([10.90.54.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFF00JZNCIJQC10@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Sat, 22 Dec 2012 17:49:35 +0900 (KST) From: Eunchul Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v3 7/8] drm/exynos: fix incorrect interrupt induced by m2m operation. Date: Sat, 22 Dec 2012 17:49:28 +0900 Message-id: <1356166169-3400-8-git-send-email-chulspro.kim@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1356166169-3400-1-git-send-email-chulspro.kim@samsung.com> References: <1356166169-3400-1-git-send-email-chulspro.kim@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t8zXV2FkqsBBgs2s1lc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujPsrO1kKunkqPsxZzt7AOJuri5GTQ0LARKL74gY2CFtM4sK9 9UA2F4eQwDJGiR0LDjPCFK04fZMJxBYSmM4o8aVZBaJoBZPE30+/2EESbAI6EkduNTOD2CIC lhIPtv5mBiliFvjJKLHuyVlWkISwQLhE8929LF2MHBwsAqoSux7UgoR5Bdwl7n24CLVMQaJ1 2SGwmZwCHhKdy5ayQix2l+hf3swCYrMICEh8m3wIbIyEgKzEpgNgqyQErrNJ/J18nxVijqTE wRU3WCYwCi9gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJERKE0jsYVzVYHGIU4GBU4uG9 2HQlQIg1say4MvcQowQHs5II7xaDqwFCvCmJlVWpRfnxRaU5qcWHGH2ALpnILCWanA+MkLyS eENjA2NDQ0tDM1NLUwMcwkrivM0eKQFCAumJJanZqakFqUUw45g4OKUaGOt22kunTJXcfmvR lctrhCStvz2W25x3ufbv4WXFuu5q63Oiz395c5F5kfGvb1keWxkqPkjuazb+UsBdxzBpVV/0 Lsu/1zhPmAlvk+rbr9UkZhKo+f35ncUdMvJ+i/8+FTl97fGZu8K7mt8+8N6c6K9d6nkzeivv Xp6Y6q6FcdqcB2OPdaSkaSuxFGckGmoxFxUnAgCtrrQKbwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoK5CydUAgy0HGS2ufH3P5sDocb/7 OFMAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGEdY8b9lZ0sBd08FR/mLGdv YJzN1cXIySEhYCKx4vRNJghbTOLCvfVsILaQwHRGiS/NKl2MXED2CiaJv59+sYMk2AR0JI7c amYGsUUELCUebP3NDFLELPCTUWLdk7OsIAlhgXCJ5rt7WboYOThYBFQldj2oBQnzCrhL3Ptw kRFimYJE67JDYDM5BTwkOpctZYVY7C7Rv7yZZQIj7wJGhlWMoqkFyQXFSem5RnrFibnFpXnp esn5uZsYwSH+THoH46oGi0OMAhyMSjy8F5uuBAixJpYVV+YeYpTgYFYS4d1icDVAiDclsbIq tSg/vqg0J7X4EKMP0FETmaVEk/OB8ZdXEm9obGJmZGlkZmxibmyMQ1hJnLfZIyVASCA9sSQ1 OzW1ILUIZhwTB6dUA+Ma6ZV7tjirui62XKOU//i0aLWcSavoux313Xe0O0sS3e7bTNaQ0PyZ ViLHZDRFQvXlBIkpJ5o+Pv9i/tHswcfsinDmR9t8hQs9ZHKbGE8/4zwc6B4S9NTmUP2TNd1V pZyrpn0MLZsW08gncnUDa4rZpBl7fXYHqXS2bH3z/pnshG9ijSVcUUosxRmJhlrMRcWJAB53 YASeAgAA X-CFilter-Loop: Reflected Cc: jy0.jeon@samsung.com, sw0312.kim@samsung.com, jaejoon.seo@samsung.com, kyungmin.park@samsung.com, jmock.shin@samsung.com, lsmin.lee@samsung.com, th908.kim@samsung.com 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 From: Jinyoung Jeon This patch fixes incorrect interrupt induced by m2m operation. the m2m operation calls s/w reset every frame but there is the case that the interrupt to m2m operation occures after s/w reset sometimes. So this patch makes dma and capture operations stop at s/w reset to avoid incorrect interrupt. Signed-off-by: Jinyoung Jeon Signed-off-by: Eunchul Kim --- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index a99ceef..9f52b7f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c @@ -169,10 +169,23 @@ static void fimc_sw_reset(struct fimc_context *ctx) DRM_DEBUG_KMS("%s\n", __func__); + /* stop dma operation */ + cfg = fimc_read(EXYNOS_CISTATUS); + if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) { + cfg = fimc_read(EXYNOS_MSCTRL); + cfg &= ~EXYNOS_MSCTRL_ENVID; + fimc_write(cfg, EXYNOS_MSCTRL); + } + cfg = fimc_read(EXYNOS_CISRCFMT); cfg |= EXYNOS_CISRCFMT_ITU601_8BIT; fimc_write(cfg, EXYNOS_CISRCFMT); + /* disable image capture */ + cfg = fimc_read(EXYNOS_CIIMGCPT); + cfg &= ~(EXYNOS_CIIMGCPT_IMGCPTEN_SC | EXYNOS_CIIMGCPT_IMGCPTEN); + fimc_write(cfg, EXYNOS_CIIMGCPT); + /* s/w reset */ cfg = fimc_read(EXYNOS_CIGCTRL); cfg |= (EXYNOS_CIGCTRL_SWRST);