drm/vc4: Fix double destroy of the BO cache on teardown.
Subsystems (3)
PATCH 1/3 drm/vc4: Fix double destroy of the BO cache on teardown.
It's also destroyed from the top level vc4_drv.c initialization, which is where the cache was actually initialized from.
This used to just involve duplicate del_timer() and cancel_work_sync() being called, but it started causing kmalloc issues once we double-freed the new BO label array.
--- drivers/gpu/drm/vc4/vc4_gem.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/vc4/vc4_gem.c +0 -2
@@ -1117,6 +1117,4 @@ vc4_gem_destroy(struct drm_device *dev)if (vc4->hang_state)vc4_free_hang_state (dev, vc4->hang_state); - -vc4_bo_cache_destroy (dev); }
Signature · 6 lines
2.13.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/3 drm/vc4: Don't disable DSI clocks on component unload.
The clocks are enabled/disabled at encoder enable/disable time, not at component load. Fixes a WARN_ON at boot if V3D fails to probe.
--- drivers/gpu/drm/vc4/vc4_dsi.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/vc4/vc4_dsi.c +0 -3
@@ -1641,9 +1641,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,mipi_dsi_host_unregister (&dsi->dsi_host); -clk_disable_unprepare (dsi->pll_phy_clock); -clk_disable_unprepare (dsi->escape_clock); -if (dsi->port ==1 ) vc4->dsi1 =NULL ; }
Signature · 6 lines
2.13.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/3] drm/vc4: Don't disable DSI clocks on component unload.
Den 02.08.2017 22.32, skrev Eric Anholt:
Quoted 6 lines
The clocks are enabled/disabled at encoder enable/disable time, not at component load. Fixes a
WARN_ONat boot if V3D fails to probe.Fixes 4078f5757144 ("drm/vc4: Add DSI driver")Signed-off-by Eric Anholt <[email protected]>---
Quoted 17 lines
drivers/gpu/drm/vc4/vc4_dsi.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/vc4/vc4_dsi.c +0
-3@@ -1641,9 +1641,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,mipi_dsi_host_unregister (&dsi->dsi_host); -clk_disable_unprepare (dsi->pll_phy_clock); -clk_disable_unprepare (dsi->escape_clock); -if (dsi->port ==1 ) vc4->dsi1 =NULL ; }
Re: [PATCH 2/3] drm/vc4: Don't disable DSI clocks on component unload.
In reply to Eric AnholtQuoted 5 lines · On Wed, 2 Aug 2017 13:32:41 -0700 Eric Anholt <[email protected]> wrote:
The clocks are enabled/disabled at encoder enable/disable time, not at component load. Fixes a
WARN_ONat boot if V3D fails to probe.Fixes 4078f5757144 ("drm/vc4: Add DSI driver")Signed-off-by Eric Anholt <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/vc4/vc4_dsi.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/vc4/vc4_dsi.c +0
-0
drivers/gpu/drm/vc4/vc4_dsi.c static void vc4_dsi_unbind(struct device *dev, struct device *master, · line 1646
Quoted 9 lines
drivers/gpu/drm/vc4/vc4_dsi.c +0
-3@@ -1641,9 +1641,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,mipi_dsi_host_unregister (&dsi->dsi_host); -clk_disable_unprepare (dsi->pll_phy_clock); -clk_disable_unprepare (dsi->escape_clock); -if (dsi->port ==1 ) vc4->dsi1 =NULL ; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 drm/vc4: Fix errant drm_bridge_remove() in DSI.
In reply to Eric Anholtdrm_bridge_remove() is for unregistering a bridge driver, not for detaching a bridge from its consumer.
--- drivers/gpu/drm/vc4/vc4_dsi.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/vc4/vc4_dsi.c +0 -1
@@ -1636,7 +1636,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,pm_runtime_disable (dev); -drm_bridge_remove (dsi->bridge);vc4_dsi_encoder_destroy (dsi->encoder);mipi_dsi_host_unregister (&dsi->dsi_host);
Signature · 6 lines
2.13.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm/vc4: Fix errant drm_bridge_remove() in DSI.
Den 02.08.2017 22.32, skrev Eric Anholt:
Quoted 6 lines
drm_bridge_remove()is for unregistering a bridge driver, not for detaching a bridge from its consumer.Fixes 656fa22f9cea ("drm/vc4: Switch DSI to the panel-bridge layer, and support bridges.")Signed-off-by Eric Anholt <[email protected]>---
Quoted 15 lines
drivers/gpu/drm/vc4/vc4_dsi.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/vc4/vc4_dsi.c +0
-1@@ -1636,7 +1636,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,pm_runtime_disable (dev); -drm_bridge_remove (dsi->bridge);vc4_dsi_encoder_destroy (dsi->encoder);mipi_dsi_host_unregister (&dsi->dsi_host);
Re: [PATCH 3/3] drm/vc4: Fix errant drm_bridge_remove() in DSI.
In reply to Eric AnholtQuoted 1 line · On Wed, 2 Aug 2017 13:32:42 -0700 Eric Anholt <[email protected]> wrote:
drm_bridge_remove()is for unregistering a bridge driver, not for
s/driver/device/
Quoted 4 lines
detaching a bridge from its consumer.
Fixes 656fa22f9cea ("drm/vc4: Switch DSI to the panel-bridge layer, and support bridges.")Signed-off-by Eric Anholt <[email protected]>
Quoted 16 lines
--- drivers/gpu/drm/vc4/vc4_dsi.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/vc4/vc4_dsi.c +0
-1@@ -1636,7 +1636,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,pm_runtime_disable (dev); -drm_bridge_remove (dsi->bridge);vc4_dsi_encoder_destroy (dsi->encoder);mipi_dsi_host_unregister (&dsi->dsi_host);
Den 02.08.2017 22.32, skrev Eric Anholt:
Quoted 18 lines
It's also destroyed from the top level
vc4_drv.cinitialization, which is where the cache was actually initialized from.This used to just involve duplicate
del_timer()andcancel_work_sync()being called, but it started causing kmalloc issues once we double-freed the new BO label array.Fixes 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats")Signed-off-by Eric Anholt <[email protected]>--- drivers/gpu/drm/vc4/vc4_gem.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/vc4/vc4_gem.c +0
-0
drivers/gpu/drm/vc4/vc4_gem.c vc4_gem_destroy(struct drm_device *dev) · line 1120
Quoted 6 lines
drivers/gpu/drm/vc4/vc4_gem.c +0
-2@@ -1117,6 +1117,4 @@ vc4_gem_destroy(struct drm_device *dev)if (vc4->hang_state)vc4_free_hang_state (dev, vc4->hang_state); - -vc4_bo_cache_destroy (dev); }
I don't have a display connected, but there's no crashing anymore.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · On Wed, 2 Aug 2017 13:32:40 -0700 Eric Anholt <[email protected]> wrote:
It's also destroyed from the top level
vc4_drv.cinitialization, which is where the cache was actually initialized from.This used to just involve duplicate
del_timer()andcancel_work_sync()being called, but it started causing kmalloc issues once we double-freed the new BO label array.Fixes 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats")Signed-off-by Eric Anholt <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/vc4/vc4_gem.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/vc4/vc4_gem.c +0
-0
drivers/gpu/drm/vc4/vc4_gem.c vc4_gem_destroy(struct drm_device *dev) · line 1120
Quoted 6 lines
drivers/gpu/drm/vc4/vc4_gem.c +0
-2@@ -1117,6 +1117,4 @@ vc4_gem_destroy(struct drm_device *dev)if (vc4->hang_state)vc4_free_hang_state (dev, vc4->hang_state); - -vc4_bo_cache_destroy (dev); }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel