From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> To: Rob Herring <robh@kernel.org>, Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: linux-kernel@vger.kernel.org, Robin Murphy <robin.murphy@arm.com>, Julien Grall <julien.grall@arm.com>, Juergen Gross <jgross@suse.com>, Stefano Stabellini <sstabellini@kernel.org>, xen-devel@lists.xenproject.org Subject: Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API Date: Thu, 26 Sep 2019 11:06:31 +0200 [thread overview] Message-ID: <fcdf6f6325d8afbd6c0b91c782b8ef89ba3dc1d0.camel@suse.de> (raw) In-Reply-To: <20190925215006.12056-1-robh@kernel.org> [-- Attachment #1: Type: text/plain, Size: 2055 bytes --] On Wed, 2019-09-25 at 16:50 -0500, Rob Herring wrote: > As the comment says, this isn't a DT based device. of_dma_configure() > is going to stop allowing a NULL DT node, so this needs to be fixed. > > Not sure exactly what setup besides arch_setup_dma_ops is needed... > > Cc: Robin Murphy <robin.murphy@arm.com> > Cc: Julien Grall <julien.grall@arm.com> > Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> > Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Cc: Juergen Gross <jgross@suse.com> > Cc: Stefano Stabellini <sstabellini@kernel.org> > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Rob Herring <robh@kernel.org> Just so it isn't forgotten, the same applies here: diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index ba1828acd8c9..de316a891f39 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -11,7 +11,6 @@ #include <linux/delay.h> #include <linux/dma-mapping.h> #include <linux/module.h> -#include <linux/of_device.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> @@ -718,19 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, struct device *dev = &xb_dev->dev; int ret; - /* - * The device is not spawn from a device tree, so arch_setup_dma_ops - * is not called, thus leaving the device with dummy DMA ops. - * This makes the device return error on PRIME buffer import, which - * is not correct: to fix this call of_dma_configure() with a NULL - * node to set default DMA ops. - */ dev->coherent_dma_mask = DMA_BIT_MASK(32); - ret = of_dma_configure(dev, NULL, true); - if (ret < 0) { - DRM_ERROR("Cannot setup DMA ops, ret %d", ret); - return ret; - } front_info = devm_kzalloc(&xb_dev->dev, sizeof(*front_info), GFP_KERNEL); [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> To: Rob Herring <robh@kernel.org>, Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Juergen Gross <jgross@suse.com>, Stefano Stabellini <sstabellini@kernel.org>, linux-kernel@vger.kernel.org, Julien Grall <julien.grall@arm.com>, xen-devel@lists.xenproject.org, Robin Murphy <robin.murphy@arm.com> Subject: Re: [Xen-devel] [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API Date: Thu, 26 Sep 2019 11:06:31 +0200 [thread overview] Message-ID: <fcdf6f6325d8afbd6c0b91c782b8ef89ba3dc1d0.camel@suse.de> (raw) In-Reply-To: <20190925215006.12056-1-robh@kernel.org> [-- Attachment #1.1: Type: text/plain, Size: 2055 bytes --] On Wed, 2019-09-25 at 16:50 -0500, Rob Herring wrote: > As the comment says, this isn't a DT based device. of_dma_configure() > is going to stop allowing a NULL DT node, so this needs to be fixed. > > Not sure exactly what setup besides arch_setup_dma_ops is needed... > > Cc: Robin Murphy <robin.murphy@arm.com> > Cc: Julien Grall <julien.grall@arm.com> > Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> > Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Cc: Juergen Gross <jgross@suse.com> > Cc: Stefano Stabellini <sstabellini@kernel.org> > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Rob Herring <robh@kernel.org> Just so it isn't forgotten, the same applies here: diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index ba1828acd8c9..de316a891f39 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -11,7 +11,6 @@ #include <linux/delay.h> #include <linux/dma-mapping.h> #include <linux/module.h> -#include <linux/of_device.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> @@ -718,19 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, struct device *dev = &xb_dev->dev; int ret; - /* - * The device is not spawn from a device tree, so arch_setup_dma_ops - * is not called, thus leaving the device with dummy DMA ops. - * This makes the device return error on PRIME buffer import, which - * is not correct: to fix this call of_dma_configure() with a NULL - * node to set default DMA ops. - */ dev->coherent_dma_mask = DMA_BIT_MASK(32); - ret = of_dma_configure(dev, NULL, true); - if (ret < 0) { - DRM_ERROR("Cannot setup DMA ops, ret %d", ret); - return ret; - } front_info = devm_kzalloc(&xb_dev->dev, sizeof(*front_info), GFP_KERNEL); [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 157 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-09-26 9:06 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-25 21:50 [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API Rob Herring 2019-09-25 21:50 ` [Xen-devel] " Rob Herring 2019-09-26 9:06 ` Nicolas Saenz Julienne [this message] 2019-09-26 9:06 ` Nicolas Saenz Julienne 2019-09-26 9:49 ` Julien Grall 2019-09-26 9:49 ` [Xen-devel] " Julien Grall 2019-09-26 10:17 ` Oleksandr Andrushchenko 2019-09-26 10:17 ` [Xen-devel] " Oleksandr Andrushchenko 2019-09-26 10:46 ` Robin Murphy 2019-09-26 10:46 ` [Xen-devel] " Robin Murphy 2019-09-26 11:16 ` Oleksandr Andrushchenko 2019-09-26 11:16 ` [Xen-devel] " Oleksandr Andrushchenko 2019-09-26 19:27 ` Rob Herring 2019-09-26 19:27 ` [Xen-devel] " Rob Herring 2019-10-01 18:23 ` Stefano Stabellini 2019-10-01 18:23 ` [Xen-devel] " Stefano Stabellini 2019-10-02 4:42 ` Oleksandr Andrushchenko 2019-10-02 4:42 ` [Xen-devel] " Oleksandr Andrushchenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=fcdf6f6325d8afbd6c0b91c782b8ef89ba3dc1d0.camel@suse.de \ --to=nsaenzjulienne@suse.de \ --cc=boris.ostrovsky@oracle.com \ --cc=jgross@suse.com \ --cc=julien.grall@arm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=oleksandr_andrushchenko@epam.com \ --cc=robh@kernel.org \ --cc=robin.murphy@arm.com \ --cc=sstabellini@kernel.org \ --cc=xen-devel@lists.xenproject.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.