From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760517AbcBYKBV (ORCPT ); Thu, 25 Feb 2016 05:01:21 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:8354 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760328AbcBYKBR (ORCPT ); Thu, 25 Feb 2016 05:01:17 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 25 Feb 2016 02:00:12 -0800 From: Alexandre Courbot To: Thierry Reding , =?UTF-8?q?Terje=20Bergstr=C3=B6m?= , Stephen Warren CC: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, gnurou@gmail.com, Alexandre Courbot Subject: [PATCH v3 1/2] gpu: host1x: Set DMA ops on device creation Date: Thu, 25 Feb 2016 19:00:57 +0900 Message-ID: <1456394458-15759-1-git-send-email-acourbot@nvidia.com> X-Mailer: git-send-email 2.7.1 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently host1x-instanciated devices have their dma_ops left to NULL, which makes any DMA operation (like buffer import) on ARM64 fallback to the dummy_dma_ops and fail with an error. This patch calls of_dma_configure() with the host1x node when creating such a device, so the proper DMA operations are set. Suggested-by: Thierry Reding Signed-off-by: Alexandre Courbot --- Changes since v2: - Re-roll with patch 2/2 for completeness drivers/gpu/host1x/bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index c2e7fba370bb..c27858ae0552 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "bus.h" #include "dev.h" @@ -396,6 +397,7 @@ static int host1x_device_add(struct host1x *host1x, device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; device->dev.dma_mask = &device->dev.coherent_dma_mask; dev_set_name(&device->dev, "%s", driver->driver.name); + of_dma_configure(&device->dev, host1x->dev->of_node); device->dev.release = host1x_device_release; device->dev.bus = &host1x_bus_type; device->dev.parent = host1x->dev; -- 2.7.1