diff options
author | Jun Lei <Jun.Lei@amd.com> | 2019-08-15 22:22:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-14 02:02:52 +0300 |
commit | 119630061e72e6512ee8911b473cfacb6b211c53 (patch) | |
tree | 635e2cfcce3846fb195e0cf6511948c5da309f7d /drivers/gpu/drm/amd/display/dc/gpio | |
parent | ff344c8d2a404e441b83182d0bd68d97e37894eb (diff) | |
download | linux-119630061e72e6512ee8911b473cfacb6b211c53.tar.xz |
drm/amd/display: remove hw access from dc_destroy
[why]
dc_destroy should only clean up SW, this is because GPUs may be
removed before driver unload, leading to HW to be unavailable.
[how]
remove GPIO close as part of GPIO destroy, this is unnecessary because
GPIO is not shared, and GPIOs are generally closed after being opened
Add tracking to HW access during destructor to make future issues
easier to pinpoint, and block access to prevent hangs.
Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/gpio')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c index f8f85490e77e..f67c18375bfd 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c @@ -321,8 +321,6 @@ void dal_gpio_destroy( return; } - dal_gpio_close(*gpio); - switch ((*gpio)->id) { case GPIO_ID_DDC_DATA: kfree((*gpio)->hw_container.ddc); diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c index d03165e71dc6..92280cc05e2d 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c @@ -169,7 +169,6 @@ void dal_gpio_destroy_generic_mux( return; } - dal_gpio_close(*mux); dal_gpio_destroy(mux); kfree(*mux); @@ -460,7 +459,6 @@ void dal_gpio_destroy_irq( return; } - dal_gpio_close(*irq); dal_gpio_destroy(irq); kfree(*irq); |