From patchwork Wed Jul 12 05:29:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Kuehling X-Patchwork-Id: 9835917 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 E10C260363 for ; Wed, 12 Jul 2017 06:02:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDF9E285E7 for ; Wed, 12 Jul 2017 06:02:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0F09285ED; Wed, 12 Jul 2017 06:02:20 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID 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 57154285E7 for ; Wed, 12 Jul 2017 06:02:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C27076E346; Wed, 12 Jul 2017 06:02:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0082.outbound.protection.outlook.com [104.47.32.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id 519CA6E346 for ; Wed, 12 Jul 2017 06:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WY0o4Hy8UWZ1q+CS1908V1282NtmoJxN8yRolaf/uHM=; b=UmfQfGVQBGaKhJM6e2FosJfwqyrXJIj19bMbwvH4mi63dc5aUa7xlDHcXCxNYZC0GmJ77m//M4Q+9R8jEzEwDy4GpjRtY8b3kWRWAqsMt8w+/3PZKUdKd1lvb+geniAqlVNvZ9Ia13xNF2U+uKT1YkYD0LlDZwvLyBhgFCajRmk= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from Harpoon.amd.com (165.204.55.251) by BN6PR1201MB0225.namprd12.prod.outlook.com (10.174.115.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 12 Jul 2017 05:30:13 +0000 From: Felix Kuehling To: amd-gfx@lists.freedesktop.org Subject: [PATCH 3/6] drm/amdgpu: disallow foreign BOs in the display path v2 Date: Wed, 12 Jul 2017 01:29:24 -0400 Message-Id: <1499837367-8368-4-git-send-email-Felix.Kuehling@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499837367-8368-1-git-send-email-Felix.Kuehling@amd.com> References: <1499837367-8368-1-git-send-email-Felix.Kuehling@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: BN6PR19CA0083.namprd19.prod.outlook.com (10.175.197.21) To BN6PR1201MB0225.namprd12.prod.outlook.com (10.174.115.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7644c626-cea7-45d6-76a1-08d4c8e71245 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR1201MB0225; X-Microsoft-Exchange-Diagnostics: 1; BN6PR1201MB0225; 3:P7VJ3UrxLENarN0Rp4uqpG0hAKQxsGi6ScQ4pXCal6+aud6Zn6GLsSu+go554ixeeQhtWiGAQHfaHUnXM7EA51uOXQRkZHxZhPby6ZxFrf3o84KgUMjeNUpUB7qcs2+poTafsMAbT5yhTAsNbRgP83kY3Ut/WXbYSHLIbPYKhwXfj2HAqpym3U5SJ82ehixxm0Zh3rHRZgyfTI5qwI3bdOv1IDrq+6RBsQJJ//CSanjRhgffz7A1JFE8yXNa47FfFm85dPMb12eW9Mov5ypewvI1IYnQZk0eTcw7+T20fqocTpE4qC1FVOwp9iLcm2QSJMy+BMtQ8HV3ZJ5uf15P8hsRQgfredY2uNGvHqOCRqAT1Kd93X96RJ4uyE42oQRhqwc1tFAWSriMvQvO5pj1+rGJGmM27UZWlGMkGYqNvUIejcVAbNRrCDBE2jtX8t9wUDnmnuKlJihZgd0dIb5frAtj4MUeeazWoL8f+Ixpa6H+/9EmwSsVmVJczFwyXLOECkt62lnZbZsRFWqPeyelEnopXPnbPmXp7S4SUbljelUiKlz1RUAs41L/jumsXiJvqkbV/W0BIadQQSScmPO0huQValGYvT12LhRad8ij3Xn9MFvut8zYp7CxtLIJXyHyLNCcnwz3x4VUqzHVNK1uoe3cgFUggBPlVkKgXri0VYvR7HIVcYE77e8EOgzoNag91AGYqZZ6EPMMFi1e4RS8VqjcUPaeyu6NS70J7YOlZlcOc+yHTtEuZh5fvY2yU5UIOprbiBfPeu+Uwgkb+nv3DA== X-MS-TrafficTypeDiagnostic: BN6PR1201MB0225: X-Microsoft-Exchange-Diagnostics: 1; BN6PR1201MB0225; 25:2NH/ayTCKG2PZRHdAIKnF9JqOgGpX308XrEfgZH5CzcCvG7WFzDwoQ+AZmKM5x5E5QSI/F6IfMBWqn2wXsVkRhuVt3/BMI41JjrMuHN+DjVl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087228)(767451399110)(148574349560750); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(2017060910075)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR1201MB0225; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR1201MB0225; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyMDFNQjAyMjU7NDowWnNRS0RIY2kwYW5SV09PVHNpUS9IODRN?= =?utf-8?B?MVRzRldJalJkYUMzeEpUdjBRVWs5ZXBtSE0xbGowSjhFUjY0ZWU5bmNJWVdr?= =?utf-8?B?Q0hBbzdtSFdsaWNtVlUyUzh5TUlLS3E1MWlPNHcvYmZPQVNrczFFMkZDNU1x?= =?utf-8?B?d0ZFeXFQWGhYUVgxV014a2ZScm4zdjdUN0NnMkJhMkNZa2wzREhjQWhjNC8r?= =?utf-8?B?Nm1lWUFMRVNsdVlodCsyd3dlMHJ4WUp0MHNmc2ZocnlMaVVGZnMybEJHb1FF?= =?utf-8?B?NFdUWWJ3U0oxeFBuaXIxM0tsV0JydUFXaE4zUEhKOGFOWGsrL0VzQUVIK1Ir?= =?utf-8?B?QWFpRVF2TUhIUyszUmhFc1phQThhdFpxZ1Fyc0o0Z0U3ai9yQzVsWktRb09L?= =?utf-8?B?SWVnQTFwS1ZVdUJkYTBoVTV1U2RPcGtrUWZseGFPYTM4UDhnYzBBdnFJTlBy?= =?utf-8?B?dUhkVCtpQTFDZFZNMTlIOUh3Q1V0ZEMwQ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wSlNmU0pMUklFbGxEYkhyb0h3UzVVNlIvZ01lVjBXSVdQdzdq?= =?utf-8?B?TTVDMWxPaks1VU5lYVFmbmpZdDAzZElkdmwzOFBpaVhNTDMxS2dVelNHUmpi?= =?utf-8?B?NDl0cDV2bVlDNFpkeDFIUlZwZFAwcTFiQ0ZuUkVHVGFQZXVZdnRqNnpoUnFU?= =?utf-8?B?ZDlPUWhaNlRROGZTTmduTkltZWh5TDdqVUppYzR2V21za0d1c3dYL0JTbUgv?= =?utf-8?B?Zk1hK1Jsa0l6OEFIbkpTRjVZTC9GdlVWMEtrdndlc2xqWWJzaFpLNDJHWG9z?= =?utf-8?B?Y1h4ZnozREFoS1hESWhRc2daNnRKc2UwTjdtS2tEVW5yRCt6MkxlNXFYc0dD?= =?utf-8?Q?86MlS70je0OfQuY3PiHQFcUtJlXOnVwGNex/oU=3D?= X-Forefront-PRVS: 036614DD9C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39400400002)(39860400002)(39850400002)(39410400002)(39840400002)(39450400003)(50986999)(50466002)(50226002)(6486002)(8676002)(2906002)(2870700001)(110136004)(38730400002)(81166006)(76176999)(2351001)(66066001)(2361001)(47776003)(7350300001)(23676002)(189998001)(53416004)(42186005)(36756003)(6116002)(3846002)(305945005)(450100002)(4326008)(575784001)(86362001)(7736002)(25786009)(53936002)(54906002)(5660300001)(2950100002)(72206003)(6916009)(6666003)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1201MB0225; H:Harpoon.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyMDFNQjAyMjU7MjM6bGJ1WThYNGJ5S1diYnRLb3VOZkxwNERn?= =?utf-8?B?bVdHN04vbHluUnFlTzlPaG9NZmpVVUpLTnZBc3EyRDI2UzB0UkNDZmpLeGI0?= =?utf-8?B?ZFFEZVI5QjI3anBXVEUzSEZrWGVWZjNrM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change-CrossTenant-OriginalArrivalTime: 12 Jul 2017 05:30:13.3906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0225 Cc: Felix Kuehling , =?UTF-8?q?Christian=20K=C3=B6nig?= , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König Pinning them in other devices VRAM would obviously not work. v2: Add checks to DC code paths Signed-off-by: Christian König Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 +++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 5 +++++ 6 files changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 3341c34..bd6b0dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -180,6 +180,12 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc, obj = new_amdgpu_fb->obj; new_abo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(new_abo->tbo.bdev) != adev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + r = -EINVAL; + goto cleanup; + } + /* pin the new buffer */ r = amdgpu_bo_reserve(new_abo, false); if (unlikely(r != 0)) { diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 3bcdbb7..2c0f04d 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -1915,6 +1915,11 @@ static int dce_v10_0_crtc_do_set_base(struct drm_crtc *crtc, */ obj = amdgpu_fb->obj; abo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(abo->tbo.bdev) != adev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + return -EINVAL; + } + r = amdgpu_bo_reserve(abo, false); if (unlikely(r != 0)) return r; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 039de10..c3d0eaa 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -1954,6 +1954,11 @@ static int dce_v11_0_crtc_do_set_base(struct drm_crtc *crtc, */ obj = amdgpu_fb->obj; abo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(abo->tbo.bdev) != adev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + return -EINVAL; + } + r = amdgpu_bo_reserve(abo, false); if (unlikely(r != 0)) return r; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index 5b525c9..76daa5a 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c @@ -1868,6 +1868,11 @@ static int dce_v6_0_crtc_do_set_base(struct drm_crtc *crtc, */ obj = amdgpu_fb->obj; abo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(abo->tbo.bdev) != adev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + return -EINVAL; + } + r = amdgpu_bo_reserve(abo, false); if (unlikely(r != 0)) return r; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index 092ee37..929b040 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -1846,6 +1846,11 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc, */ obj = amdgpu_fb->obj; abo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(abo->tbo.bdev) != adev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + return -EINVAL; + } + r = amdgpu_bo_reserve(abo, false); if (unlikely(r != 0)) return r; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c index 8b499cc..770018a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c @@ -1621,6 +1621,11 @@ static int dm_plane_helper_prepare_fb( obj = afb->obj; rbo = gem_to_amdgpu_bo(obj); + if (amdgpu_ttm_adev(rbo->tbo.bdev)->ddev != plane->dev) { + DRM_ERROR("Foreign BOs not allowed in the display engine\n"); + return -EINVAL; + } + r = amdgpu_bo_reserve(rbo, false); if (unlikely(r != 0)) return r;