mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 00:07:22 +07:00
drm/arm/malidp: Modified the prototype of malidp irq de-initializers
Malidp uses two interrupts ie 1. se_irq - used for memory writeback. and 2. de_irq - used for display output. 'struct drm_device' is being replaced with 'struct malidp_hw_device' as the function argument. The reason being the dependency of malidp_de_irq_fini on 'struct drm_device' needs to be removed so as to enable it to call from functions which receives 'struct malidp_hw_device' as argument. Furthermore, there is no way to retrieve 'struct drm_device' from 'struct malidp_hw_device'. Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
This commit is contained in:
parent
613c5c7fc8
commit
62862cfbb1
@ -304,6 +304,8 @@ static int malidp_irq_init(struct platform_device *pdev)
|
||||
{
|
||||
int irq_de, irq_se, ret = 0;
|
||||
struct drm_device *drm = dev_get_drvdata(&pdev->dev);
|
||||
struct malidp_drm *malidp = drm->dev_private;
|
||||
struct malidp_hw_device *hwdev = malidp->dev;
|
||||
|
||||
/* fetch the interrupts from DT */
|
||||
irq_de = platform_get_irq_byname(pdev, "DE");
|
||||
@ -323,7 +325,7 @@ static int malidp_irq_init(struct platform_device *pdev)
|
||||
|
||||
ret = malidp_se_irq_init(drm, irq_se);
|
||||
if (ret) {
|
||||
malidp_de_irq_fini(drm);
|
||||
malidp_de_irq_fini(hwdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -763,8 +765,8 @@ static int malidp_bind(struct device *dev)
|
||||
fbdev_fail:
|
||||
pm_runtime_get_sync(dev);
|
||||
vblank_fail:
|
||||
malidp_se_irq_fini(drm);
|
||||
malidp_de_irq_fini(drm);
|
||||
malidp_se_irq_fini(hwdev);
|
||||
malidp_de_irq_fini(hwdev);
|
||||
drm->irq_enabled = false;
|
||||
irq_init_fail:
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
@ -794,14 +796,15 @@ static void malidp_unbind(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm = dev_get_drvdata(dev);
|
||||
struct malidp_drm *malidp = drm->dev_private;
|
||||
struct malidp_hw_device *hwdev = malidp->dev;
|
||||
|
||||
drm_dev_unregister(drm);
|
||||
drm_fb_cma_fbdev_fini(drm);
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
pm_runtime_get_sync(dev);
|
||||
drm_crtc_vblank_off(&malidp->crtc);
|
||||
malidp_se_irq_fini(drm);
|
||||
malidp_de_irq_fini(drm);
|
||||
malidp_se_irq_fini(hwdev);
|
||||
malidp_de_irq_fini(hwdev);
|
||||
drm->irq_enabled = false;
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
component_unbind_all(dev, drm);
|
||||
|
@ -998,11 +998,8 @@ int malidp_de_irq_init(struct drm_device *drm, int irq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void malidp_de_irq_fini(struct drm_device *drm)
|
||||
void malidp_de_irq_fini(struct malidp_hw_device *hwdev)
|
||||
{
|
||||
struct malidp_drm *malidp = drm->dev_private;
|
||||
struct malidp_hw_device *hwdev = malidp->dev;
|
||||
|
||||
malidp_hw_disable_irq(hwdev, MALIDP_DE_BLOCK,
|
||||
hwdev->hw->map.de_irq_map.irq_mask);
|
||||
malidp_hw_disable_irq(hwdev, MALIDP_DC_BLOCK,
|
||||
@ -1102,11 +1099,8 @@ int malidp_se_irq_init(struct drm_device *drm, int irq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void malidp_se_irq_fini(struct drm_device *drm)
|
||||
void malidp_se_irq_fini(struct malidp_hw_device *hwdev)
|
||||
{
|
||||
struct malidp_drm *malidp = drm->dev_private;
|
||||
struct malidp_hw_device *hwdev = malidp->dev;
|
||||
|
||||
malidp_hw_disable_irq(hwdev, MALIDP_SE_BLOCK,
|
||||
hwdev->hw->map.se_irq_map.irq_mask);
|
||||
}
|
||||
|
@ -302,9 +302,9 @@ static inline void malidp_hw_enable_irq(struct malidp_hw_device *hwdev,
|
||||
}
|
||||
|
||||
int malidp_de_irq_init(struct drm_device *drm, int irq);
|
||||
void malidp_de_irq_fini(struct drm_device *drm);
|
||||
void malidp_de_irq_fini(struct malidp_hw_device *hwdev);
|
||||
int malidp_se_irq_init(struct drm_device *drm, int irq);
|
||||
void malidp_se_irq_fini(struct drm_device *drm);
|
||||
void malidp_se_irq_fini(struct malidp_hw_device *hwdev);
|
||||
|
||||
u8 malidp_hw_get_format_id(const struct malidp_hw_regmap *map,
|
||||
u8 layer_id, u32 format);
|
||||
|
Loading…
Reference in New Issue
Block a user