All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Linux/PPC Development <linuxppc-dev@ozlabs.org>,
	Linux Frame Buffer Device Development
	<linux-fbdev-devel@lists.sourceforge.net>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/4 (final?)] ps3fb: thread updates
Date: Wed, 21 Feb 2007 15:20:47 -0800	[thread overview]
Message-ID: <20070221152047.0d3da74c.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0702201141000.20432@pademelon.sonytel.be>

On Tue, 20 Feb 2007 11:42:04 +0100 (CET)
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

> ps3fb: Replace the kernel_thread and the semaphore by a proper kthread, which is
> simply woken up when the screen must be updated

<goes off and generates the incremental diff again so we can see what changed>


diff -puN drivers/video/ps3fb.c~ps3fb-thread-updates-2 drivers/video/ps3fb.c
--- a/drivers/video/ps3fb.c~ps3fb-thread-updates-2
+++ a/drivers/video/ps3fb.c
@@ -32,7 +32,6 @@
 #include <linux/ioctl.h>
 #include <linux/notifier.h>
 #include <linux/reboot.h>
-#include <linux/freezer.h>
 #include <linux/kthread.h>
 
 #include <asm/uaccess.h>
@@ -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?



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Linux/PPC Development <linuxppc-dev@ozlabs.org>,
	Linux Frame Buffer Device Development
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH 1/4 (final?)] ps3fb: thread updates
Date: Wed, 21 Feb 2007 15:20:47 -0800	[thread overview]
Message-ID: <20070221152047.0d3da74c.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0702201141000.20432@pademelon.sonytel.be>

On Tue, 20 Feb 2007 11:42:04 +0100 (CET)
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

> ps3fb: Replace the kernel_thread and the semaphore by a proper kthread, which is
> simply woken up when the screen must be updated

<goes off and generates the incremental diff again so we can see what changed>


diff -puN drivers/video/ps3fb.c~ps3fb-thread-updates-2 drivers/video/ps3fb.c
--- a/drivers/video/ps3fb.c~ps3fb-thread-updates-2
+++ a/drivers/video/ps3fb.c
@@ -32,7 +32,6 @@
 #include <linux/ioctl.h>
 #include <linux/notifier.h>
 #include <linux/reboot.h>
-#include <linux/freezer.h>
 #include <linux/kthread.h>
 
 #include <asm/uaccess.h>
@@ -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?

  reply	other threads:[~2007-02-21 23:20 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 15:23 [patch 0/4] PS3 AV/FB updates Geert.Uytterhoeven
2007-02-15 15:23 ` Geert.Uytterhoeven
2007-02-15 15:23 ` [patch 1/4] ps3fb: thread updates Geert.Uytterhoeven
2007-02-15 15:23   ` Geert.Uytterhoeven
2007-02-15 17:50   ` Christoph Hellwig
2007-02-15 17:50     ` Christoph Hellwig
2007-02-15 21:43     ` Benjamin Herrenschmidt
2007-02-16  0:59       ` Andrew Morton
2007-02-16 15:58         ` Geert Uytterhoeven
2007-02-16 15:58           ` Geert Uytterhoeven
2007-02-16 16:00         ` [PATCH 1/4 (updated)] " Geert Uytterhoeven
2007-02-16 16:00           ` Geert Uytterhoeven
2007-02-16 16:38           ` Christoph Hellwig
2007-02-16 16:38             ` Christoph Hellwig
2007-02-16 17:33             ` Geert Uytterhoeven
2007-02-16 17:33               ` [Linux-fbdev-devel] " Geert Uytterhoeven
2007-02-19 14:07               ` Geert Uytterhoeven
2007-02-20 10:33                 ` Geert Uytterhoeven
2007-02-20 10:42                   ` [PATCH 1/4 (final?)] " Geert Uytterhoeven
2007-02-21 23:20                     ` Andrew Morton [this message]
2007-02-21 23:20                       ` Andrew Morton
2007-02-22  8:21                       ` Geert Uytterhoeven
2007-02-22  8:21                         ` Geert Uytterhoeven
2007-02-22 12:16                       ` Geert Uytterhoeven
2007-02-22 12:16                         ` Geert Uytterhoeven
2007-02-22 12:17                       ` [PATCH 1/4 (final)] " Geert Uytterhoeven
2007-02-22 12:17                         ` Geert Uytterhoeven
2007-02-16 16:03         ` [PATCH extra] ps3fb: atomic fixes Geert Uytterhoeven
2007-02-16 16:03           ` Geert Uytterhoeven
2007-02-16 16:36         ` [patch 1/4] ps3fb: thread updates Christoph Hellwig
2007-02-16 16:36           ` Christoph Hellwig
2007-02-15 15:23 ` [patch 2/4] ps3av: " Geert.Uytterhoeven
2007-02-15 15:23   ` Geert.Uytterhoeven
2007-02-15 15:23 ` [patch 3/4] ps3fb: kill superfluous zero initializations Geert.Uytterhoeven
2007-02-15 15:23   ` Geert.Uytterhoeven
2007-02-15 15:23 ` [patch 4/4] ps3av: misc updates Geert.Uytterhoeven
2007-02-15 15:23   ` Geert.Uytterhoeven
2007-02-15 15:48 ` [patch 0/4] PS3 AV/FB updates James Simmons
2007-02-15 15:48   ` [Linux-fbdev-devel] " James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070221152047.0d3da74c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=hch@lst.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.