Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6962160rwb; Tue, 22 Nov 2022 23:27:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf76X3a+1O09kCwd29qD31yjSzyC2pniW4Se+6ZaX1N6HbQcKuYMvCNYCtCoI6WxU8phv+2R X-Received: by 2002:a17:90a:f104:b0:218:bd1d:37ad with SMTP id cc4-20020a17090af10400b00218bd1d37admr11603817pjb.39.1669188436566; Tue, 22 Nov 2022 23:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669188436; cv=none; d=google.com; s=arc-20160816; b=T3ro5PtPHFPkwusBVf0rvLe5T+8VP4UY/W0VAFOLc4dso3WhZfCHtJRu0f9ipad1wO seXNQdojz0nrbraxf1QPYDzxs97G8frVcLuwIE7KKzsNMdXWcXegyumYlKvy8V/kkyM+ pt0ijpO2lb6xH0UcWzmZDm2Ekm4Ov/RQ0kMeNt1RhuGCx1iEhOl4hYuUG4WaxGazprP6 yfkvf1cNeI/ag6uK+tk44lsc/Qhu3Qpm/hSHewg8ENh+t9TDwdFI2YBn7hVx1O62gi+F 23/ov1kCwqMUQu6IDniOtoxRkgjr/8VDq35jYeMn3WyaVaRaCr01316639qBdPtE6YIJ Myjg== 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=FyHP432TH6kSpoaiuJyzCGzcZRk4kHZJB0I50lpctKUrDGIBnjo1ooa+DyrdZ4jCkp f6edrI8m6WkfyGT3IRh4/fZ+hG8CcLEwoACZ5qbOUkOTaydRB2jgIiMg1drgrzNtYHQH +VloDy4LgqpXaSdg/E6mcxdH6VJHRPycQPnEzpB/k4BZpfWOch7Zv+SK3GA5TWK7rDmT IUqlUKm07+/sv5pNntwg9o1e7M3ODrbFa2Rs1Vf1V/H67HCHiYDp0ONVrPb/ZXHDq2gT S2xiJY1m8pbubiqsZi9hBz/J0zifCzgtLjlKfHseF2UadFtdr2aYzNLfUIRsI0xo3K2H Y30A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=MNoNLXji; 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 y9-20020a17090a8b0900b0021870b9d3c7si995778pjn.45.2022.11.22.23.27.04; Tue, 22 Nov 2022 23:27:16 -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=MNoNLXji; 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 S236252AbiKWHAt (ORCPT + 89 others); Wed, 23 Nov 2022 02:00:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236212AbiKWHAe (ORCPT ); Wed, 23 Nov 2022 02:00:34 -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 2BFA1F5A06; Tue, 22 Nov 2022 23:00:33 -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 AEC671373; Wed, 23 Nov 2022 08:00:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669186830; bh=3fphJVPxicGLurGTXvkQUE9p+5BG3KUJATq5hRVNQpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MNoNLXji6WI7jRt6XJeAXNMFVzuCYtF+oveYW3Fn8gQNUEbI6D5xxZb9bnVfQPpWe cWLONf2Ej98LyTyH2UPgthUOo5/wdSEbc9c+BElcDJqqjB/d6gW+8ddRQqROta1y6Z eIxxQ0AQ/UB77phm8p/SryFNLoWwsvj9KGfHvLNA= 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 v2 6/7] drm: rcar-du: Add r8a779g0 support Date: Wed, 23 Nov 2022 08:59:45 +0200 Message-Id: <20221123065946.40415-7-tomi.valkeinen+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123065946.40415-1-tomi.valkeinen+renesas@ideasonboard.com> References: <20221123065946.40415-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