[go: nahoru, domu]

History log of /drivers/ps3/ps3av.c
Revision Date Author Comments
0fe763c570ad2701c830b9e4e53c65ad89c11c32 22-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> Drivers: misc: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f02777b4c0047e75b0b6db9a67aa49d29ae57965 17-Apr-2012 Valentin Ilie <valentin.ilie@gmail.com> drivers/ps3: Fix checkpatch warnings in ps3av.c

Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
8354be9c104db8e92bb079e29540fbafb7f09b5c 06-Feb-2010 Frans Pop <elendil@planet.nl> powerpc: Remove trailing space in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: linuxppc-dev@ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
a469f563d6eec9ef68da9b4aed708e7f6ecabd51 10-Jun-2009 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> drivers/ps3: Add missing annotations

probe functions should be __devinit
initialization functions should be __init

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
7a4a89c38960591fa6555d287f793bd592c07ebd 10-Jun-2009 sebastian.blanes@gmail.com <sebastian.blanes@gmail.com> ps3av: Set 16:9 aspect ratio for 720p video modes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
e7eec2fc27d7dbefd5852c36b3fe6229e6302c99 03-Mar-2009 roel kluin <roel.kluin@gmail.com> powerpc/ps3: Make ps3av_set_video_mode mode ID signed

Change the ps3av_auto_videomode() mode id argument type from unsigned to
signed so a negative id can be detected and reported as an -EINVAL failure.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
9b82f3e61758ed897200f0244b63a77c1791bcba 30-Oct-2008 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> powerpc/ps3: Replace the flip_ctl logic in ps3av and ps3fb by a mutex

Introduce ps3_gpu_mutex to synchronizes GPU-related operations, like:
- invoking the L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT command using the
lv1_gpu_context_attribute() hypervisor call,
- handling the PS3AV_CID_AVB_PARAM packet in the PS3 A/V Settings driver.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
756ba83ee370fbf62643777e7ba4a4f05932f6fb 20-Oct-2008 Masakazu Mokuno <mokuno@sm.sony.co.jp> ps3: Add ps3av_audio_mute_analog()

Add support for muting the analog output so that it does not
play noises while non-PCM data is played.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
084ffff29844a4bce69999d67809e6c00309ba58 06-Feb-2008 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3: use symbolic names for video modes

Use symbolic names for video modes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3c4f594a6da410789975dcde16b07b62c62fa564 06-Feb-2008 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused

ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused, so remove them

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3305a6bc2c4dbd8f7fde1b9941ccb260bc6355c2 19-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: remove unused fields in ps3av_monitor_quirks

Remove the `clear_50' and `clear_vesa' fields of struct
ps3av_monitor_quirk, as they're currently unused. We can always re-add
them when we really need them.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d7dd91ff236b90a8aca2d619554b07bcb82953c7 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3fb: default to 480p on DVI-D/HDMI if video=safe

Default to the 480p video mode on DVI-D and HDMI displays if `video=safe' is
passed on the kernel command line.

This is intended to be used by `kboot'-style boot loaders (i.e. first-stage
kernels) for the PS3, to provide a failsafe video mode.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ce4c371a9de1f5b9e1d15f9d59c5f7d079bcd6d7 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: dont distinguish between `boot' and `non-boot' autodetection

don't distinguish between `boot' and `non-boot' autodetection now the
autodetection code has been improved

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
466c449e5feb6007841c100d385aeba7869b9946 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: remove unused ps3av_set_mode()

remove unused ps3av_set_mode()

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
57f70c6067b66b16398010d43d1ee2eba5e56760 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: add quirk database for broken monitors

add a quirk database for broken monitors where the `best' advertised
video mode doesn't work

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fd5621129bbfa30839efbb6d32f20026a113f894 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: add autodetection for VESA modes

add autodetection for VESA modes

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
101aa56d02240dfe36b2fb229fed0a9d6efba425 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: treat DVI-D like HDMI in autodetect

treat DVI-D monitors like HDMI monitors when autodetecting the best video mode

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
71a27fecaf836093a30fe538c5ab98ef0b25bfc8 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: use PS3 video mode ids in autodetect code

It doesn't make much sense to use the PS3AV_CMD_VIDEO_VID_* values in the
autodetection code, just to convert them to PS3 video mode ids afterwards.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
eea820ab0b189d74620dca376817a2e599eb1ab1 16-Oct-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: eliminate PS3AV_DEBUG

ps3av: eliminate PS3AV_DEBUG
- Move ps3av_cmd_av_monitor_info_dump from ps3av_cmd.c to ps3av.c, as
it's
used there only
- Integrate ps3av_cmd_av_hw_conf_dump() into its sole user
- Use pr_debug() for printing debug info

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8ca0bf750b7d9b7e859f2f40516b914827e7afd8 16-Oct-2007 Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp> ps3: Fix black and white stripes

Fix the black and white stripes issue with WUXGA monitor via HDMI.

It seems that when we use a VESA resolution from boot up, the AV settings
driver could not be initialized correctly. In that case we need a dummy
packet before VESA setting.

[Geert] Refactored to reduce code duplication.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13a5e30cf7407415387b5592b15ef4b352d28283 16-Jun-2007 Geoff Levand <geoffrey.levand@am.sony.com> [POWERPC] PS3: Rework AV settings driver

Make the PS3 ps3av driver a loadable module.
- Replace static data with kmalloc()'ed.
o Allocate struct ps3av dynamically, as it contains data used as vuart
receive/transmit buffers
o Move static recv_buf from ps3av_do_pkt() to struct ps3av
- Move ps3av_vuart_{read,write}() from drivers/ps3/ps3av_cmd.c to
drivers/ps3/ps3av.c and make them static as they're used in that file only.
- Make device a PS3 system-bus device.
- Update copyright formatting.
- Make two new routines ps3av_register_flip_ctl() and ps3av_flip_ctl() to
support late binding of the frame buffer flip control routine.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
253f04e78ded827c30f9582489773ebe2adc8924 02-May-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: Use __func__ instead of __FUNCTION__

ps3av: Replace GNU extension `__FUNCTION__' by C99 `__func__'

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
640729014e073e6e2de1f513b2856b81aa7d84e9 02-May-2007 Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp> ps3: Make `ps3videomode -v 0 (auto mode) work again

ps3: Make `ps3videomode -v 0' (auto mode) work again

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fffe52e86b4ad5f8bdcb284c4ea6c87402967f3d 02-May-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: misc updates

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5caf5db887b2bc87d74a78674d8e3e4774fa2a14 02-May-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> ps3av: thread updates

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ef596c697a4d80048eccf50530153d7e3330c127 10-Mar-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> [POWERPC] ps3: always make sure were running on a PS3

Add missing checks to PS3 specific drivers ps3av and sys-manager to verify that
we are actually running on a PS3 (pointed out by Arnd).

Correct existing checks in other subsystems/drivers to return -ENODEV instead
of zero.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
8170f524894b17a3f36351fe0e1a3fb6aca733ee 22-Feb-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> [POWERPC] ps3: always make sure we're running on a PS3

Add missing checks to PS3 specific drivers ps3av and sys-manager to verify that
we are actually running on a PS3 (pointed out by Arnd).

Correct existing checks in other subsystems/drivers to return -ENODEV instead
of zero.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
11227fd1922dc5dda691586852cfd220dd383f37 12-Feb-2007 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> [PATCH] ps3: AV Settings Driver

Add the PS3 AV Settings Driver.

The AV Settings driver is used to control Audio and Video settings. It
communicates with the policy manager through the virtual uart.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>