From patchwork Wed Jun 12 06:55:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 10988769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBF2C14BB for ; Wed, 12 Jun 2019 06:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB9C02899C for ; Wed, 12 Jun 2019 06:56:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0362289B4; Wed, 12 Jun 2019 06:56:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 87C712899C for ; Wed, 12 Jun 2019 06:56:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C98489364; Wed, 12 Jun 2019 06:55:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC2DB892ED; Wed, 12 Jun 2019 06:55:43 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id p11so15577238wre.7; Tue, 11 Jun 2019 23:55:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zQt3dTdSIWWsICsAYI/0AdJq0BXECo0U6dzPvCi9/fc=; b=b64mTD/ctcVEFlOkwMwdUieHzSmuDh/w5EmFyDWTURkaPSs6RbpWXXHQi/sICuBfhl kx7d8VMdsRIMfD/zqbyMxV9IUCphSlCbETAnqsirE9GrBqCvMhs/v6/BK7yHSHl4hG7K 73+7MY4TjD6wat7RiJ6LrsAjujxyy8GIDKPh9lcMXa4uVSCJhWH9wKP4FyU3AFI/4FDU e7XiX2dF+r9Ucr0RON/yHj5Z0OwA+3y4yLz0+C2t2wyrZHP6AY5JYRr966jV5jypmIgN 2KtNPItIJN1mW8XwQf8TZZW1yWAac6SdAMTw1WdkcobS+b/JkkH8Zkcm0M4DNTqoxN0N cKPg== X-Gm-Message-State: APjAAAWtyoryavBb3QR6vFHX7PMJyepCgnKWtjhXPCIy6WTBs3mVOm/z wKboYn2YDWOi2urbcgV53dW8m/jKcwI= X-Google-Smtp-Source: APXvYqyHqDMPZYr/NW4jLdO9agHqSfno94vT10KoRoB7iqt1kOqXGFrMAxvUnBgYS1Z/a0+UE6vXeQ== X-Received: by 2002:a5d:5186:: with SMTP id k6mr38801827wrv.30.1560322540601; Tue, 11 Jun 2019 23:55:40 -0700 (PDT) Received: from cizrna.lan ([109.72.12.69]) by smtp.gmail.com with ESMTPSA id u23sm4337132wmj.33.2019.06.11.23.55.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 23:55:39 -0700 (PDT) From: Tomeu Vizoso To: Development mailing list for IGT GPU Tools Subject: [PATCH i-g-t 2/2] tests/panfrost: Fix couple of things so submit tests work on T720 Date: Wed, 12 Jun 2019 08:55:30 +0200 Message-Id: <20190612065530.64238-2-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190612065530.64238-1-tomeu.vizoso@collabora.com> References: <20190612065530.64238-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zQt3dTdSIWWsICsAYI/0AdJq0BXECo0U6dzPvCi9/fc=; b=U2BQCYmluJ/9tCe7ZD4VNqI9NKB+kkcN+jIz0gzvLDdsErWPFkWZ0eUcPVzjWOR95K SXYAQI9QPdEWLRpWJuwjEAHTT7FIQFNv3Wx65F4S9aoYbblxqKf+C8LubrThv91rFzJQ 7eniF1pHY7qsgIwuVY8FiH56ln/tJSUwEzPszVnvXSiTU9iLbYgxSWaR1RgarRaOrdmS 6bX4JhwcCCCOl7zXT/f09hCPm9f6SHUKQ4BIXO0puM5U8nGhjQIAVevo9Y7pUGvE6cZy 2Y34egpS5LHj6rLYgSp8o2KPRqS+w9wxFfp1nr7dktYgcnx0PdXro3bZfovrORGF5qkc V0ZA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tomeu Vizoso --- tests/panfrost_submit.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/panfrost_submit.c b/tests/panfrost_submit.c index 5770dc24a42b..13ce85b73d9e 100644 --- a/tests/panfrost_submit.c +++ b/tests/panfrost_submit.c @@ -34,10 +34,11 @@ #include #include #include +#include "panfrost-job.h" #include "panfrost_drm.h" -#define WIDTH 1366 -#define HEIGHT 768 +#define WIDTH 1920 +#define HEIGHT 1080 #define CLEAR_COLOR 0xff7f7f7f /* One tenth of a second */ @@ -56,14 +57,30 @@ abs_timeout(uint64_t duration) return (uint64_t)current.tv_sec * NSECS_PER_SEC + current.tv_nsec + duration; } +static void check_error(int fd, struct panfrost_submit *submit) +{ + struct mali_job_descriptor_header *header; + + header = submit->submit_bo->map; + igt_assert_eq_u64(header->fault_pointer, 0); +} + static void check_fb(int fd, struct panfrost_bo *bo) { + int gpu_prod_id = igt_panfrost_get_param(fd, DRM_PANFROST_PARAM_GPU_PROD_ID); __uint32_t *fbo; int i; fbo = bo->map; - for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) - igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + + if (gpu_prod_id >= 0x0750) { + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + } else { + // Mask the alpha away because on <=T720 we don't know how to have it + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR & 0x00ffffff); + } } igt_main @@ -84,6 +101,7 @@ igt_main do_ioctl(fd, DRM_IOCTL_PANFROST_SUBMIT, submit->args); igt_assert(syncobj_wait(fd, &submit->args->out_sync, 1, abs_timeout(SHORT_TIME_NSEC), 0, NULL)); + check_error(fd, submit); check_fb(fd, submit->fbo); igt_panfrost_free_job(fd, submit); }