From patchwork Mon Mar 4 15:30:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837961 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 7B0DE14DE for ; Mon, 4 Mar 2019 15:30:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 679532A615 for ; Mon, 4 Mar 2019 15:30:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C2B92A813; Mon, 4 Mar 2019 15:30:36 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 121672A7BC for ; Mon, 4 Mar 2019 15:30:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F254089D40; Mon, 4 Mar 2019 15:30:34 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73AC489D39; Mon, 4 Mar 2019 15:30:33 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id v10so5526656qtp.8; Mon, 04 Mar 2019 07:30:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j7Kapi49btjujIG11+00U0SUMjezA3PkQP5wjJqqpCI=; b=gpZ6HF9Zej1VS4XbkbNdgLuMWK4AcGSuxB5d3CZqaA5MonFb0D+EqiMJ2dqk12mTVJ +T34IzIeRsBK/m4jSBAQZJADqnJV3gJyZh7Nm7n89o1hcensIVIN41by2YHm/cBX8osQ /JSJstKKk67FdLsMTU1muRA3L07M7/SUvy4Iimz2rJw/pjtvqMoShE3JN6k5fSNauEru 3JMEeRZ1tbk8as0Ru4sdgC7mDC7Bh6NeTkJJzUkm6sSAbSNZXEfn76M3MP0hFQtSBkfV H6va3BREjDd2bo0qyvLEsiJVkmLjhnQP7IGTsrpX7ACttQjSJOTTnVwGuVoSQyKlBnK/ JFJg== X-Gm-Message-State: APjAAAXGk6nPQtproCuW48GBsELro52wWUGsyUF9xtu7D1SkmjXZFqwB 9dWlKSEXFjef7tuFLI49vGM= X-Google-Smtp-Source: APXvYqzP9/zSzbJxGaNbGpzJBeJZDCIiFQLTUfCW2+aYxue2QL2UcMIyzKGhEYFdzLGLqGpnWrvimA== X-Received: by 2002:a0c:d24a:: with SMTP id o10mr14917814qvh.170.1551713432575; Mon, 04 Mar 2019 07:30:32 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id r22sm3859633qki.43.2019.03.04.07.30.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:30:32 -0800 (PST) Date: Mon, 4 Mar 2019 12:30:30 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <127b743d899c62b62921dffa629cfcd469390adf.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j7Kapi49btjujIG11+00U0SUMjezA3PkQP5wjJqqpCI=; b=tve3dkPOdxQRxcHGRaC7B3AXedAVLJh/O7qKnqGF+gaXFff7BxJoDtNPYQX20SZuJp wC7hx9LHnTPKeh9y3oGsqrb6NfbpbROfb7JvQ+fXjTEgYvwZxs6KgA3AS9KnecA3LCJp GH1xD2TRAdavBckMdRIkSekZnhxpyAtmkbJbcWdlgDSdEiY16EwB8Hu0cwujPbM3GTHm mXClctt1lgK5gurHevrSViQFeIM/2iAbaYbaUg2E8NCHSl69y0ex6HBn0d31pS1Bko+T vDXMna7VaMFrY3tBRgfENtlGnKtbpoPoLDXj9r6As9mv+IH3/SCt+dJNKW1mQS6VqDUi QGXQ== Subject: [Intel-gfx] [PATCH i-g-t 3/7] kms_flip: Fix warning related to i915 gem dependence X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP In the kms_flip tests has an igt_fixture that allocates memory for i915 driver with “drm_intel_bufmgr_gem_init()”, which produces the following warning: IGT-Version: 1.23-g8d81c2c2 (x86_64) (Linux: 5.0.0-rc7-VKMS-RULES+ x86_64) Using monotonic timestamps DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument Assuming 131072kB available aperture size. May lead to reduced performance or incorrect rendering. get chip id failed: -1 [22] This commit handles this specific dependence with the i915 driver which make the kms_flip logs better. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 0d261b77..57138ec1 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1528,10 +1528,12 @@ int main(int argc, char **argv) igt_install_exit_handler(kms_flip_exit_handler); get_timestamp_format(); - bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); - if (bufmgr) { - devid = intel_get_drm_devid(drm_fd); - batch = intel_batchbuffer_alloc(bufmgr, devid); + if (is_i915_device(drm_fd)) { + bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); + if (bufmgr) { + devid = intel_get_drm_devid(drm_fd); + batch = intel_batchbuffer_alloc(bufmgr, devid); + } } }