[igt-dev] [PATCH i-g-t v32 28/39] tools/intel_residency: adopt intel_residency to use bufops
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Fri Aug 28 13:13:43 UTC 2020
IGT draw functions remove libdrm dependency so migrate to new API.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
tools/intel_residency.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tools/intel_residency.c b/tools/intel_residency.c
index bfab40da..736fca0d 100644
--- a/tools/intel_residency.c
+++ b/tools/intel_residency.c
@@ -82,7 +82,7 @@ struct {
int fd;
drmModeResPtr res;
drmModeConnectorPtr connectors[MAX_CONNECTORS];
- drm_intel_bufmgr *bufmgr;
+ struct buf_ops *bops;
} drm;
struct {
@@ -191,16 +191,14 @@ static void setup_drm(void)
drm.connectors[i] = drmModeGetConnector(drm.fd,
drm.res->connectors[i]);
- drm.bufmgr = drm_intel_bufmgr_gem_init(drm.fd, 4096);
- igt_assert(drm.bufmgr);
- drm_intel_bufmgr_gem_enable_reuse(drm.bufmgr);
+ drm.bops = buf_ops_create(drm.fd);
}
static void teardown_drm(void)
{
int i;
- drm_intel_bufmgr_destroy(drm.bufmgr);
+ buf_ops_destroy(drm.bops);
for (i = 0; i < drm.res->count_connectors; i++)
drmModeFreeConnector(drm.connectors[i]);
@@ -238,7 +236,7 @@ static void draw_rect(struct igt_fb *fb, enum igt_draw_method method,
igt_assert(false);
}
- igt_draw_rect_fb(drm.fd, drm.bufmgr, NULL, fb, method, clip.x1, clip.y1,
+ igt_draw_rect_fb(drm.fd, drm.bops, 0, fb, method, clip.x1, clip.y1,
clip.x2 - clip.x1, clip.y2 - clip.y1, color);
if (method == IGT_DRAW_MMAP_WC) {
--
2.26.0
More information about the igt-dev
mailing list