From patchwork Wed Mar 13 09:04:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 2262431 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 777B3DF215 for ; Wed, 13 Mar 2013 09:07:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46152E6837 for ; Wed, 13 Mar 2013 02:07:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 59758E601B for ; Wed, 13 Mar 2013 02:04:03 -0700 (PDT) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJL003E5D6OA950@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 13 Mar 2013 18:04:02 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.45]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id DF.8B.05174.20140415; Wed, 13 Mar 2013 18:04:02 +0900 (KST) X-AuditID: cbfee68f-b7f4a6d000001436-22-514041029ba1 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 84.74.17838.10140415; Wed, 13 Mar 2013 18:04:01 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.90.8.53]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MJL00D3UD6PCE90@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 13 Mar 2013 18:04:01 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 3/7] drm/exynos: Fix G2D core mulfunctioning issue Date: Wed, 13 Mar 2013 18:04:01 +0900 Message-id: <1363165441-7448-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsVy+t8zXV0mR4dAg3U7OC2ufH3P5sDocb/7 OFMAYxSXTUpqTmZZapG+XQJXRs/BBsaC+fwV2w5sZmxgfMDTxcjJISFgInH9/WlGCFtM4sK9 9WxdjFwcQgLLGCVObbnH3sXIAVZ0b1EgRHwRo8TU1csYIZx1TBLzV59iAelmE1CVmLjiPhuI LSJgKtExaSkLSBGzQDejxPMHf1lBEsICThLfr79iArFZgBqmzH8LFucVcJbo7bvJBnGGgsSC e2/BzpAQ2MMmsffRYkaIBgGJb5MPsUCcJCux6QAzRL2kxMEVN1gmMAouYGRYxSiaWpBcUJyU XmSsV5yYW1yal66XnJ+7iRESVv07GO8esD7EmAw0biKzlGhyPjAs80riDY3NjCxMTUyNjcwt zUgTVhLnVWuxDhQSSE8sSc1OTS1ILYovKs1JLT7EyMTBKdXAmMMnIh4U8fzN546Y9u4wZV7V wnfnGWID+a3/3g1h1sxaG7Ugvdi64rxrlfbXX/GXIy/EcUpm9z1SOSzE/7K0KnZR67XqHUK1 aucWzPB4zm6yfuPMRa0Xg1ZsrdaqVtW8bLV8zknpY642Nlb/Odt3MtvMMdda9b+z7e5ygwJ7 62CJj5+u/DirxFKckWioxVxUnAgA/DXDBUECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgC6jo0OgwbP9VhZXvr5nc2D0uN99 nCmAMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCOMaPnYANjwXz+im0HNjM2 MD7g6WLk4JAQMJG4tyiwi5ETyBSTuHBvPVsXIxeHkMAiRompq5cxQjjrmCTmrz7FAlLFJqAq MXHFfTYQW0TAVKJj0lIWkCJmgW5GiecP/rKCJIQFnCS+X3/FBGKzADVMmf8WLM4r4CzR23eT DWKdgsSCe2/ZJjByL2BkWMUomlqQXFCclJ5rqFecmFtcmpeul5yfu4kRHLTPpHYwrmywOMQo wMGoxMMr8NU+UIg1say4MvcQowQHs5II7zcbh0Ah3pTEyqrUovz4otKc1OJDjMlA2ycyS4km 5wMjKq8k3tDYxMzI0sjM2MTc2Jg0YSVx3gOt1oFCAumJJanZqakFqUUwW5g4OKUaGCMDZgtN +ScW5/pmCw/PPLmtp3XCMhOnGed3vHm3+Osx7ZafgqdjT8kcnv+zsmeD4++ipHmunpH7jpja PtaZN/P/S7b1X99093zR5klN2pKjsTBLW9bkaeHl27oZplqZ9g1Ly69ovvnCuXo6f4At12fx JxynztlvWtB7KCfQ3EOL0VT0zL1LXkosxRmJhlrMRcWJAN5ARmKeAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: kyungmin.park@samsung.com, sw0312.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: YoungJun Cho This patch fixes G2D core mulfunctioning issue once g2d dma is started. Without 'DMA_HOLD_CMD_REG' register setting, there is only one interrupt after the execution to all command lists have been completed. And that induces watchdog. So this patch sets 'LIST_HOLD' command to the register so that command execution interrupt can be occured whenever each command list execution is finished. Signed-off-by: YoungJun Cho Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 095520f..91bc4cc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -82,7 +82,7 @@ #define G2D_DMA_LIST_DONE_COUNT_OFFSET 17 /* G2D_DMA_HOLD_CMD */ -#define G2D_USET_HOLD (1 << 2) +#define G2D_USER_HOLD (1 << 2) #define G2D_LIST_HOLD (1 << 1) #define G2D_BITBLT_HOLD (1 << 0) @@ -863,10 +863,13 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data, cmdlist->data[cmdlist->last++] = G2D_SRC_BASE_ADDR; cmdlist->data[cmdlist->last++] = 0; - if (node->event) { - cmdlist->data[cmdlist->last++] = G2D_DMA_HOLD_CMD; - cmdlist->data[cmdlist->last++] = G2D_LIST_HOLD; - } + /* + * 'LIST_HOLD' command should be set to the DMA_HOLD_CMD_REG + * if user wants G2D interrupt event once each command list or + * BitBLT command execution is finished. + */ + cmdlist->data[cmdlist->last++] = G2D_DMA_HOLD_CMD; + cmdlist->data[cmdlist->last++] = G2D_LIST_HOLD; /* Check size of cmdlist: last 2 is about G2D_BITBLT_START */ size = cmdlist->last + req->cmd_nr * 2 + req->cmd_buf_nr * 2 + 2;