Re: [PATCH 05/15] OMAP: DSS2: RFBI: convert to new kfifo API

2010-01-12 Thread Tomi Valkeinen
On Mon, 2010-01-11 at 10:25 +0100, ext Sergey Lapin wrote:
 Hi, all!
 
  Heh, maybe update the comments on this one before asking
  Linus to pull? :)
 
  Yes, perhaps that would be wise =). I hope somebody is able to test the
  patch, as I don't have hardware to test it.
 Is there some guidelines on porting old rfbi driver to dss2?
 Then I could test this one.

Unfortunately no. You could look at panel-taal.c, which is a DSI command
mode display, as that is quite similar to what an rfbi display would be.

At some point I had a hackish port of N800 display to DSS2, but I didn't
have time to keep it up to date, so I left it out. Perhaps I will port
it again now that DSS2 is more stable (right... ;).

 Tomi


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/15] OMAP: DSS2: RFBI: convert to new kfifo API

2010-01-11 Thread Tomi Valkeinen
On Fri, 2010-01-08 at 17:52 +0100, ext Tony Lindgren wrote:
 * Tomi Valkeinen tomi.valkei...@nokia.com [100108 05:21]:
  Compiles, but not tested.
 
 Heh, maybe update the comments on this one before asking
 Linus to pull? :)

Yes, perhaps that would be wise =). I hope somebody is able to test the
patch, as I don't have hardware to test it.

 Tomi


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/15] OMAP: DSS2: RFBI: convert to new kfifo API

2010-01-11 Thread Sergey Lapin
Hi, all!

 Heh, maybe update the comments on this one before asking
 Linus to pull? :)

 Yes, perhaps that would be wise =). I hope somebody is able to test the
 patch, as I don't have hardware to test it.
Is there some guidelines on porting old rfbi driver to dss2?
Then I could test this one.

Thanks a lot,
S.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/15] OMAP: DSS2: RFBI: convert to new kfifo API

2010-01-08 Thread Tomi Valkeinen
Compiles, but not tested.

Signed-off-by: Tomi Valkeinen tomi.valkei...@nokia.com
---
 drivers/video/omap2/dss/rfbi.c |   30 +++---
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index d0b3006..b936495 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -120,7 +120,7 @@ static struct {
 
struct omap_dss_device *dssdev[2];
 
-   struct kfifo  *cmd_fifo;
+   struct kfifo  cmd_fifo;
spinlock_tcmd_lock;
struct completion cmd_done;
atomic_t  cmd_fifo_full;
@@ -1011,20 +1011,20 @@ static void process_cmd_fifo(void)
return;
 
while (true) {
-   spin_lock_irqsave(rfbi.cmd_fifo-lock, flags);
+   spin_lock_irqsave(rfbi.cmd_lock, flags);
 
-   len = __kfifo_get(rfbi.cmd_fifo, (unsigned char *)p,
+   len = kfifo_out(rfbi.cmd_fifo, (unsigned char *)p,
  sizeof(struct update_param));
if (len == 0) {
DSSDBG(nothing more in fifo\n);
atomic_set(rfbi.cmd_pending, 0);
-   spin_unlock_irqrestore(rfbi.cmd_fifo-lock, flags);
+   spin_unlock_irqrestore(rfbi.cmd_lock, flags);
break;
}
 
/* DSSDBG(fifo full %d\n, rfbi.cmd_fifo_full.counter);*/
 
-   spin_unlock_irqrestore(rfbi.cmd_fifo-lock, flags);
+   spin_unlock_irqrestore(rfbi.cmd_lock, flags);
 
BUG_ON(len != sizeof(struct update_param));
BUG_ON(p.rfbi_module  1);
@@ -1052,25 +1052,25 @@ static void rfbi_push_cmd(struct update_param *p)
unsigned long flags;
int available;
 
-   spin_lock_irqsave(rfbi.cmd_fifo-lock, flags);
+   spin_lock_irqsave(rfbi.cmd_lock, flags);
available = RFBI_CMD_FIFO_LEN_BYTES -
-   __kfifo_len(rfbi.cmd_fifo);
+   kfifo_len(rfbi.cmd_fifo);
 
 /* DSSDBG(%d bytes left in fifo\n, available); */
if (available  sizeof(struct update_param)) {
DSSDBG(Going to wait because FIFO FULL..\n);
-   spin_unlock_irqrestore(rfbi.cmd_fifo-lock, flags);
+   spin_unlock_irqrestore(rfbi.cmd_lock, flags);
atomic_inc(rfbi.cmd_fifo_full);
wait_for_completion(rfbi.cmd_done);
/*DSSDBG(Woke up because fifo not full anymore\n);*/
continue;
}
 
-   ret = __kfifo_put(rfbi.cmd_fifo, (unsigned char *)p,
+   ret = kfifo_in(rfbi.cmd_fifo, (unsigned char *)p,
  sizeof(struct update_param));
 /* DSSDBG(pushed %d bytes\n, ret);*/
 
-   spin_unlock_irqrestore(rfbi.cmd_fifo-lock, flags);
+   spin_unlock_irqrestore(rfbi.cmd_lock, flags);
 
BUG_ON(ret != sizeof(struct update_param));
 
@@ -1155,12 +1155,12 @@ int rfbi_init(void)
 {
u32 rev;
u32 l;
+   int r;
 
spin_lock_init(rfbi.cmd_lock);
-   rfbi.cmd_fifo = kfifo_alloc(RFBI_CMD_FIFO_LEN_BYTES, GFP_KERNEL,
-   rfbi.cmd_lock);
-   if (IS_ERR(rfbi.cmd_fifo))
-   return -ENOMEM;
+   r = kfifo_alloc(rfbi.cmd_fifo, RFBI_CMD_FIFO_LEN_BYTES, GFP_KERNEL);
+   if (r)
+   return r;
 
init_completion(rfbi.cmd_done);
atomic_set(rfbi.cmd_fifo_full, 0);
@@ -1196,7 +1196,7 @@ void rfbi_exit(void)
 {
DSSDBG(rfbi_exit\n);
 
-   kfifo_free(rfbi.cmd_fifo);
+   kfifo_free(rfbi.cmd_fifo);
 
iounmap(rfbi.base);
 }
-- 
1.6.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/15] OMAP: DSS2: RFBI: convert to new kfifo API

2010-01-08 Thread Tony Lindgren
* Tomi Valkeinen tomi.valkei...@nokia.com [100108 05:21]:
 Compiles, but not tested.

Heh, maybe update the comments on this one before asking
Linus to pull? :)

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html