All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/11] Introduce writeback connectors
@ 2016-10-11 14:53 ` Brian Starkey
  0 siblings, 0 replies; 70+ messages in thread
From: Brian Starkey @ 2016-10-11 14:53 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, linux-media, liviu.dudau, robdclark, hverkuil,
	eric, ville.syrjala, daniel

Hi,

This RFC series introduces a new connector type:
 DRM_MODE_CONNECTOR_WRITEBACK
It is a follow-on from a previous discussion: [1]

Writeback connectors are used to expose the memory writeback engines
found in some display controllers, which can write a CRTC's
composition result to a memory buffer.
This is useful e.g. for testing, screen-recording, screenshots,
wireless display, display cloning, memory-to-memory composition.

Patches 1-7 include the core framework changes required, and patches
8-11 implement a writeback connector for the Mali-DP writeback engine.
The Mali-DP patches depend on this other series: [2].

The connector is given the FB_ID property for the output framebuffer,
and two new read-only properties: PIXEL_FORMATS and
PIXEL_FORMATS_SIZE, which expose the supported framebuffer pixel
formats of the engine.

The EDID property is not exposed for writeback connectors.

Writeback connector usage:
--------------------------
Due to connector routing changes being treated as "full modeset"
operations, any client which wishes to use a writeback connector
should include the connector in every modeset. The writeback will not
actually become active until a framebuffer is attached.

The writeback itself is enabled by attaching a framebuffer to the
FB_ID property of the connector. The driver must then ensure that the
CRTC content of that atomic commit is written into the framebuffer.

The writeback works in a one-shot mode with each atomic commit. This
prevents the same content from being written multiple times.
In some cases (front-buffer rendering) there might be a desire for
continuous operation - I think a property could be added later for
this kind of control.

Writeback can be disabled by setting FB_ID to zero.

Known issues:
-------------
 * I'm not sure what "DPMS" should mean for writeback connectors.
   It could be used to disable writeback (even when a framebuffer is
   attached), or it could be hidden entirely (which would break the
   legacy DPMS call for writeback connectors).
 * With Daniel's recent re-iteration of the userspace API rules, I
   fully expect to provide some userspace code to support this. The
   question is what, and where? We want to use writeback for testing,
   so perhaps some tests in igt is suitable.
 * Documentation. Probably some portion of this cover letter needs to
   make it into Documentation/
 * Synchronisation. Our hardware will finish the writeback by the next
   vsync. I've not implemented fence support here, but it would be an
   obvious addition.

See Also:
---------
[1] https://lists.freedesktop.org/archives/dri-devel/2016-July/113197.html
[2] https://lists.freedesktop.org/archives/dri-devel/2016-October/120486.html

I welcome any comments, especially if this approach does/doesn't fit
well with anyone else's hardware.

Thanks,

-Brian

---

Brian Starkey (10):
  drm: add writeback connector type
  drm/fb-helper: skip writeback connectors
  drm: extract CRTC/plane disable from drm_framebuffer_remove
  drm: add __drm_framebuffer_remove_atomic
  drm: add fb to connector state
  drm: expose fb_id property for writeback connectors
  drm: add writeback-connector pixel format properties
  drm: mali-dp: rename malidp_input_format
  drm: mali-dp: add RGB writeback formats for DP550/DP650
  drm: mali-dp: add writeback connector

Liviu Dudau (1):
  drm: mali-dp: Add support for writeback on DP550/DP650

 drivers/gpu/drm/arm/Makefile        |    1 +
 drivers/gpu/drm/arm/malidp_crtc.c   |   10 ++
 drivers/gpu/drm/arm/malidp_drv.c    |   25 +++-
 drivers/gpu/drm/arm/malidp_drv.h    |    5 +
 drivers/gpu/drm/arm/malidp_hw.c     |  104 ++++++++++----
 drivers/gpu/drm/arm/malidp_hw.h     |   27 +++-
 drivers/gpu/drm/arm/malidp_mw.c     |  268 +++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/arm/malidp_planes.c |    8 +-
 drivers/gpu/drm/arm/malidp_regs.h   |   15 ++
 drivers/gpu/drm/drm_atomic.c        |   40 ++++++
 drivers/gpu/drm/drm_atomic_helper.c |    4 +
 drivers/gpu/drm/drm_connector.c     |   79 ++++++++++-
 drivers/gpu/drm/drm_crtc.c          |   14 +-
 drivers/gpu/drm/drm_fb_helper.c     |    4 +
 drivers/gpu/drm/drm_framebuffer.c   |  249 ++++++++++++++++++++++++++++----
 drivers/gpu/drm/drm_ioctl.c         |    7 +
 include/drm/drmP.h                  |    2 +
 include/drm/drm_atomic.h            |    3 +
 include/drm/drm_connector.h         |   15 ++
 include/drm/drm_crtc.h              |   12 ++
 include/uapi/drm/drm.h              |   10 ++
 include/uapi/drm/drm_mode.h         |    1 +
 22 files changed, 830 insertions(+), 73 deletions(-)
 create mode 100644 drivers/gpu/drm/arm/malidp_mw.c

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2016-10-17  6:24 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 14:53 [RFC PATCH 00/11] Introduce writeback connectors Brian Starkey
2016-10-11 14:53 ` Brian Starkey
2016-10-11 14:53 ` [RFC PATCH 01/11] drm: Add writeback connector type Brian Starkey
2016-10-11 14:53   ` Brian Starkey
2016-10-11 14:53 ` [RFC PATCH 02/11] drm/fb-helper: Skip writeback connectors Brian Starkey
2016-10-11 14:53   ` Brian Starkey
2016-10-11 15:44   ` Daniel Vetter
2016-10-11 15:44     ` Daniel Vetter
2016-10-11 16:47     ` Brian Starkey
2016-10-11 16:47       ` Brian Starkey
2016-10-11 16:56       ` Daniel Vetter
2016-10-11 16:56         ` Daniel Vetter
2016-10-11 14:54 ` [RFC PATCH 03/11] drm: Extract CRTC/plane disable from drm_framebuffer_remove Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 04/11] drm: Add __drm_framebuffer_remove_atomic Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 15:51   ` Daniel Vetter
2016-10-11 15:51     ` Daniel Vetter
2016-10-11 14:54 ` [RFC PATCH 05/11] drm: Add fb to connector state Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 06/11] drm: Expose fb_id property for writeback connectors Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 07/11] drm: Add writeback-connector pixel format properties Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 15:48   ` Daniel Vetter
2016-10-11 15:48     ` Daniel Vetter
2016-10-11 14:54 ` [RFC PATCH 08/11] drm: mali-dp: Rename malidp_input_format Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 09/11] drm: mali-dp: Add RGB writeback formats for DP550/DP650 Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 10/11] drm: mali-dp: Add support for writeback on DP550/DP650 Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 14:54 ` [RFC PATCH 11/11] drm: mali-dp: Add writeback connector Brian Starkey
2016-10-11 14:54   ` Brian Starkey
2016-10-11 15:43 ` [RFC PATCH 00/11] Introduce writeback connectors Daniel Vetter
2016-10-11 15:43   ` Daniel Vetter
2016-10-11 16:43   ` Brian Starkey
2016-10-11 16:43     ` Brian Starkey
2016-10-11 17:01     ` Daniel Vetter
2016-10-11 17:01       ` Daniel Vetter
2016-10-11 19:44       ` Brian Starkey
2016-10-11 19:44         ` Brian Starkey
2016-10-11 20:02         ` Daniel Vetter
2016-10-11 20:02           ` Daniel Vetter
2016-10-11 21:24           ` Brian Starkey
2016-10-11 21:24             ` Brian Starkey
2016-10-12  6:56             ` Daniel Vetter
2016-10-12  6:56               ` Daniel Vetter
2016-10-13  9:47               ` [PATCH] drm: atomic: Clarify documentation around drm_atomic_crtc_needs_modeset Brian Starkey
2016-10-13 14:54                 ` Alex Deucher
2016-10-13 14:54                   ` Alex Deucher
2016-10-17  6:07                   ` Daniel Vetter
2016-10-17  6:07                     ` Daniel Vetter
2016-10-11 16:25 ` [RFC PATCH 00/11] Introduce writeback connectors Ville Syrjälä
2016-10-11 16:25   ` Ville Syrjälä
2016-10-11 16:29   ` Daniel Vetter
2016-10-11 16:29     ` Daniel Vetter
2016-10-11 19:01 ` Eric Anholt
2016-10-11 19:01   ` Eric Anholt
2016-10-12  7:30   ` Brian Starkey
2016-10-12  7:30     ` Brian Starkey
2016-10-13 17:32     ` Eric Anholt
2016-10-14 10:50 ` Archit Taneja
2016-10-14 10:50   ` Archit Taneja
2016-10-14 12:39   ` Brian Starkey
2016-10-14 12:39     ` Brian Starkey
2016-10-14 12:50     ` Ville Syrjälä
2016-10-14 12:50       ` Ville Syrjälä
2016-10-14 14:56     ` Daniel Vetter
2016-10-14 14:56       ` Daniel Vetter

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.