* [patch 0/8] PS3 AV/FB patches
@ 2007-05-02 12:48 Geert Uytterhoeven
2007-05-02 12:48 ` [patch 1/8] ps3fb: thread updates Geert Uytterhoeven
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Paul Mackerras, James Simmons, linux-fbdev-devel, Antonino Daplas,
linuxppc-dev
Hi Linus, Andrew,
Here are our patches for the PS3 Audio Video Settings and Virtual Frame
Buffer
drivers for 2.6.22:
[1/8] ps3fb: thread updates
[2/8] ps3fb: atomic fixes
[3/8] ps3av: thread updates
[4/8] ps3fb: kill superfluous zero initializations
[5/8] ps3av: misc updates
[6/8] [PATCH] ps3: Make `ps3videomode -v 0' (auto mode) work again
[7/8] ps3fb: Use __func__ instead of __FUNCTION__
[8/8] ps3av: Use __func__ instead of __FUNCTION__
The last 3 are new, but they are quite simple/trivial.
Please apply. Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 1/8] ps3fb: thread updates
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 2/8] ps3fb: atomic fixes Geert Uytterhoeven
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3fb-kthread.diff --]
[-- Type: text/plain, Size: 3783 bytes --]
ps3fb: Replace the kernel_thread and the semaphore by a proper kthread, which
is simply woken up when the screen must be updated
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/video/ps3fb.c | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21/drivers/video/ps3fb.c
@@ -32,6 +32,8 @@
#include <linux/ioctl.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
+#include <linux/kthread.h>
+#include <linux/freezer.h>
#include <asm/uaccess.h>
#include <linux/fb.h>
@@ -129,7 +131,6 @@ struct ps3fb_priv {
u64 context_handle, memory_handle;
void *xdr_ea;
struct gpu_driver_info *dinfo;
- struct semaphore sem;
u32 res_index;
u64 vblank_count; /* frame count */
@@ -139,6 +140,8 @@ struct ps3fb_priv {
atomic_t ext_flip; /* on/off flip with vsync */
atomic_t f_count; /* fb_open count */
int is_blanked;
+ int is_kicked;
+ struct task_struct *task;
};
static struct ps3fb_priv ps3fb;
@@ -805,11 +808,14 @@ static int ps3fb_ioctl(struct fb_info *i
static int ps3fbd(void *arg)
{
- daemonize("ps3fbd");
- for (;;) {
- down(&ps3fb.sem);
- if (atomic_read(&ps3fb.ext_flip) == 0)
+ while (!kthread_should_stop()) {
+ try_to_freeze();
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (ps3fb.is_kicked) {
+ ps3fb.is_kicked = 0;
ps3fb_sync(0); /* single buffer */
+ }
+ schedule();
}
return 0;
}
@@ -830,8 +836,11 @@ static irqreturn_t ps3fb_vsync_interrupt
if (v1 & (1 << GPU_INTR_STATUS_VSYNC_1)) {
/* VSYNC */
ps3fb.vblank_count = head->vblank_count;
- if (!ps3fb.is_blanked)
- up(&ps3fb.sem);
+ if (ps3fb.task && !ps3fb.is_blanked &&
+ !atomic_read(&ps3fb.ext_flip)) {
+ ps3fb.is_kicked = 1;
+ wake_up_process(ps3fb.task);
+ }
wake_up_interruptible(&ps3fb.wait_vsync);
}
@@ -968,6 +977,7 @@ static int __init ps3fb_probe(struct pla
u64 xdr_lpar;
int status;
unsigned long offset;
+ struct task_struct *task;
/* get gpu context handle */
status = lv1_gpu_memory_allocate(DDR_SIZE, 0, 0, 0, 0,
@@ -1050,9 +1060,18 @@ static int __init ps3fb_probe(struct pla
"fb%d: PS3 frame buffer device, using %ld KiB of video memory\n",
info->node, ps3fb_videomemory.size >> 10);
- kernel_thread(ps3fbd, info, CLONE_KERNEL);
+ task = kthread_run(ps3fbd, info, "ps3fbd");
+ if (IS_ERR(task)) {
+ retval = PTR_ERR(task);
+ goto err_unregister_framebuffer;
+ }
+
+ ps3fb.task = task;
+
return 0;
+err_unregister_framebuffer:
+ unregister_framebuffer(info);
err_fb_dealloc:
fb_dealloc_cmap(&info->cmap);
err_framebuffer_release:
@@ -1083,6 +1102,11 @@ void ps3fb_cleanup(void)
{
int status;
+ if (ps3fb.task) {
+ struct task_struct *task = ps3fb.task;
+ ps3fb.task = NULL;
+ kthread_stop(task);
+ }
if (ps3fb.irq_no) {
free_irq(ps3fb.irq_no, ps3fb.dev);
ps3_free_irq(ps3fb.irq_no);
@@ -1195,7 +1219,6 @@ static int __init ps3fb_init(void)
atomic_set(&ps3fb.f_count, -1); /* fbcon opens ps3fb */
atomic_set(&ps3fb.ext_flip, 0); /* for flip with vsync */
- init_MUTEX(&ps3fb.sem);
init_waitqueue_head(&ps3fb.wait_vsync);
ps3fb.num_frames = 1;
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 2/8] ps3fb: atomic fixes
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
2007-05-02 12:48 ` [patch 1/8] ps3fb: thread updates Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 3/8] ps3av: thread updates Geert Uytterhoeven
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3fb-atomic.diff --]
[-- Type: text/plain, Size: 1235 bytes --]
ps3fb: Use atomic_dec_if_positive() instead of bogus atomic_read()/atomic_dec()
combinations
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/video/ps3fb.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21/drivers/video/ps3fb.c
@@ -680,13 +680,10 @@ EXPORT_SYMBOL_GPL(ps3fb_wait_for_vsync);
void ps3fb_flip_ctl(int on)
{
- if (on) {
- if (atomic_read(&ps3fb.ext_flip) > 0) {
- atomic_dec(&ps3fb.ext_flip);
- }
- } else {
+ if (on)
+ atomic_dec_if_positive(&ps3fb.ext_flip);
+ else
atomic_inc(&ps3fb.ext_flip);
- }
}
EXPORT_SYMBOL_GPL(ps3fb_flip_ctl);
@@ -786,8 +783,7 @@ static int ps3fb_ioctl(struct fb_info *i
case PS3FB_IOCTL_OFF:
DPRINTK("PS3FB_IOCTL_OFF:\n");
- if (atomic_read(&ps3fb.ext_flip) > 0)
- atomic_dec(&ps3fb.ext_flip);
+ atomic_dec_if_positive(&ps3fb.ext_flip);
retval = 0;
break;
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 3/8] ps3av: thread updates
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
2007-05-02 12:48 ` [patch 1/8] ps3fb: thread updates Geert Uytterhoeven
2007-05-02 12:48 ` [patch 2/8] ps3fb: atomic fixes Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 4/8] ps3fb: kill superfluous zero initializations Geert Uytterhoeven
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3av-workqueue.diff --]
[-- Type: text/plain, Size: 3174 bytes --]
ps3av: Replace the kernel_thread and the ping pong semaphores by a singlethread
workqueue and a completion.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/ps3/ps3av.c | 30 ++++++++++++++----------------
include/asm-powerpc/ps3av.h | 5 +++--
2 files changed, 17 insertions(+), 18 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/ps3/ps3av.c
+++ ps3-linux-2.6.21/drivers/ps3/ps3av.c
@@ -440,7 +440,7 @@ static int ps3av_set_videomode(void)
ps3av_set_av_video_mute(PS3AV_CMD_MUTE_ON);
/* wake up ps3avd to do the actual video mode setting */
- up(&ps3av.ping);
+ queue_work(ps3av.wq, &ps3av.work);
return 0;
}
@@ -515,18 +515,10 @@ static void ps3av_set_videomode_cont(u32
ps3av_set_av_video_mute(PS3AV_CMD_MUTE_OFF);
}
-static int ps3avd(void *p)
+static void ps3avd(struct work_struct *work)
{
- struct ps3av *info = p;
-
- daemonize("ps3avd");
- while (1) {
- down(&info->ping);
- ps3av_set_videomode_cont(info->ps3av_mode,
- info->ps3av_mode_old);
- up(&info->pong);
- }
- return 0;
+ ps3av_set_videomode_cont(ps3av.ps3av_mode, ps3av.ps3av_mode_old);
+ complete(&ps3av.done);
}
static int ps3av_vid2table_id(int vid)
@@ -725,7 +717,7 @@ int ps3av_set_video_mode(u32 id, int boo
}
/* set videomode */
- down(&ps3av.pong);
+ wait_for_completion(&ps3av.done);
ps3av.ps3av_mode_old = ps3av.ps3av_mode;
ps3av.ps3av_mode = id;
if (ps3av_set_videomode())
@@ -881,12 +873,16 @@ static int ps3av_probe(struct ps3_vuart_
memset(&ps3av, 0, sizeof(ps3av));
init_MUTEX(&ps3av.sem);
- init_MUTEX_LOCKED(&ps3av.ping);
- init_MUTEX(&ps3av.pong);
mutex_init(&ps3av.mutex);
ps3av.ps3av_mode = 0;
ps3av.dev = dev;
- kernel_thread(ps3avd, &ps3av, CLONE_KERNEL);
+
+ INIT_WORK(&ps3av.work, ps3avd);
+ init_completion(&ps3av.done);
+ complete(&ps3av.done);
+ ps3av.wq = create_singlethread_workqueue("ps3avd");
+ if (!ps3av.wq)
+ return -ENOMEM;
ps3av.available = 1;
switch (ps3_os_area_get_av_multi_out()) {
@@ -926,6 +922,8 @@ static int ps3av_remove(struct ps3_vuart
{
if (ps3av.available) {
ps3av_cmd_fin();
+ if (ps3av.wq)
+ destroy_workqueue(ps3av.wq);
ps3av.available = 0;
}
--- ps3-linux-2.6.21.orig/include/asm-powerpc/ps3av.h
+++ ps3-linux-2.6.21/include/asm-powerpc/ps3av.h
@@ -646,8 +646,9 @@ struct ps3av_pkt_avb_param {
struct ps3av {
int available;
struct semaphore sem;
- struct semaphore ping;
- struct semaphore pong;
+ struct work_struct work;
+ struct completion done;
+ struct workqueue_struct *wq;
struct mutex mutex;
int open_count;
struct ps3_vuart_port_device *dev;
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 4/8] ps3fb: kill superfluous zero initializations
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
` (2 preceding siblings ...)
2007-05-02 12:48 ` [patch 3/8] ps3av: thread updates Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 5/8] ps3av: misc updates Geert Uytterhoeven
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3fb-zero-init.diff --]
[-- Type: text/plain, Size: 989 bytes --]
ps3fb: kill superfluous zero initializations
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/video/ps3fb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21/drivers/video/ps3fb.c
@@ -297,10 +297,10 @@ static const struct fb_videomode ps3fb_m
#define VP_OFF(i) (WIDTH(i) * Y_OFF(i) * BPP + X_OFF(i) * BPP)
#define FB_OFF(i) (GPU_OFFSET - VP_OFF(i) % GPU_OFFSET)
-static int ps3fb_mode = 0;
+static int ps3fb_mode;
module_param(ps3fb_mode, bool, 0);
-static char *mode_option __initdata = NULL;
+static char *mode_option __initdata;
static int ps3fb_get_res_table(u32 xres, u32 yres)
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 5/8] ps3av: misc updates
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
` (3 preceding siblings ...)
2007-05-02 12:48 ` [patch 4/8] ps3fb: kill superfluous zero initializations Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 6/8] ps3: Make `ps3videomode -v 0 (auto mode) work again Geert Uytterhoeven
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3av-misc.diff --]
[-- Type: text/plain, Size: 4145 bytes --]
ps3av:
- Move the definition of struct ps3av to ps3av.c, as it's locally used only.
- Kill ps3av.sem, use the existing ps3av.mutex instead.
- Make the 512-byte buffer in ps3av_do_pkt() static to reduce stack usage.
Its use is protected by a semaphore anyway.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/ps3/ps3av.c | 29 ++++++++++++++++++++++-------
include/asm-powerpc/ps3av.h | 22 +---------------------
2 files changed, 23 insertions(+), 28 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/ps3/ps3av.c
+++ ps3-linux-2.6.21/drivers/ps3/ps3av.c
@@ -38,7 +38,24 @@
static int timeout = 5000; /* in msec ( 5 sec ) */
module_param(timeout, int, 0644);
-static struct ps3av ps3av;
+static struct ps3av {
+ int available;
+ struct mutex mutex;
+ struct work_struct work;
+ struct completion done;
+ struct workqueue_struct *wq;
+ int open_count;
+ struct ps3_vuart_port_device *dev;
+
+ int region;
+ struct ps3av_pkt_av_get_hw_conf av_hw_conf;
+ u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX];
+ u32 opt_port[PS3AV_OPT_PORT_MAX];
+ u32 head[PS3AV_HEAD_MAX];
+ u32 audio_port;
+ int ps3av_mode;
+ int ps3av_mode_old;
+} ps3av;
static struct ps3_vuart_port_device ps3av_dev = {
.match_id = PS3_MATCH_ID_AV_SETTINGS
@@ -250,7 +267,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
struct ps3av_send_hdr *buf)
{
int res = 0;
- union {
+ static union {
struct ps3av_reply_hdr reply_hdr;
u8 raw[PS3AV_BUF_SIZE];
} recv_buf;
@@ -259,8 +276,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
BUG_ON(!ps3av.available);
- if (down_interruptible(&ps3av.sem))
- return -ERESTARTSYS;
+ mutex_lock(&ps3av.mutex);
table = ps3av_search_cmd_table(cid, PS3AV_CID_MASK);
BUG_ON(!table);
@@ -290,11 +306,11 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
goto err;
}
- up(&ps3av.sem);
+ mutex_unlock(&ps3av.mutex);
return 0;
err:
- up(&ps3av.sem);
+ mutex_unlock(&ps3av.mutex);
printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res);
return res;
}
@@ -872,7 +888,6 @@ static int ps3av_probe(struct ps3_vuart_
memset(&ps3av, 0, sizeof(ps3av));
- init_MUTEX(&ps3av.sem);
mutex_init(&ps3av.mutex);
ps3av.ps3av_mode = 0;
ps3av.dev = dev;
--- ps3-linux-2.6.21.orig/include/asm-powerpc/ps3av.h
+++ ps3-linux-2.6.21/include/asm-powerpc/ps3av.h
@@ -18,8 +18,6 @@
#ifndef _ASM_POWERPC_PS3AV_H_
#define _ASM_POWERPC_PS3AV_H_
-#include <linux/mutex.h>
-
/** command for ioctl() **/
#define PS3AV_VERSION 0x205 /* version of ps3av command */
@@ -643,25 +641,6 @@ struct ps3av_pkt_avb_param {
u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE];
};
-struct ps3av {
- int available;
- struct semaphore sem;
- struct work_struct work;
- struct completion done;
- struct workqueue_struct *wq;
- struct mutex mutex;
- int open_count;
- struct ps3_vuart_port_device *dev;
-
- int region;
- struct ps3av_pkt_av_get_hw_conf av_hw_conf;
- u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX];
- u32 opt_port[PS3AV_OPT_PORT_MAX];
- u32 head[PS3AV_HEAD_MAX];
- u32 audio_port;
- int ps3av_mode;
- int ps3av_mode_old;
-};
/** command status **/
#define PS3AV_STATUS_SUCCESS 0x0000 /* success */
@@ -719,6 +698,7 @@ static inline void ps3av_cmd_av_monitor_
extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *,
u32);
+struct ps3_vuart_port_device;
extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev,
const void *buf, unsigned long size);
extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 6/8] ps3: Make `ps3videomode -v 0 (auto mode) work again
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
` (4 preceding siblings ...)
2007-05-02 12:48 ` [patch 5/8] ps3av: misc updates Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 7/8] ps3fb: Use __func__ instead of __FUNCTION__ Geert Uytterhoeven
2007-05-02 12:48 ` [patch 8/8] ps3av: " Geert Uytterhoeven
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3videomode-auto-mode.diff --]
[-- Type: text/plain, Size: 2168 bytes --]
From: Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp>
ps3: Make `ps3videomode -v 0' (auto mode) work again
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/ps3/ps3av.c | 7 +++++++
drivers/video/ps3fb.c | 5 +++++
include/asm-powerpc/ps3av.h | 1 +
3 files changed, 13 insertions(+)
--- ps3-linux-2.6.21.orig/drivers/ps3/ps3av.c
+++ ps3-linux-2.6.21/drivers/ps3/ps3av.c
@@ -744,6 +744,13 @@ int ps3av_set_video_mode(u32 id, int boo
EXPORT_SYMBOL_GPL(ps3av_set_video_mode);
+int ps3av_get_auto_mode(int boot)
+{
+ return ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
+}
+
+EXPORT_SYMBOL_GPL(ps3av_get_auto_mode);
+
int ps3av_set_mode(u32 id, int boot)
{
int res;
--- ps3-linux-2.6.21.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21/drivers/video/ps3fb.c
@@ -732,6 +732,11 @@ static int ps3fb_ioctl(struct fb_info *i
if (copy_from_user(&val, argp, sizeof(val)))
break;
+ if (!(val & PS3AV_MODE_MASK)) {
+ u32 id = ps3av_get_auto_mode(0);
+ if (id > 0)
+ val = (val & ~PS3AV_MODE_MASK) | id;
+ }
DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val);
retval = -EINVAL;
old_mode = ps3fb_mode;
--- ps3-linux-2.6.21.orig/include/asm-powerpc/ps3av.h
+++ ps3-linux-2.6.21/include/asm-powerpc/ps3av.h
@@ -706,6 +706,7 @@ extern int ps3av_vuart_read(struct ps3_v
extern int ps3av_set_video_mode(u32, int);
extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
+extern int ps3av_get_auto_mode(int);
extern int ps3av_set_mode(u32, int);
extern int ps3av_get_mode(void);
extern int ps3av_get_scanmode(int);
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 7/8] ps3fb: Use __func__ instead of __FUNCTION__
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
` (5 preceding siblings ...)
2007-05-02 12:48 ` [patch 6/8] ps3: Make `ps3videomode -v 0 (auto mode) work again Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
2007-05-02 12:48 ` [patch 8/8] ps3av: " Geert Uytterhoeven
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3fb-__func__.diff --]
[-- Type: text/plain, Size: 6803 bytes --]
ps3fb: Replace GNU extension `__FUNCTION__' by C99 `__func__'
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/video/ps3fb.c | 54 +++++++++++++++++++++++++++-----------------------
1 files changed, 30 insertions(+), 24 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/video/ps3fb.c
+++ ps3-linux-2.6.21/drivers/video/ps3fb.c
@@ -47,7 +47,7 @@
#include <asm/ps3.h>
#ifdef PS3FB_DEBUG
-#define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ##args)
+#define DPRINTK(fmt, args...) printk("%s: " fmt, __func__ , ##args)
#else
#define DPRINTK(fmt, args...)
#endif
@@ -396,7 +396,7 @@ static int ps3fb_sync(u32 frame)
if (frame > ps3fb.num_frames - 1) {
printk(KERN_WARNING "%s: invalid frame number (%u)\n",
- __FUNCTION__, frame);
+ __func__, frame);
return -EINVAL;
}
offset = xres * yres * BPP * frame;
@@ -409,23 +409,26 @@ static int ps3fb_sync(u32 frame)
(xres << 16) | yres,
xres * BPP); /* line_length */
if (status)
- printk(KERN_ERR "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
+ __func__, status);
#ifdef HEAD_A
status = lv1_gpu_context_attribute(ps3fb.context_handle,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP,
0, offset, 0, 0);
if (status)
- printk(KERN_ERR "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
+ __func__, status);
#endif
#ifdef HEAD_B
status = lv1_gpu_context_attribute(ps3fb.context_handle,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP,
1, offset, 0, 0);
if (status)
- printk(KERN_ERR "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
+ __func__, status);
#endif
return 0;
}
@@ -634,7 +637,7 @@ static int ps3fb_blank(int blank, struct
{
int retval;
- DPRINTK("%s: blank:%d\n", __FUNCTION__, blank);
+ DPRINTK("%s: blank:%d\n", __func__, blank);
switch (blank) {
case FB_BLANK_POWERDOWN:
case FB_BLANK_HSYNC_SUSPEND:
@@ -830,7 +833,7 @@ static irqreturn_t ps3fb_vsync_interrupt
status = lv1_gpu_context_intr(ps3fb.context_handle, &v1);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_context_intr failed: %d\n",
- __FUNCTION__, status);
+ __func__, status);
return IRQ_NONE;
}
@@ -889,7 +892,7 @@ static int ps3fb_vsync_settings(struct g
dinfo->nvcore_frequency/1000000, dinfo->memory_frequency/1000000);
if (dinfo->version_driver != GPU_DRIVER_INFO_VERSION) {
- printk(KERN_ERR "%s: version_driver err:%x\n", __FUNCTION__,
+ printk(KERN_ERR "%s: version_driver err:%x\n", __func__,
dinfo->version_driver);
return -EINVAL;
}
@@ -898,7 +901,7 @@ static int ps3fb_vsync_settings(struct g
error = ps3_alloc_irq(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet,
&ps3fb.irq_no);
if (error) {
- printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __FUNCTION__,
+ printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __func__,
error);
return error;
}
@@ -906,7 +909,7 @@ static int ps3fb_vsync_settings(struct g
error = request_irq(ps3fb.irq_no, ps3fb_vsync_interrupt, IRQF_DISABLED,
"ps3fb vsync", ps3fb.dev);
if (error) {
- printk(KERN_ERR "%s: request_irq failed %d\n", __FUNCTION__,
+ printk(KERN_ERR "%s: request_irq failed %d\n", __func__,
error);
ps3_free_irq(ps3fb.irq_no);
return error;
@@ -925,7 +928,7 @@ static int ps3fb_xdr_settings(u64 xdr_lp
xdr_lpar, ps3fb_videomemory.size, 0);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_context_iomap failed: %d\n",
- __FUNCTION__, status);
+ __func__, status);
return -ENXIO;
}
DPRINTK("video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n",
@@ -937,8 +940,9 @@ static int ps3fb_xdr_settings(u64 xdr_lp
xdr_lpar, ps3fb_videomemory.size,
GPU_IOIF, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n",
+ __func__, status);
return -ENXIO;
}
return 0;
@@ -985,7 +989,7 @@ static int __init ps3fb_probe(struct pla
&ps3fb.memory_handle, &ddr_lpar);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_memory_allocate failed: %d\n",
- __FUNCTION__, status);
+ __func__, status);
goto err;
}
DPRINTK("ddr:lpar:0x%lx\n", ddr_lpar);
@@ -996,14 +1000,14 @@ static int __init ps3fb_probe(struct pla
&lpar_reports, &lpar_reports_size);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_context_attribute failed: %d\n",
- __FUNCTION__, status);
+ __func__, status);
goto err_gpu_memory_free;
}
/* vsync interrupt */
ps3fb.dinfo = ioremap(lpar_driver_info, 128 * 1024);
if (!ps3fb.dinfo) {
- printk(KERN_ERR "%s: ioremap failed\n", __FUNCTION__);
+ printk(KERN_ERR "%s: ioremap failed\n", __func__);
goto err_gpu_context_free;
}
@@ -1162,8 +1166,9 @@ int ps3fb_set_sync(void)
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC,
0, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: %d\n",
+ __func__, status);
return -1;
}
#endif
@@ -1173,8 +1178,9 @@ int ps3fb_set_sync(void)
1, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_MODE failed: %d\n",
- __FUNCTION__, status);
+ printk(KERN_ERR
+ "%s: lv1_gpu_context_attribute DISPLAY_MODE failed: %d\n",
+ __func__, status);
return -1;
}
#endif
@@ -1199,7 +1205,7 @@ static int __init ps3fb_init(void)
error = ps3av_dev_open();
if (error) {
- printk(KERN_ERR "%s: ps3av_dev_open failed\n", __FUNCTION__);
+ printk(KERN_ERR "%s: ps3av_dev_open failed\n", __func__);
goto err;
}
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 8/8] ps3av: Use __func__ instead of __FUNCTION__
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
` (6 preceding siblings ...)
2007-05-02 12:48 ` [patch 7/8] ps3fb: Use __func__ instead of __FUNCTION__ Geert Uytterhoeven
@ 2007-05-02 12:48 ` Geert Uytterhoeven
7 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2007-05-02 12:48 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: James Simmons, Antonino Daplas, linuxppc-dev, Paul Mackerras,
Geert Uytterhoeven, linux-fbdev-devel
[-- Attachment #1: ps3-stable/ps3av-__func__.diff --]
[-- Type: text/plain, Size: 9278 bytes --]
ps3av: Replace GNU extension `__FUNCTION__' by C99 `__func__'
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/ps3/ps3av.c | 42 ++++++++++++++++++++----------------------
drivers/ps3/ps3av_cmd.c | 20 +++++++++-----------
2 files changed, 29 insertions(+), 33 deletions(-)
--- ps3-linux-2.6.21.orig/drivers/ps3/ps3av.c
+++ ps3-linux-2.6.21/drivers/ps3/ps3av.c
@@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(cons
else
printk(KERN_ERR
"%s: failed event packet, cid:%08x size:%d\n",
- __FUNCTION__, hdr->cid, hdr->size);
+ __func__, hdr->cid, hdr->size);
return 1; /* receive event packet */
}
return 0;
@@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const stru
if (res < 0) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_write() failed (result=%d)\n",
- __FUNCTION__, res);
+ __func__, res);
return res;
}
@@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const stru
if (res != PS3AV_HDR_SIZE) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n",
- __FUNCTION__, res);
+ __func__, res);
return res;
}
@@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const stru
if (res < 0) {
dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n",
- __FUNCTION__, res);
+ __func__, res);
return res;
}
res += PS3AV_HDR_SIZE; /* total len */
@@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const stru
if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
- __FUNCTION__, recv_buf->cid);
+ __func__, recv_buf->cid);
return -EINVAL;
}
@@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
if (res < 0) {
printk(KERN_ERR
"%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
- __FUNCTION__, res);
+ __func__, res);
goto err;
}
@@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
usr_buf_size);
if (res < 0) {
printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
- __FUNCTION__, res);
+ __func__, res);
goto err;
}
@@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len,
err:
mutex_unlock(&ps3av.mutex);
- printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res);
+ printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
return res;
}
@@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32
if (res == PS3AV_STATUS_NO_SYNC_HEAD)
printk(KERN_WARNING
"%s: Command failed. Please try your request again. \n",
- __FUNCTION__);
+ __func__);
else if (res)
dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");
@@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boo
size = ARRAY_SIZE(video_mode_table);
if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
- dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__,
- id);
+ dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
return -EINVAL;
}
@@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boo
if ((id & PS3AV_MODE_MASK) == 0) {
id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
if (id < 1) {
- printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__,
- id);
+ printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
return -EINVAL;
}
id |= option;
@@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id)
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
- printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
+ printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
return video_mode_table[id].interlace;
@@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
- printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
+ printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
return video_mode_table[id].freq;
@@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xr
id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) {
- printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id);
+ printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL;
}
*xres = video_mode_table[id].x;
@@ -853,7 +851,7 @@ int ps3av_dev_open(void)
status = lv1_gpu_open(0);
if (status) {
printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
- __FUNCTION__, status);
+ __func__, status);
ps3av.open_count--;
}
}
@@ -870,13 +868,13 @@ int ps3av_dev_close(void)
mutex_lock(&ps3av.mutex);
if (ps3av.open_count <= 0) {
- printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__);
+ printk(KERN_ERR "%s: GPU already closed\n", __func__);
status = -1;
} else if (!--ps3av.open_count) {
status = lv1_gpu_close();
if (status)
printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
- __FUNCTION__, status);
+ __func__, status);
}
mutex_unlock(&ps3av.mutex);
@@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_
/* init avsetting modules */
res = ps3av_cmd_init();
if (res < 0)
- printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__,
+ printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
res);
ps3av_get_hw_conf(&ps3av);
@@ -978,7 +976,7 @@ static int ps3av_module_init(void)
if (error) {
printk(KERN_ERR
"%s: ps3_vuart_port_driver_register failed %d\n",
- __FUNCTION__, error);
+ __func__, error);
return error;
}
@@ -986,7 +984,7 @@ static int ps3av_module_init(void)
if (error)
printk(KERN_ERR
"%s: ps3_vuart_port_device_register failed %d\n",
- __FUNCTION__, error);
+ __func__, error);
return error;
}
--- ps3-linux-2.6.21.orig/drivers/ps3/ps3av_cmd.c
+++ ps3-linux-2.6.21/drivers/ps3/ps3av_cmd.c
@@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u3
video_mode->video_order = ps3av_video_fmt_table[video_fmt].order;
pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
- __FUNCTION__, video_vid, video_mode->width, video_mode->height,
+ __func__, video_vid, video_mode->width, video_mode->height,
video_mode->pitch, video_mode->video_out_format,
video_mode->video_format, video_mode->video_order);
return sizeof(*video_mode);
@@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs)
if (ps3av_cnv_mclk_table[i].fs == fs)
return ps3av_cnv_mclk_table[i].mclk;
- printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs);
+ printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
return 0;
}
@@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs,
d = 4;
break;
default:
- printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__,
- video_vid);
+ printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid);
break;
}
if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K)
- printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs);
+ printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
else
ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d];
@@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, c
ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) |
0x01;
} else
- printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__,
- source);
+ printk(KERN_ERR "%s failed, source:%x\n", __func__, source);
return ret;
}
@@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bi
ret = PS3AV_CMD_AV_INPUTLEN_24;
break;
default:
- printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__,
+ printk(KERN_ERR "%s failed, word_bits:%x\n", __func__,
word_bits);
break;
}
@@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bi
static u8 ps3av_cnv_layout(u32 num_of_ch)
{
if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) {
- printk(KERN_ERR "%s failed, num_of_ch:%x\n", __FUNCTION__,
+ printk(KERN_ERR "%s failed, num_of_ch:%x\n", __func__,
num_of_ch);
return 0;
}
@@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt
res = get_status(avb);
if (res)
- pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __FUNCTION__,
+ pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __func__,
res);
out:
@@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_po
return size;
if (error != -EAGAIN) {
printk(KERN_ERR "%s: ps3_vuart_read failed %d\n",
- __FUNCTION__, error);
+ __func__, error);
return error;
}
msleep(POLLING_INTERVAL);
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-02 12:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 12:48 [patch 0/8] PS3 AV/FB patches Geert Uytterhoeven
2007-05-02 12:48 ` [patch 1/8] ps3fb: thread updates Geert Uytterhoeven
2007-05-02 12:48 ` [patch 2/8] ps3fb: atomic fixes Geert Uytterhoeven
2007-05-02 12:48 ` [patch 3/8] ps3av: thread updates Geert Uytterhoeven
2007-05-02 12:48 ` [patch 4/8] ps3fb: kill superfluous zero initializations Geert Uytterhoeven
2007-05-02 12:48 ` [patch 5/8] ps3av: misc updates Geert Uytterhoeven
2007-05-02 12:48 ` [patch 6/8] ps3: Make `ps3videomode -v 0 (auto mode) work again Geert Uytterhoeven
2007-05-02 12:48 ` [patch 7/8] ps3fb: Use __func__ instead of __FUNCTION__ Geert Uytterhoeven
2007-05-02 12:48 ` [patch 8/8] ps3av: " Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).