dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>, Iago Toral <itoral@igalia.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, kernel-dev@igalia.com,
	"Maíra Canal" <mcanal@igalia.com>
Subject: [PATCH 0/5] drm/v3d: Enable Super Pages
Date: Mon, 11 Mar 2024 07:05:57 -0300	[thread overview]
Message-ID: <20240311100959.205545-1-mcanal@igalia.com> (raw)

This series introduces support for super pages in V3D. The V3D MMU has support
for 1MB pages, called super pages, which is currently not used. Therefore,
this patchset has the intention to enable super pages in V3D. The advantage of
enabling super pages size is that if any entry for a page within a super page
is cached in the MMU, it will be used for translation of all virtual addresses
in the range of that super pages without requiring fetching any other entries.

Super pages essentially means a slightly better performance for users,
especially in applications with high memory requirements (e.g. applications
that uses multiple large BOs).

Using a Raspberry Pi 4 (with a PAGE_SIZE=4KB downstream kernel), when running
traces from multiple applications, we were able to see the following
improvements:

fps_avg  helped:  warzone2100.70secs.1024x768.trace:                       1.81 -> 2.56 (41.82%)
fps_avg  helped:  warzone2100.30secs.1024x768.trace:                       2.00 -> 2.39 (19.62%)
fps_avg  helped:  quake2-gl1.4-1280x720.trace:                             35.01 -> 36.57 (4.47%)
fps_avg  helped:  supertuxkart-menus_1024x768.trace:                       120.75 -> 125.50 (3.93%)
fps_avg  helped:  quake2-gles3-1280x720.trace:                             62.69 -> 64.29 (2.55%)
fps_avg  helped:  ue4_shooter_game_shooting_low_quality_640x480.gfxr:      26.13 -> 26.75 (2.39%)
fps_avg  helped:  vkQuake_capture_frames_1_through_1200_1280x720.gfxr:     60.35 -> 61.36 (1.67%)
fps_avg  helped:  ue4_sun_temple_640x480.gfxr:                             24.60 -> 24.94 (1.40%)
fps_avg  helped:  ue4_shooter_game_shooting_high_quality_640x480.gfxr:     23.07 -> 23.34 (1.15%)
fps_avg  helped:  serious_sam_trace02_1280x720.gfxr:                       47.44 -> 47.74 (0.63%)
fps_avg  helped:  ue4_shooter_game_high_quality_640x480.gfxr:              18.91 -> 19.02 (0.59%)

Using a Raspberry Pi 5 (with a PAGE_SIZE=16KB downstream kernel), when running
traces from multiple applications, we were able to see the following
improvements:

fps_avg  helped:  warzone2100.30secs.1024x768.trace:                       3.60 -> 4.49 (24.72%)
fps_avg  helped:  sponza_demo02_800x600.gfxr:                              46.33 -> 49.34 (6.49%)
fps_avg  helped:  quake3e_capture_frames_1_through_1800_1920x1080.gfxr:    155.70 -> 165.71 (6.43%)
fps_avg  helped:  gl-117-1024x768.trace:                                   31.82 -> 33.85 (6.41%)
fps_avg  helped:  supertuxkart-menus_1024x768.trace:                       287.80 -> 303.80 (5.56%)
fps_avg  helped:  ue4_shooter_game_shooting_low_quality_640x480.gfxr:      45.27 -> 47.30 (4.49%)
fps_avg  helped:  sponza_demo01_800x600.gfxr:                              42.05 -> 43.68 (3.89%)
fps_avg  helped:  supertuxkart-racing_1024x768.trace:                      19.94 -> 20.59 (3.26%)
fps_avg  helped:  vkQuake_capture_frames_1_through_1200_1280x720.gfxr:     135.19 -> 139.45 (3.15%)
fps_avg  helped:  quake2-gles3-1280x720.trace:                             151.71 -> 156.13 (2.92%)
fps_avg  helped:  ue4_shooter_game_high_quality_640x480.gfxr:              30.28 -> 31.05 (2.54%)
fps_avg  helped:  rbdoom-3-bfg_640x480.gfxr:                               31.52 -> 32.30 (2.49%)
fps_avg  helped:  quake3e_capture_frames_1800_through_2400_1920x1080.gfxr: 157.29 -> 160.35 (1.94%)
fps_avg  helped:  quake3e-1280x720.trace:                                  230.48 -> 234.51 (1.75%)
fps_avg  helped:  ue4_shooter_game_shooting_high_quality_640x480.gfxr:     49.67 -> 50.46 (1.60%)
fps_avg  helped:  ue4_sun_temple_640x480.gfxr:                             39.70 -> 40.23 (1.34%)

This series also introduces changes in the GEM helpers, in order to enable V3D
to have a separated mountpoint for shmem GEM objects. Any feedback from the
community about the changes in the GEM helpers is welcomed!

Best Regards,
- Maíra

Maíra Canal (5):
  drm/v3d: Fix return if scheduler initialization fails
  drm/gem: Add a mountpoint parameter to drm_gem_object_init()
  drm/v3d: Introduce gemfs
  drm/gem: Create shmem GEM object in a given mountpoint
  drm/v3d: Enable super pages

 drivers/gpu/drm/armada/armada_gem.c           |  2 +-
 drivers/gpu/drm/drm_gem.c                     | 12 ++++-
 drivers/gpu/drm/drm_gem_dma_helper.c          |  2 +-
 drivers/gpu/drm/drm_gem_shmem_helper.c        | 30 +++++++++--
 drivers/gpu/drm/drm_gem_vram_helper.c         |  2 +-
 drivers/gpu/drm/etnaviv/etnaviv_gem.c         |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_gem.c       |  2 +-
 drivers/gpu/drm/gma500/gem.c                  |  2 +-
 drivers/gpu/drm/loongson/lsdc_ttm.c           |  2 +-
 drivers/gpu/drm/mediatek/mtk_drm_gem.c        |  2 +-
 drivers/gpu/drm/msm/msm_gem.c                 |  2 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  2 +-
 drivers/gpu/drm/nouveau/nouveau_prime.c       |  2 +-
 drivers/gpu/drm/omapdrm/omap_gem.c            |  2 +-
 drivers/gpu/drm/qxl/qxl_object.c              |  2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_gem.c   |  2 +-
 drivers/gpu/drm/tegra/gem.c                   |  2 +-
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c |  2 +-
 drivers/gpu/drm/v3d/Makefile                  |  3 +-
 drivers/gpu/drm/v3d/v3d_bo.c                  | 19 ++++++-
 drivers/gpu/drm/v3d/v3d_drv.c                 |  7 +++
 drivers/gpu/drm/v3d/v3d_drv.h                 | 15 +++++-
 drivers/gpu/drm/v3d/v3d_gem.c                 |  6 ++-
 drivers/gpu/drm/v3d/v3d_gemfs.c               | 52 +++++++++++++++++++
 drivers/gpu/drm/v3d/v3d_mmu.c                 | 24 ++++++++-
 drivers/gpu/drm/xen/xen_drm_front_gem.c       |  2 +-
 include/drm/drm_gem.h                         |  3 +-
 include/drm/drm_gem_shmem_helper.h            |  3 ++
 28 files changed, 176 insertions(+), 32 deletions(-)
 create mode 100644 drivers/gpu/drm/v3d/v3d_gemfs.c

--
2.43.0


             reply	other threads:[~2024-03-11 10:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 10:05 Maíra Canal [this message]
2024-03-11 10:05 ` [PATCH 1/5] drm/v3d: Fix return if scheduler initialization fails Maíra Canal
2024-03-12  8:35   ` Iago Toral
2024-03-11 10:05 ` [PATCH 2/5] drm/gem: Add a mountpoint parameter to drm_gem_object_init() Maíra Canal
2024-03-12  8:51   ` Tvrtko Ursulin
2024-03-12  8:59     ` Christian König
2024-03-12  9:30       ` Tvrtko Ursulin
2024-03-12 10:23         ` Christian König
2024-03-12 10:31           ` Tvrtko Ursulin
2024-03-12 10:37             ` Christian König
2024-03-12 13:09               ` Tvrtko Ursulin
2024-03-12 13:48                 ` Christian König
2024-03-18 12:42                   ` Maíra Canal
2024-03-18 13:10                     ` Christian König
2024-03-18 13:28                       ` Maíra Canal
2024-03-18 14:01                         ` Maíra Canal
2024-03-18 14:04                         ` Christian König
2024-03-18 14:24                           ` Maíra Canal
2024-03-18 15:05                             ` Christian König
2024-03-18 15:27                               ` Tvrtko Ursulin
2024-03-11 10:06 ` [PATCH 3/5] drm/v3d: Introduce gemfs Maíra Canal
2024-03-12  8:35   ` Iago Toral
2024-03-12  8:55   ` Tvrtko Ursulin
2024-03-11 10:06 ` [PATCH 4/5] drm/gem: Create shmem GEM object in a given mountpoint Maíra Canal
2024-03-11 10:06 ` [PATCH 5/5] drm/v3d: Enable super pages Maíra Canal
2024-03-12  8:34   ` Iago Toral
2024-03-12 13:41   ` Tvrtko Ursulin
2024-03-12  8:37 ` [PATCH 0/5] drm/v3d: Enable Super Pages Iago Toral

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=20240311100959.205545-1-mcanal@igalia.com \
    --to=mcanal@igalia.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=itoral@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).