[igt-dev] [i-g-t V3 15/45] tests/kms_big_fb: Deduce region for xe framebuffer
B, Jeevan
jeevan.b at intel.com
Thu Apr 27 06:14:38 UTC 2023
> -----Original Message-----
> From: B, Jeevan
> Sent: Thursday, April 27, 2023 11:43 AM
> To: Bhanuprakash Modem <bhanuprakash.modem at intel.com>; igt-
> dev at lists.freedesktop.org
> Subject: RE: [igt-dev] [i-g-t V3 15/45] tests/kms_big_fb: Deduce region for xe
> framebuffer
>
>
>
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of
> > Bhanuprakash Modem
> > Sent: Wednesday, April 26, 2023 5:17 PM
> > To: igt-dev at lists.freedesktop.org
> > Subject: [igt-dev] [i-g-t V3 15/45] tests/kms_big_fb: Deduce region
> > for xe framebuffer
> >
> > From: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> >
> > For discrete framebuffer reside on vram/device memory and for
> > integrated on system memory. Due to xe requirement regarding size and
> > alignment on different memory regions during intel_buf creation pass
> > deduced memory region.
> >
> LGTM
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Reviewed-by: Jeevan B <jeevan.b at intel.com>
>
> > ---
> > tests/i915/kms_big_fb.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c index
> > a29a05a28..a0d5ef730 100644
> > --- a/tests/i915/kms_big_fb.c
> > +++ b/tests/i915/kms_big_fb.c
> > @@ -28,6 +28,7 @@
> > #include <string.h>
> >
> > #include "i915/gem_create.h"
> > +#include "xe/xe_query.h"
> >
> > IGT_TEST_DESCRIPTION("Test big framebuffers");
> >
> > @@ -62,7 +63,10 @@ static struct intel_buf *init_buf(data_t *data,
> > const char *buf_name)
> > {
> > struct intel_buf *buf;
> > + enum intel_driver driver = buf_ops_get_driver(data->bops);
> > uint32_t name, handle, tiling, stride, width, height, bpp, size;
> > + uint64_t region = driver == INTEL_DRIVER_XE ?
> > + vram_if_possible(data->drm_fd, 0) : -1;
> >
> > igt_assert_eq(fb->offsets[0], 0);
> >
> > @@ -75,8 +79,10 @@ static struct intel_buf *init_buf(data_t *data,
> >
> > name = gem_flink(data->drm_fd, fb->gem_handle);
> > handle = gem_open(data->drm_fd, name);
> > - buf = intel_buf_create_using_handle(data->bops, handle, width, height,
> > - bpp, 0, tiling, 0);
> > + buf = intel_buf_create_full(data->bops, handle, width, height,
> > + bpp, 0, tiling, 0, size, 0,
> > + region);
> > +
> > intel_buf_set_name(buf, buf_name);
> > intel_buf_set_ownership(buf, true);
> >
> > --
> > 2.40.0
More information about the igt-dev
mailing list