Since the DRM page flip mechanism keeps updatign the crtc->fb member
with the current fb to be flipped, this gets out-of-sync with the
psb_fb_helper->fb member. In the event of a HDMI hotplug, this mismatch
causes the HDMI hotplug event to be deferred and never handled. Ensure
that we are keeping both the members in sync always during flip.
Signed-off-by: Arun Kannan <arun.kannan@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
PVRSRV_KERNEL_MEM_INFO *new_fb_mem_info, *current_fb_mem_info;
struct pending_flip *new_pending_flip;
struct psb_fpriv *priv;
+ struct drm_device *dev = crtc->dev;
+ struct psb_fbdev *fbdev = NULL;
unsigned long flags;
struct pvr_trcmd_flpreq *fltrace;
current_fb_mem_info = get_fb_meminfo(crtc->fb);
+ /* In page flip, change the psb_fb_helper.fb to the swapped fb.*/
+ if (dev->dev_private)
+ fbdev = ((struct drm_psb_private *)dev->dev_private)->fbdev;
+ if (fbdev)
+ fbdev->psb_fb_helper.fb = fb;
+ else
+ printk(KERN_ALERT "%s cannot find the fb\n", __func__);
+
crtc->fb = fb;
new_pending_flip->old_mem_info = current_fb_mem_info;