helper->funcs = funcs;
}
-void drm_flip_helper_fini(struct drm_flip_helper *helper)
+void drm_flip_helper_clear(struct drm_flip_helper *helper)
{
unsigned long flags;
struct drm_flip_driver *driver = helper->driver;
queue_work(driver->wq, &driver->cleanup_work);
}
+void drm_flip_helper_fini(struct drm_flip_helper *helper)
+{
+ struct drm_flip_driver *driver = helper->driver;
+
+ drm_flip_helper_clear(helper);
+
+ flush_work_sync(&driver->finish_work);
+ flush_work_sync(&driver->cleanup_work);
+}
+
void drm_flip_helper_vblank(struct drm_flip_helper *helper)
{
struct drm_flip_driver *driver = helper->driver;
void drm_flip_driver_fini(struct drm_flip_driver *driver)
{
- flush_work_sync(&driver->finish_work);
- flush_work_sync(&driver->cleanup_work);
-
destroy_workqueue(driver->wq);
/* All the scheduled flips should be cleaned up by now. */
const struct drm_flip_helper_funcs *funcs);
/*
- * Finalize flip helper. This will forcefully complete the
+ * Clear flip helper state. This will forcefully complete the
* helper's pending flip (if any).
*/
+void drm_flip_helper_clear(struct drm_flip_helper *helper);
+
+/*
+ * Finalize the flip helper. This will forcefully complete the
+ * helper's pending flip (if any), and wait for the finish and
+ * cleanup works to finish.
+ */
void drm_flip_helper_fini(struct drm_flip_helper *helper);
/*
mdfld_dsi_dpi_shut_down(dpi_output, pipe); //Send shut down command
dsi_set_device_ready_state(dev, 0, pipe); //Clear device ready state
+
+ mdfld_pipe_disabled(dev, pipe);
}
static void mdfld_dsi_configure_up(struct mdfld_dsi_encoder * dsi_encoder, int pipe)
return &oflip->base;
}
+
+void mdfld_overlay_pipe_disabled(struct drm_plane *plane, int pipe)
+{
+ struct mfld_overlay *ovl = to_mfld_overlay(plane);
+
+ if (ovl->pipe != pipe)
+ return;
+
+ drm_flip_helper_clear(&ovl->flip_helper);
+}
#include "bufferclass_video_linux.h"
#include "android_hdmi.h"
-#include "psb_page_flip.h"
int drm_psb_debug;
/*EXPORT_SYMBOL(drm_psb_debug); */
struct drm_psb_private *dev_priv =
(struct drm_psb_private *) dev->dev_private;
- psb_page_flip_fini(dev);
-
/*Fristly, unload pvr driver*/
PVRSRVDrmUnload(dev);
gl3_enable();
#endif
- psb_page_flip_init(dev);
-
/*Intel drm driver load is done, continue doing pvr load*/
DRM_DEBUG("Pvr driver load\n");
#include "psb_ttm_userobj_api.h"
#include "psb_fb.h"
#include "psb_pvr_glue.h"
+#include "psb_page_flip.h"
#include "mdfld_dsi_dbi.h"
#include "mdfld_dsi_output.h"
mode_dev->bo_pin_for_scanout = psb_bo_pin_for_scanout;
mode_dev->bo_unpin_for_scanout = psb_bo_unpin_for_scanout;
+ psb_page_flip_init(dev);
+
drm_mode_config_init(dev);
dev->mode_config.min_width = 0;
drm_mode_config_cleanup(dev);
+ psb_page_flip_fini(dev);
+
mutex_unlock(&dev->struct_mutex);
}
}
+void mdfld_pipe_disabled(struct drm_device *dev, int pipe)
+{
+ struct drm_psb_private *dev_priv = dev->dev_private;
+ struct drm_crtc *crtc;
+ int i;
+
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+ struct psb_intel_crtc *psb_intel_crtc = to_psb_intel_crtc(crtc);
+
+ if (psb_intel_crtc->pipe == pipe) {
+ drm_flip_helper_clear(&psb_intel_crtc->flip_helper);
+ break;
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(dev_priv->overlays); i++) {
+ if (!dev_priv->overlays[i])
+ continue;
+ mdfld_overlay_pipe_disabled(dev_priv->overlays[i], pipe);
+ }
+}
+
/**
* Sets the power management mode of the pipe and plane.
*
#endif /* MDFLD_PO_JLIU7 */
}
}
+
+ mdfld_pipe_disabled(dev, pipe);
break;
}
extern int intelfb_remove(struct drm_device *dev,
struct drm_framebuffer *fb);
extern void mdfld_disable_crtc (struct drm_device *dev, int pipe);
+extern void mdfld_pipe_disabled(struct drm_device *dev, int pipe);
extern void mdfld_dbi_update_fb (struct drm_device *dev, int pipe);
extern void mdfld_dbi_enter_dsr (struct drm_device *dev);
extern void mdfld_overlay_resume(struct drm_plane *plane);
extern struct drm_flip *mdfld_overlay_atomic_flip(struct drm_plane *plane, int pipe);
extern void mdfld_overlay_process_vblank(struct drm_plane *plane, int pipe);
+extern void mdfld_overlay_pipe_disabled(struct drm_plane *plane, int pipe);
#endif /* __INTEL_DRV_H__ */