[igt-dev] [PATCH i-g-t] lib/intel_allocator: Fixed start offset

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Dec 7 11:35:00 UTC 2022


On Wed, Dec 07, 2022 at 12:02:32PM +0100, Dominik Karol Piatkowski wrote:
> Fixed start offset in __intel_allocator_open_full.
> 
> 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 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
> index 717d7fc5..4525ba97 100644
> --- a/lib/intel_allocator.c
> +++ b/lib/intel_allocator.c
> @@ -913,6 +913,9 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
>  	struct alloc_resp resp;
>  	uint64_t gtt_size;
>  
> +	if (!start)
> +		req.open.start = gem_detect_safe_start_offset(fd);
> +
>  	if (!end) {
>  		igt_assert_f(can_report_gtt_size(fd), "Invalid fd\n");
>  		gtt_size = gem_aperture_size(fd);
> -- 
> 2.34.1
>

Please join both patches to single series, and add description
why we need to fix this. 

--
Zbigniew 


More information about the igt-dev mailing list