Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id EFC958F017 for ; Mon, 11 Jul 2022 15:22:34 +0000 (UTC) Message-ID: <13065c61-267b-01cd-82b0-6bc8d0a3b854@intel.com> Date: Mon, 11 Jul 2022 20:52:09 +0530 Content-Language: en-US To: Swati Sharma , References: <20220708052906.1896-1-swati2.sharma@intel.com> From: "Modem, Bhanuprakash" In-Reply-To: <20220708052906.1896-1-swati2.sharma@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] tests/i915/kms_dsc: Skip test if DP res. < 5K List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Fri-08-07-2022 10:59 am, Swati Sharma wrote: > While rewriting the kms_dsc IGT; missed one condition. > Skip test if connector type is DP and resolution > is less than 5K since force dsc enable supports resolutions > above 5K in DP. > > Signed-off-by: Swati Sharma > --- > tests/i915/kms_dsc.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c > index 3506fcb52..d8f924a93 100644 > --- a/tests/i915/kms_dsc.c > +++ b/tests/i915/kms_dsc.c > @@ -165,6 +165,23 @@ static bool check_dsc_on_connector(data_t *data) > return true; > } > > +/* Force dsc enable supports resolutions above 5K in DP */ > +static bool check_5k_dp_test_constraint(data_t *data) > +{ > + igt_output_t *output = data->output; > + drmModeConnector *connector = output->config.connector; > + drmModeModeInfo *mode = get_highres_mode(output); > + > + if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort && && test_type == TEST_DSC_BPP > + mode->hdisplay < 5120) { s/5120/HDISPLAY_5K - Bhanu > + igt_debug("Force dsc enable does not support res. < 5k in %s\n", > + output->name); > + return false; > + } > + > + return true; > +} > + > static bool check_big_joiner_test_constraint(data_t *data, > enum dsc_test_type test_type) > { > @@ -285,6 +302,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned > test_cleanup(data); > } > > + > static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpp, unsigned int plane_format) > { > igt_display_t *display = &data->display; > @@ -300,6 +318,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpp, unsign > if (!check_dsc_on_connector(data)) > continue; > > + if (!check_5k_dp_test_constraint(data)) > + continue; > + > if (!check_big_joiner_test_constraint(data, test_type)) > continue; >