All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Subject: [PATCH v7 00/18] R-Car DU display writeback support
Date: Mon, 18 Mar 2019 16:31:03 +0200	[thread overview]
Message-ID: <20190318143121.29561-1-laurent.pinchart+renesas@ideasonboard.com> (raw)

Hello everybody,

This is the latest and greatest version of the patch series that
implements display writeback support for the R-Car Gen3 platforms in the
VSP1 and DU drivers. All patches have been reviewed, all comments
incorporated, and the result rebased on top ov v5.1-rc1.

Patches 01/18 to 11/18 prepare the VSP1 driver for writeback support
with all the necessary plumbing, including extensions of the API between
the VSP1 and DU drivers.

The most significant change compared to v6 is the rebase on top of
v5.1-rc1. This was done to ease merging, as the VSP and DU parts would
normally go through different trees. I usually ask Mauro or Dave their
permission to merge the whole series through a single tree, and doing
the same this time I would select the DRM tree given that I hope to get
more DU patches merged in this development cycle. There is no foreseen
conflicting patch for the VSP in v5.2, but if a need arises, I will
them on top of the 11 first patches of this series and send a pull
request to Mauro to avoid conflicts.

Mauro, I plan to send a pull request to Dave by the end of this week, so
if you'd like to have a look at the VSP patches, now would be a good
time :-) It's only driver changes, and they have been reviewed already,
so I don't expect any problem.

Compared to v5 the major change is the usage of chained display lists in
the VSP to disable writeback after one frame, instead of patching the
active display list in memory. This should solve the potential DMA to
released buffer issue that could occur when the frame start interrupt
was delayed after frame end. Patch 06/18 and 07/18 are new in this
version to support usage of chained display pipelines.

Compared to v4 the major change is the move from V4L2 to DRM writeback
connectors for the userspace API. This has caused a few issues with
writeback support to be uncovered, and they are addressed by patches
12/18 to 14/18.

Patches 15/18 to 17/18 then perform refactoring of the DU driver, to
finally add writeback support in patch 18/18.

The writeback pixel format is restricted to RGB, due to the VSP1
outputting RGB to the display and lacking a separate colour space
conversion unit for writeback. The writeback framebuffer size must match
the active mode, writeback scaling is not supported by the hardware.

Writeback requests being part of atomic commits, they're queued to the
hardware when they are received, become active at the next vblank, and
complete on the following vblank. The display list chaining mechanism
ensures that writeback will be enabled for a single frame only, unless
the next atomic commit contains a separate writeback request.

For convenience patches can be found at

	git://linuxtv.org/pinchartl/media.git drm/du/writeback

Kieran Bingham (1):
  Revert "[media] v4l: vsp1: Supply frames to the DU continuously"

Laurent Pinchart (17):
  media: vsp1: wpf: Fix partition configuration for display pipelines
  media: vsp1: Replace leftover occurrence of fragment with body
  media: vsp1: Fix addresses of display-related registers for VSP-DL
  media: vsp1: Replace the display list internal flag with a flags field
  media: vsp1: Add vsp1_dl_list argument to .configure_stream()
    operation
  media: vsp1: dl: Allow chained display lists for display pipelines
  media: vsp1: wpf: Add writeback support
  media: vsp1: drm: Split RPF format setting to separate function
  media: vsp1: drm: Extend frame completion API to the DU driver
  media: vsp1: drm: Implement writeback support
  drm: writeback: Cleanup job ownership handling when queuing job
  drm: writeback: Fix leak of writeback job
  drm: writeback: Add job prepare and cleanup operations
  drm: rcar-du: Fix rcar_du_crtc structure documentation
  drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure
  drm: rcar-du: vsp: Extract framebuffer (un)mapping to separate
    functions
  drm: rcar-du: Add writeback support for R-Car Gen3

 drivers/gpu/drm/arm/malidp_mw.c             |   3 +-
 drivers/gpu/drm/drm_atomic_helper.c         |  11 +
 drivers/gpu/drm/drm_atomic_state_helper.c   |   4 +
 drivers/gpu/drm/drm_atomic_uapi.c           |  31 +--
 drivers/gpu/drm/drm_writeback.c             |  73 +++++-
 drivers/gpu/drm/rcar-du/Kconfig             |   4 +
 drivers/gpu/drm/rcar-du/Makefile            |   3 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c      |   7 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h      |   9 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c       |  37 +++
 drivers/gpu/drm/rcar-du/rcar_du_kms.h       |   1 +
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c       | 122 +++++-----
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h       |  17 ++
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 243 ++++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_writeback.h |  39 ++++
 drivers/gpu/drm/vc4/vc4_txp.c               |   2 +-
 drivers/media/platform/vsp1/vsp1_brx.c      |   1 +
 drivers/media/platform/vsp1/vsp1_clu.c      |   1 +
 drivers/media/platform/vsp1/vsp1_dl.c       |  84 ++++---
 drivers/media/platform/vsp1/vsp1_dl.h       |   6 +-
 drivers/media/platform/vsp1/vsp1_drm.c      |  94 +++++---
 drivers/media/platform/vsp1/vsp1_drm.h      |   2 +-
 drivers/media/platform/vsp1/vsp1_entity.c   |   3 +-
 drivers/media/platform/vsp1/vsp1_entity.h   |   7 +-
 drivers/media/platform/vsp1/vsp1_hgo.c      |   1 +
 drivers/media/platform/vsp1/vsp1_hgt.c      |   1 +
 drivers/media/platform/vsp1/vsp1_hsit.c     |   1 +
 drivers/media/platform/vsp1/vsp1_lif.c      |   1 +
 drivers/media/platform/vsp1/vsp1_lut.c      |   1 +
 drivers/media/platform/vsp1/vsp1_regs.h     |   6 +-
 drivers/media/platform/vsp1/vsp1_rpf.c      |   1 +
 drivers/media/platform/vsp1/vsp1_rwpf.h     |   1 +
 drivers/media/platform/vsp1/vsp1_sru.c      |   1 +
 drivers/media/platform/vsp1/vsp1_uds.c      |   1 +
 drivers/media/platform/vsp1/vsp1_uif.c      |   1 +
 drivers/media/platform/vsp1/vsp1_video.c    |  16 +-
 drivers/media/platform/vsp1/vsp1_wpf.c      |  83 +++++--
 include/drm/drm_modeset_helper_vtables.h    |   7 +
 include/drm/drm_writeback.h                 |  30 ++-
 include/media/vsp1.h                        |  19 +-
 40 files changed, 775 insertions(+), 200 deletions(-)
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_writeback.c
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_writeback.h

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-media@vger.kernel.org
Subject: [PATCH v7 00/18] R-Car DU display writeback support
Date: Mon, 18 Mar 2019 16:31:03 +0200	[thread overview]
Message-ID: <20190318143121.29561-1-laurent.pinchart+renesas@ideasonboard.com> (raw)

Hello everybody,

This is the latest and greatest version of the patch series that
implements display writeback support for the R-Car Gen3 platforms in the
VSP1 and DU drivers. All patches have been reviewed, all comments
incorporated, and the result rebased on top ov v5.1-rc1.

Patches 01/18 to 11/18 prepare the VSP1 driver for writeback support
with all the necessary plumbing, including extensions of the API between
the VSP1 and DU drivers.

The most significant change compared to v6 is the rebase on top of
v5.1-rc1. This was done to ease merging, as the VSP and DU parts would
normally go through different trees. I usually ask Mauro or Dave their
permission to merge the whole series through a single tree, and doing
the same this time I would select the DRM tree given that I hope to get
more DU patches merged in this development cycle. There is no foreseen
conflicting patch for the VSP in v5.2, but if a need arises, I will
them on top of the 11 first patches of this series and send a pull
request to Mauro to avoid conflicts.

Mauro, I plan to send a pull request to Dave by the end of this week, so
if you'd like to have a look at the VSP patches, now would be a good
time :-) It's only driver changes, and they have been reviewed already,
so I don't expect any problem.

Compared to v5 the major change is the usage of chained display lists in
the VSP to disable writeback after one frame, instead of patching the
active display list in memory. This should solve the potential DMA to
released buffer issue that could occur when the frame start interrupt
was delayed after frame end. Patch 06/18 and 07/18 are new in this
version to support usage of chained display pipelines.

Compared to v4 the major change is the move from V4L2 to DRM writeback
connectors for the userspace API. This has caused a few issues with
writeback support to be uncovered, and they are addressed by patches
12/18 to 14/18.

Patches 15/18 to 17/18 then perform refactoring of the DU driver, to
finally add writeback support in patch 18/18.

The writeback pixel format is restricted to RGB, due to the VSP1
outputting RGB to the display and lacking a separate colour space
conversion unit for writeback. The writeback framebuffer size must match
the active mode, writeback scaling is not supported by the hardware.

Writeback requests being part of atomic commits, they're queued to the
hardware when they are received, become active at the next vblank, and
complete on the following vblank. The display list chaining mechanism
ensures that writeback will be enabled for a single frame only, unless
the next atomic commit contains a separate writeback request.

For convenience patches can be found at

	git://linuxtv.org/pinchartl/media.git drm/du/writeback

Kieran Bingham (1):
  Revert "[media] v4l: vsp1: Supply frames to the DU continuously"

Laurent Pinchart (17):
  media: vsp1: wpf: Fix partition configuration for display pipelines
  media: vsp1: Replace leftover occurrence of fragment with body
  media: vsp1: Fix addresses of display-related registers for VSP-DL
  media: vsp1: Replace the display list internal flag with a flags field
  media: vsp1: Add vsp1_dl_list argument to .configure_stream()
    operation
  media: vsp1: dl: Allow chained display lists for display pipelines
  media: vsp1: wpf: Add writeback support
  media: vsp1: drm: Split RPF format setting to separate function
  media: vsp1: drm: Extend frame completion API to the DU driver
  media: vsp1: drm: Implement writeback support
  drm: writeback: Cleanup job ownership handling when queuing job
  drm: writeback: Fix leak of writeback job
  drm: writeback: Add job prepare and cleanup operations
  drm: rcar-du: Fix rcar_du_crtc structure documentation
  drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure
  drm: rcar-du: vsp: Extract framebuffer (un)mapping to separate
    functions
  drm: rcar-du: Add writeback support for R-Car Gen3

 drivers/gpu/drm/arm/malidp_mw.c             |   3 +-
 drivers/gpu/drm/drm_atomic_helper.c         |  11 +
 drivers/gpu/drm/drm_atomic_state_helper.c   |   4 +
 drivers/gpu/drm/drm_atomic_uapi.c           |  31 +--
 drivers/gpu/drm/drm_writeback.c             |  73 +++++-
 drivers/gpu/drm/rcar-du/Kconfig             |   4 +
 drivers/gpu/drm/rcar-du/Makefile            |   3 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c      |   7 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h      |   9 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c       |  37 +++
 drivers/gpu/drm/rcar-du/rcar_du_kms.h       |   1 +
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c       | 122 +++++-----
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h       |  17 ++
 drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 243 ++++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_writeback.h |  39 ++++
 drivers/gpu/drm/vc4/vc4_txp.c               |   2 +-
 drivers/media/platform/vsp1/vsp1_brx.c      |   1 +
 drivers/media/platform/vsp1/vsp1_clu.c      |   1 +
 drivers/media/platform/vsp1/vsp1_dl.c       |  84 ++++---
 drivers/media/platform/vsp1/vsp1_dl.h       |   6 +-
 drivers/media/platform/vsp1/vsp1_drm.c      |  94 +++++---
 drivers/media/platform/vsp1/vsp1_drm.h      |   2 +-
 drivers/media/platform/vsp1/vsp1_entity.c   |   3 +-
 drivers/media/platform/vsp1/vsp1_entity.h   |   7 +-
 drivers/media/platform/vsp1/vsp1_hgo.c      |   1 +
 drivers/media/platform/vsp1/vsp1_hgt.c      |   1 +
 drivers/media/platform/vsp1/vsp1_hsit.c     |   1 +
 drivers/media/platform/vsp1/vsp1_lif.c      |   1 +
 drivers/media/platform/vsp1/vsp1_lut.c      |   1 +
 drivers/media/platform/vsp1/vsp1_regs.h     |   6 +-
 drivers/media/platform/vsp1/vsp1_rpf.c      |   1 +
 drivers/media/platform/vsp1/vsp1_rwpf.h     |   1 +
 drivers/media/platform/vsp1/vsp1_sru.c      |   1 +
 drivers/media/platform/vsp1/vsp1_uds.c      |   1 +
 drivers/media/platform/vsp1/vsp1_uif.c      |   1 +
 drivers/media/platform/vsp1/vsp1_video.c    |  16 +-
 drivers/media/platform/vsp1/vsp1_wpf.c      |  83 +++++--
 include/drm/drm_modeset_helper_vtables.h    |   7 +
 include/drm/drm_writeback.h                 |  30 ++-
 include/media/vsp1.h                        |  19 +-
 40 files changed, 775 insertions(+), 200 deletions(-)
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_writeback.c
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_writeback.h

-- 
Regards,

Laurent Pinchart

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

             reply	other threads:[~2019-03-18 14:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 14:31 Laurent Pinchart [this message]
2019-03-18 14:31 ` [PATCH v7 00/18] R-Car DU display writeback support Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 01/18] Revert "[media] v4l: vsp1: Supply frames to the DU continuously" Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 02/18] media: vsp1: wpf: Fix partition configuration for display pipelines Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 03/18] media: vsp1: Replace leftover occurrence of fragment with body Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 04/18] media: vsp1: Fix addresses of display-related registers for VSP-DL Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 05/18] media: vsp1: Replace the display list internal flag with a flags field Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 06/18] media: vsp1: Add vsp1_dl_list argument to .configure_stream() operation Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 07/18] media: vsp1: dl: Allow chained display lists for display pipelines Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 08/18] media: vsp1: wpf: Add writeback support Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 09/18] media: vsp1: drm: Split RPF format setting to separate function Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 10/18] media: vsp1: drm: Extend frame completion API to the DU driver Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 11/18] media: vsp1: drm: Implement writeback support Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 12/18] drm: writeback: Cleanup job ownership handling when queuing job Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 13/18] drm: writeback: Fix leak of writeback job Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 14/18] drm: writeback: Add job prepare and cleanup operations Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 15/18] drm: rcar-du: Fix rcar_du_crtc structure documentation Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 16/18] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 17/18] drm: rcar-du: vsp: Extract framebuffer (un)mapping to separate functions Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:31 ` [PATCH v7 18/18] drm: rcar-du: Add writeback support for R-Car Gen3 Laurent Pinchart
2019-03-18 14:31   ` Laurent Pinchart
2019-03-18 14:46 ` [PATCH v7 00/18] R-Car DU display writeback support Mauro Carvalho Chehab
2019-03-18 14:46   ` Mauro Carvalho Chehab

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=20190318143121.29561-1-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab+samsung@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.