From patchwork Wed Jul 19 02:22:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Kuehling X-Patchwork-Id: 9850347 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 98BBF602A7 for ; Wed, 19 Jul 2017 02:22:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8277C27F2B for ; Wed, 19 Jul 2017 02:22:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7730C28628; Wed, 19 Jul 2017 02:22:14 +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 C3CB327F2B for ; Wed, 19 Jul 2017 02:22:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D83D06E3F1; Wed, 19 Jul 2017 02:22:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0047.outbound.protection.outlook.com [104.47.37.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEFA96E3F1; Wed, 19 Jul 2017 02:22:10 +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=JKqUPhmobBUnktIoD4X6L/Vrh/92jUvwmMAZK5VYZDxaK1apP9ZK29uZn0m6iruv/2defJJUlXHxx+5KKTFHna864OUwtU/OsG0+b7BK8Rjg9ckgZwUI4u+VGj8s2o1Koxm79zR5x73cBKhk+9VTL8gMpFB1dY7uuZzUq+ikkFI= 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 DM5PR1201MB0235.namprd12.prod.outlook.com (10.174.107.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 19 Jul 2017 02:22:09 +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: Tue, 18 Jul 2017 22:22:10 -0400 Message-Id: <1500430934-27098-4-git-send-email-Felix.Kuehling@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500430934-27098-1-git-send-email-Felix.Kuehling@amd.com> References: <1500430934-27098-1-git-send-email-Felix.Kuehling@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: CY4PR03CA0008.namprd03.prod.outlook.com (10.168.162.18) To DM5PR1201MB0235.namprd12.prod.outlook.com (10.174.107.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 394da28d-b056-49b9-e9d3-08d4ce4cf559 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 3:iiLJMBIBVYgw5DacRekfgDDATENT2kjAbAEVW8EJ+ax9jcihYYy4zLPDSUGcS8Cn4isNBALiwkRpvqjW1fWTpKaj4EXuI/idsSwjZiIYluDIBRZ1Ig9qZlMmMVHL4clC5NNS7YTZHNk4FtrCP/Sgoj+9w7VFKN95ngCMe4kNevS0Ig78NZNCi1hEe9PdPsJ9r07KWrmWwz65+4BiYaOUAc0VF+I3mP7eXV8M+59vFsRUzZU2n95VxCmM9G+sJHO4kQ5ASLs7Wo2b+e+wZ3iHjhTSPqR1aKdiK8uJiwvLpnmXWclo1XwPVBFseirODE+F5AzNsSKvgHzzwudjtcNCZo4GCM9siNUPLH/FiFBM7LUED244rjqVM+1YFOHN5KThJ6Qk8HNaQYikTppuZiy1GVDCIxhNAjDIxlYNeZBG5b/bobukzDO+4S/p4eks6hA2qp11QAtwPMJawRZyA7YqYxibot6e8QRN3wE71kd4MrTTczaqmE23UOmLUFQUj3CoVeXigNyuKwonubFU+7VDCrb9477Qe6JjkErzwEhLK2iBsqc5d6/Co2EQcYIdLjUp0LcrdS0q4kFtNogymI1CtA3ctrk+SrWJjuCBC3cy2FOPsJDiR8pqqYJVIOpYjGtUvnV/XadKEcuk8vLF1kVhv4qDLXRwXwIemeSPsr60mybctPd2y9Y9/ahw94ovtc0h2twzl559n5Y8/8V8IxZYJ8Bq+DlMK5Nw/H3FyE9Ke31jHHAIWXUwUw1MOJNRWp0z1iQyYR4Moa0IbPA0v0meRQ== X-MS-TrafficTypeDiagnostic: DM5PR1201MB0235: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 25:yB7InOW7KiD/08UtFSrBAM1u31aYa8xybeHF06wW0Myunsnx7Nhz5iKJvzEE1frcmWB/hdm2EXPsFZXQjIDz2DBNTlBqfvdI0Hlq/HSmHy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349560750); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR1201MB0235; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyMDFNQjAyMzU7NDpWUEtOZXlMZUNGK0FDSnlySW9sSzY5QnpS?= =?utf-8?B?QzNXclpCV3NETGpBK2pVZGpMZDBVY3ppZlBKYm5tTkdhZk13T0xoS0p1VUFO?= =?utf-8?B?cXc1QkxiLzBwRkN1NHVnemNlRmh6LzF5SVB1eWxpR1hka1prSWdla2NmN3RU?= =?utf-8?B?MGlUWnYzM0xlRGt0RXA5cTJybXNVSjY0cHpkaWpvWjlFV09UVTBEWXdtc1Ra?= =?utf-8?B?OHljZDZkVVZLdGpuQW82dUh6YXh3d2M4MkZoSHRqYWxtU1BudUszblFPMDVZ?= =?utf-8?B?blhvMXBHRWlla2RaZW9iUko0MFk3d2pzSjNCSERlbE5uVU5Sd3JPMlRWVXZu?= =?utf-8?B?WnlCNFFaM0lyOWRMU3dtK04yeDhDcjYxNUpjWlkvWHNuWGxxTjRvNkVCUzJo?= =?utf-8?B?NXNqbkFBWUIwczQzcmtxTnQ1MHRYUzV2TlE4anNlcTVDK2VRZnVjWlRERHg0?= =?utf-8?B?d3Yrc2VtNTJvM1pvd2VOR09GZ3YxazM5enhkOVRMSEg4ZkYvWGg0OElXa21H?=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d6ZzVweTBORzJLN0ZGeklKVEV3aUd3?= =?utf-8?B?aDNIMVNBbGZ4cHNaNzA1WWpkNHh3bmM5M2hRK2d4Y0dialNHcXZMNGtqODYv?= =?utf-8?B?OXNYbUZOWk9BUU9RSXFpbXVGeFFpMWdKQlZLOXFjOGRPVHZyb3piS3JRM0wy?= =?utf-8?B?K05UclJpeGxCdUtmbi9PU29yZWpiZHhTTVpSSHhuNmJKSjc3bGM1YVQ3OWNC?= =?utf-8?B?aUJYM2JRcSthZkV0dmcxb25iYUVBNVdWWVJyQ3h2cncxdlFWK2dQU0F6L3NN?= =?utf-8?B?b3hYcjNmN3lHSTF3bkFBUGZQWWNoenIxa2J5ME80M0dmYll5WmxxMlRBKzVU?= =?utf-8?Q?LcvzLSnaDCIQy+ueHoM3QDH+a8RYpOpWeug3uY=3D?= X-Forefront-PRVS: 0373D94D15 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39410400002)(39860400002)(39840400002)(39400400002)(39850400002)(39450400003)(25786009)(50226002)(47776003)(66066001)(2361001)(42186005)(8676002)(2870700001)(81166006)(23676002)(2906002)(54906002)(4326008)(53936002)(50466002)(7350300001)(5660300001)(76176999)(50986999)(450100002)(53416004)(36756003)(2351001)(86362001)(38730400002)(305945005)(189998001)(72206003)(478600001)(575784001)(6666003)(6916009)(6486002)(6116002)(3846002)(2950100002)(7736002)(110136004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0235; H:Harpoon.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyMDFNQjAyMzU7MjM6RG4xRjFxdUJsQnBFaHRYdTNFZHJ6S2Np?= =?utf-8?B?dnkrREM0L3lrY2tkS1hObWNPemk5U1dxOFY2NzVvc1RCYzBadHJpd1pIVjhE?= =?utf-8?B?bkhqd1hFOVlmMHFFK1YvY0wyNFkrYmo5aHZZVHZWWGYyeGc2VVh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-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2017 02:22:09.0698 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0235 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;