diff options
author | Ville Syrjälä <[email protected]> | 2024-02-03 00:43:25 +0200 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2024-02-07 01:58:40 +0200 |
commit | 3c0fa9f4ec220d4a6fac1b80c231c38cf6d0934d (patch) | |
tree | 8a44a2ee0f8af7243df62c4bbadb786a207aade6 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 2a2e2f5f48278b9c4b96bb28997dd8e61932a0de (diff) |
drm/i915: Use struct resource for memory region IO as well
mem->region is a struct resource, but mem->io_start and
mem->io_size are not for whatever reason. Let's unify this
and convert the io stuff into a struct resource as well.
Should make life a little less annoying when you don't have
juggle between two different approaches all the time.
Mostly done using cocci (with manual tweaks at all the
places where we mutate io_size by hand):
@@
struct intel_memory_region *M;
expression START, SIZE;
@@
- M->io_start = START;
- M->io_size = SIZE;
+ M->io = DEFINE_RES_MEM(START, SIZE);
@@
struct intel_memory_region *M;
@@
- M->io_start
+ M->io.start
@@
struct intel_memory_region M;
@@
- M.io_start
+ M.io.start
@@
expression M;
@@
- M->io_size
+ resource_size(&M->io)
@@
expression M;
@@
- M.io_size
+ resource_size(&M.io)
Reviewed-by: Andrzej Hajda <[email protected]>
Acked-by: Nirmoy Das <[email protected]>
Tested-by: Paz Zcharya <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions