Skip to content

v3d: Perfmon cleanup

Tvrtko Ursulin dri-devel stable 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 1 replyIn review
  2. v311 patches 9 repliesSuperseded
  3. v212 patches 15 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v112 patches4 repliesSuperseded

Changes in v4 from the cover letter

* Fixed more rebase errors and details in commit messages.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11drm/v3d: Prevent out of bounds access in performance query extensionsdrivers/gpu/drm/v3d/v3d_submit.c+6 -00 replies
2/11drm/v3d: Fix potential memory leak in the timestamp extensiondrivers/gpu/drm/v3d/v3d_drv.h drivers/gpu/drm/v3d/v3d_sched.c drivers/gpu/drm/v3d/v3d_submit.c+48 -190 replies
3/11drm/v3d: Fix potential memory leak in the performance extensiondrivers/gpu/drm/v3d/v3d_drv.h drivers/gpu/drm/v3d/v3d_sched.c drivers/gpu/drm/v3d/v3d_submit.c+50 -260 replies
4/11drm/v3d: Validate passed in drm syncobj handles in the timestamp extensiondrivers/gpu/drm/v3d/v3d_submit.c+12 -00 replies
5/11drm/v3d: Validate passed in drm syncobj handles in the performance extensiondrivers/gpu/drm/v3d/v3d_submit.c+8 -00 replies
6/11drm/v3d: Move part of copying of reset/copy performance extension to a helperdrivers/gpu/drm/v3d/v3d_submit.c+68 -840 replies
7/11drm/v3d: Size the kperfmon_ids array at runtimedrivers/gpu/drm/v3d/v3d_drv.h drivers/gpu/drm/v3d/v3d_sched.c drivers/gpu/drm/v3d/v3d_submit.c+15 -120 replies
8/11drm/v3d: Do not use intermediate storage when copying performance query resultsdrivers/gpu/drm/v3d/v3d_sched.c+37 -220 replies
9/11drm/v3d: Move perfmon init completely into own unitdrivers/gpu/drm/v3d/v3d_drv.c drivers/gpu/drm/v3d/v3d_drv.h drivers/gpu/drm/v3d/v3d_perfmon.c +1 more+40 -350 replies
10/11drm/v3d: Prefer get_user for scalar typesdrivers/gpu/drm/v3d/v3d_submit.c+5 -50 replies
11/11drm/v3d: Add some local variables in queries/extensionsdrivers/gpu/drm/v3d/v3d_submit.c+49 -390 replies

Reviews trailers per patch

10 of 11 patches have a Reviewed-by or Acked-by.

PatchIago Toral QuirogaMaíra Canal
1/11R-b R-b
2/11R-b
3/11
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/11] v3d: Perfmon cleanup

From: Tvrtko Ursulin <[email protected]>

When we had to quickly deal with a tree build issue via merging 792d16b5375d ("drm/v3d: Move perfmon init completely into own unit"), we promised to follow up with a nicer solution.

As in the process of eliminating the hardcoded defines we have discovered a few issues in handling of corner cases and userspace input validation, the fix has turned into a larger series, but hopefully the end result is a justifiable cleanup.

v2:
* Re-order the patches so fixes come first while last three are optional cleanups.

v3:
* Fixed a bunch of rebase errors I made when re-ordering patches from v1 to v2.
* Dropped the double underscore from __v3d_timestamp_query_info_free.
* Added v3d prefix to v3d_copy_query_info.
* Renamed qinfo to query_info.
* Fixed some spelling errors and bad patch references.
* Added mention to get_user to one commit message.
* Dropped one patch from the series which became redundant due other re-ordering.
* Re-ordered last two patches with the view of dropping the last.

v4:
* Fixed more rebase errors and details in commit messages.

Cc Maíra Canal <[email protected]>

Tvrtko Ursulin (11):
drm/v3d: Prevent out of bounds access in performance query extensions drm/v3d: Fix potential memory leak in the timestamp extension drm/v3d: Fix potential memory leak in the performance extension drm/v3d: Validate passed in drm syncobj handles in the timestamp
extension
drm/v3d: Validate passed in drm syncobj handles in the performance
extension
drm/v3d: Move part of copying of reset/copy performance extension to a
helper
drm/v3d: Size the kperfmon_ids array at runtime
drm/v3d: Do not use intermediate storage when copying performance
query results
drm/v3d: Move perfmon init completely into own unit drm/v3d: Prefer get_user for scalar types
drm/v3d: Add some local variables in queries/extensions

 drivers/gpu/drm/v3d/v3d_drv.c                 |   9 +-
 drivers/gpu/drm/v3d/v3d_drv.h                 |  16 +-
 drivers/gpu/drm/v3d/v3d_perfmon.c             |  44 +--
 .../gpu/drm/v3d/v3d_performance_counters.h    |  16 +-
 drivers/gpu/drm/v3d/v3d_sched.c               | 105 +++++--
 drivers/gpu/drm/v3d/v3d_submit.c              | 294 +++++++++++-------
 6 files changed, 290 insertions(+), 194 deletions(-)
Signature · 1 line
2.44.0