From patchwork Thu Oct 12 13:29:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10002009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 78F0D6028A for ; Thu, 12 Oct 2017 13:30:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64E4425F3E for ; Thu, 12 Oct 2017 13:30:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59FA928DD9; Thu, 12 Oct 2017 13:30:26 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable 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 099E625F3E for ; Thu, 12 Oct 2017 13:30:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4D4B6E861; Thu, 12 Oct 2017 13:30:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06CDF6E859; Thu, 12 Oct 2017 13:29:59 +0000 (UTC) Received: by mail-qt0-x243.google.com with SMTP id j58so2485873qtj.0; Thu, 12 Oct 2017 06:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tgTQ8MsZvarKQhn+GvONyi3A2tMZS2RsICYzueMok2s=; b=um7MabVmehiWSGjpl95HUZt+9WL6IAOvzkbrjgx4u4Ru6bpy4KuweZLYPlDsf9EUHT EIvMQztMvbWOxCR3D55UDJ62FNEYzLy/sOIPlk6CU5Xf5JWmDFPp29KYO67vgFtImYDs bAb1PKt+qdKF2B8m6AR6EqYBoBdE5pH4gysBQtab5vWK0Mjt866S2ywCbjICtzUhdFZU Dk/Lu2+d1/MGWaEnYva4cMl+VoF1xEtDkcjtigcFBHoX58YRYnMxLejJ+wKVo2gglCwB qeO0hhC+KsHCoG/aC0fQLyCse6vcvAIXG+SoQNJIqIW7BW5Wa7UceNYbmCcIiCeenQb1 hm8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tgTQ8MsZvarKQhn+GvONyi3A2tMZS2RsICYzueMok2s=; b=MugGbHYBZIA39WdhtDqI2bh3cK2Pou0zCpxypWMkwvM679LDaY4d6Euyu1rDmWQ7JW 9DoJycByMwAv9k7wTuB1fvNLpKHsDDM0itIX0BPp8iQ0OVOWFVbPwgy3/YyxsjZJonNA dzYYm7RWGsZyjYpyTLW2oI2U7U8A5wABJfOE6L0ELHMME0t16YDRS70Eika4STOckvwU uYmSDRaMhvxwH/8+gcN9RO7LWVzJXphyGq6SMwhSquD6DqnSrEXQUWeO3PTqqZ1c66ic VApFvPJ6qg2TUrhd+Sn6qg8UPBhR5OECmz0w3WSAL2Q00Ow96jnrIWPdlpR/qra99ZoJ PXaQ== X-Gm-Message-State: AMCzsaW3MqkrfeArNQwRpU0cr8Y8g8InX9q+4Y7jvm7nxuCSUqLfZj8H OxyuhG7sS3K1RQ+eievnkjpfiA== X-Google-Smtp-Source: AOwi7QAeEPHkx62lw8UdsgOam1Jf6IKsdyPMda8CEJshTu6Ut+kMCvq/361J+HTW0UdpKVySVa+8dA== X-Received: by 10.200.0.135 with SMTP id c7mr3806144qtg.66.1507814998888; Thu, 12 Oct 2017 06:29:58 -0700 (PDT) Received: from localhost (p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de. [2003:e4:1be4:fd00:cead:5b94:e1cf:d280]) by smtp.gmail.com with ESMTPSA id s22sm7216678qta.67.2017.10.12.06.29.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2017 06:29:58 -0700 (PDT) From: Thierry Reding To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Oct 2017 15:29:42 +0200 Message-Id: <20171012132943.28316-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171012132943.28316-1-thierry.reding@gmail.com> References: <20171012132943.28316-1-thierry.reding@gmail.com> Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t 6/7] lib/drmtest: Support Tegra X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Add a driver definition for Tegra and wire up all the necessary pieces to identify its devices. Signed-off-by: Thierry Reding --- lib/drmtest.c | 10 ++++++++++ lib/drmtest.h | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index f46419ec36cf..e05f88d4a887 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -130,6 +130,11 @@ static bool is_nouveau_device(int fd) return __is_device(fd, "nouveau"); } +static bool is_tegra_device(int fd) +{ + return __is_device(fd, "tegra"); +} + static bool has_known_intel_chipset(int fd) { struct drm_i915_getparam gp; @@ -285,6 +290,9 @@ int __drm_open_driver(int chipset) if (chipset & DRIVER_NOUVEAU && is_nouveau_device(fd)) return fd; + if (chipset & DRIVER_TEGRA && is_tegra_device(fd)) + return fd; + /* Only VGEM-specific tests should be run on VGEM */ if (chipset == DRIVER_ANY && !is_vgem_device(fd)) return fd; @@ -362,6 +370,8 @@ static const char *chipset_to_str(int chipset) return "amdgpu"; case DRIVER_NOUVEAU: return "nouveau"; + case DRIVER_TEGRA: + return "tegra"; case DRIVER_ANY: return "any"; default: diff --git a/lib/drmtest.h b/lib/drmtest.h index e54e1b6756af..bdb938ffd9ab 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -44,6 +44,7 @@ #define DRIVER_VIRTIO (1 << 3) #define DRIVER_AMDGPU (1 << 4) #define DRIVER_NOUVEAU (1 << 5) +#define DRIVER_TEGRA (1 << 6) /* * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system * with vgem as well as a supported driver, you can end up with a