From patchwork Fri Dec 28 15:19: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: 10744509 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 0175C6C5 for ; Fri, 28 Dec 2018 15:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E500228BAF for ; Fri, 28 Dec 2018 15:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7F5028BB6; Fri, 28 Dec 2018 15:20:38 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI 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 A802C28BAF for ; Fri, 28 Dec 2018 15:20:18 +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=VrGLe5YoNPj4KYbMGMpcvRVmo1+sO4KOxwMq0eMyxlE=; b=rxM0xlwjhM/RXB g3ZltQckgdf2mnsKcSwd/3SZOpBGq/ctF617qYUBuwxeWPCmNJYBjhG3EA8eXnjcunU2PAzzQVI+I MevjLdAPl54j0Nd+rNmVg2+ZbsZIyblnGhBwjNb8mQw851xMGLhLj6UXsX0LqMMbkvt+y+wOUFW9q yoAqKCh3luOqlzSBjDkpoHsSJo2VgpXDihiaBisVEobmA1MSTFyIrCEzKwzrXAbRqHzNNn+MItUjj S6zWIL6VUml9ONEDZzo0p531h90frYxnVzgf0+AgY4ezv7ETMKaMRWZjSY4MnKVxXowWjh9zVPslt uEsFoPv1h9nfFxa2PTTA==; 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 1gctvd-0000J1-7N; Fri, 28 Dec 2018 15:20:01 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gctvN-0008Vp-6x for linux-arm-kernel@lists.infradead.org; Fri, 28 Dec 2018 15:19:49 +0000 Received: by mail-lf1-x143.google.com with SMTP id c16so14749437lfj.8 for ; Fri, 28 Dec 2018 07:19:33 -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=v4Ds6Z+OiEaHNaxosbxSSLHIYzs/zje2q5ByzOawEMg=; b=qdt/3TFbco4JAUE52thvWvxKRlrkGXp7ZoBgrM7LXx0MT80l2GP0TkqJc0ok81Bc9o wqZiSQ66FuddOXR7Sv5pMkN7O2iEE36Dk1ZTR6Lw29ztd7ZDSMZ3fIISy8FjOomCEsGN 4UH+XueRgezXQn2BXAwcoz1TrVk9+LFnhO7D4OziVHRfeqLCW78rbLZvsvR7brrjZqpV oUbTLzHkymHFD6mVfglvXoI/4vLzAjX0x7yE/czYCmwvAVhmwpSAf3emJI18cS7P89xY 4HQDPgxhRunjsZV3+YzVv9bE8qai+5FRKnyIcXLvGQPrbrlIFGJsJa8a0KqYrT3UlOdQ xLhA== 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=v4Ds6Z+OiEaHNaxosbxSSLHIYzs/zje2q5ByzOawEMg=; b=NlTz48KVtSYicoOUSOQLbiPI+qUqV+6KyK0N4LOf3Vhhcc+K6m28mkuv3IZbBGSvN4 2dsmUsDFGK2DBEiCbJ+dTwgD8J8dJ6Fn5b0c/Uza59VAWY8Lw1baOPMOh+EF/pTBAyUG +hmaePkQTh0tLb5oaGMklL5Jwbuz03sQNXJtSSYAPIpkCdwq6T8Nm/jhW2UwCIf6H8aa M4NxEaKJuKoi61Q/VuBlZumhlnL0aj1gHXQ8lCai8DSvWJzGVwgSEwxTFn9wLro0/mAJ Zgq+yJ3BjiyzLtt/1HoyprED+43zerZr8zbNgZUOxQ1Dwjf9N5QSyNK71TLxvfn0TAmn Zb5A== X-Gm-Message-State: AA+aEWZb3TmPWLW+0YNp+INIWhTaPJofZlnYLXZ2zmuGH/JBINuzPrDa XP1egg6YRGwEek7VIdoooCA= X-Google-Smtp-Source: AFSGD/UMI6f+gpL5kx/yIXHEnON8Ng9rPZDadspSsi43craER40nzg628JPrInJKPsrp+ieJpkIKoA== X-Received: by 2002:a19:f510:: with SMTP id j16mr13516090lfb.35.1546010371958; Fri, 28 Dec 2018 07:19:31 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:7146:fd07:48ff:9665]) by smtp.googlemail.com with ESMTPSA id s24sm7872704lfc.30.2018.12.28.07.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Dec 2018 07:19:31 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: inki.dae@samsung.com, krzk@kernel.org, airlied@linux.ie Subject: [PATCH v2 1/3] drm/exynos: rotator: Add support for s5pv210 Date: Fri, 28 Dec 2018 16:19:02 +0100 Message-Id: <20181228151904.12079-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181228151904.12079-1-pawel.mikolaj.chmiel@gmail.com> References: <20181228151904.12079-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-20181228_071945_459554_63C74A41 X-CRM114-Status: GOOD ( 13.19 ) 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 8d67b2a54be3..05abfed6f7f8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -356,6 +356,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) }, @@ -371,6 +376,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) }, @@ -381,6 +391,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) }, @@ -396,6 +411,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), @@ -413,6 +433,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, }, {