From patchwork Tue Apr 11 11:42:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13207418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A091C77B6F for ; Tue, 11 Apr 2023 11:42:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A551710E09A; Tue, 11 Apr 2023 11:42:46 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 9252810E09A for ; Tue, 11 Apr 2023 11:42:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.98,336,1673881200"; d="scan'208";a="159045151" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 11 Apr 2023 20:42:42 +0900 Received: from localhost.localdomain (unknown [10.226.93.123]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 37F69400195D; Tue, 11 Apr 2023 20:42:37 +0900 (JST) From: Biju Das To: David Airlie , Daniel Vetter , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v7 00/17] Add RCar DU lib support Date: Tue, 11 Apr 2023 12:42:18 +0100 Message-Id: <20230411114235.366042-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Chris Paterson , Laurent Pinchart , Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org, Biju Das , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The DU controller on RZ/G2L LCDC is similar to R-Car as it is connected to VSPD. RCar DU lib is created for sharing kms, vsp and encoder driver code between both RCar and RZ/G2L alike SoCs. Tested this patch series on RZ/{G2M, G2L, G2LC} and RZ/V2L platforms. v6->v7: * Split DU lib and RZ/G2L du driver as separate patch series as DU support added to more platforms based on RZ/G2L alike SoCs. * Rebased to latest drm-tip. v5->v6: * Merged DU lib and RZ/G2L du driver in same patch series * Rebased to latest drm-misc. * Merged patch#1 to RZ/G2L Driver patch. * Updated KConfig dependency from ARCH_RENESAS->ARCH_RZG2L. * Optimized rzg2l_du_output_name() by removing unsupported outputs. v4->v5: * Added Rb tag from Rob for binding patch. * Started using RCar DU libs(kms, vsp and encoder) * Started using rcar_du_device, rcar_du_write, rcar_du_crtc, rcar_du_format_info and rcar_du_encoder. v3->v4: * Changed compatible name from renesas,du-r9a07g044->renesas,r9a07g044-du * started using same compatible for RZ/G2{L,LC} * Removed rzg2l_du_group.h and struct rzg2l_du_group * Renamed __rzg2l_du_group_start_stop->rzg2l_du_start_stop * Removed rzg2l_du_group_restart * Updated rzg2l_du_crtc_set_display_timing * Removed mode_valid callback. * Updated rzg2l_du_crtc_create() parameters * Updated compatible * Removed RZG2L_DU_MAX_GROUPS V2->v3: * Added new bindings for RZ/G2L DU * Removed indirection and created new DRM driver based on R-Car DU v1->v2: * Based on [1], all references to 'rzg2l_lcdc' replaced with 'rzg2l_du' * Updated commit description for bindings * Removed LCDC references from bindings * Changed clock name from du.0->aclk from bindings * Changed reset name from du.0->du from bindings * Replaced crtc_helper_funcs->rcar_crtc_helper_funcs * Updated macro DRM_RZG2L_LCDC->DRM_RZG2L_DU * Replaced rzg2l-lcdc-drm->rzg2l-du-drm * Added forward declaration for struct reset_control [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220312084205.31462-2-biju.das.jz@bp.renesas.com/ RFC->v1: * Changed minItems->maxItems for renesas,vsps. * Added RZ/G2L LCDC driver with special handling for CRTC reusing most of RCar DU code * Fixed the comments for num_rpf from rpf's->RPFs/ and vsp->VSP. RFC: https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-18-biju.das.jz@bp.renesas.com/ https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-12-biju.das.jz@bp.renesas.com/ https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-13-biju.das.jz@bp.renesas.com/ https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-19-biju.das.jz@bp.renesas.com/ Biju Das (17): drm: rcar-du: Add encoder lib support drm: rcar-du: Add kms lib support drm: rcar-du: Add vsp lib support drm: rcar-du: Move rcar_du_vsp_atomic_begin() drm: rcar-du: Move rcar_du_vsp_atomic_flush() drm: rcar-du: Move rcar_du_vsp_{map,unmap}_fb() drm: rcar-du: Move rcar_du_dumb_create() drm: rcar-du: Move rcar_du_gem_prime_import_sg_table() drm: rcar-du: Add rcar_du_lib_vsp_init() drm: rcar-du: Move rcar_du_vsp_plane_prepare_fb() drm: rcar-du: Move rcar_du_vsp_plane_cleanup_fb() drm: rcar-du: Move rcar_du_vsp_plane_atomic_update() drm: rcar-du: Add rcar_du_lib_fb_create() drm: rcar-du: Add rcar_du_lib_mode_cfg_helper_get() drm: rcar-du: Move rcar_du_encoders_init() drm: rcar-du: Move rcar_du_properties_init() drm: rcar-du: Add rcar_du_lib_vsps_init() drivers/gpu/drm/rcar-du/Kconfig | 10 + drivers/gpu/drm/rcar-du/Makefile | 4 + drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 117 +-- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 14 +- drivers/gpu/drm/rcar-du/rcar_du_encoder_lib.c | 138 ++++ drivers/gpu/drm/rcar-du/rcar_du_encoder_lib.h | 30 + drivers/gpu/drm/rcar-du/rcar_du_kms.c | 694 +--------------- drivers/gpu/drm/rcar-du/rcar_du_kms.h | 29 +- drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c | 744 ++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_kms_lib.h | 61 ++ drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 407 +--------- drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 26 +- drivers/gpu/drm/rcar-du/rcar_du_vsp_lib.c | 436 ++++++++++ drivers/gpu/drm/rcar-du/rcar_du_vsp_lib.h | 76 ++ 14 files changed, 1515 insertions(+), 1271 deletions(-) create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_encoder_lib.c create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_encoder_lib.h create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_kms_lib.c create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_kms_lib.h create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vsp_lib.c create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vsp_lib.h