aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/include/gpio_interface.h
diff options
context:
space:
mode:
authorSu Sung Chung <[email protected]>2019-07-08 15:31:39 +0000
committerAlex Deucher <[email protected]>2019-08-15 15:53:55 +0000
commit91db9311945f01901ddb9813ce11364de214a156 (patch)
tree1afec6692b3e5f2a29036ab0b889bf558adf91ac /drivers/gpu/drm/amd/display/include/gpio_interface.h
parentdrm/amd/display: Add work-around option to skip DCN20 clock updates (diff)
downloadkernel-91db9311945f01901ddb9813ce11364de214a156.tar.gz
kernel-91db9311945f01901ddb9813ce11364de214a156.zip
drm/amd/display: refactor gpio to allocate hw_container in constructor
[why] if dynamic allocation fails during gpio_open, it will cause crash due to page fault. [how] handle allocation when gpio object gets created and prevent from calling gpio_open if allocation failed Signed-off-by: Su Sung Chung <[email protected]> Reviewed-by: Jun Lei <[email protected]> Acked-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/include/gpio_interface.h')
-rw-r--r--drivers/gpu/drm/amd/display/include/gpio_interface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/include/gpio_interface.h b/drivers/gpu/drm/amd/display/include/gpio_interface.h
index 7de64195dc33..5e888a093c16 100644
--- a/drivers/gpu/drm/amd/display/include/gpio_interface.h
+++ b/drivers/gpu/drm/amd/display/include/gpio_interface.h
@@ -93,8 +93,17 @@ enum sync_source dal_gpio_get_sync_source(
enum gpio_pin_output_state dal_gpio_get_output_state(
const struct gpio *gpio);
+struct hw_ddc *dal_gpio_get_ddc(struct gpio *gpio);
+
+struct hw_hpd *dal_gpio_get_hpd(struct gpio *gpio);
+
+struct hw_generic *dal_gpio_get_generic(struct gpio *gpio);
+
/* Close the handle */
void dal_gpio_close(
struct gpio *gpio);
+
+
+
#endif