From patchwork Thu Nov 28 15:37:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11266293 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 CC0DB14B7 for ; Thu, 28 Nov 2019 15:38:15 +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 B3A7C2084D for ; Thu, 28 Nov 2019 15:38:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3A7C2084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F201B6E845; Thu, 28 Nov 2019 15:38:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7002A89A32 for ; Thu, 28 Nov 2019 15:37:50 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id z7so28211586wrl.13 for ; Thu, 28 Nov 2019 07:37:50 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=1T7/AcKP+hhj8SOL+bY3lDT9n71bxZ0GZTUy8vWuG2g=; b=qy3hWbU9kETYMvMqP37HkajAq5xA3S5+ewKvj79yfOL9OtV3kfGvO4tlqHz6vaZSKH bg2h182Uit0wS+awdTCKRUM03WosmsBX3bGGJTq8eUf1XJV+/994vO4Qyxdg76320G68 um4c+Lt2LbyY7kZBaCMp/SILI7eoHcUePQ5kj2lKfk5K161A0rba+UZFlWeI8gprmwZ1 zl27T1qRMCPqWR7mBxTwumwJ7HT9wr/Zr9Q5aop7PHXCcCBM8owb7Ey1MWXwb4G+Pc1r pMPt19lAt8IK7cVGesLWm9OviOKXwUnpvwsbV2Ob5qGab+HPyYf/s/3bZONheavQ4xtI suJQ== X-Gm-Message-State: APjAAAXkpLbVnVK9zVUsYnEt0TLcoy52FH9BeLkCEm2STEuvk3TjXhwk W4tpqL6Kgt1xcZYVzvUYT6U= X-Google-Smtp-Source: APXvYqxKLainoNtcc0HDYljhnL3r7ynNz0rfcrAvv/OaB23srWIx2DeO4OnP3I8objnbbNwISXF4/A== X-Received: by 2002:adf:ec48:: with SMTP id w8mr1044845wrn.19.1574955468937; Thu, 28 Nov 2019 07:37:48 -0800 (PST) Received: from localhost (pD9E518ED.dip0.t-ipconnect.de. [217.229.24.237]) by smtp.gmail.com with ESMTPSA id l26sm10811590wmj.48.2019.11.28.07.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 07:37:48 -0800 (PST) From: Thierry Reding To: Thierry Reding Subject: [PATCH 3/9] drm/tegra: gem: Remove premature import restrictions Date: Thu, 28 Nov 2019 16:37:35 +0100 Message-Id: <20191128153741.2380419-4-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128153741.2380419-1-thierry.reding@gmail.com> References: <20191128153741.2380419-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-Mailman-Original-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 :mime-version:content-transfer-encoding; bh=1T7/AcKP+hhj8SOL+bY3lDT9n71bxZ0GZTUy8vWuG2g=; b=Tpd2Ng5wKj1h9mYegR6CcgORwfu+unKC6Z52kdP+Lh8xc10PYhNiJMKy1fXhyhMNe4 EVEm0JMyoShZpbXGeWhr8DR0AgVeWVyQXNjxoA6vP0FJeWexKJeo5Ctl4u3sYLoNiaV5 c5w1G38jZojKpu3AwC3MieqnPKVXIkaaF0Fw1kO1o/e19vzRs9dW1W7zrIqsksMksmis c2v8QLm6zuLIvc5WreVea9H2sEdgfwQ1Mz7QZJApfymVkwHJNLCViktOX9GXw+o7Dtja 11UbqMN2ADA9pIh4RJizyvCeZWzcVkoDmrF9idnwTQ4Wxpj3/yqAtjBFT0IbIMGW5NHP w/PQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thierry Reding It's not known at import time whether or not all users of a DMA-BUF will be able to deal with non-contiguous memory. Each user needs to verify at map-time whether it can access the buffer. Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter --- drivers/gpu/drm/tegra/gem.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index 6dfad56eee2b..bc15b430156d 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -440,13 +440,6 @@ static struct tegra_bo *tegra_bo_import(struct drm_device *drm, err = tegra_bo_iommu_map(tegra, bo); if (err < 0) goto detach; - } else { - if (bo->sgt->nents > 1) { - err = -EINVAL; - goto detach; - } - - bo->iova = sg_dma_address(bo->sgt->sgl); } bo->gem.import_attach = attach;