From patchwork Wed Dec 19 15:57:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10737689 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 5AC476C5 for ; Wed, 19 Dec 2018 16:05:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 487972B5A1 for ; Wed, 19 Dec 2018 16:05:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BA7F2B5CD; Wed, 19 Dec 2018 16:05:00 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD05D2B5A1 for ; Wed, 19 Dec 2018 16:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/dWsXt2egB7FZEBIKeybvPnUtn1ZelI/oaaB7vb4B6M=; b=CeUepNmUL6byuG csmQHx9jWUsUVrBY1HHp+jN4jsROOQyGJm1dGSJiF8ywIjUVj32EEA8fx0VO0NS94QdCRsC9knKko zPa8F9bk49dP6ZXb7Tq0/RU6SA+5BRYdYzoalzbgwPEikfViEkvtBzyok430j4VxP6jLMhEODoIHd V58LiIX0FCEvIXKBniq2W9Jj5xB9LSrWhPzTVW6sCx/jnnWPfGEOFe7Phr8rSZ5bHDqJnSoEGuFML OkYSBEdWAmeLIwcRRgdLigDqjH6/x1S6dniT9/jHdgyCumU2pOdXqauqXNafjgjxx6uSvBq0m0qpR XflitOXII8U09Jux7sdw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZeL8-0001E7-M5; Wed, 19 Dec 2018 16:04:54 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZeKs-00010P-Ta for linux-arm-kernel@lists.infradead.org; Wed, 19 Dec 2018 16:04:40 +0000 Received: by mail-lf1-x142.google.com with SMTP id i26so15446466lfc.0 for ; Wed, 19 Dec 2018 08:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZZI8ioWXkc4sq7/+UaHZVn4uYxbM0VQloyZQGuqbwgg=; b=JSiskSSCKMdW6SROQWsAN+3PI4AOXKr9SmcP/NJCUlOUJ13ZuYHnccEJQa16U3eRHf rN6UIPgmOA+vfs26YoTNj+eLoZCY55M4BVMsot0glgvtKdj2i/b7+qi2oqNZOwEoggkY DqbkNX90bI1Q2vHeSUZGhbVSTgcAY7D+VMmjHcKT6ntRlPIGF+T/HlNC8rn32JhK/jls dwU7je2wrUvAMXbcIVdhxYMntfFEj2LGn0or0Z8fSSe5H2yiqkszrmvlbq4XelS1f0/g grLB7vCyiFAewfzu3/1Fcaau+HD4yd4W7FpihnrBwhrZEnrHoN264E6Wz9AoydQ6xB/C SJoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZZI8ioWXkc4sq7/+UaHZVn4uYxbM0VQloyZQGuqbwgg=; b=DCS26iVIv1w+YFTDa4jq78EafSTnZV52xzAPQJwlE8Ebk0vLCGQBashV8w+02rEQj9 P8A///cbYA7ILmhrzaVD2v3NFkIDwo+P+4sEyI0ga7xSMzaglmrXbJmfRGl4o7h+Ls4V KdnljojI16ImLNuf6qBbtzq5qkKZqhKFat3kLZb9OwBT4enCKed+KrYtycPMZ/LZO7Af nHOgJVDg6JhJrNnEQMxqLzrj9ad52CLpEfzYO/v4pDEYj5ybPeEaBqrJrnsEnkBA8mHJ ld1C8ZoNNnwZaKz3VICKNuW0QO3YYWgJ91Do0tdrSqPIpCC+xcQiKCKoksWy6LKNpd4S 4pfA== X-Gm-Message-State: AA+aEWaaeDYJWVvTcGF75Cy6riJghkgL8ixDM3Y8HxKQttP7ZF5i44pf 5BxcfW24k7kMQZ8i5uoroNg= X-Google-Smtp-Source: AFSGD/XvQ2nuSqE4wy/SbLlLNPEkqpARqK5tWnC9Ud8eRUmdV0WeVTBjc0PXOds7iOWSNVOByjIIkw== X-Received: by 2002:a19:c18d:: with SMTP id r135mr1884611lff.59.1545235466806; Wed, 19 Dec 2018 08:04:26 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:253f:4197:555d:bfba]) by smtp.googlemail.com with ESMTPSA id i75sm3943979lfb.58.2018.12.19.08.04.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 08:04:26 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: inki.dae@samsung.com, krzk@kernel.org, airlied@linux.ie Subject: [PATCH 1/3] drm/exynos: rotator: Add support for s5pv210 Date: Wed, 19 Dec 2018 16:57:02 +0100 Message-Id: <20181219155704.15264-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181219155704.15264-1-pawel.mikolaj.chmiel@gmail.com> References: <20181219155704.15264-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181219_080438_954006_3EDAB17D X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, robh+dt@kernel.org, kyungmin.park@samsung.com, kgene@kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds support for s5pv210. Currently only NV12 and XRGB8888 formats are supported. It was tested by using tool from https://www.spinics.net/lists/linux-samsung-soc/msg60498.html Signed-off-by: Paweł Chmiel --- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index a820a68429b9..a822d340ccf6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -357,6 +357,11 @@ static int rotator_runtime_resume(struct device *dev) } #endif +static const struct drm_exynos_ipp_limit rotator_s5pv210_rbg888_limits[] = { + { IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) }, + { IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) }, +}; + static const struct drm_exynos_ipp_limit rotator_4210_rbg888_limits[] = { { IPP_SIZE_LIMIT(BUFFER, .h = { 8, SZ_16K }, .v = { 8, SZ_16K }) }, { IPP_SIZE_LIMIT(AREA, .h.align = 4, .v.align = 4) }, @@ -372,6 +377,11 @@ static const struct drm_exynos_ipp_limit rotator_5250_rbg888_limits[] = { { IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) }, }; +static const struct drm_exynos_ipp_limit rotator_s5pv210_yuv_limits[] = { + { IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) }, + { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) }, +}; + static const struct drm_exynos_ipp_limit rotator_4210_yuv_limits[] = { { IPP_SIZE_LIMIT(BUFFER, .h = { 32, SZ_64K }, .v = { 32, SZ_64K }) }, { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) }, @@ -382,6 +392,11 @@ static const struct drm_exynos_ipp_limit rotator_4412_yuv_limits[] = { { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) }, }; +static const struct exynos_drm_ipp_formats rotator_s5pv210_formats[] = { + { IPP_SRCDST_FORMAT(XRGB8888, rotator_s5pv210_rbg888_limits) }, + { IPP_SRCDST_FORMAT(NV12, rotator_s5pv210_yuv_limits) }, +}; + static const struct exynos_drm_ipp_formats rotator_4210_formats[] = { { IPP_SRCDST_FORMAT(XRGB8888, rotator_4210_rbg888_limits) }, { IPP_SRCDST_FORMAT(NV12, rotator_4210_yuv_limits) }, @@ -397,6 +412,11 @@ static const struct exynos_drm_ipp_formats rotator_5250_formats[] = { { IPP_SRCDST_FORMAT(NV12, rotator_4412_yuv_limits) }, }; +static const struct rot_variant rotator_s5pv210_data = { + .formats = rotator_s5pv210_formats, + .num_formats = ARRAY_SIZE(rotator_s5pv210_formats), +}; + static const struct rot_variant rotator_4210_data = { .formats = rotator_4210_formats, .num_formats = ARRAY_SIZE(rotator_4210_formats), @@ -414,6 +434,9 @@ static const struct rot_variant rotator_5250_data = { static const struct of_device_id exynos_rotator_match[] = { { + .compatible = "samsung,s5pv210-rotator", + .data = &rotator_s5pv210_data, + }, { .compatible = "samsung,exynos4210-rotator", .data = &rotator_4210_data, }, {