From patchwork Fri Mar 1 12:20:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10835063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0D94922 for ; Fri, 1 Mar 2019 12:21:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D3EB2D8F5 for ; Fri, 1 Mar 2019 12:21:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E9592D964; Fri, 1 Mar 2019 12:21:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 051122D8F5 for ; Fri, 1 Mar 2019 12:21:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728113AbfCAMVJ (ORCPT ); Fri, 1 Mar 2019 07:21:09 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39133 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727782AbfCAMVJ (ORCPT ); Fri, 1 Mar 2019 07:21:09 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190301122107euoutp029f2087f54bbf1f94f3a4a95722da1ab4~H1RFuTfEl2133221332euoutp02J; Fri, 1 Mar 2019 12:21:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190301122107euoutp029f2087f54bbf1f94f3a4a95722da1ab4~H1RFuTfEl2133221332euoutp02J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1551442867; bh=kajuxefl1uq80FJ5j9Ilef82z+xQ7NHRuKtobYzH6hA=; h=From:To:Cc:Subject:Date:References:From; b=ozd7+LrAR6A0R1OjT6ZGThaYRnyXVkuCuBpyO+UK5Mz9XACkmsbB6glaKBykz8lPA lywQQydTUEDDtrTOtoIjC9lv1h1WJpy+OYXyz0/dceYJ5cTfLm1y9hgADaZ87s9gCx W4aVslt8gU4Qi+48oM7aAnOX7OKs/Kl10Kv7BnRs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190301122107eucas1p2d7b4a6ba6e4458303a20aa70ce69d0af~H1RFSRgAB2891128911eucas1p2P; Fri, 1 Mar 2019 12:21:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id DF.4E.04441.2B3297C5; Fri, 1 Mar 2019 12:21:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190301122106eucas1p2dc9cbc6d822965bfa3cd2de83f3a7812~H1REnTiI02978329783eucas1p2k; Fri, 1 Mar 2019 12:21:06 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-4e-5c7923b20838 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 43.23.04284.1B3297C5; Fri, 1 Mar 2019 12:21:06 +0000 (GMT) Received: from AMDC3748.DIGITAL.local ([106.120.43.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PNO007ENSZ56Z20@eusync3.samsung.com>; Fri, 01 Mar 2019 12:21:05 +0000 (GMT) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 00/23] drm/exynos: add support for GSCALER planes on Exynos5433 Date: Fri, 01 Mar 2019 13:20:32 +0100 Message-id: <20190301122055.7135-1-a.hajda@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeLIzCtJLcpLzFFi42LZduzned1NypUxBtufa1vcWneO1WLjjPWs Fle+vmezmHR/AovFjPP7mCzWHrnL7sDmcb/7OJNH35ZVjB6fN8kFMEdx2aSk5mSWpRbp2yVw ZfxcOIW1YIt8xZ+Ws2wNjC8kuxg5OSQETCSu3fzI1MXIxSEksIJRYsfPHYwQzmdGiVUr7jPB VC07O48ZIrGMUWLXqVmsEM5/RonHkw8yglSxCWhK/N18kw3EFhFQlli1r50dpIhZ4BKjxOuT 3WBFwgKBEl8ubwEbyyKgKrFoQQsziM0rYC6x+dcUNoh18hKrNxwAWychcJVVYsKhs8wQCReJ y927WSFsGYnOjoNQ99VLNM28AtXQwShxYvFyqEnWEoePXwRrYBbgk5i0bTpQEQdQnFeio00I osRD4ubu/WBzhARiJa4u2840gVF8ASPDKkbx1NLi3PTUYsO81HK94sTc4tK8dL3k/NxNjMCo Of3v+KcdjF8vJR1iFOBgVOLhTXhZHiPEmlhWXJl7iFGCg1lJhJePoTJGiDclsbIqtSg/vqg0 J7X4EKM0B4uSOG81w4NoIYH0xJLU7NTUgtQimCwTB6dUA2PI6/c2jGZ9/75uThOx3W0T5Wb0 rZth1mzO+Tzv+7fNWGKavkhjSZyP4JuXvl9zHAr8DxQbWrXZzeTIFLvmv3Ln0UL+e48iXUu7 7h66G5Gr9qU22Xl5zxR5o8CnsmLRFyx1S69/E/hS9unhRs3+N7FJm57V3/+RL52ZeczEb+4K ppnZuec5nZRYijMSDbWYi4oTAShueuqWAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAJMWRmVeSWpSXmKPExsVy+t/xq7qblCtjDKZYW9xad47VYuOM9awW V76+Z7OYdH8Ci8WM8/uYLNYeucvuwOZxv/s4k0ffllWMHp83yQUwR3HZpKTmZJalFunbJXBl /Fw4hbVgi3zFn5azbA2MLyS7GDk5JARMJJadncfcxcjFISSwhFFiYfcOJginkUli39x3rCBV bAKaEn8332QDsUUElCVW7WtnByliFrjCKNH+rYsdJCEs4C9xbXIrM4jNIqAqsWhBC5jNK2Au sfnXFDaIdfISqzccYJ7AyLWAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZGoL+3Hfu5eQfj pY3BhxgFOBiVeHgTXpbHCLEmlhVX5h5ilOBgVhLh5WOojBHiTUmsrEotyo8vKs1JLT7EKM3B oiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXAaCtReu9USvpClR1Xmk/JH3Xm/80kKJNW3/nD LDX2E/fvP/1zdz68F2d57u8939enek872GlmT2+NKdvNGbSt4cEMbptDK1OeBPvs07zYW9Ii ZRIjzbZEZEXf/G3Br2rzldPFZFZ8irSwltr1bLLo5BsOFesjDmwuCkisvMjDmDr78tbWugt7 lFiKMxINtZiLihMBu2dvh/MBAAA= X-CMS-MailID: 20190301122106eucas1p2dc9cbc6d822965bfa3cd2de83f3a7812 CMS-TYPE: 201P X-CMS-RootMailID: 20190301122106eucas1p2dc9cbc6d822965bfa3cd2de83f3a7812 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Inki, GSCALERs in Exynos SoCs support conversion between wide range of image formats, plus scaling and rotation. Driver already supports mem2mem mode - via ExynosDRM IPP framework. This patchset adds support for mem to display mode - framebuffers can be converted, scaled and send directly to Display Controller. From DRM framework's point of view every GSCALER exposes drm_plane which can be connected to display controller (display panel or TV). The feature is not well documented so the development was quite difficult - a process of trial and error, vendor code analysis, guessing from datasheets. Hopefully most of the issues were solved. I have developed and tested it on TM2 device with panel and TV paths. The patchset contains three parts: 1. Preparatory patches - mostly cleanup and refactoring of drm_crtc and drm_plane related structures, to allow usage of planes which are not physically bound to crtcs (01-13). 2. Adding local path support to GSCALER and DECON (14-20). 3. Few fixes of bugs existing already in the code but discovered due to added local path support (21-23). The patchset is based on exynos_drm_next plus my patchset adding zpos to DECON and FIMD - 'drm/exynos: add support for dynamic zpos in DECON and FIMD' - it is required to allow set z-pos position of GSCALER planes. To simplify tests I have also created branch containing all required patches: Repo: https://git.tizen.org/cgit/platform/kernel/linux-exynos Branch: sandbox/ahajda/dev/exynos-drm-local-path Regards Andrzej Andrzej Hajda (23): drm/exynos: remove exynos_drm_plane.h header drm/exynos: remove spare macro drm/exynos: drop exynos_drm_plane_config structure drm/exynos: add exynos_drm_crtc_init function drm/exynos/decon5433: embed exynos_drm_crtc directly into context drm/exynos/decon7: embed exynos_drm_crtc directly into context drm/exynos/fimd: embed exynos_drm_crtc directly into context drm/exynos/mixer: embed exynos_drm_crtc directly into context drm/exynos/vidi: embed exynos_drm_crtc directly into context drm/exynos: remove standalone exynos_drm_crtc leftovers drm/exynos/vidi: remove encoder_to_vidi helper drm/exynos: unify plane type assignment drm/exynos: set primary and cursor planes in exynos_drm_crtc_init drm/exynos: add plane update/disable callbacks for planes drm/exynos: add GSCALER plane capability drm/exynos/gscaler: fix id assignement arm64: dts: exynos: configure GSCALER related clocks arm64: dts: exynos: add DSD/GSD clocks to DECONs and GSCALERs drm/exynos/gscaler: add local path support drm/exynos/decon5433: add local path support drm/exynos/decon5433: wait for finish previous update drm/exynos/gscaler: change supported color format BGRX8888 to XBGR8888 drm/exynos/gscaler: fix handling YVU420 pixel format .../dts/exynos/exynos5433-tm2-common.dtsi | 6 + arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 6 +- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 25 +- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 162 ++++++++----- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 66 +++-- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 46 ++-- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 7 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.h | 50 ++-- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 85 +++---- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 229 ++++++++++++++---- drivers/gpu/drm/exynos/exynos_drm_plane.c | 84 ++++--- drivers/gpu/drm/exynos/exynos_drm_plane.h | 14 -- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 48 ++-- drivers/gpu/drm/exynos/exynos_mixer.c | 95 +++----- drivers/gpu/drm/exynos/regs-decon5433.h | 6 + drivers/gpu/drm/exynos/regs-gsc.h | 6 + 17 files changed, 529 insertions(+), 407 deletions(-) delete mode 100644 drivers/gpu/drm/exynos/exynos_drm_plane.h