drm: hdlcd: Revamp runtime power management
Because the HDLCD driver acts as a component master it can end up enabling the runtime PM functionality before the encoders are initialised. This can cause crashes if the component slave never probes (missing module) or if the PM operations kick in before the probe finishes. Move the enabling of the runtime PM after the component master has finished collecting the slave components and use the DRM atomic helpers to suspend and resume the device. Tested-by: Robin Murphy <Robin.Murphy@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
This commit is contained in:
@@ -13,6 +13,7 @@ struct hdlcd_drm_private {
|
||||
struct list_head event_list;
|
||||
struct drm_crtc crtc;
|
||||
struct drm_plane *plane;
|
||||
struct drm_atomic_state *state;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
atomic_t buffer_underrun_count;
|
||||
atomic_t bus_error_count;
|
||||
@@ -36,7 +37,5 @@ static inline u32 hdlcd_read(struct hdlcd_drm_private *hdlcd, unsigned int reg)
|
||||
|
||||
int hdlcd_setup_crtc(struct drm_device *dev);
|
||||
void hdlcd_set_scanout(struct hdlcd_drm_private *hdlcd);
|
||||
void hdlcd_crtc_suspend(struct drm_crtc *crtc);
|
||||
void hdlcd_crtc_resume(struct drm_crtc *crtc);
|
||||
|
||||
#endif /* __HDLCD_DRV_H__ */
|
||||
|
Reference in New Issue
Block a user