platform: release IOMMU's mm upon exit
PATCH 1/3 platform: release IOMMU's mm upon exit
nvkm_mm_fini() was not called when exiting the driver, resulting in a memory leak. Fix this.
Signed-off-by Alexandre Courbot <[email protected]>
--- drm/nouveau/nouveau_platform.c | 1 + 1 file changed, 1 insertion(+)
drm/nouveau/nouveau_platform.c +1 -0
@@ -152,6 +152,7 @@ static void nouveau_platform_remove_iommu(struct device *dev, struct nouveau_platform_gpu *gpu) {if (gpu->iommu.domain) { +nvkm_mm_fini (&gpu->iommu._mm);iommu_detach_device (gpu->iommu.domain, dev);iommu_domain_free (gpu->iommu.domain); }
Signature · 6 lines
2.3.3 _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 1426848066-13700-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
PATCH 2/3 platform: fix probe error path
A "return 0" found its way in the middle of the error path of nouveau_platform_probe(), remove it as it will make the kernel crash if we try to unload the module afterwards.
While we are at it, also remove the IOMMU domain if it has been created, as we should.
Signed-off-by Alexandre Courbot <[email protected]>
--- drm/nouveau/nouveau_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drm/nouveau/nouveau_platform.c +1 -2
@@ -209,10 +209,9 @@ static int nouveau_platform_probe(struct platform_device *pdev) err_unref:drm_dev_unref (drm); -return 0 ; - power_down:nouveau_platform_power_down (gpu); +nouveau_platform_remove_iommu (&pdev->dev, gpu);return err; }
Signature · 1 line
2.3.3
PATCH 3/3 pmu/gk20a: add some missing statics
In reply to a message not in the archiveMake static a few functions and structures that should be.
Signed-off-by Alexandre Courbot <[email protected]>
--- drm/nouveau/nvkm/subdev/pmu/gk20a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drm/nouveau/nvkm/subdev/pmu/gk20a.c +4 -3
@@ -159,7 +159,7 @@ resched:nvkm_timer_alarm (priv,100000000 , alarm); } -int +static int gk20a_pmu_fini (struct nvkm_object *object,bool suspend) {struct nvkm_pmu *pmu = (void *)object;
@@ -170,7 +170,7 @@ gk20a_pmu_fini(struct nvkm_object *object, bool suspend)return nvkm_subdev_fini (&pmu->base, suspend); } -int +static int gk20a_pmu_init (struct nvkm_object *object) {struct nvkm_pmu *pmu = (void *)object;
@@ -192,7 +192,8 @@ gk20a_pmu_init(struct nvkm_object *object)return ret; } -struct gk20a_pmu_dvfs_data gk20a_dvfs_data= { +static struct gk20a_pmu_dvfs_data +gk20a_dvfs_data= { .p_load_target =70 , .p_load_max =90 , .p_smooth =1 ,
Signature · 6 lines
2.3.3 _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau