From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7086A10E02D for ; Tue, 13 Jun 2023 05:59:53 +0000 (UTC) Message-ID: <4f993fe4-0b0c-105b-cb99-50ef67eb3c00@intel.com> Date: Tue, 13 Jun 2023 11:29:34 +0530 Content-Language: en-US To: Kunal Joshi , References: <20230612190134.2902272-1-kunal1.joshi@intel.com> <20230612190134.2902272-3-kunal1.joshi@intel.com> From: "Modem, Bhanuprakash" In-Reply-To: <20230612190134.2902272-3-kunal1.joshi@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t 2/6] RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as of now 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-13-06-2023 12:31 am, Kunal Joshi wrote: > XE doesn't support tiling as of now, so set tiling to linear > > v2: use is_xe_device() instead of static variable (Jouni) > assert if xe device and unsupported tiling method specified > in opt handler (Jouni) > v3: Fix condition in igt_assert > v4: Keep tiling check in igt_require (Bhanu) > v5: Handle opt.tiling elegantly (Bhanu) > > Signed-off-by: Kunal Joshi > --- > tests/i915/kms_frontbuffer_tracking.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c > index c2b99670..61403afb 100644 > --- a/tests/i915/kms_frontbuffer_tracking.c > +++ b/tests/i915/kms_frontbuffer_tracking.c > @@ -261,7 +261,6 @@ struct { > .only_pipes = PIPE_COUNT, > .shared_fb_x_offset = 248, > .shared_fb_y_offset = 500, > - .tiling = TILING_DEFAULT, > }; > > struct modeset_params { > @@ -1341,6 +1340,16 @@ static void setup_drm(void) > drm.fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE); > drm.debugfs = igt_debugfs_dir(drm.fd); > > + /* > + * Skip if xe device and unsupported tiling method specified > + * in opt_handler > + */ > + if (opt.tiling) > + igt_require(is_i915_device(drm.fd) || > + (is_xe_device(drm.fd) && opt.tiling == TILING_LINEAR)); > + else > + opt.tiling = is_i915_device(drm.fd) ? TILING_DEFAULT : TILING_LINEAR; LGTM: Reviewed-by: Bhanuprakash Modem - Bhanu > + > kmstest_set_vt_graphics_mode(); > igt_display_require(&drm.display, drm.fd); > > @@ -3634,6 +3643,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) > > for (t.tiling = TILING_LINEAR; t.tiling < TILING_COUNT; > t.tiling++) { > + > if (t.tiling == TILING_X) > continue; > > @@ -3646,6 +3656,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) > feature_str(t.feature), > tiling_str(t.tiling)) { > > + if (is_xe_device(drm.fd)) > + igt_require(t.tiling == TILING_LINEAR); > + > /* Tiling Y is only supported on GEN9+ */ > if (t.tiling == TILING_Y) { > igt_require(AT_LEAST_GEN(devid, 9));