summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2020-09-11 10:07:44 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2020-09-16 14:51:24 +0100
commit38d5e4b4c2ae375ac90b3e92082d06f9ba1de80c (patch)
tree7709e39d7a6c7aa2652e0297b07c9322c4730fcb
parentfd4705436757d3403e7801adfa39791c6939e555 (diff)
tools/intel_residency: adopt intel_residency to use bufops
IGT draw functions remove libdrm dependency so migrate to new API. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tools/intel_residency.c10
1 files 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) {