From patchwork Wed Sep 24 02:56:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 4961451 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BA71FBEEA5 for ; Wed, 24 Sep 2014 02:56:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5A4E20221 for ; Wed, 24 Sep 2014 02:56:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87FCB200D4 for ; Wed, 24 Sep 2014 02:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754428AbaIXC4F (ORCPT ); Tue, 23 Sep 2014 22:56:05 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:64684 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753546AbaIXC4F (ORCPT ); Tue, 23 Sep 2014 22:56:05 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCD0084YXHFQP40@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 24 Sep 2014 11:56:03 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.115]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 6B.44.18484.3C232245; Wed, 24 Sep 2014 11:56:03 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-85-542232c374af Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 32.42.09430.3C232245; Wed, 24 Sep 2014 11:56:03 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.83.67]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NCD00EI1XHE0R00@mmp1.samsung.com>; Wed, 24 Sep 2014 11:56:02 +0900 (KST) From: Inki Dae To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, linux-samsung-soc@vger.kernel.org, Inki Dae Subject: [PATCH] drm/exynos: fimd: fix screen shaking issue on i80 mode Date: Wed, 24 Sep 2014 11:56:01 +0900 Message-id: <1411527361-23813-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsWyRsSkWPewkVKIwYqdfBa9504yWVz5+p7N YtL9CSwWM87vY3Jg8dj+7QGrx/3u40wefVtWMXp83iQXwBLFZZOSmpNZllqkb5fAldF1qZm1 YCJfxc1jW1gbGPdwdzFycEgImEj0tSd1MXICmWISF+6tZ+ti5OIQEljKKPHz7lpWiISJxJxJ c5kgEosYJW6fO80O4XQzSTx+P4cZpIpNQFVi4or7bCC2iICyxN+JqxhBbGaBKInlh5eyg2wT FnCX+HbKCiTMAlT+uHsPWAmvgIvEszP97BAHKQAtswEZLyFwn01i6YUtzBD1AhLfJh9igaiR ldh0gBniNkmJgytusExgFFzAyLCKUTS1ILmgOCm9yFivODG3uDQvXS85P3cTIzAUT/971r+D 8e4B60OMAhyMSjy8E8SVQoRYE8uKK3MPMZoCbZjILCWanA8M+LySeENjMyMLUxNTYyNzSzMl cd6FUj+DhQTSE0tSs1NTC1KL4otKc1KLDzEycXBKNTAqSrVuTt+WMqtq361ij+7Fx/IniDzu +dJ1xOTWza8pUTNWB5x/NzXzQlmsl13mcfO7GUZXd71asXFpJAf3q9rjfQKyKwS87db33dFt V+PTvbDr8l+RyU5h3ZnPhSaEHtulEb2vJi4gfO/FS8cjvDR6bpzqOz5LSWCP+f3qwxaBITeU PP0ePtyrxFKckWioxVxUnAgAidIr+kACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsVy+t9jAd3DRkohBv9OsFv0njvJZHHl63s2 i0n3J7BYzDi/j8mBxWP7twesHve7jzN59G1ZxejxeZNcAEtUA6NNRmpiSmqRQmpecn5KZl66 rZJ3cLxzvKmZgaGuoaWFuZJCXmJuqq2Si0+ArltmDtBOJYWyxJxSoFBAYnGxkr4dpgmhIW66 FjCNEbq+IUFwPUYGaCBhDWNG16Vm1oKJfBU3j21hbWDcw93FyMkhIWAiMWfSXCYIW0ziwr31 bF2MXBxCAosYJW6fO80O4XQzSTx+P4cZpIpNQFVi4or7bCC2iICyxN+JqxhBbGaBKInlh5cC NXBwCAu4S3w7ZQUSZgEqf9y9B6yEV8BF4tmZfrASCQEFoMU2Exi5FzAyrGIUTS1ILihOSs81 0itOzC0uzUvXS87P3cQIDvVn0jsYVzVYHGIU4GBU4uGdIK4UIsSaWFZcmXuIUYKDWUmEd58q UIg3JbGyKrUoP76oNCe1+BCjKdDyicxSosn5wDjMK4k3NDYxM7I0Mje0MDI2VxLnPdhqHSgk kJ5YkpqdmlqQWgTTx8TBKdXAmKAavu6jmiW3Pa+wl+Kahbevc4QcWJC6KeVZA1uXVif/fS+/ RI4LDyueMLt3LjlrcvMLI49svHhFhOF7BbmYK++LrrYwa9xdNfuNJh97poj21iPqf33LJqUX vfkv3uv++NWn4N6kgJqPax4G17eqC/G9K9ezOa1hUaJ/Ma7rqdr2J6svK6oqsRRnJBpqMRcV JwIAwKt08IsCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch resolves a issue that screen is shaked after resumed. The issue could be incurred when overlay registers are updated to new buffer while fimd is still transmitting video data. So this patch make sure to wait for the completion of the transmission if fimd is transmitting video data before updating overlay registers. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 2f896df..8a45a70 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -665,6 +665,25 @@ static void fimd_win_commit(struct exynos_drm_manager *mgr, int zpos) } /* + * Wait for the completion of current transmission if fimd is still + * transmitting video data. + * + * Below codes resolve following issue: + * when resumed, fimd_win_commit() could be called to update overlay + * relevent registers and then pae flip could be performed by userspace + * request. The problem is that te interrupt could occur and + * fimd_trigger() could be called before fimd_win_commit is called by + * page flip function, exynos_drm_crtc_page_flip. + * + * In this case, there is a problem that fimd_win_commit() is called by + * the page flip request while fimd is still transmitting video data + * so overlay registers are updated to new buffer. That makes screen + * to be shaked. + */ + if (ctx->i80_if && atomic_read(&ctx->triggering)) + fimd_wait_for_vblank(mgr); + + /* * SHADOWCON/PRTCON register is used for enabling timing. * * for example, once only width value of a register is set,