All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: check device type before calling intel_get_drm_devid
@ 2021-08-05  3:40 maitreye
  2021-08-05  3:40 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: add an API to support color square DP CTS pattern maitreye
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: maitreye @ 2021-08-05  3:40 UTC (permalink / raw)
  To: igt-dev
  Cc: maitreye, robdclark, seanpaul, swboyd, nganji, aravindh,
	abhinavk, khsieh, manasi.d.navare, petri.latvala

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@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))
+			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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-15  1:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  3:40 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: check device type before calling intel_get_drm_devid maitreye
2021-08-05  3:40 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: add an API to support color square DP CTS pattern maitreye
2021-08-12 21:00   ` maitreye
2021-08-13 11:33   ` Petri Latvala
     [not found]     ` <4951ee20ab1d8446e08de1c6dc09bd93@codeaurora.org>
2022-02-15  1:49       ` Abhinav Kumar
2021-08-05  3:55 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] lib/igt_fb: check device type before calling intel_get_drm_devid Patchwork
2021-08-06 16:38 ` [igt-dev] [PATCH i-g-t 1/2] " Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.