[igt-dev] [PATCH i-g-t v5 02/13] igt: fb: Reduce tile size alignment for non intel platforms

Lyude Paul lyude at redhat.com
Tue Jan 29 19:42:35 UTC 2019


Reviewed-by: Lyude Paul <lyude at redhat.com>

On Fri, 2019-01-25 at 15:58 +0100, Maxime Ripard wrote:
> Aligning the width on 64 pixels only make sense on intel platforms, make
> sure to add a check against this.
> 
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
> Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
> ---
>  lib/igt_fb.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index e23908e28c07..1a5c338ea532 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -204,7 +204,11 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int
> fb_bpp,
>  {
>  	switch (tiling) {
>  	case LOCAL_DRM_FORMAT_MOD_NONE:
> -		*width_ret = 64;
> +		if (is_i915_device(fd))
> +			*width_ret = 64;
> +		else
> +			*width_ret = 1;
> +
>  		*height_ret = 1;
>  		break;
>  	case LOCAL_I915_FORMAT_MOD_X_TILED:
-- 
Cheers,
	Lyude Paul



More information about the igt-dev mailing list