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: 10855313 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 022F71515 for ; Fri, 15 Mar 2019 17:01:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD7CB2AB36 for ; Fri, 15 Mar 2019 17:01:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D170E2AB47; Fri, 15 Mar 2019 17:01:17 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50F6F2AB36 for ; Fri, 15 Mar 2019 17:01:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729701AbfCORBQ (ORCPT ); Fri, 15 Mar 2019 13:01:16 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:53196 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727651AbfCORBQ (ORCPT ); Fri, 15 Mar 2019 13:01:16 -0400 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) 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= From: Kieran Bingham To: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart Cc: Kieran Bingham 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 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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(-)