[Intel-gfx] [PATCH 1/7] lib/igt_fb: Let others use igt_get_fb_tile_size

Daniel Vetter daniel at ffwll.ch
Mon Mar 20 09:48:17 UTC 2017


On Sat, Mar 18, 2017 at 12:45:20AM +0530, Praveen Paneri wrote:
> This function can be used by igt_draw to get accurate
> tile dimensions for all tile formats.
> 
> Signed-off-by: Praveen Paneri <praveen.paneri at intel.com>
> ---
>  lib/igt_fb.c | 2 +-
>  lib/igt_fb.h | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index d2b7e9e..6ecc36b 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -74,7 +74,7 @@ static struct format_desc_struct {
>  #define for_each_format(f)	\
>  	for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
>  
> -static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
>  				 unsigned *width_ret, unsigned *height_ret)

Documentation seems missing here.
-Daniel

>  {
>  	switch (tiling) {
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index 4a680ce..b178eba 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -94,7 +94,8 @@ enum igt_text_align {
>  	align_vcenter	= 0x04,
>  	align_hcenter	= 0x08,
>  };
> -
> +void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
> +			unsigned *width_ret, unsigned *height_ret);
>  void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
>  		      unsigned *size_ret, unsigned *stride_ret);
>  unsigned int
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list