All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@linux.ie, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, noralf@tronnes.org,
	drawat.floss@gmail.com, airlied@redhat.com, kraxel@redhat.com,
	david@lechnology.com, sam@ravnborg.org, javierm@redhat.com,
	kernel@amanoeldawod.com, dirty.ice.hu@gmail.com,
	michael+lkml@stapelberg.ch, aros@gmx.com,
	joshua@stroblindustries.com, arnd@arndb.de
Cc: dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 0/9] drm/simpledrm: Enable damage clips and virtual screens
Date: Fri, 22 Oct 2021 15:28:20 +0200	[thread overview]
Message-ID: <20211022132829.7697-1-tzimmermann@suse.de> (raw)

Enable FB_DAMAGE_CLIPS with simpledrm for improved performance and/or
less overhead. With this in place, add support for virtual screens
(i.e., framebuffers that are larger than the display resolution). This
also enables fbdev panning and page flipping.

After the discussion and bug fixing wrt to fbdev overallocation, I
decided to add full support for this to simpledrm. Patches #1 to #5
change the format-helper functions accordingly. Destination buffers
are now clipped by the caller and all functions support a similar
feature set. This has some fallout in various drivers.

Patch #6 change fbdev emulation to support overallocation with
shadow buffers, even if the hardware buffer would be too small.

Patch #7 and #8 update simpledrm to enable damage clipping and virtual
screen sizes. Both feature go hand in hand, sort of. For shadow-
buffered planes, the DRM framebuffer lives in system memory. So the
maximum size of the virtual screen is somewhat arbitrary. We add two
constants for resonable maximum width and height of 4096 each.

Patch #9 adds documentation and a TODO item.

Tested with simpledrm. I also ran the recently posted fbdev panning
tests to make sure that the fbdev overallocation works correctly. [1]

[1] https://lists.freedesktop.org/archives/igt-dev/2021-October/036642.html

Thomas Zimmermann (9):
  drm/format-helper: Export drm_fb_clip_offset()
  drm/format-helper: Rework format-helper memcpy functions
  drm/format-helper: Add destination-buffer pitch to drm_fb_swab()
  drm/format-helper: Rework format-helper conversion functions
  drm/format-helper: Streamline blit-helper interface
  drm/fb-helper: Allocate shadow buffer of surface height
  drm/simpledrm: Enable FB_DAMAGE_CLIPS property
  drm/simpledrm: Support virtual screen sizes
  drm: Clarify semantics of struct
    drm_mode_config.{min,max}_{width,height}

 Documentation/gpu/todo.rst                  |  15 ++
 drivers/gpu/drm/drm_fb_helper.c             |   2 +-
 drivers/gpu/drm/drm_format_helper.c         | 236 ++++++++++----------
 drivers/gpu/drm/drm_mipi_dbi.c              |   6 +-
 drivers/gpu/drm/gud/gud_pipe.c              |  14 +-
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c |   5 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c      |   4 +-
 drivers/gpu/drm/tiny/cirrus.c               |  24 +-
 drivers/gpu/drm/tiny/repaper.c              |   2 +-
 drivers/gpu/drm/tiny/simpledrm.c            |  41 +++-
 drivers/gpu/drm/tiny/st7586.c               |   2 +-
 include/drm/drm_format_helper.h             |  58 ++---
 include/drm/drm_gem_atomic_helper.h         |  18 ++
 include/drm/drm_mode_config.h               |  13 ++
 14 files changed, 254 insertions(+), 186 deletions(-)

--
2.33.0


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@linux.ie, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, noralf@tronnes.org,
	drawat.floss@gmail.com, airlied@redhat.com, kraxel@redhat.com,
	david@lechnology.com, sam@ravnborg.org, javierm@redhat.com,
	kernel@amanoeldawod.com, dirty.ice.hu@gmail.com,
	michael+lkml@stapelberg.ch, aros@gmx.com,
	joshua@stroblindustries.com, arnd@arndb.de
Cc: linux-hyperv@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: [PATCH 0/9] drm/simpledrm: Enable damage clips and virtual screens
Date: Fri, 22 Oct 2021 15:28:20 +0200	[thread overview]
Message-ID: <20211022132829.7697-1-tzimmermann@suse.de> (raw)

Enable FB_DAMAGE_CLIPS with simpledrm for improved performance and/or
less overhead. With this in place, add support for virtual screens
(i.e., framebuffers that are larger than the display resolution). This
also enables fbdev panning and page flipping.

After the discussion and bug fixing wrt to fbdev overallocation, I
decided to add full support for this to simpledrm. Patches #1 to #5
change the format-helper functions accordingly. Destination buffers
are now clipped by the caller and all functions support a similar
feature set. This has some fallout in various drivers.

Patch #6 change fbdev emulation to support overallocation with
shadow buffers, even if the hardware buffer would be too small.

Patch #7 and #8 update simpledrm to enable damage clipping and virtual
screen sizes. Both feature go hand in hand, sort of. For shadow-
buffered planes, the DRM framebuffer lives in system memory. So the
maximum size of the virtual screen is somewhat arbitrary. We add two
constants for resonable maximum width and height of 4096 each.

Patch #9 adds documentation and a TODO item.

Tested with simpledrm. I also ran the recently posted fbdev panning
tests to make sure that the fbdev overallocation works correctly. [1]

[1] https://lists.freedesktop.org/archives/igt-dev/2021-October/036642.html

Thomas Zimmermann (9):
  drm/format-helper: Export drm_fb_clip_offset()
  drm/format-helper: Rework format-helper memcpy functions
  drm/format-helper: Add destination-buffer pitch to drm_fb_swab()
  drm/format-helper: Rework format-helper conversion functions
  drm/format-helper: Streamline blit-helper interface
  drm/fb-helper: Allocate shadow buffer of surface height
  drm/simpledrm: Enable FB_DAMAGE_CLIPS property
  drm/simpledrm: Support virtual screen sizes
  drm: Clarify semantics of struct
    drm_mode_config.{min,max}_{width,height}

 Documentation/gpu/todo.rst                  |  15 ++
 drivers/gpu/drm/drm_fb_helper.c             |   2 +-
 drivers/gpu/drm/drm_format_helper.c         | 236 ++++++++++----------
 drivers/gpu/drm/drm_mipi_dbi.c              |   6 +-
 drivers/gpu/drm/gud/gud_pipe.c              |  14 +-
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c |   5 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c      |   4 +-
 drivers/gpu/drm/tiny/cirrus.c               |  24 +-
 drivers/gpu/drm/tiny/repaper.c              |   2 +-
 drivers/gpu/drm/tiny/simpledrm.c            |  41 +++-
 drivers/gpu/drm/tiny/st7586.c               |   2 +-
 include/drm/drm_format_helper.h             |  58 ++---
 include/drm/drm_gem_atomic_helper.h         |  18 ++
 include/drm/drm_mode_config.h               |  13 ++
 14 files changed, 254 insertions(+), 186 deletions(-)

--
2.33.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

             reply	other threads:[~2021-10-22 13:28 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 13:28 Thomas Zimmermann [this message]
2021-10-22 13:28 ` [PATCH 0/9] drm/simpledrm: Enable damage clips and virtual screens Thomas Zimmermann
2021-10-22 13:28 ` [PATCH 1/9] drm/format-helper: Export drm_fb_clip_offset() Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-23  7:49   ` Sam Ravnborg
2021-10-23  7:49     ` Sam Ravnborg
2021-11-01  8:43     ` Thomas Zimmermann
2021-11-01  8:43       ` Thomas Zimmermann
2021-11-01  8:43       ` Thomas Zimmermann
2021-10-24  8:25   ` Noralf Trønnes
2021-10-24  8:25     ` Noralf Trønnes
2021-10-22 13:28 ` [PATCH 2/9] drm/format-helper: Rework format-helper memcpy functions Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24  8:25   ` Noralf Trønnes
2021-10-24  8:25     ` Noralf Trønnes
2021-10-22 13:28 ` [PATCH 3/9] drm/format-helper: Add destination-buffer pitch to drm_fb_swab() Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24  8:33   ` Noralf Trønnes
2021-10-24  8:33     ` Noralf Trønnes
2021-10-22 13:28 ` [PATCH 4/9] drm/format-helper: Rework format-helper conversion functions Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24 11:32   ` Noralf Trønnes
2021-10-24 11:32     ` Noralf Trønnes
2021-11-01 13:38     ` Thomas Zimmermann
2021-11-01 13:38       ` Thomas Zimmermann
2021-11-01 13:38       ` Thomas Zimmermann
2021-10-22 13:28 ` [PATCH 5/9] drm/format-helper: Streamline blit-helper interface Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24 14:59   ` Noralf Trønnes
2021-10-24 14:59     ` Noralf Trønnes
2021-10-22 13:28 ` [PATCH 6/9] drm/fb-helper: Allocate shadow buffer of surface height Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24 15:10   ` Noralf Trønnes
2021-10-24 15:10     ` Noralf Trønnes
2021-10-22 13:28 ` [PATCH 7/9] drm/simpledrm: Enable FB_DAMAGE_CLIPS property Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-24 15:20   ` Noralf Trønnes
2021-10-24 15:20     ` Noralf Trønnes
2021-11-01  8:56     ` Thomas Zimmermann
2021-11-01  8:56       ` Thomas Zimmermann
2021-11-01  8:56       ` Thomas Zimmermann
2021-10-22 13:28 ` [PATCH 8/9] drm/simpledrm: Support virtual screen sizes Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-22 13:28 ` [PATCH 9/9] drm: Clarify semantics of struct drm_mode_config.{min,max}_{width,height} Thomas Zimmermann
2021-10-22 13:28   ` [PATCH 9/9] drm: Clarify semantics of struct drm_mode_config.{min, max}_{width, height} Thomas Zimmermann
2021-10-22 13:28   ` Thomas Zimmermann
2021-10-23  7:44 ` [PATCH 0/9] drm/simpledrm: Enable damage clips and virtual screens Sam Ravnborg
2021-10-23  7:44   ` Sam Ravnborg

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=20211022132829.7697-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=arnd@arndb.de \
    --cc=aros@gmx.com \
    --cc=daniel@ffwll.ch \
    --cc=david@lechnology.com \
    --cc=dirty.ice.hu@gmail.com \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=joshua@stroblindustries.com \
    --cc=kernel@amanoeldawod.com \
    --cc=kraxel@redhat.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michael+lkml@stapelberg.ch \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=virtualization@lists.linux-foundation.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.