Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp316150rwb; Thu, 1 Dec 2022 02:33:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6oAMRcKFWDY+sm5R6Ner5I10CaWrpPdWS1RHnCT5H+BsTGPS/N9fCh/Y0lco/qAx2lysBG X-Received: by 2002:a05:6402:1717:b0:461:8fbf:f607 with SMTP id y23-20020a056402171700b004618fbff607mr58191585edu.235.1669890810583; Thu, 01 Dec 2022 02:33:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669890810; cv=none; d=google.com; s=arc-20160816; b=aUzqLKC7JuN745cu4J4kIcRenSkPWXhYPzAZtOGof6zvqFBxpHOW/JB5WqbLfMahMT FcyUkVkOcLB/czp6lBiQX1t63x0wbGrxKs6kJMqKRBcUlfJnEbYLUYp+pTiMrvRG2rz6 MGBw3cCEFVdHX4uKMNlrqAGxIjXHdyCJNKomVM4n+f4QpZp3EogEfQr2vAysgGCAuaN8 L2CkZD5/taOJDsQXBTZJKjFFvFqjAHv49o3V2qke2GXK8jth0bHjgvrnG2UlnS4EAY+m f0Tgq4di5HtLqBwIB2MQrEYA43X+A6M/q60euZ8FiDAN7kt0/NJZag2yiLFow/GXc1OP lgGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CPfNnb1fel4NaUUz81nJWJs1HQRFrh62eRYFWEghoZw=; b=Rvou5SlhiRYm16vgQrCZMKOksJm0sZzr6qWoF8jRzy8N/tZ1mQjs8mWZnSnIpbcIqL CMu2ByMCUy0H1nmLsAPgwU9c6mHrSKVxnl1CheyY47jclN4SBe4wnTZZdUyqdNxEwJ91 HDM3jDejc8asiwSpxdO3o2DRuNB68fbdNrOun5ZiCn4xjCoOhvmrfqoUVbLKSxVAyoJe 1JrIJCc4TwEuqQdr9ahEEGnLF5HP/ff4AKIUDjHaZvj7nzEAyNk6Es+UEO/cSSq9gs8/ qELeWoXK5PWxO2XfkcLrvfkOrPPA49Z6Mt3Jj0PQ3gRmO22je9+dPlUEVjU9BnV2KYip 8gnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JjZveGnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss28-20020a170907c01c00b007a9b7e68634si2978576ejc.515.2022.12.01.02.33.11; Thu, 01 Dec 2022 02:33:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JjZveGnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229899AbiLAJ5d (ORCPT + 82 others); Thu, 1 Dec 2022 04:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiLAJ5E (ORCPT ); Thu, 1 Dec 2022 04:57:04 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB9D9790B; Thu, 1 Dec 2022 01:57:02 -0800 (PST) Received: from desky.lan (91-154-32-225.elisa-laajakaista.fi [91.154.32.225]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E78EB2D9; Thu, 1 Dec 2022 10:56:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669888615; bh=3fphJVPxicGLurGTXvkQUE9p+5BG3KUJATq5hRVNQpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JjZveGnccVG0mRCUc2Krgf70dukhK233RlMWRCxAxF/Cy3ff2haCHmQ4nHQvyLyL5 0A5bnUV/DHjxRJLvRoJSeJuwJPl736Jki7zLHOYpa15unG6uLp3JaB+5HJnluFUVLT CvE/kVoCD8Hm0Z2L+1dPiqYzZsWZvYEdc61/Qm2g= From: Tomi Valkeinen To: Laurent Pinchart , Kieran Bingham , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Tomi Valkeinen Subject: [PATCH v5 6/7] drm: rcar-du: Add r8a779g0 support Date: Thu, 1 Dec 2022 11:56:30 +0200 Message-Id: <20221201095631.89448-7-tomi.valkeinen+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221201095631.89448-1-tomi.valkeinen+renesas@ideasonboard.com> References: <20221201095631.89448-1-tomi.valkeinen+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for DU on r8a779g0, which is identical to DU on r8a779a0. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_group.c | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index d003e8d9e7a2..46c60a2d710d 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -524,6 +524,27 @@ static const struct rcar_du_device_info rcar_du_r8a779a0_info = { .dsi_clk_mask = BIT(1) | BIT(0), }; +static const struct rcar_du_device_info rcar_du_r8a779g0_info = { + .gen = 4, + .features = RCAR_DU_FEATURE_CRTC_IRQ + | RCAR_DU_FEATURE_VSP1_SOURCE + | RCAR_DU_FEATURE_NO_BLENDING, + .channels_mask = BIT(1) | BIT(0), + .routes = { + /* R8A779G0 has two MIPI DSI outputs. */ + [RCAR_DU_OUTPUT_DSI0] = { + .possible_crtcs = BIT(0), + .port = 0, + }, + [RCAR_DU_OUTPUT_DSI1] = { + .possible_crtcs = BIT(1), + .port = 1, + }, + }, + .num_rpf = 5, + .dsi_clk_mask = BIT(1) | BIT(0), +}; + static const struct of_device_id rcar_du_of_table[] = { { .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info }, { .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info }, @@ -549,6 +570,7 @@ static const struct of_device_id rcar_du_of_table[] = { { .compatible = "renesas,du-r8a77990", .data = &rcar_du_r8a7799x_info }, { .compatible = "renesas,du-r8a77995", .data = &rcar_du_r8a7799x_info }, { .compatible = "renesas,du-r8a779a0", .data = &rcar_du_r8a779a0_info }, + { .compatible = "renesas,du-r8a779g0", .data = &rcar_du_r8a779g0_info }, { } }; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c index 1fe8581577ed..6da01760ede5 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_group.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c @@ -107,7 +107,7 @@ static void rcar_du_group_setup_didsr(struct rcar_du_group *rgrp) */ rcrtc = rcdu->crtcs; num_crtcs = rcdu->num_crtcs; - } else if (rcdu->info->gen == 3 && rgrp->num_crtcs > 1) { + } else if (rcdu->info->gen >= 3 && rgrp->num_crtcs > 1) { /* * On Gen3 dot clocks are setup through per-group registers, * only available when the group has two channels. -- 2.34.1