Re: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Add over 32k HW stride tests

Ville Syrjälä
2019-09-23T12:43:48Z

On Mon, Sep 23, 2019 at 01:40:33PM +0300, Juha-Pekka Heikkila wrote:
> On ICL when using 64bpp formats strides can reach up to
> 64k. These test try exact maximum HW strides so gtt
> remapping will not come in play.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/kms_big_fb.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 103 insertions(+)

I believe all you should need is something like:

--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -161,9 +161,6 @@ static void max_fb_size(data_t *data, int *width, int *height,
uint64_t size;
int i = 0;

- *width = data->max_fb_width;
- *height = data->max_fb_height;
-
/* max fence stride is only 8k bytes on gen3 */
if (intel_gen(data->devid) < 4 &&
format == DRM_FORMAT_XRGB8888)
@@ -415,8 +412,16 @@ static bool test_pipe(data_t *data)
return ret;
}

-static void test_scanout(data_t *data)
+static void test_scanout(data_t *data, bool test_max_hw_stride)
{
+ if (test_max_hw_stride) {
+ data->big_fb_width = BIG;
+ data->big_fb_height = BIG;
+ } else {
+ data->big_fb_width = data->max_fb_width;
+ data->big_fb_height = data->max_fb_height;
+ }
+
max_fb_size(data, &data->big_fb_width, &data->big_fb_height,
data->format, data->modifier);

--
Ville Syrjälä
Intel