From patchwork Fri Mar 15 17:01:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10855317 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 1381F139A for ; Fri, 15 Mar 2019 17:01:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF5342AB36 for ; Fri, 15 Mar 2019 17:01:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E35CB2AB47; Fri, 15 Mar 2019 17:01:20 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 93E9A2AB36 for ; Fri, 15 Mar 2019 17:01:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADBEE6E183; Fri, 15 Mar 2019 17:01:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5685D6E183 for ; Fri, 15 Mar 2019 17:01:17 +0000 (UTC) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E0DFF31A; Fri, 15 Mar 2019 18:01:14 +0100 (CET) From: Kieran Bingham To: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart Subject: [PATCH v2 0/6] drm: rcar-du: Rework CRTC and groups for atomic commits Date: Fri, 15 Mar 2019 17:01:04 +0000 Message-Id: <20190315170110.23280-1-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1552669275; bh=R905az5TiJgr3ba6D2Ug0Pj86WB9igxiK7ishnNM5F4=; h=From:To:Cc:Subject:Date:From; b=n7E4nQqxzxOPJeGHvoX+6qfnkKsNFPyhpVpI1lcq2nYcYLPC7o+xEbWF4V8DFjFws u/B+MtER3AAJyTzyg4UmrBb+k29D9WZ5COAUySxbXGgNL+XEUZqulKJisz5fKT5Jr2 eZJzJYjJmFkx4XHrbvkiN3LyTvF1zfRdEp5FbINI= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kieran Bingham Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The DU processes the CRTC and group objects, with various operations storing state of those objects globally, along with performing configuration operations in the atomic_begin handlers. This series aims to refactor the code to establish a private object for the group state, and move all hardware operations to occur only in the commit_tail code paths. The sequence of register writes to the DU is confirmed to be unchanged by this series, however follow on patches after this may begin to modify the sequences. Because of this, these patches are kept as their own series. Note that the rcar_du_crtc_get() in rcar_du_crtc_atomic_begin() is safe to remove, as the call to rcar_du_vsp_atomic_begin() now maps to a no-op, but is kept for API integrity, though it could now be removed. Removal of rcar_du_vsp_atomic_begin() and indeed rcar_du_crtc_atomic_begin() could occur in a later patch, but needs to be synchronised with VSP update. These patches are based on top of my previous cleanup series, which is on top of drm-next. Kieran Bingham (6): drm: rcar-du: Link CRTCs to the DU device drm: rcar-du: Add CRTC standby helpers drm: rcar-du: Add pre/post commit CRTC helpers drm: rcar-du: Provide for_each_group helper drm: rcar-du: Create a group state object drm: rcar-du: Add group hooks for atomic-commit drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 150 +++++++++++-------- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 14 +- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 5 + drivers/gpu/drm/rcar-du/rcar_du_group.c | 182 +++++++++++++++++++----- drivers/gpu/drm/rcar-du/rcar_du_group.h | 36 ++++- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 49 +++---- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 +- 7 files changed, 305 insertions(+), 133 deletions(-)