[PATCH i-g-t v2 02/10] lib/intel_blt: Rename confusing fb tile to i915 tile

Karolina Stolarek karolina.stolarek at intel.com
Fri Apr 26 11:46:04 UTC 2024


On 26.04.2024 13:27, Zbigniew Kempczyński wrote:
> On Fri, Apr 26, 2024 at 01:11:02PM +0200, Karolina Stolarek wrote:
>>
>> On 26.04.2024 11:01, Zbigniew Kempczyński wrote:
>>> Fb tile is defacto drm modifier, thus blt_tile_to_fb_tile() name
>>> is confusing as it converts to I915_TILING*, not drm modifier.
>>> Lets rename it.
>>
>> I agree with the sentiment, but I wonder if we should have this function
>> in intel_blt at all. It's only used in xe_render_copy test. Why not move
>> it there?
> 
> At the moment it was used only in xe_render_copy, but I've another
> candidate (xe_intel_bb at render) I should slightly adopt to avoid
> hardcoded tilings.

I see, thanks for the explanation.

So:
Reviewed-by: Karolina Stolarek <karolina.stolarek at intel.com>

> 
> --
> Zbigniew
> 
>>
>> All the best,
>> Karolina
>>
>>>
>>> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
>>> ---
>>>    lib/intel_blt.c              | 4 ++--
>>>    lib/intel_blt.h              | 2 +-
>>>    tests/intel/xe_render_copy.c | 2 +-
>>>    3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/intel_blt.c b/lib/intel_blt.c
>>> index 4da5cc855e..5a281036c4 100644
>>> --- a/lib/intel_blt.c
>>> +++ b/lib/intel_blt.c
>>> @@ -536,14 +536,14 @@ static int __block_tiling(enum blt_tiling_type tiling)
>>>    }
>>>    /**
>>> - * blt_tile_to_fb_tile:
>>> + * blt_tile_to_i915_tile:
>>>     * @tiling: tiling id
>>>     *
>>>     * Returns:
>>>     * id of tiling introduced in i915 like I915_TILING_* used for example
>>>     * in render-copy code.
>>>     */
>>> -int blt_tile_to_fb_tile(enum blt_tiling_type tiling)
>>> +int blt_tile_to_i915_tile(enum blt_tiling_type tiling)
>>>    {
>>>    	switch (tiling) {
>>>    	case T_LINEAR: return I915_TILING_NONE;
>>> diff --git a/lib/intel_blt.h b/lib/intel_blt.h
>>> index cc59666862..fcfce69bee 100644
>>> --- a/lib/intel_blt.h
>>> +++ b/lib/intel_blt.h
>>> @@ -213,7 +213,7 @@ bool blt_platform_has_flat_ccs_enabled(int fd);
>>>    bool blt_uses_extended_block_copy(int fd);
>>>    const char *blt_tiling_name(enum blt_tiling_type tiling);
>>> -int blt_tile_to_fb_tile(enum blt_tiling_type tiling);
>>> +int blt_tile_to_i915_tile(enum blt_tiling_type tiling);
>>>    uint32_t blt_get_min_stride(uint32_t width, uint32_t bpp,
>>>    			    enum blt_tiling_type tiling);
>>> diff --git a/tests/intel/xe_render_copy.c b/tests/intel/xe_render_copy.c
>>> index 4f98cb7dfa..ef75c4ce6d 100644
>>> --- a/tests/intel/xe_render_copy.c
>>> +++ b/tests/intel/xe_render_copy.c
>>> @@ -407,7 +407,7 @@ igt_main_args("dpiW:H:", NULL, help_str, opt_handler, NULL)
>>>    					continue;
>>>    				tiling_name = blt_tiling_name(tiling);
>>> -				tiling = blt_tile_to_fb_tile(tiling);
>>> +				tiling = blt_tile_to_i915_tile(tiling);
>>>    				igt_dynamic_f("render-%s-%ux%u", tiling_name, surfwidth, surfheight)
>>>    					render(bops, tiling, surfwidth, surfheight, id);
>>>    			}


More information about the igt-dev mailing list