[PATCH i-g-t] tests/intel/kms_big_fb: Fix width calculation while creating the intel buf
Juha-Pekka Heikkilä
juha-pekka.heikkila at intel.com
Wed May 8 18:39:24 UTC 2024
@Vinod, can you add here comment this patch partially revert changes
done in bfa3db0cd9e9a11c0eeaf40a2743c5e2e0f24d2c
On 8.5.2024 18.13, Kamil Konieczny wrote:
> Hi Vinod,
> On 2024-05-07 at 15:30:26 +0300, Vinod Govindapillai wrote:
>> From: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>>
>
> Please add description here.
>
> Regards,
> Kamil
>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>> Signed-off-by: Vinod Govindapillai <vinod.govindapillai at intel.com>
>> ---
>> lib/igt_draw.c | 2 +-
>> tests/intel/kms_big_fb.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/igt_draw.c b/lib/igt_draw.c
>> index 2c01d7b02..97a7e6b37 100644
>> --- a/lib/igt_draw.c
>> +++ b/lib/igt_draw.c
>> @@ -650,7 +650,7 @@ static struct intel_buf *create_buf(int fd, struct buf_ops *bops,
>> uint64_t region = driver == INTEL_DRIVER_XE ? vram_if_possible(fd, 0) : -1;
>> uint64_t size = from->size;
>>
>> - width = from->width;
>> + width = from->stride / (from->bpp / 8);
>> height = from->height;
>> if (driver == INTEL_DRIVER_XE)
>> size = ALIGN(size, xe_get_default_alignment(fd));
>> diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
>> index f7f303d41..1e45d8e42 100644
>> --- a/tests/intel/kms_big_fb.c
>> +++ b/tests/intel/kms_big_fb.c
>> @@ -199,7 +199,7 @@ static struct intel_buf *init_buf(data_t *data,
>> tiling = igt_fb_mod_to_tiling(fb->modifier);
>> bpp = fb->plane_bpp[0];
>> size = fb->size;
>> - width = fb->width;
>> + width = fb->strides[0] / (bpp / 8);
>> height = fb->height;
>>
>> name = gem_flink(data->drm_fd, fb->gem_handle);
>> --
>> 2.34.1
>>
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the igt-dev
mailing list