Permalink
Browse files

Better fix for quitting X hang. Interrupted mailbox reads are not som…

…ething we can reliably recover from, so down_interruptable is not a safe call.
  • Loading branch information...
1 parent 8b47c68 commit 34b34bdafecf00b8db1b4436a9a59205969888b6 @popcornmix popcornmix committed with Jul 14, 2012
Showing with 4 additions and 11 deletions.
  1. +4 −8 arch/arm/mach-bcm2708/vcio.c
  2. +0 −3 drivers/video/bcm2708_fb.c
@@ -119,14 +119,10 @@ static int mbox_read(struct vc_mailbox *mbox, unsigned chan, uint32_t *data28)
if (mbox->magic != MBOX_MAGIC)
rc = -EINVAL;
else {
- if (down_interruptible(&mbox->sema[chan]) == 0) {
- *data28 = MBOX_DATA28(mbox->msg[chan]);
- mbox->msg[chan] = 0;
- rc = 0;
- } else {
- /* The wait was interrupted */
- rc = -EINTR;
- }
+ down(&mbox->sema[chan]);
+ *data28 = MBOX_DATA28(mbox->msg[chan]);
+ mbox->msg[chan] = 0;
+ rc = 0;
}
return rc;
}
@@ -222,9 +222,6 @@ static int bcm2708_fb_set_par(struct fb_info *info)
/* inform vc about new framebuffer */
bcm_mailbox_write(MBOX_CHAN_FB, fb->dma);
- /* workaround occasional failure to read results. TODO: fix */
- msleep(10);
-
/* wait for response */
bcm_mailbox_read(MBOX_CHAN_FB, &val);

0 comments on commit 34b34bd

Please sign in to comment.