From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A7E86EB9F for ; Fri, 6 Aug 2021 16:39:20 +0000 (UTC) Received: by mail-qt1-x82a.google.com with SMTP id l24so6879256qtj.4 for ; Fri, 06 Aug 2021 09:39:20 -0700 (PDT) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com. [209.85.219.173]) by smtp.gmail.com with ESMTPSA id 71sm3095684qkk.26.2021.08.06.09.39.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Aug 2021 09:39:17 -0700 (PDT) Received: by mail-yb1-f173.google.com with SMTP id a93so16281522ybi.1 for ; Fri, 06 Aug 2021 09:39:17 -0700 (PDT) MIME-Version: 1.0 References: <1628134823-27763-1-git-send-email-maitreye@codeaurora.org> In-Reply-To: <1628134823-27763-1-git-send-email-maitreye@codeaurora.org> From: Sean Paul Date: Fri, 6 Aug 2021 12:38:38 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: check device type before calling intel_get_drm_devid List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: maitreye Cc: igt-dev@lists.freedesktop.org, Rob Clark , Stephen Boyd , nganji@codeaurora.org, aravindh@codeaurora.org, abhinavk@codeaurora.org, khsieh@codeaurora.org, Manasi Navare , Petri Latvala List-ID: On Wed, Aug 4, 2021 at 11:40 PM maitreye 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 > --- > 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 > > + 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 >