Skip to contentSkip to conversation

drm/vc4: Mark the device as active when enabling runtime PM.

PATCH In review Eric Anholt 2 participants 2 messages May 15, 2017 – Jun 2, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: Mark the device as active when enabling runtime PM.

Failing to do so meant that we got a resume() callback on first use of the device, so we would leak the bin BO that we allocated during probe.

Fixes 553c942f8b2c ("drm/vc4: Allow using more than 256MB of CMA memory.")
---
 drivers/gpu/drm/vc4/vc4_v3d.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vc4/vc4_v3d.c +1 -0
index e3d5c59dbd4a..825a8462a63b 100644
@@ -403,6 +403,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
 		return ret;
 	}
 
+	pm_runtime_set_active(dev);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */
 	pm_runtime_enable(dev);
Signature · 6 lines
2.11.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Mon, 15 May 2017 10:16:15 -0700 Eric Anholt <[email protected]> wrote:

Failing to do so meant that we got a resume() callback on first use of the device, so we would leak the bin BO that we allocated during probe.

Fixes 553c942f8b2c ("drm/vc4: Allow using more than 256MB of CMA memory.")
Quoted 9 lines
---
 drivers/gpu/drm/vc4/vc4_v3d.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vc4/vc4_v3d.c +0 -0
index e3d5c59dbd4a..825a8462a63b 100644

drivers/gpu/drm/vc4/vc4_v3d.c static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) · line 409

Quoted 7 lines
drivers/gpu/drm/vc4/vc4_v3d.c +1 -0
@@ -403,6 +403,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
 		return ret;
 	}
 
+	pm_runtime_set_active(dev);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */
 	pm_runtime_enable(dev);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel