From patchwork Wed Mar 11 13:51:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 11431961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A454490 for ; Wed, 11 Mar 2020 15:04:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D6179206E7 for ; Wed, 11 Mar 2020 15:04:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oiScoyoP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6179206E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4ACDE6E202; Wed, 11 Mar 2020 15:04:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A3316E987; Wed, 11 Mar 2020 13:52:08 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id s5so2734086wrg.3; Wed, 11 Mar 2020 06:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=flGhpt37sp9XD/VKJktequW1z/Op/EL2iIAVEZzSQBY=; b=oiScoyoPXcSLytkyJFtKR4RMXZnOUT43vPO6N1orKuuu8dPRVMLBJVk7aEKXvnNZy6 6R4LyIBXhaLIPUbvls7Ix/3hJooN/+SVPeQ9W285fZX3GdvVYmPktv3rKvuzBV0HjC6i B+j8ze0EEgWt1wjvyy3mwyZ4kS0+yPcOGyq4jGWrnai/HUtrmCv8oBWcpcqFf7Kg4+a1 hwOstEbOSSyJCV4Oa+UgABp4O+/h37vl7/EsFLeM66M6hpvW8ib6CKfEJ+bQvAxz/uEy uyvdk+xPLLIy1nnFcUU4jn/pdPDYj2/dllCAo4PQjw7pL/yTkzwroIUc2Ll13s5Qes15 WKeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=flGhpt37sp9XD/VKJktequW1z/Op/EL2iIAVEZzSQBY=; b=kfVE2w+HHAX6tGTrLFEjqloHbrkHuPx8Q+ka2cygQQd6rh8GlTc79JlTrSud9lxsAP gMJOv+UyCG8bFM+X9yay6Yr28hkgqOvBuDBsaH8gdzuiaA9/tpaY3IzG42AYSd9KPeWu jt78FMZfyj8+M/K1XvxVVQsI3FTCfXb0mSHjMHsH3lxUPHAyfNPcmccedToZxkFEJHQJ MTRLEcP7KbcsmGQZu1CJVWtw8hw+3862mdN0wSe0tIZfTlBCjBAP+xgAggvTpG+lbJDJ F0zq1vcyo66MwMq+Odkr9Ysgj9eWi3mVUI8G/hKApvlXLxVgkGD5ntE5R1E4gyGH0ZPj 5wdw== X-Gm-Message-State: ANhLgQ0l0RYCxH8yvK4F+879TBsPVTKE56fkjEoRFv1fYLuAjtqmJk9v omSx2uWyDs+2NW4FvdbJ6A4= X-Google-Smtp-Source: ADFU+vvgmw4fd1NqGTYZeiUuoJEPOPj4Kn4u889b6V+DZSy4sQjKVUikTia6D/Jj32pCHPGIgHy5mA== X-Received: by 2002:adf:c449:: with SMTP id a9mr4615828wrg.366.1583934727345; Wed, 11 Mar 2020 06:52:07 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:8dc:e796:e7da:a319]) by smtp.gmail.com with ESMTPSA id 138sm3183811wmb.21.2020.03.11.06.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 06:52:06 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: David1.Zhou@amd.com, hch@infradead.org, jgg@ziepe.ca, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org Date: Wed, 11 Mar 2020 14:51:58 +0100 Message-Id: <20200311135158.3310-7-christian.koenig@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200311135158.3310-1-christian.koenig@amd.com> References: <20200311135158.3310-1-christian.koenig@amd.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 11 Mar 2020 15:04:30 +0000 Subject: [Intel-gfx] [PATCH 6/6] drm/amdgpu: improve amdgpu_gem_info debugfs file X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Note if a buffer was imported using peer2peer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 4277125a79ee..e42608115c99 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -854,7 +855,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) attachment = READ_ONCE(bo->tbo.base.import_attach); if (attachment) - seq_printf(m, " imported from %p", dma_buf); + seq_printf(m, " imported from %p%s", dma_buf, + attachment->peer2peer ? " P2P" : ""); else if (dma_buf) seq_printf(m, " exported as %p", dma_buf);