Skip to content

Commit

Permalink
Better fix for quitting X hang. Interrupted mailbox reads are not som…
Browse files Browse the repository at this point in the history
…ething we can reliably recover from, so down_interruptable is not a safe call.
  • Loading branch information
popcornmix committed Jul 14, 2012
1 parent 178f598 commit f6e4f04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
12 changes: 4 additions & 8 deletions arch/arm/mach-bcm2708/vcio.c
Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions drivers/video/bcm2708_fb.c
Expand Up @@ -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);

Expand Down

0 comments on commit f6e4f04

Please sign in to comment.