From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E01010EAB7 for ; Thu, 27 Apr 2023 06:40:42 +0000 (UTC) Message-ID: <69648412-edb1-373f-77ab-cc1adc59a21d@intel.com> Date: Thu, 27 Apr 2023 12:10:09 +0530 To: =?UTF-8?Q?Zbigniew_Kempczy=c5=84ski?= , References: <20230425154017.374465-1-zbigniew.kempczynski@intel.com> <20230425154017.374465-16-zbigniew.kempczynski@intel.com> Content-Language: en-US From: "Modem, Bhanuprakash" In-Reply-To: <20230425154017.374465-16-zbigniew.kempczynski@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t v6 15/15] tests/kms_big_fb: Deduce region for xe framebuffer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Tue-25-04-2023 09:10 pm, Zbigniew Kempczyński wrote: > 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 Reviewed-by: Bhanuprakash Modem > Signed-off-by: Zbigniew Kempczyński > --- > 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 a29a05a282..a0d5ef7301 100644 > --- a/tests/i915/kms_big_fb.c > +++ b/tests/i915/kms_big_fb.c > @@ -28,6 +28,7 @@ > #include > > #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); >