Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75377
b: refs/heads/master
c: 8dab637
h: refs/heads/master
i:
  75375: 896a836
v: v3
  • Loading branch information
Jeremy Kerr authored and Linus Torvalds committed Jan 11, 2008
1 parent 8be3f04 commit 7e73eea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba21611c9c0031ca8388cae5e43b38c29c8b595d
refs/heads/master: 8dab63761219d7bc6a7d7d3b5f0fca76af5533a5
12 changes: 8 additions & 4 deletions trunk/drivers/video/ps3fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ static int ps3fb_sync(struct fb_info *info, u32 frame)
u32 ddr_line_length, xdr_line_length;
u64 ddr_base, xdr_base;

acquire_console_sem();

if (frame > par->num_frames - 1) {
dev_dbg(info->device, "%s: invalid frame number (%u)\n",
__func__, frame);
Expand All @@ -464,7 +462,6 @@ static int ps3fb_sync(struct fb_info *info, u32 frame)
xdr_line_length);

out:
release_console_sem();
return error;
}

Expand All @@ -479,7 +476,10 @@ static int ps3fb_release(struct fb_info *info, int user)
if (atomic_dec_and_test(&ps3fb.f_count)) {
if (atomic_read(&ps3fb.ext_flip)) {
atomic_set(&ps3fb.ext_flip, 0);
ps3fb_sync(info, 0); /* single buffer */
if (!try_acquire_console_sem()) {
ps3fb_sync(info, 0); /* single buffer */
release_console_sem();
}
}
}
return 0;
Expand Down Expand Up @@ -865,7 +865,9 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd,
break;

dev_dbg(info->device, "PS3FB_IOCTL_FSEL:%d\n", val);
acquire_console_sem();
retval = ps3fb_sync(info, val);
release_console_sem();
break;

default:
Expand All @@ -885,7 +887,9 @@ static int ps3fbd(void *arg)
set_current_state(TASK_INTERRUPTIBLE);
if (ps3fb.is_kicked) {
ps3fb.is_kicked = 0;
acquire_console_sem();
ps3fb_sync(info, 0); /* single buffer */
release_console_sem();
}
schedule();
}
Expand Down

0 comments on commit 7e73eea

Please sign in to comment.