drm/vkms: Introduces writeback support

Submitted by Rodrigo Siqueira on June 6, 2019, 10:40 p.m.

Details

Reviewer None
Submitted June 6, 2019, 10:40 p.m.
Last Updated June 26, 2019, 1:39 a.m.
Revision 3

Cover Letter(s)

Revision 1
      This patchset introduces the writeback connector to vkms. The first
patch is required for enabling the virtual encoder to be compatible with
the crtc when we have multiple encoders. The second patch adds the
required implementation to enable writeback in the vkms. With this
patchset, vkms can successfully pass all the kms_writeback tests from
IGT.

Rodrigo Siqueira (2):
  drm/vkms: Use index instead of 0 in possible crtc
  drm/vkms: Add support for writeback

 drivers/gpu/drm/vkms/Makefile         |   9 +-
 drivers/gpu/drm/vkms/vkms_crtc.c      |   5 +
 drivers/gpu/drm/vkms/vkms_drv.c       |  12 +-
 drivers/gpu/drm/vkms/vkms_drv.h       |  16 ++-
 drivers/gpu/drm/vkms/vkms_output.c    |  12 +-
 drivers/gpu/drm/vkms/vkms_plane.c     |   4 +-
 drivers/gpu/drm/vkms/vkms_writeback.c | 165 ++++++++++++++++++++++++++
 7 files changed, 214 insertions(+), 9 deletions(-)
 create mode 100644 drivers/gpu/drm/vkms/vkms_writeback.c
    
Revision 2
      This patchset introduces the writeback support to vkms. As a pre-work,
the first set of patches separates part of the code inside vkms_crc to a
new file named vkms_composer; this change allows that other parts of the
vkms take advantage of composing functions. Next, there's a patch that
enables the virtual encoder to be compatible with the crtc when we have
multiple encoders. The final patch adds the required implementation to
enable writeback in the vkms. With this patchset, vkms can successfully
pass all the kms_writeback tests from IGT.

Note: This patchset depends on Daniel's rework of CRC, see it at
https://patchwork.freedesktop.org/series/61737/

Rodrigo Siqueira (5):
  drm/vkms: Move functions from vkms_crc to vkms_composer
  drm/vkms: Rename crc_enabled to composer_enabled
  drm/vkms: Rename vkms_crc_data to vkms_data
  drm/vkms: Use index instead of 0 in possible crtc
  drm/vkms: Add support for writeback

 drivers/gpu/drm/vkms/Makefile         |  10 +-
 drivers/gpu/drm/vkms/vkms_composer.c  |  69 +++++++++++
 drivers/gpu/drm/vkms/vkms_composer.h  |  12 ++
 drivers/gpu/drm/vkms/vkms_crc.c       |  81 ++-----------
 drivers/gpu/drm/vkms/vkms_crtc.c      |   2 +-
 drivers/gpu/drm/vkms/vkms_drv.c       |   9 +-
 drivers/gpu/drm/vkms/vkms_drv.h       |  18 ++-
 drivers/gpu/drm/vkms/vkms_output.c    |  12 +-
 drivers/gpu/drm/vkms/vkms_plane.c     |  40 +++----
 drivers/gpu/drm/vkms/vkms_writeback.c | 166 ++++++++++++++++++++++++++
 10 files changed, 315 insertions(+), 104 deletions(-)
 create mode 100644 drivers/gpu/drm/vkms/vkms_composer.c
 create mode 100644 drivers/gpu/drm/vkms/vkms_composer.h
 create mode 100644 drivers/gpu/drm/vkms/vkms_writeback.c
    
Revision 3
      This is the V3 version of a series that introduces the writeback support
to vkms. As a result of the previous review, this patchset can be seen
in three parts: make vkms able to support multiple connector, pre-work
for vkms, and the vkms implementation. Follows the details:

* First part: The first patch of this series is a fix that enables vkms to
accept new connectors, such as writeback connector.

* Second part: The second part of this patchset starts on patch 02 and
finish on patch 04; basically it is a pre-work that aims to make vkms
composer operations a little bit more generic. These patches update the
CRC files and function to make it work as a composer; it also
centralizes the vkms framebuffer operations. Additionally, these changes
enable the composer to use the writeback framebuffer instead of creating
a copy.

* Third part: The final patch enables the support for writeback in vkms.

With this patchset, vkms can successfully pass all the kms_writeback
tests from IGT.

Note: Most of the changes in the V3 was suggested by Daniel Vetter as
can be seen at the link
https://patchwork.freedesktop.org/patch/311844/?series=61738&rev=2

Note: This patchset depends on Daniel's rework of CRC, see it at
https://patchwork.freedesktop.org/series/61737/

Rodrigo Siqueira (5):
  drm/vkms: Avoid assigning 0 for possible_crtc
  drm/vkms: Rename vkms_crc.c into vkms_composer.c
  drm/vkms: Decouple crc operations from composer
  drm/vkms: Compute CRC without change input data
  drm/vkms: Add support for writeback

 drivers/gpu/drm/vkms/Makefile                 |   9 +-
 .../drm/vkms/{vkms_crc.c => vkms_composer.c}  | 174 ++++++++++--------
 drivers/gpu/drm/vkms/vkms_crtc.c              |  30 +--
 drivers/gpu/drm/vkms/vkms_drv.c               |  10 +-
 drivers/gpu/drm/vkms/vkms_drv.h               |  40 ++--
 drivers/gpu/drm/vkms/vkms_output.c            |  16 +-
 drivers/gpu/drm/vkms/vkms_plane.c             |  40 ++--
 drivers/gpu/drm/vkms/vkms_writeback.c         | 141 ++++++++++++++
 8 files changed, 331 insertions(+), 129 deletions(-)
 rename drivers/gpu/drm/vkms/{vkms_crc.c => vkms_composer.c} (51%)
 create mode 100644 drivers/gpu/drm/vkms/vkms_writeback.c
    

Revisions