From patchwork Fri Dec 1 06:05:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 10086327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27B436037E for ; Fri, 1 Dec 2017 06:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 135C32A509 for ; Fri, 1 Dec 2017 06:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06DE72A50C; Fri, 1 Dec 2017 06:24:25 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3CF382A509 for ; Fri, 1 Dec 2017 06:24:24 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=JTLnZ++Ide7Q7Jd5yTt4Go1WrV1Xcv4VYTpChBvAfks=; b=pf0Pgvlq1yHRFdfwpYln/AYbX2 zK5rbOlJ3h3aFbFNHOQYCXw0JIqBC1iG8GucxJ77dxgspzHgwNjDbJkBaLaq8ie9ha4zD9soNbYbJ SQ1tDhl0mQ7A+dt1UBPtI9NivaHAk/6q4edqPmdHN+pFaqKqEgSD9z8AJMiuozSUyomfP0CemIHnX 0fMNh1ViBHfu2FWz1QQVv+W6taA53HISOQhyG8QPHgVsTELdrLzHYgmRa3mBY/HO7K2YsmchyDTsv J38xYsnEE+jw4CU7pVgvcaAwt3g1TeKCqhL5Obr0wh9Aas/y3spxSoiPEMEoj/YkUKqCqFm+PxFo+ VjjSZ/Sg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKekJ-0001zU-Tk; Fri, 01 Dec 2017 06:24:23 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKejg-0001JS-9C for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Dec 2017 06:23:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xtxFXXTxg6W2O3v8Oq1FJwvCkSFIeTfl9tjziZBDWL8=; b=ae1IXuBqXmOMopOgpxvgOw7lG jGbJRX1B+XlKmVRMuELardYzn+fjqxs/NTTcWPCEj7r50jVsCgT0WQQM33Bt0HT3MqgObGqufcfN2 IJFNjxgoQ2k3Hm/83oKFC7TsRJq6yOMLPVll+PdHiFSR3fb8Q/g2eFCXM47bTNsZSWQggF3IQl3Hl 2pNUSJEcdDBmYB2ospSeO/8NKF68Zw/j+IIIBtc4qLaLydfW/BPSbaJKgyBnpmSBUUVDNY4fStNEV mijpx8aDCQX09rNUQtPsWz+HDReZdfkrVeeE/o0HET2TGxq7qvqv9a97C6d6JjUBdVk1moTqlqTXr 1zQGqajnw==; Received: from mailoutvs3.siol.net ([213.250.19.136] helo=mail.siol.net) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKeU7-0008Nn-7a for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2017 06:07:43 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 2F243520729; Fri, 1 Dec 2017 07:07:05 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta09.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta09.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BokRU_7s61x7; Fri, 1 Dec 2017 07:07:04 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id A8949520844; Fri, 1 Dec 2017 07:07:04 +0100 (CET) Received: from localhost.localdomain (cpe-86-58-68-135.ftth.triera.net [86.58.68.135]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 4EB2C52089E; Fri, 1 Dec 2017 07:07:02 +0100 (CET) From: Jernej Skrabec To: maxime.ripard@free-electrons.com Subject: [PATCH v2 22/27] drm/sun4i: Add CCSC property to DE2 configuration Date: Fri, 1 Dec 2017 07:05:45 +0100 Message-Id: <20171201060550.10392-23-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171201060550.10392-1-jernej.skrabec@siol.net> References: <20171201060550.10392-1-jernej.skrabec@siol.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171201_060739_375043_0504E9D3 X-CRM114-Status: GOOD ( 12.04 ) 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: airlied@linux.ie, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, wens@csie.org, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io MIME-Version: 1.0 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 Base addresses of channel output CSC (CCSC) depends whether mixer in question is first or second and if it is second, if supports VEP or not. This new property will tell which set of base addresses to take. Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 1 + drivers/gpu/drm/sun4i/sun8i_mixer.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index e3296a060352..7f88cf5f97eb 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c @@ -337,6 +337,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { .vi_num = 2, .ui_num = 1, .scaler_mask = 0x3, + .ccsc = 0, }; static const struct of_device_id sun8i_mixer_of_table[] = { diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h index 9bbd762d26f7..994090858b18 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.h +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h @@ -98,11 +98,16 @@ struct de2_fmt_info { * First, scaler supports for VI channels is defined and after that, scaler * support for UI channels. For example, if mixer has 2 VI channels without * scaler and 2 UI channels with scaler, bitmask would be 0xC. + * @ccsc: select set of CCSC base addresses + * Set value to 0 if this is first mixer or second mixer with VEP support. + * Set value to 1 if this is second mixer without VEP support. Other values + * are invalid. */ struct sun8i_mixer_cfg { int vi_num; int ui_num; int scaler_mask; + int ccsc; }; struct sun8i_mixer {