All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits
Date: Tue, 18 Jun 2019 18:16:29 +0100	[thread overview]
Message-ID: <f138fab6-49ae-5cb5-10b0-1de4b314ea99@ideasonboard.com> (raw)
In-Reply-To: <20190617210930.6054-1-laurent.pinchart+renesas@ideasonboard.com>

Hi Laurent,

On 17/06/2019 22:09, Laurent Pinchart wrote:
> Hello everybody,
> 
> This patch series refactors atomic commit tail handling in the R-Car DU
> driver to simplify the code flow, and open the door to further
> optimisations. It takes over Kieran's "[PATCH v2 0/6] drm: rcar-du:
> Rework CRTC and groups for atomic commits" and "[RFC PATCH 0/3] VSP1/DU
> atomic interface changes" series.

Thanks for getting this series ready for integration.

For the changes made to patches originally authored by me:
  Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

For your new patches, see those patches directly.
 (One is reviewed, and one is not fully reviewed yet).


For the whole series:
  Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Including testing specifically against a previously reported modetest
failure from the test teams which is now functioning correctly.
Interestingly my connector id's seem to have incremented. I'm not sure
why yet...

As discussed, it could be due to the group changes.

--
Kieran


> The R-Car DU is a bit of a strange beast, with support for up to four
> CRTCs that share resources in groups of two CRTCs. Depending on the
> generation, planes can be shared (on Gen 1 and Gen 2), and output
> routing configuration is also handled at the group level to some extent.
> Furthermore, many configuration parameters, especially those related to
> routing or clock handling, require the whole group to be restarted to
> take effect, even when the parameter itself affects a single CRTC only.
> 
> This hardware architecture is difficult to handle properly on the
> software side, and has resulted in group usage being reference-counted
> while CRTC usage only tracks the enabled state. Calls are then
> unbalanced and difficult to trace, especially for the configuration of
> output routing, and implementation of new shared resources is hindered.
> This patch series aims at solving this problem.
> 
> The series starts with 4 patches that touch the API between the DU and
> VSP drivers. It became apparent that we need to split the configuration
> of the VSP to allow fine grain control of setting the mode configuration
> and enabling/disabling of the pipeline. To support the cross-component
> API, the new interface is added in patch 01/10, including an
> implementation of vsp1_du_setup_lif() to support the transition. Patch
> 02/10 prepares for the new call flow that will call the atomic flush
> handler before enabling the pipeline. The DRM usage is adapted in patch
> 03/10, before the call is removed entirely in patch 04/10.
> 
> The next two patches convert CRTC clock handling and initial setup,
> potentially called from both the CRTC .atomic_begin() and
> .atomic_enable() operations, to a simpler code flow controlled by the
> commit tail handler. Patch 05/10 takes the CRTCs out of standby and put
> them back in standby respectively at the beginning and end of the commit
> tail handler, based on the CRTC atomic state instead of state
> information stored in the custom rcar_du_crtc structure. Patch 06/10
> then performs a similar change for the CRTC mode setting configuration.
> 
> Finally, the last four patches introduce a DRM private object for the
> CRTC groups, along with an associated state. Patch 07/10 adds a helper
> macro to easily iterate over CRTC groups, and patch 08/10 adds the group
> private objects and empty states. Patches 09/10 and 10/10 respectively
> move the group setup and routing configuration under control of the
> commit tail handler, simplifying the configuration and moving state
> information from driver structures to state structures.
> 
> More refactoring is expected, with plane assignment being moved to group
> states, and group restart being optimised to avoid flickering. Better
> configuration of pixel clocks could also be implemented on top of this
> series.
> 
> The whole series has been tested on M3-N and D3 boards with the DU test
> suite (http://git.ideasonboard.com/renesas/kms-tests.git). Additional
> tests have been developed and bugs in existing tests fixed, with patches
> being posted to the linux-renesas-soc@vger.kernel.org mailing list that
> will be integrated in the near future. All individual commits have been
> tested on M3-N, while only key points (after patch 04/10 and patch
> 10/10) have been tested on D3. No failure or change in behaviour has
> been noticed.
> 
> Kieran Bingham (8):
>   media: vsp1: drm: Split vsp1_du_setup_lif()
>   drm: rcar-du: Convert to the new VSP atomic API
>   media: vsp1: drm: Remove vsp1_du_setup_lif()
>   drm: rcar-du: Handle CRTC standby from commit tail handler
>   drm: rcar-du: Handle CRTC configuration from commit tail handler
>   drm: rcar-du: Provide for_each_group helper
>   drm: rcar-du: Create a group state object
>   drm: rcar-du: Perform group setup from the atomic tail handler
> 
> Laurent Pinchart (2):
>   media: vsp1: drm: Don't configure hardware when the pipeline is
>     disabled
>   drm: rcar-du: Centralise routing configuration in commit tail handler
> 
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c  | 168 ++++++-----
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.h  |   9 +-
>  drivers/gpu/drm/rcar-du/rcar_du_drv.h   |   6 +-
>  drivers/gpu/drm/rcar-du/rcar_du_group.c | 377 +++++++++++++++++++-----
>  drivers/gpu/drm/rcar-du/rcar_du_group.h |  44 ++-
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c   |  63 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c |  10 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c   |  20 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h   |   2 +
>  drivers/media/platform/vsp1/vsp1_drm.c  | 189 ++++++++----
>  drivers/media/platform/vsp1/vsp1_drm.h  |   2 +
>  include/media/vsp1.h                    |  26 +-
>  12 files changed, 637 insertions(+), 279 deletions(-)
> 

-- 
Regards
--
Kieran

WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits
Date: Tue, 18 Jun 2019 18:16:29 +0100	[thread overview]
Message-ID: <f138fab6-49ae-5cb5-10b0-1de4b314ea99@ideasonboard.com> (raw)
In-Reply-To: <20190617210930.6054-1-laurent.pinchart+renesas@ideasonboard.com>

Hi Laurent,

On 17/06/2019 22:09, Laurent Pinchart wrote:
> Hello everybody,
> 
> This patch series refactors atomic commit tail handling in the R-Car DU
> driver to simplify the code flow, and open the door to further
> optimisations. It takes over Kieran's "[PATCH v2 0/6] drm: rcar-du:
> Rework CRTC and groups for atomic commits" and "[RFC PATCH 0/3] VSP1/DU
> atomic interface changes" series.

Thanks for getting this series ready for integration.

For the changes made to patches originally authored by me:
  Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

For your new patches, see those patches directly.
 (One is reviewed, and one is not fully reviewed yet).


For the whole series:
  Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Including testing specifically against a previously reported modetest
failure from the test teams which is now functioning correctly.
Interestingly my connector id's seem to have incremented. I'm not sure
why yet...

As discussed, it could be due to the group changes.

--
Kieran


> The R-Car DU is a bit of a strange beast, with support for up to four
> CRTCs that share resources in groups of two CRTCs. Depending on the
> generation, planes can be shared (on Gen 1 and Gen 2), and output
> routing configuration is also handled at the group level to some extent.
> Furthermore, many configuration parameters, especially those related to
> routing or clock handling, require the whole group to be restarted to
> take effect, even when the parameter itself affects a single CRTC only.
> 
> This hardware architecture is difficult to handle properly on the
> software side, and has resulted in group usage being reference-counted
> while CRTC usage only tracks the enabled state. Calls are then
> unbalanced and difficult to trace, especially for the configuration of
> output routing, and implementation of new shared resources is hindered.
> This patch series aims at solving this problem.
> 
> The series starts with 4 patches that touch the API between the DU and
> VSP drivers. It became apparent that we need to split the configuration
> of the VSP to allow fine grain control of setting the mode configuration
> and enabling/disabling of the pipeline. To support the cross-component
> API, the new interface is added in patch 01/10, including an
> implementation of vsp1_du_setup_lif() to support the transition. Patch
> 02/10 prepares for the new call flow that will call the atomic flush
> handler before enabling the pipeline. The DRM usage is adapted in patch
> 03/10, before the call is removed entirely in patch 04/10.
> 
> The next two patches convert CRTC clock handling and initial setup,
> potentially called from both the CRTC .atomic_begin() and
> .atomic_enable() operations, to a simpler code flow controlled by the
> commit tail handler. Patch 05/10 takes the CRTCs out of standby and put
> them back in standby respectively at the beginning and end of the commit
> tail handler, based on the CRTC atomic state instead of state
> information stored in the custom rcar_du_crtc structure. Patch 06/10
> then performs a similar change for the CRTC mode setting configuration.
> 
> Finally, the last four patches introduce a DRM private object for the
> CRTC groups, along with an associated state. Patch 07/10 adds a helper
> macro to easily iterate over CRTC groups, and patch 08/10 adds the group
> private objects and empty states. Patches 09/10 and 10/10 respectively
> move the group setup and routing configuration under control of the
> commit tail handler, simplifying the configuration and moving state
> information from driver structures to state structures.
> 
> More refactoring is expected, with plane assignment being moved to group
> states, and group restart being optimised to avoid flickering. Better
> configuration of pixel clocks could also be implemented on top of this
> series.
> 
> The whole series has been tested on M3-N and D3 boards with the DU test
> suite (http://git.ideasonboard.com/renesas/kms-tests.git). Additional
> tests have been developed and bugs in existing tests fixed, with patches
> being posted to the linux-renesas-soc@vger.kernel.org mailing list that
> will be integrated in the near future. All individual commits have been
> tested on M3-N, while only key points (after patch 04/10 and patch
> 10/10) have been tested on D3. No failure or change in behaviour has
> been noticed.
> 
> Kieran Bingham (8):
>   media: vsp1: drm: Split vsp1_du_setup_lif()
>   drm: rcar-du: Convert to the new VSP atomic API
>   media: vsp1: drm: Remove vsp1_du_setup_lif()
>   drm: rcar-du: Handle CRTC standby from commit tail handler
>   drm: rcar-du: Handle CRTC configuration from commit tail handler
>   drm: rcar-du: Provide for_each_group helper
>   drm: rcar-du: Create a group state object
>   drm: rcar-du: Perform group setup from the atomic tail handler
> 
> Laurent Pinchart (2):
>   media: vsp1: drm: Don't configure hardware when the pipeline is
>     disabled
>   drm: rcar-du: Centralise routing configuration in commit tail handler
> 
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c  | 168 ++++++-----
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.h  |   9 +-
>  drivers/gpu/drm/rcar-du/rcar_du_drv.h   |   6 +-
>  drivers/gpu/drm/rcar-du/rcar_du_group.c | 377 +++++++++++++++++++-----
>  drivers/gpu/drm/rcar-du/rcar_du_group.h |  44 ++-
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c   |  63 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c |  10 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c   |  20 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.h   |   2 +
>  drivers/media/platform/vsp1/vsp1_drm.c  | 189 ++++++++----
>  drivers/media/platform/vsp1/vsp1_drm.h  |   2 +
>  include/media/vsp1.h                    |  26 +-
>  12 files changed, 637 insertions(+), 279 deletions(-)
> 

-- 
Regards
--
Kieran
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-06-18 17:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 21:09 [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits Laurent Pinchart
2019-06-17 21:09 ` Laurent Pinchart
2019-06-17 21:09 ` [PATCH v3 01/10] media: vsp1: drm: Split vsp1_du_setup_lif() Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 12:32   ` Ulrich Hecht
2019-06-18 12:32     ` Ulrich Hecht
2019-06-18 13:46     ` Laurent Pinchart
2019-06-18 13:46       ` Laurent Pinchart
2019-06-17 21:09 ` [PATCH v3 02/10] media: vsp1: drm: Don't configure hardware when the pipeline is disabled Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 12:31   ` Kieran Bingham
2019-06-18 12:31     ` Kieran Bingham
2019-06-18 12:35   ` Ulrich Hecht
2019-06-18 12:35     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 03/10] drm: rcar-du: Convert to the new VSP atomic API Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 12:39   ` Ulrich Hecht
2019-06-18 12:39     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 04/10] media: vsp1: drm: Remove vsp1_du_setup_lif() Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 12:40   ` Ulrich Hecht
2019-06-18 12:40     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 05/10] drm: rcar-du: Handle CRTC standby from commit tail handler Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 13:03   ` Ulrich Hecht
2019-06-18 13:03     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 06/10] drm: rcar-du: Handle CRTC configuration " Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 13:11   ` Ulrich Hecht
2019-06-18 13:11     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 07/10] drm: rcar-du: Provide for_each_group helper Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 10:43   ` Kieran Bingham
2019-06-18 10:43     ` Kieran Bingham
2019-06-18 13:15   ` Ulrich Hecht
2019-06-18 13:15     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 08/10] drm: rcar-du: Create a group state object Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 13:36   ` Ulrich Hecht
2019-06-18 13:36     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 09/10] drm: rcar-du: Perform group setup from the atomic tail handler Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 13:46   ` Ulrich Hecht
2019-06-18 13:46     ` Ulrich Hecht
2019-06-17 21:09 ` [PATCH v3 10/10] drm: rcar-du: Centralise routing configuration in commit " Laurent Pinchart
2019-06-17 21:09   ` Laurent Pinchart
2019-06-18 14:12   ` Ulrich Hecht
2019-06-18 14:12     ` Ulrich Hecht
2019-06-18 14:41     ` Laurent Pinchart
2019-06-18 14:41       ` Laurent Pinchart
2019-06-18 17:16 ` Kieran Bingham [this message]
2019-06-18 17:16   ` [PATCH v3 00/10] drm: rcar-du: Rework CRTC and groups for atomic commits Kieran Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f138fab6-49ae-5cb5-10b0-1de4b314ea99@ideasonboard.com \
    --to=kieran.bingham@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.