Julia Lawall [Sun, 11 Mar 2012 19:36:21 +0000 (20:36 +0100)]
drivers/video/pvr2fb.c: ensure arguments to request_irq and free_irq are compatible
Convert calls to free_irq so that the second argument is the same as the
last argument of the corresponding call to request_irq. Without this
property, free_irq does nothing.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
The meram_register(), meram_unregister() and meram_update() operations
check that the pointers they get from the caller are not NULL. Those
checks can be remove, as the caller already ensures that the pointers
are valid.
The platform sanity checks can also be removed, as the operations can't
be accessed without valid platform data anyway.
Instead of manually specifying the ICBs to use in platform data,
allocate them automatically at runtime. The range of reserved ICBs (for
instance to be used through UIO), if any, is passed in the platform data
reserved_icbs field as a bitmask.
The MERAM registration function now returns a pointer to an opaque MERAM
object, which is passed to the update and unregistration functions.
Instead of modifying the struct sh_mobile_meram_cfg instances passed by
callers, store the ICB parameters internally and make the public API
take const pointers to sh_mobile_meram_cfg.
fbdev: sh_mobile_meram: Add _cfg suffix to struct sh_mobile_meram_icb
The structure describe ICB configuration, no ICB objects themselves.
Rename it to sh_mobile_meram_icb_cfg in preparation for the addition of
an ICB structure.
All the structure fields are unsigned integers, make them so.
arm: mach-shmobile: Split MERAM resources into regs and meram
The MERAM resource currently combines both the registers space and the
MERAM space. Only the register space needs to be ioremapped, split the
resource to make that possible.
Laurent Pinchart [Wed, 30 Nov 2011 22:07:30 +0000 (23:07 +0100)]
fbdev: sh_mobile_lcdc: Store configuration in channel structure
Store the frame buffer configuration (colorspace, visible/virtual
horizontal and vertical resolutions and line pitch) in the
sh_mobile_lcdc_chan structure, and use it instead of accessing fb_info.
Laurent Pinchart [Tue, 29 Nov 2011 14:58:10 +0000 (15:58 +0100)]
fbdev: sh_mobile_lcdc: Add sh_mobile_format_info() function
The function returns a pointer to a structure describing a format based
on its fourcc. Use the function where applicable instead of hardcoded
switch-case statements.
The struct sh_mobile_lcdc_chan_cfg platform data contains a list of
video modes. Name the lcd_cfg and num_cfg fields to reflect that they
describe video modes.
Laurent Pinchart [Tue, 29 Nov 2011 00:46:12 +0000 (01:46 +0100)]
fbdev: sh_mobile_hdmi: Don't access LCDC fb_info
The LCDC fb_info structure is only used to retrieve the default video
mode in case none of the modes advertised by EDID information is
acceptable. Pass a pointer to the default mode through the
sh_mobile_lcdc_entity structure instead.
Laurent Pinchart [Tue, 29 Nov 2011 00:07:50 +0000 (01:07 +0100)]
fbdev: sh_mobile_hdmi: Don't set sh_hdmi::mode in the display on handler
The struct sh_hdmi mode field is only used after being assigned by the
EDID read code. There is thus no need to initialize it from the LCDC
display var in the display on handler.
Instead of accessing the LCDC channel and fb_info structures directly,
use the LCDC notification callback to inform the LCDC driver about
display-related events.
sh_mobile_lcdc: Add display notify callback to sh_mobile_lcdc_chan
The callback implements 3 notification events:
- SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT notifies the LCDC that the
display has been connected
- SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT notifies the LCDC that the
display has been disconnected
- SH_MOBILE_LCDC_EVENT_DISPLAY_MODE notifies that LCDC that a display
mode has been detected
Laurent Pinchart [Mon, 28 Nov 2011 22:19:59 +0000 (23:19 +0100)]
fbdev: sh_mobile_lcdc: Return display connection state in display_on
Return true if the display is connected and false otherwise. Set the fb
info state to FBINFO_STATE_SUSPENDED in the sh_mobile_lcdc driver when
the display is not connected.
Pass a pointer to the transmitter device through platform data, retrieve
the corresponding sh_mobile_lcdc_entity structure in the probe method
and call the transmitter display_on/off methods directly.
fbdev: sh_mobile_lcdc: Move pm runtime enable to probe()
The pm_runtime_enable() and pm_runtime_resume() calls don't belong to
sh_mobile_lcdc_setup_clocks(). Move them to the probe function. Remove
the unneeded pm_runtime_resume() call.
As check_var already ensures that the mode is valid there is no need
to do those expensive lookups here again. The only thing that might
change is that the deprecated interface could report slightly
different refresh rates due to rounding errors.
This patch converts the modetables used in viafb to
- remove the strange thing that sync_end and blanking_end contained
the length and not the absolute value
- remove hundreds of useless defines
- use fb_videomode and not our own definition so modes defined in
the subsystem and received via EDID are compatible with ours
As the modes are now stored in a flat structure and no longer in a
tree like thing the lookup time was increased but as it is a rare
event anyway it shouldn't matter. Otherwise the behaviour should be
the same as before.
Olivier Sobrie [Wed, 29 Feb 2012 07:06:40 +0000 (08:06 +0100)]
udlfb: Fix invalid return codes in edid sysfs entry store function
Return a negative errno instead of zero in the write function of
the sysfs entry in case of error.
Also add a check on the return value of dlfb_setup_modes().
Donghwa Lee [Tue, 6 Mar 2012 02:44:58 +0000 (11:44 +0900)]
MAINTAINERS: add entry for exynos mipi display drivers
Add Inki Dae, Donghwa Lee and Kyungmin Park as maintainers who developers
for exynos mipi display drivers for video/driver/exynos/exynos_mipi* and
include/video/exynos_mipi*.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Tue, 6 Mar 2012 06:53:41 +0000 (15:53 +0900)]
video: s3c-fb: Add support EXYNOS5 FIMD
This patch adds s3c_fb_driverdata s3c_fb_data_exynos5 for EXYNOS5
and adds extended timing control setting.
EXYNOS5 FIMD needs extended setting for video timing control.
Additional bits are added to VIDTCON2, VIDWxxADD2, VIDOSDxA and
VIDOSDxB registers in order to set timing value for lager resolution.
Also, address offset of VIDTCONx registers is changed from 0x0
to 0x20000, thus variable type should be changed to int type
to handle the address offset of VIDTCONx registers for EXYNOS5 FIMD.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Linus Torvalds [Sun, 4 Mar 2012 00:33:51 +0000 (16:33 -0800)]
Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
PARISC fixes from James Bottomley:
"This is a set of build fixes to get the cross compiled architecture
testbeds building again"
* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] don't unconditionally override CROSS_COMPILE for 64 bit.
[PARISC] include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
Ben Collins [Sat, 3 Mar 2012 20:57:37 +0000 (12:57 -0800)]
udlfb: Add module_param to allow forcing pixel_limit
Some user scenarios need to prioritize performance over
maxiumum resolution.
Also, some devices may have bad vendor descriptors, and
this allows the user to set a pixel limit that matches
their specific device to avoid blank screens on higher
resolution monitors.
700000 minimum for DL-115, 2360000 maximum for DL-195
Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Bernie Thompson <bernie@plugable.com>
Ben Collins [Sat, 3 Mar 2012 20:43:27 +0000 (12:43 -0800)]
udlfb: Make sure to get correct endian keys from vendor descriptor
The driver was not using le16_to_cpu when reading keys from the vendor
descriptor, causing incorrect parsing. Mainly, sku_pixel_limit was not
being parsed on big-endian systems. This would result in a blank screen
on big-endian CPUs where the DL chips's max mode was smaller than the
monitor's native mode.
Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Bernie Thompson <bernie@plugable.com>
Linus Torvalds [Fri, 2 Mar 2012 23:21:48 +0000 (15:21 -0800)]
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
hhwmon fixes for 3.3-rc6 from Guenter Roeck:
These patches are necessary for correct operation and management of
F75387.
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (f75375s) Catch some attempts to write to r/o registers
hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
hwmon: (f75375s) Make pwm*_mode writable for the F75387
hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
Linus Torvalds [Fri, 2 Mar 2012 23:21:15 +0000 (15:21 -0800)]
Merge tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6
fbdev fixes for 3.3 from Florian Tobias Schandinat
It includes:
- two fixes for OMAP HDMI
- one fix to make new OMAP functions behave as they are supposed to
- one Kconfig dependency fix
- two fixes for viafb for modesetting on VX900 hardware
* tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6:
OMAPDSS: APPLY: make ovl_enable/disable synchronous
OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
viafb: fix IGA1 modesetting on VX900
viafb: select HW scaling on VX900 for IGA2
OMAPDSS: HDMI: hot plug detect fix
OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled
Linus Torvalds [Fri, 2 Mar 2012 23:20:41 +0000 (15:20 -0800)]
Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
sound fixes for 3.3-rc6 from Takashi Iwai
This contains again regression fixes for various HD-audio and ASoC
regarding SSI and dapm shutdown path. In addition, a minor azt3328
fix and the correction of the new jack-notification strings in HD-audio.
* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Kill hyphenated names
ALSA: hda - Add a fake mute feature
ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs
ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3
ALSA: hda/realtek - Fix resume of multiple input sources
ASoC: i.MX SSI: Fix DSP_A format.
ASoC: dapm: Check for bias level when powering down
Linus Torvalds [Fri, 2 Mar 2012 22:49:24 +0000 (14:49 -0800)]
vfs: split up name hashing in link_path_walk() into helper function
The code in link_path_walk() that finds out the length and the hash of
the next path component is some of the hottest code in the kernel. And
I have a version of it that does things at the full width of the CPU
wordsize at a time, but that means that we *really* want to split it up
into a separate helper function.
So this re-organizes the code a bit and splits the hashing part into a
helper function called "hash_name()". It returns the length of the
pathname component, while at the same time computing and writing the
hash to the appropriate location.
The code generation is slightly changed by this patch, but generally for
the better - and the added abstraction actually makes the code easier to
read too. And the new interface is well suited for replacing just the
"hash_name()" function with alternative implementations.
Linus Torvalds [Fri, 2 Mar 2012 22:47:15 +0000 (14:47 -0800)]
vfs: clarify and clean up dentry_cmp()
It did some odd things for unclear reasons. As this is one of the
functions that gets changed when doing word-at-a-time compares, this is
yet another of the "don't change any semantics, but clean things up so
that subsequent patches don't get obscured by the cleanups".
Linus Torvalds [Fri, 2 Mar 2012 22:32:59 +0000 (14:32 -0800)]
vfs: uninline full_name_hash()
.. and also use it in lookup_one_len() rather than open-coding it.
There aren't any performance-critical users, so inlining it is silly.
But it wouldn't matter if it wasn't for the fact that the word-at-a-time
dentry name patches want to conditionally replace the function, and
uninlining it sets the stage for that.
So again, this is a preparatory patch that doesn't change any semantics,
and only prepares for a much cleaner and testable word-at-a-time dentry
name accessor patch.
Linus Torvalds [Fri, 2 Mar 2012 22:23:30 +0000 (14:23 -0800)]
vfs: trivial __d_lookup_rcu() cleanups
These don't change any semantics, but they clean up the code a bit and
mark some arguments appropriately 'const'.
They came up as I was doing the word-at-a-time dcache name accessor
code, and cleaning this up now allows me to send out a smaller relevant
interesting patch for the experimental stuff.
Nikolaus Schulz [Tue, 28 Feb 2012 21:15:54 +0000 (16:15 -0500)]
hwmon: (f75375s) Catch some attempts to write to r/o registers
It makes no sense to attempt to manually configure the fan in auto mode,
or set the duty cycle directly in closed loop mode. The corresponding
registers are then read-only. If the user tries it nonetheless, error out
with EINVAL instead of silently doing nothing.
Nikolaus Schulz [Tue, 28 Feb 2012 21:15:53 +0000 (16:15 -0500)]
hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
The F75387 supports automatic fan control using either PWM duty cycle or
RPM speed values. Make the driver detect the latter mode, and expose the
different modes in sysfs as per pwm_enable, so that the user can switch
between them.
The interpretation of the pwm_enable attribute for the F75387 is adjusted
to be a superset of those values used for similar Fintek chips which do
not support automatic duty mode, with 2 mapping to automatic speed mode,
and moving automatic duty mode to the new value 4.
Toggling the duty mode via pwm_enable is currently denied for the F75387,
as the chip then simply reinterprets the fan configuration register values
according to the new mode, switching between RPM and PWM units, which
makes this a dangerous operation.
This patch introduces a new pwm mode into the driver. This is necessary
because the new mode (automatic pwm mode, 4) may already be enabled by the
BIOS, and the driver should not break existing functionality. This was seen
on at least one board.
Linus Torvalds [Fri, 2 Mar 2012 19:38:43 +0000 (11:38 -0800)]
Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pulling latest branches from Ingo:
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
memblock: Fix size aligning of memblock_alloc_base_nid()
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf probe: Ensure offset provided is not greater than function length without DWARF info too
perf tools: Ensure comm string is properly terminated
perf probe: Ensure offset provided is not greater than function length
perf evlist: Return first evsel for non-sample event on old kernel
perf/hwbp: Fix a possible memory leak
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
CPU hotplug, cpusets, suspend: Don't touch cpusets during suspend/resume
H. Peter Anvin [Fri, 2 Mar 2012 18:43:49 +0000 (10:43 -0800)]
regset: Return -EFAULT, not -EIO, on host-side memory fault
There is only one error code to return for a bad user-space buffer
pointer passed to a system call in the same address space as the
system call is executed, and that is EFAULT. Furthermore, the
low-level access routines, which catch most of the faults, return
EFAULT already.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@hack.frob.com> Cc: <stable@vger.kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H. Peter Anvin [Fri, 2 Mar 2012 18:43:48 +0000 (10:43 -0800)]
regset: Prevent null pointer reference on readonly regsets
The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.
Rather than putting in stub functions everywhere, handle regsets with
null .get or .set methods explicitly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@hack.frob.com> Cc: <stable@vger.kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joerg Roedel [Wed, 29 Feb 2012 13:57:32 +0000 (14:57 +0100)]
perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled
It turned out that a performance counter on AMD does not
count at all when the GO or HO bit is set in the control
register and SVM is disabled in EFER.
This patch works around this issue by masking out the HO bit
in the performance counter control register when SVM is not
enabled.
The GO bit is not touched because it is only set when the
user wants to count in guest-mode only. So when SVM is
disabled the counter should not run at all and the
not-counting is the intended behaviour.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Avi Kivity <avi@redhat.com> Cc: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Robert Richter <robert.richter@amd.com> Cc: stable@vger.kernel.org # v3.2 Link: http://lkml.kernel.org/r/1330523852-19566-1-git-send-email-joerg.roedel@amd.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Fri, 2 Mar 2012 02:27:43 +0000 (18:27 -0800)]
Merge git://www.linux-watchdog.org/linux-watchdog
Watchdog updates from Wim Van Sebroeck:
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: fix GETTIMEOUT ioctl in booke_wdt
watchdog: update maintainers git entry
watchdog: Fix typo in pnx4008_wdt.c
watchdog: Fix typo in Kconfig
watchdog: fix error in probe() of s3c2410_wdt (reset at booting)
watchdog: hpwdt: clean up set_memory_x call for 32 bit
Linus Torvalds [Fri, 2 Mar 2012 02:26:48 +0000 (18:26 -0800)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull from Mark Brown:
"A simple, driver specific fix. This device isn't widely used outside
of Marvell reference boards most of which are probably used with their
BSPs rather than with mainline so low risk."
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: fix the ldo configure according to 88pm860x spec
Linus Torvalds [Fri, 2 Mar 2012 02:24:52 +0000 (18:24 -0800)]
Merge branch 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6
i2c bugfix from Wolfram Sang:
"This patch fixes a wrong assumption in the mxs-i2c-driver about a
command queue being done. Without it, we have seen races when the
bus was under load."
* 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6:
i2c: mxs: only flag completion when queue is completely done
Linus Torvalds [Fri, 2 Mar 2012 02:23:43 +0000 (18:23 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
DRM fixes from Dave Airlie:
intel: fixes for output regression on 965GM, an oops and a machine
hang
radeon: uninitialised var (that gcc didn't warn about for some reason)
+ a couple of correctness fixes.
exynos: fixes for various things, drop some chunks of unused code.
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/radeon/kms/vm: fix possible bug in radeon_vm_bo_rmv()
drm/radeon: fix uninitialized variable
drm/radeon/kms: fix radeon_dp_get_modes for LVDS bridges (v2)
drm/i915: Remove use of the autoreported ringbuffer HEAD position
drm/i915: Prevent a machine hang by checking crtc->active before loading lut
drm/i915: fix operator precedence when enabling RC6p
drm/i915: fix a sprite watermark computation to avoid divide by zero if xpos<0
drm/i915: fix mode set on load pipe. (v2)
drm/exynos: exynos_drm.h header file fixes
drm/exynos: added panel physical size.
drm/exynos: added postclose to release resource.
drm/exynos: removed exynos_drm_fbdev_recreate function.
drm/exynos: fixed page flip issue.
drm/exynos: added possible_clones setup function.
drm/exynos: removed pageflip_event_list init code when closed.
drm/exynos: changed priority of mixer layers.
drm/exynos: Fix typo in exynos_mixer.c
Linus Torvalds [Fri, 2 Mar 2012 02:22:55 +0000 (18:22 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
[S390] memory hotplug: prevent memory zone interleave
[S390] crash_dump: remove duplicate include
[S390] KEYS: Enable the compat keyctl wrapper on s390x
Bernie Thompson [Fri, 2 Mar 2012 01:35:48 +0000 (17:35 -0800)]
udlfb: fix hcd_buffer_free panic on unplug/replug
Fix race conditions with unplug/replug behavior, in particular
take care not to hold up USB probe/disconnect for long-running
framebuffer operations and rely on usb to handle teardown.
Fix for kernel panic reported with new F17 multiseat support.
Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Bernie Thompson <bernie@plugable.com>