[igt-dev] [PATCH i-g-t 2/4] lib/intel_allocator: Fixed start alignment

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Dec 19 07:50:00 UTC 2022


On Wed, Dec 14, 2022 at 08:29:42AM +0100, Dominik Karol Piatkowski wrote:
> On some platforms it may be required to use aligned start address.
> 
> Signed-off-by: Dominik Karol Piatkowski <dominik.karol.piatkowski at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> ---
>  lib/intel_allocator.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
> index 64616984..060a65ce 100644
> --- a/lib/intel_allocator.c
> +++ b/lib/intel_allocator.c
> @@ -927,6 +927,8 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
>  	if (!default_alignment)
>  		req.open.default_alignment = gem_detect_safe_alignment(fd);
>  
> +	req.open.start = ALIGN(req.open.start, req.open.default_alignment);
> +

Squash with patch 1/4, improve a commit msg a bit, then:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew

>  	/* Get child_tid only once at open() */
>  	if (child_tid == -1)
>  		child_tid = gettid();
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list