[PATCH 1/4 (final?)] ps3fb: thread updates
Geert Uytterhoeven
Geert.Uytterhoeven at sonycom.com
Thu Feb 22 23:16:41 EST 2007
On Wed, 21 Feb 2007, Andrew Morton wrote:
> On Tue, 20 Feb 2007 11:42:04 +0100 (CET)
> Geert Uytterhoeven <Geert.Uytterhoeven at sonycom.com> wrote:
> @@ -808,16 +807,13 @@ static int ps3fb_ioctl(struct fb_info *i
>
> static int ps3fbd(void *arg)
> {
> - DEFINE_WAIT(wait);
> - DECLARE_WAIT_QUEUE_HEAD(wq);
> -
> while (!kthread_should_stop()) {
> - prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE);
> - if (!ps3fb.is_kicked)
> - schedule();
> - finish_wait(&wq, &wait);
> - ps3fb.is_kicked = 0;
> - ps3fb_sync(0); /* single buffer */
> + set_current_state(TASK_INTERRUPTIBLE);
> + if (ps3fb.is_kicked) {
> + ps3fb.is_kicked = 0;
> + ps3fb_sync(0); /* single buffer */
> + }
> + schedule();
> }
> return 0;
> }
> _
>
> There's still no try_to_freeze() in there. Shouldn't we have one?
Here it is. I'll also resend the whole patch for completeness.
Subject: ps3fb: add missing try_to_freeze()
ps3fb: add missing try_to_freeze()
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven at sonycom.com>
---
drivers/video/ps3fb.c | 2 ++
1 files changed, 2 insertions(+)
--- ps3-linux-2.6.21-rc1.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21-rc1/drivers/video/ps3fb.c
@@ -33,6 +33,7 @@
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/kthread.h>
+#include <linux/freezer.h>
#include <asm/uaccess.h>
#include <linux/fb.h>
@@ -808,6 +809,7 @@ static int ps3fb_ioctl(struct fb_info *i
static int ps3fbd(void *arg)
{
while (!kthread_should_stop()) {
+ try_to_freeze();
set_current_state(TASK_INTERRUPTIBLE);
if (ps3fb.is_kicked) {
ps3fb.is_kicked = 0;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven at sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
More information about the Linuxppc-dev
mailing list