From patchwork Tue Sep 12 08:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 112243 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4862867qgf; Tue, 12 Sep 2017 01:09:20 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7pMELIQmdbT7LDyhArVH3yQgYDxOU7xKo9M4iLs/4JNvwKfpq4Z+sxX3+vRw7io3fXt0d+ X-Received: by 10.98.215.18 with SMTP id b18mr9229060pfh.147.1505203760834; Tue, 12 Sep 2017 01:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505203760; cv=none; d=google.com; s=arc-20160816; b=ZLQIAybTSMTb/VAziHYDvoE3H+IKZDz7ghobrdI0JHodBgp0W9vsRz44TG+wOzcE8p UP1UvcJ+G6ccgn6s1toKKWsHWIsIJNbH/XFKmmTHl1X29kpHzMde62vxrrvHSpM+TnFL hnYNZkAqKSoRQjUzcnuqcjZ3QFwvBKFoJbNVB/ueNNVywHXWAcjFLcb1AO8HNoZXk30v FxyNFYXidiC4ui21WaDrVWB6ydI2YjoNz7wXqC/EGzThSHN4Z4o2DLHYGUqyh38gnQ4X 3ghxCOWUhlYad/IZSVSBf0yBFLLMqwDroRIhQVZ5C2incKh/WR4UFuj0/QQ5DSubRccJ U4EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:arc-authentication-results; bh=f7K6CVN77dihJsGqhJv1nf10GU2y0OCPxIXsiCQrrRo=; b=bnhDsjg7lIrJ5DV+m2giqs15pl0ZEkNXDafemT+vF0b5H6RFvFITyLWpc8yJfgHn6b dioiOGqR9OJOcNwRfGKo5mT0vCFHuo1AbIYK7V9YaoM43q2jbQ9OHO77PPAb45x4rEsy s5U0AwI34csyYuOqoUDztLcINZ77oIZAJ8K9BWgcGt6RLS7uqSwzRkNzpoTm5QuYYu5s 8A/sf/ujq5mucg2ISjA6HX8JtvZc8eLODrLTvnqpjg3G3Lt/JBBQ08TcVccvzMCVriIS TvPTqvvAusR2uYoxZD6VS5a7UccoARsLxVlzjzmg3mRNLm4mgQ8RhTdgAfx2/VkfecKk oOVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i187si1602764pgc.345.2017.09.12.01.09.20; Tue, 12 Sep 2017 01:09:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbdILIJT (ORCPT + 4 others); Tue, 12 Sep 2017 04:09:19 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:45133 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdILIJN (ORCPT ); Tue, 12 Sep 2017 04:09:13 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20170912080911euoutp0196698e1d97b02c0a76a62b9fdf624a7c~jjtZFUqqS1508315083euoutp01K; Tue, 12 Sep 2017 08:09:11 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170912080910eucas1p280109fc658c17463356bd09a318e9e0a~jjtYakGM-0782007820eucas1p2n; Tue, 12 Sep 2017 08:09:10 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 64.0D.12907.62697B95; Tue, 12 Sep 2017 09:09:10 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170912080909eucas1p1942c418e6e4e2621bb977ecb5ae588be~jjtXuCnEM1315913159eucas1p1d; Tue, 12 Sep 2017 08:09:09 +0000 (GMT) X-AuditID: cbfec7f1-f793a6d00000326b-79-59b796260413 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 91.3D.20118.52697B95; Tue, 12 Sep 2017 09:09:09 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OW500MV7QN2C7A0@eusync4.samsung.com>; Tue, 12 Sep 2017 09:09:09 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Bartlomiej Zolnierkiewicz , Tobias Jakobi , Krzysztof Kozlowski , Sylwester Nawrocki Subject: [PATCH 0/6] Exynos DRM: rewrite IPP subsystem and userspace API Date: Tue, 12 Sep 2017 10:08:52 +0200 Message-id: <1505203739-29747-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWy7djP87pq07ZHGhy6LGlxa905VouNM9az Wlz5+p7NYtL9CSwW589vYLeYcX4fk8XaI3fZLQ6/aWe1mDH5JZtF2+oPrA5cHptWdbJ53O8+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ZhFQlXjz/gIjiM0LFP/Z/IkVYpucxMljk1kn MHIvYGRYxSiSWlqcm55bbKRXnJhbXJqXrpecn7uJERhA24793LKDsetd8CFGAQ5GJR5eje5t kUKsiWXFlbmHGCU4mJVEeH/0bI8U4k1JrKxKLcqPLyrNSS0+xCjNwaIkztu7Z3WkkEB6Yklq dmpqQWoRTJaJg1OqgVHd7NHT8MveC1dmmm9OevR8wgfrzCds/GEMkTlbTaXXNQrlpnN8PNpn ZbnK+MpLriPbJPe7/I73ubNUcwmTQw1D9q0Z20O7mq+mPnpn6OzRtE361qnjK58+V9nsV2Zx L+XogtMMj56FKBZfuTtXyuPB3dBKX4HiKFefaZVpx47O3vk5fPrf3SeVWIozEg21mIuKEwE9 Jl3iHAIAAA== X-CMS-MailID: 20170912080909eucas1p1942c418e6e4e2621bb977ecb5ae588be X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-CMS-RootMailID: 20170912080909eucas1p1942c418e6e4e2621bb977ecb5ae588be X-RootMTR: 20170912080909eucas1p1942c418e6e4e2621bb977ecb5ae588be References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Dear all, This patchset performs complete rewrite of Exynos DRM IPP subsystem and its userspace API. Why such rewrite is needed? Exynos DRM IPP API is over-engineered in general, but not really extensible on the other side. It is also buggy, with significant design flaws: - Userspace API covers memory-2-memory picture operations together with CRTC writeback and duplicating features, which belongs to video plane. - Lack of support of the all required image formats (for example NV12 Samsung-tiled cannot be used due to lack of pixel format modifier support). - Userspace API designed only to mimic hardware behaviour, not easy to understand. - Lack of proper input validation in the core, drivers also didn't do that correctly, so it was possible to set incorrect parameters and easil trigger IOMMU fault or memory trash. - Drivers were partially disfunctional or supported only a subset of modes. Due to the above limitations and issues the Exynos DRM IPP API was not used by any of the open-source projects. I assume that it is safe to remove this broken API without any damage to open-source community. All remaining users (mainly Tizen project related) will be updated to the new version. This patchset changes Exynos DRM IPP subsystem to something useful. The userspace API is much simpler, state-less and easy to understand. Also the code of the core and driver is significantly smaller and easier to understand. Patches were tested on Exynos4412 based Odroid U3 and Exynos5422 Odroid XU3 boards, on top of Linux next-20170911 kernel. Best regards Marek Szyprowski Samsung R&D Institute Poland My previous works in this area: "[RFC v2 0/2] Exynos DRM: add Picture Processor extension" https://www.spinics.net/lists/dri-devel/msg140669.html - removed usage of DRM objects and properties - replaced them with simple list of parameters with predefined IDs "[RFC 0/4] Exynos DRM: add Picture Processor extension" https://www.spinics.net/lists/linux-samsung-soc/msg59323.html - moved this feature from DRM core to Exynos DRM driver - changed name from framebuffer processor to picture processor - simplified code to cover only things needed by Exynos drivers - implemented simple fifo task scheduler - cleaned up rotator driver conversion (removed IPP remainings) "[RFC 0/2] New feature: Framebuffer processors" https://www.spinics.net/lists/linux-samsung-soc/msg54810.html - generic approach implemented in DRM core, rejected Patch summary: Marek Szyprowski (6): drm/exynos: ipp: Remove Exynos DRM IPP subsystem drm/exynos: ipp: Add IPP v2 framework drm/exynos: rotator: Convert driver to IPP v2 core API drm/exynos: gsc: Convert driver to IPP v2 core API drm/exynos: Add generic support for devices shared with V4L2 subsystem drm/exynos: fimc: Convert driver to IPP v2 core API drivers/gpu/drm/exynos/Kconfig | 12 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 33 +- drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 +- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 893 +++-------- drivers/gpu/drm/exynos/exynos_drm_fimc.h | 23 - drivers/gpu/drm/exynos/exynos_drm_gsc.c | 853 +++------- drivers/gpu/drm/exynos/exynos_drm_gsc.h | 24 - drivers/gpu/drm/exynos/exynos_drm_ipp.c | 2239 ++++++++------------------- drivers/gpu/drm/exynos/exynos_drm_ipp.h | 352 ++--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 735 ++------- drivers/gpu/drm/exynos/exynos_drm_rotator.h | 19 - include/uapi/drm/exynos_drm.h | 315 ++-- 12 files changed, 1627 insertions(+), 3875 deletions(-) delete mode 100644 drivers/gpu/drm/exynos/exynos_drm_fimc.h delete mode 100644 drivers/gpu/drm/exynos/exynos_drm_gsc.h delete mode 100644 drivers/gpu/drm/exynos/exynos_drm_rotator.h -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html