From patchwork Thu Jul 17 09:01:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4573531 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 A741AC0514 for ; Thu, 17 Jul 2014 09:01:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB40B20107 for ; Thu, 17 Jul 2014 09:01:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 953DD20148 for ; Thu, 17 Jul 2014 09:01:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756009AbaGQJBr (ORCPT ); Thu, 17 Jul 2014 05:01:47 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:49131 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754967AbaGQJBk (ORCPT ); Thu, 17 Jul 2014 05:01:40 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8U00MZDMELKB20@mailout2.samsung.com>; Thu, 17 Jul 2014 18:01:33 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.45]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 80.21.24374.CE097C35; Thu, 17 Jul 2014 18:01:33 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-79-53c790ec0f5b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 39.8D.04943.CE097C35; Thu, 17 Jul 2014 18:01:32 +0900 (KST) Received: from localhost.localdomain ([10.252.75.90]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8U00LFFMEI4B80@mmp1.samsung.com>; Thu, 17 Jul 2014 18:01:32 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux-samsung-soc@vger.kernel.org, thierry.reding@gmail.com, kyungmin.park@samsung.com, inki.dae@samsung.com, kgene.kim@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com Subject: [PATCH v6 04/14] drm/exynos: add TE handler to support LCD I80 interface Date: Thu, 17 Jul 2014 18:01:19 +0900 Message-id: <1405587689-1466-5-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.9.0 In-reply-to: <1405587689-1466-1-git-send-email-yj44.cho@samsung.com> References: <1405587689-1466-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRmVeSWpSXmKPExsVy+t8zXd23E44HG+xYyWRxa905VovecyeZ LOYfAbKufH3PZtH/ZiGrxblXKxktJt2fwGLx4t5FFoveBVfZLM42vWG3mHF+H5PF0usXmSwm TF/LYtG69whQbPJLNoufu+axOAh4rJm3htHjcl8vk8fOWXfZPVYu/8LmsWlVJ5vH9m8PWD3u dx9n8ujbsorR4/MmuQDOKC6blNSczLLUIn27BK6MhTMPMRUcEqu4e28qUwPjauEuRk4OCQET iVeTjzJD2GISF+6tZ+ti5OIQEljGKHH8/Q1mmKKWs+9YIBKLGCW2Hn0BVdXKJNHe94QFpIpN QFPi+ccdrCC2iICpRMekpWAdzAJPmCRObd4PViQsECyxq3UCO4jNIqAqcXXGeUYQm1fAWWL2 ghNsEO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wrrsw9xCjBwawkwrut 63iwEG9KYmVValF+fFFpTmrxIUZToKMmMkuJJucDk0xeSbyhsYmZkaWRmbGJubGxkjjvgVbr QCGB9MSS1OzU1ILUIpg+Jg5OqQbGadGXH0dmcXzNYawW+HDs1EbbZ9K28/1DwjzCd0YkT1vK 82+WYPHN3AlGX44tmnZ2heQCnikJCvMUZr/cdv/7m8nM+2Wu6Ndv/5gyW7Dj+d7de78c6sxz VGNnmihiFM+iayZqeVGgfPc977t/tXa5HPwxNbDn863O1d8LvkjkTI0QMY1RWC6eoMRSnJFo qMVcVJwIAJiFu8j6AgAA 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=-6.9 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 To support LCD I80 interface, the panel should generate Tearing Effect synchronization signal between MCU and FB to display video images. And the display controller should trigger to transfer video image at this signal. So the panel receives the TE IRQ, then calls these handler chains to notify it to the display controller. Signed-off-by: YoungJun Cho Acked-by: Inki Dae Acked-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 ++++++++ drivers/gpu/drm/exynos/exynos_drm_crtc.h | 7 +++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 3 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 3bf091d..b68e58f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -511,3 +511,11 @@ int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev, return -EPERM; } + +void exynos_drm_crtc_te_handler(struct drm_crtc *crtc) +{ + struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager; + + if (manager->ops->te_handler) + manager->ops->te_handler(manager); +} diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h index 9f74b10..690dcdd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h @@ -36,4 +36,11 @@ void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos); int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev, unsigned int out_type); +/* + * This function calls the crtc device(manager)'s te_handler() callback + * to trigger to transfer video image at the tearing effect synchronization + * signal. + */ +void exynos_drm_crtc_te_handler(struct drm_crtc *crtc); + #endif diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index 02f3b3d..13be498 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -186,6 +186,8 @@ struct exynos_drm_display { * @win_commit: apply hardware specific overlay data to registers. * @win_enable: enable hardware specific overlay. * @win_disable: disable hardware specific overlay. + * @te_handler: trigger to transfer video image at the tearing effect + * synchronization signal if there is a page flip request. */ struct exynos_drm_manager; struct exynos_drm_manager_ops { @@ -204,6 +206,7 @@ struct exynos_drm_manager_ops { void (*win_commit)(struct exynos_drm_manager *mgr, int zpos); void (*win_enable)(struct exynos_drm_manager *mgr, int zpos); void (*win_disable)(struct exynos_drm_manager *mgr, int zpos); + void (*te_handler)(struct exynos_drm_manager *mgr); }; /*