[igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: check device type before calling intel_get_drm_devid
Sean Paul
seanpaul at chromium.org
Fri Aug 6 16:38:38 UTC 2021
On Wed, Aug 4, 2021 at 11:40 PM maitreye <maitreye at codeaurora.org> wrote:
>
> Check intel device type before calling intel_get_drm_devid
> to avoid incorrect assertion failures while trying to use
> create_bo_for_fb on non-intel targets. Otherwise it leads
> to failures like below :
>
> ./msm_dp_compliance
> found idx of failsafe mode = 17
> (msm_dp_compliance:27338) intel_chipset-CRITICAL: Test assertion failure function
> intel_get_drm_devid, file ../igt-gpu-tools-9999/lib/intel_chipset.c:132:
> (msm_dp_compliance:27338) intel_chipset-CRITICAL:
> Failed assertion: is_i915_device(fd)
> (msm_dp_compliance:27338) intel_chipset-CRITICAL: Last errno: 2,
> No such file or directory
>
> Signed-off-by: maitreye <maitreye at codeaurora.org>
> ---
> lib/igt_fb.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index ab52ea9..583cc9e 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -836,9 +836,11 @@ static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
> * On ADL_P CCS color planes must be 2MB aligned, until remapping
> * support is added for CCS FBs.
> */
> - if (IS_ALDERLAKE_P(intel_get_drm_devid(fb->fd)) &&
> - is_ccs_modifier(fb->modifier))
> - size = ALIGN(size, 2 * 1024 * 1024);
> + if (is_i915_device(fb->fd)) {
> + if (IS_ALDERLAKE_P(intel_get_drm_devid(fb->fd)) &&
> + is_ccs_modifier(fb->modifier))
Not sure if my email client is rendering incorrectly, but I think you
lost indentation here.
With that fixed,
Reviewed-by: Sean Paul <seanpaul at chromium.org>
>
> + size = ALIGN(size,2 * 1024 * 1024);
> + }
>
> return size;
> }
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
More information about the igt-dev
mailing list