Message ID | 1454503374-16382-9-git-send-email-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Marek, 2016? 02? 03? 21:42? Marek Szyprowski ?(?) ? ?: > Virtual DRM device is used for memory allocation for GEM objects. On > some architectures null dma operations are assigned for virtual devices > if no explicit initialization has been made. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > --- > drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c > index 68f0f36..a33ea44 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c > @@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) > init_waitqueue_head(&private->wait); > spin_lock_init(&private->lock); > > + arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false); As you got the report, above function incurrs build error below, ERROR: "arch_setup_dma_ops" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined! Exynos drm can be built as a module. In this case, arch_setup_dma_ops cannot be accessed by the module. I could fix it easily like below but I'm not sure that it's reasonable. +extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, + u64 size, struct iommu_ops *iommu, + bool coherent) { }; Thanks, Inki Dae > dev_set_drvdata(dev->dev, dev); > dev->dev_private = (void *)private; > >
Hello, On 2016-02-12 06:55, Inki Dae wrote: > Hi Marek, > > 2016? 02? 03? 21:42? Marek Szyprowski ?(?) ? ?: >> Virtual DRM device is used for memory allocation for GEM objects. On >> some architectures null dma operations are assigned for virtual devices >> if no explicit initialization has been made. >> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> >> --- >> drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c >> index 68f0f36..a33ea44 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c >> @@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) >> init_waitqueue_head(&private->wait); >> spin_lock_init(&private->lock); >> >> + arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false); > As you got the report, above function incurrs build error below, > ERROR: "arch_setup_dma_ops" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined! > > Exynos drm can be built as a module. In this case, arch_setup_dma_ops cannot be accessed by the module. > > I could fix it easily like below but I'm not sure that it's reasonable. > > +extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, > + u64 size, struct iommu_ops *iommu, > + bool coherent) { }; I don't think this is a good idea - the result will be same as not applying the patch at all. Please drop this patch for now, I will rework it while adding support for generic IOMMU for ARM and ARM64. Best regards
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 68f0f36..a33ea44 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) init_waitqueue_head(&private->wait); spin_lock_init(&private->lock); + arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false); dev_set_drvdata(dev->dev, dev); dev->dev_private = (void *)private;
Virtual DRM device is used for memory allocation for GEM objects. On some architectures null dma operations are assigned for virtual devices if no explicit initialization has been made. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 + 1 file changed, 1 insertion(+)