Commit graph

6956 commits

Author SHA1 Message Date
Tomi Valkeinen
47fc469b3a OMAPDSS: setup default fifo thresholds
At the moment we don't setup FIFO thresholds by default in omapdss. It's
supposed to be done by the user of omapdss. And that is missing from
omapdrm, causing unoptimal thresholds to be used when using omapdrm.

While I believe it's in theory better to allow the user of omapdss to
setup the fifo thresholds, in practice we always use the same values,
and we could as well setup the thresholds in omapdss.

Furthermore, in omapdss init we always swap the FIFO used for GFX and WB
overlays, but we don't swap the FIFO thresholds for those overlays
(which is the reason for omapdrm using unoptimal HW reset values). So
it would make sense to setup the thresholds to account for the swapping
of the FIFOs.

So, this patch adds code to setup default FIFO tresholds at omapdss
init.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:13 +02:00
Tomi Valkeinen
d49cd15550 OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG
Dispc driver presumes that the callers handle locking for all normal
functions. However, omapdrm doesn't handle this, and presumes that all
overlay manager registers are private to that overlay manager, and thus
presumes that configurations for overlay managers can be written via
different threads freely.

For many registers the above is true. The exceptions are DISPC_CONTROL
and DISPC_CONFIG registers, which contain bits for both LCD and TV
overlay managers.

Fixing this properly in omapdrm means a big omapdrm rewrite. So, for
now, add locking to dispc for the problematic registers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Somnath Mukherjee <somnath@ti.com>
2015-02-26 12:15:13 +02:00
Tomi Valkeinen
4e1d3ca083 OMAPDSS: DISPC: fix div by zero issue in overlay scaling
omapdrm doesn't always configure the overlays correctly, causing the
overlay setup functions to be called with zero timings. This leads to
division by zero error.

This happens, for example, when a HDMI cable is not connected, but a
user tries to setup a plane with scaling.

Fixing omapdrm is a big job, so for now let's check for the bad timings
in DISPC and return an error.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:13 +02:00
Tomi Valkeinen
386f167c69 OMAPDSS: DISPC: change sync_pclk_edge default value
The common 'struct videomode' does not have a flag to select when the
sync signals should be driven.

The default behavior of DISPC HW is to drive the sync signal on the
opposite pixel clock edge from data signal, which is also what the
videomode_to_omap_video_timings() uses.

However, it looks like what panels usually expect is that the data and
sync signals are driven on the same edge, so let's change
videomode_to_omap_video_timings() to set the sync_pclk_edge accordingly.

Note that this only affect panels drivers that use
videomode_to_omap_video_timings(), probably when getting the video
timings directly from DT data. The drivers can still configure the
sync_pclk_edge independently if they so wish.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:12 +02:00
Tomi Valkeinen
ed35188158 OMAPDSS: DISPC: explicit handling for sync and de levels
When configuring the lcd timings, instead of writing enum values
directly to the HW, use switch-case to get the value to be programmed.

This is safer and also allows us to change the enum values.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:12 +02:00
Tomi Valkeinen
7a16360d56 OMAPDSS: DISPC: remove OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES
DISPC can drive data lines either on rising or falling pixel clock edge,
which can be configured by the user.

Sync lines can also be driven on rising or falling pixel clock edge, but
additionally the HW can be configured to drive the sync lines on
opposite clock edge from the data lines.

This opposite edge setting does not make any sense, as the same effect
can be achieved by just setting the sync lines to be driven on the other
edge compared to the data lines. It feels like some kind of backward
compatibility option, even if all DSS versions seem to have the same
implementation.

To simplify the code and configuration of the signals, and to make the
dispc timings more compatible with what is used on other platforms,
let's just remove the whole opposite-edge support.

The drivers that used OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES setting are
changed so that they use the opposite setting from the data edge.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:11 +02:00
Tomi Valkeinen
6246c8b57c OMAPDSS: TFP410: fix input sync signals
TFP410 requires that DE is active high and the data and syncs are driven
on rising pixel clock edge. However, at the moment the driver doesn't
request such syncs, and the end result is that the sync settings depend
on default values, which are not right in all cases.

Set the sync values explicitly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 12:15:11 +02:00
Tomi Valkeinen
e566658f2e OMAPDSS: fix paddr check for TILER addresses
The DISPC driver checks that the buffer address is not 0. However, when
using TILER, the address space is TILER specific and 0 is a valid
address.

Fix the check to allow address of 0 for TILER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
2015-02-26 12:15:11 +02:00
Tomi Valkeinen
a38bb793ea OMAPDSS: fix regression with display sysfs files
omapdss's sysfs directories for displays used to have 'name' file,
giving the name for the display. This file was later renamed to
'display_name' to avoid conflicts with i2c sysfs 'name' file. Looks like
at least xserver-xorg-video-omap3 requires the 'name' file to be
present.

To fix the regression, this patch creates new kobjects for each display,
allowing us to create sysfs directories for the displays. This way we
have the whole directory for omapdss, and there will be no sysfs file
clashes with the underlying display device's sysfs files.

We can thus add the 'name' sysfs file back.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: NeilBrown <neilb@suse.de>
2015-02-26 10:23:15 +02:00
Sudip Mukherjee
d746b40c64 video: fbdev: fix possible null dereference
we were dereferencing edid first and the NULL check was after
accessing that. now we are using edid only if we know that
it is not NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 10:23:15 +02:00
Kiran Padwal
11f09e53af video: ARM CLCD: Add missing error check for devm_kzalloc
This patch add a missing check on the return value of devm_kzalloc,
which would cause a NULL pointer dereference in a OOM situation.

Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26 10:23:15 +02:00
Tomi Valkeinen
7b205455cc OMAPDSS: HDMI5: Increase DDC SDA-HOLD time
It has been observed that the current SDA-HOLD time is too short for
some board/cable/monitor combinations. Increase the SDA-HOLD time to
1000ns.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-25 15:03:50 +02:00
Tomi Valkeinen
1511c75be0 OMAPDSS: fix AM43xx minimum pixel clock divider
AM43xx supports pixel clock divider of 1, just like all OMAP3+ SoCs. Fix
the minimum divider value.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-25 15:03:28 +02:00
Philipp Zabel
f033c0bcc5 of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint
Decrementing the reference count of the previous endpoint node allows to
use the of_graph_get_next_endpoint function in a for_each_... style macro.
All current users of this function that pass a non-NULL prev parameter
(that is, soc_camera and imx-drm) are changed to not decrement the passed
prev argument's refcount themselves.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-23 11:42:23 +01:00
Andrea Arcangeli
7e33912849 mm: gup: use get_user_pages_unlocked
This allows those get_user_pages calls to pass FAULT_FLAG_ALLOW_RETRY to
the page fault in order to release the mmap_sem during the I/O.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Peter Feiner <pfeiner@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-11 17:06:05 -08:00
Linus Torvalds
e0c8453769 fbdev changes for v3.20
* omapdss: add DRA7xxx SoC support
 * fbdev: support DMT (Display Monitor Timing) calculation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU2yD3AAoJEPo9qoy8lh71mWQQAIakYyfFAYFnGOZU7vj9zxlj
 //UYaAWjjcksRd31hSBjGT/rQCmM/vM159W7RmIiJfqlw+hBIaHzWC3Wt9+4E3qt
 1p/eO/QdwRoOAixrY2WQhC1O70PldDIO75rw85EjxlISkw0gmEKeG2eSiYFVvPfI
 2afNj4gOkP1KUOZOTABMc0H+BMJo/EVQ34MJx8JNFGHRynGaDx7O44/0G8k/kfnk
 /tEit0iS4T7oF2Rz89fxFZxzoAtDmtR+ftFSkm42/2pmlmHXeh5Sn2Nxz3Kt6P0J
 bwvGXt7Q9VkKSB257wZ06tVER18JUNo6hOzEKZDYpfteDSX3pREMiNHi/EnDBLe+
 eXQ4GGozh50MfBYUnIYZ30vG8iY3oGzSPTENVfyMT6knVzTe2fbnu6vco231upBB
 DKak4+vqZk7ODC+PO3S3IjoxvpRziEiwbr4X7gk8CCU+5S8lwGZ1hAH91sUbiHVd
 p14wfMke5/RkgAF4USwbeyKxA/tNJosbrrKQW+9zpTAZL2iPR9g/6NM689LiEGpL
 uzM0Va0RxaFnqNDbbh4iFUEDcMD8/riRI6Tqa/QWtZvYVD+R/cdr4G/6aV8zG6gL
 B+yWPJxBOGOU3cuONWSC2jcUaT9v+AupV5oxRKcmmXNhByQ77g1ncX+TAPiv++ni
 1PMCAO2IIBt0GgY4SkfK
 =FBW1
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev changes from Tomi Valkeinen:

 - omapdss: add DRA7xxx SoC support

 - fbdev: support DMT (Display Monitor Timing) calculation

* tag 'fbdev-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (40 commits)
  omapfb: Return error code when applying overlay settings fails
  OMAPDSS: DPI: DRA7xx support
  OMAPDSS: HDMI: Add DRA7xx support
  OMAPDSS: DISPC: program dispc polarities to control module
  OMAPDSS: DISPC: Add DRA7xx support
  OMAPDSS: Add Video PLLs for DRA7xx
  OMAPDSS: Add functions for external control of PLL
  OMAPDSS: DSS: Add DRA7xx base support
  Doc/DT: Add DT binding doc for DRA7xx DSS
  OMAPDSS: add define for DRA7xx HW version
  OMAPDSS: encoder-tpd12s015: Fix race issue with LS_OE
  OMAPDSS: OMAP5: fix digit output's allowed mgrs
  OMAPDSS: constify port arrays
  OMAPDSS: PLL: add dss_pll_wait_reset_done()
  OMAPDSS: Add enum dss_pll_id
  video: fbdev: fix sys_copyarea
  video/mmpfb: allow modular build
  fb: via: turn gpiolib and i2c selects into dependencies
  fbdev: ssd1307fb: return proper error code if write command fails
  fbdev: fix CVT vertical front and back porch values
  ...
2015-02-11 09:24:30 -08:00
Linus Torvalds
3e63430a5c media updates for v3.20-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU2NQQAAoJEAhfPr2O5OEV5BgQAIja/XsIgpeNhfN8kJ3GrdhL
 Z+QRTcHNc6AWGm1dkI+YTl4B38/xLlmxhUYPKsDl19N7n1oKkqdUxYtLe1mLdecW
 dvqMXMVBKQSCgyDP5sgZNHKlavEX1ZPTTtkrY8zYWaXbkcf4dOZyisbNQrmFdO3T
 wt4zwaO8+ziCEYbotLsaI1VpEDKFZV6AVhKnLsWxc4ZoCnAqJbmA31jtANxrQ0tw
 UgXRjJmf1uWrS+MWM5xFDi+v+FmZiUAHMJ5iksqWhp2pKj41geIqy7lAueytEN+Q
 vQHZ9cfhnoF/7VrqDtqq5CaJZPKfA80PSxml9mbjc4wytvWLevoc4UxFtU+lohOf
 YbM3nB5J3nAcq0bNF/cSpuYUoiGnK86FazuM6YAQy2CaucrVKALKHHmziWbK6gBv
 1yA4qnDuRYKps3SQSQQKuNlv8dmcVTD/sVhf8EIx62son6xxeXf21nas61lw8k5P
 lrUVH9nJxkwTkRJ7wMjlAZeh0pTyB/Ag1bSn81myziv0r4AsNyWJT5qxN8szmZDe
 nXGIdQ1h5JkMQ0kCfhhLqgdIUwhx7dMXIlXcCfR/8a9uYm4StegPNCEZDybIi6co
 8Ok3rPYt15PlrCyfMjXFOG/TYi/cZ/xIbffLbSFMOqnCUZElaA7RNpOnswNc9fc6
 2WsY54Lb4ftC4bQ7hM90
 =VH6m
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - Some documentation updates and a few new pixel formats

 - Stop btcx-risc abuse by cx88 and move it to bt8xx driver

 - New platform driver: am437x

 - New webcam driver: toptek

 - New remote controller hardware protocols added to img-ir driver

 - Removal of a few very old drivers that relies on old kABIs and are
   for very hard to find hardware: parallel port webcam drivers
   (bw-qcam, c-cam, pms and w9966), tlg2300, Video In/Out for SGI (vino)

 - Removal of the USB Telegent driver (tlg2300).  The company that
   developed this driver has long gone and the hardware is hard to find.
   As it relies on a legacy set of kABI symbols and nobody seems to care
   about it, remove it.

 - several improvements at rtl2832 driver

 - conversion on cx28521 and au0828 to use videobuf2 (VB2)

 - several improvements, fixups and board additions

* tag 'media/v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (321 commits)
  [media] dvb_net: Convert local hex dump to print_hex_dump_debug
  [media] dvb_net: Use standard debugging facilities
  [media] dvb_net: Use vsprintf %pM extension to print Ethernet addresses
  [media] staging: lirc_serial: adjust boolean assignments
  [media] stb0899: use sign_extend32() for sign extension
  [media] si2168: add support for 1.7MHz bandwidth
  [media] si2168: return error if set_frontend is called with invalid parameters
  [media] lirc_dev: avoid potential null-dereference
  [media] mn88472: simplify bandwidth registers setting code
  [media] dvb: tc90522: re-add symbol-rate report
  [media] lmedm04: add read snr, signal strength and ber call backs
  [media] lmedm04: Create frontend call back for read status
  [media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocks
  [media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb
  [media] lmedm04: Increase Interupt due time to 200 msec
  [media] cx88-dvb: whitespace cleanup
  [media] rtl28xxu: properly initialize pdata
  [media] rtl2832: declare functions as static
  [media] rtl2830: declare functions as static
  [media] rtl2832_sdr: add kernel-doc comments for platform_data
  ...
2015-02-11 08:45:40 -08:00
Linus Torvalds
ab0475df5c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
 "Summary:

  - switch to asm-generic/futex.h

  - various cleanups

  - defconfig updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/defconfig: Enable Ethernet bridging
  m68k/defconfig: Enable Atari EtherNAT and EtherNEC Ethernet support
  m68k/defconfig: Enable automounting of devtmpfs at /dev
  m68k/defconfig: Enable early printk support
  m68k/defconfig: Enable test modules
  m68k/defconfig: Refresh defconfigs for v3.16-rc1--v3.19-rc2
  m68k/atari: Remove obsolete IRQ_TYPE_*
  sound: dmasound_atari: Remove obsolete IRQ_TYPE_SLOW
  video: atafb: Remove obsolete IRQ_TYPE_PRIO
  parport: parport_atari: Remove obsolete IRQ_TYPE_SLOW
  net: atarilance: Remove obsolete IRQ_TYPE_PRIO
  m68k/atari: Remove obsolete keyboard_tasklet scheduling
  m68k/mac: Fix scsi_type for Mac LC and similar models
  m68k: Switch to asm-generic/futex.h
  m68k/mvme147: config.c - Remove unused functions
  m68k/atari: atakeyb.c - Remove some unused functions
  m68k/mvme16x: rtc - Don't use module_init in non-modular code
2015-02-10 13:27:24 -08:00
Tomi Valkeinen
d6c2152b3e Merge branches '3.20/fbdev' and '3.20/omapdss' into for-next
Merge fbdev topic branches
2015-02-04 12:44:11 +02:00
Peter Meerwald
811fbb1f58 omapfb: Return error code when applying overlay settings fails
the check of the return code is missing, user space does not get notified
about the error condition:

omapdss OVERLAY error: overlay 2 horizontally not inside the display area (403 + 800 >= 800)
omapdss APPLY error: failed to apply settings: illegal configuration.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:41:53 +02:00
Tomi Valkeinen
a2408154a1 OMAPDSS: DPI: DRA7xx support
Add support for DRA7xx DPI output.

DRA7xx has three DPI outputs, each of which gets its input from a DISPC
channel. However, DRA72x has only one video PLL, and DRA74x has two
video PLLs. In both cases the video PLLs need to be shared between
multiple outputs. The driver doesn't handle this at the moment.

Also, DRA7xx requires configuring CONTROL module bits to route the clock
from the PLL to the used DISPC channel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:07 +02:00
Tomi Valkeinen
adb5ff835c OMAPDSS: HDMI: Add DRA7xx support
Add support for DRA7xx to the HDMI driver.

The HDMI block on DRA7xx is the same as on OMAP5, except we need to
enable and disable the HDMI PLL via the CONTROL module.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:06 +02:00
Tomi Valkeinen
0006fd63d1 OMAPDSS: DISPC: program dispc polarities to control module
On DRA7xx, DISPC needs to write output signal polarities not only to a
DISPC register, like for all earlier DSS versions, but to control
module's CTRL_CORE_SMA_SW_1 register.

This patch adds support to write the polarities to control module.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:06 +02:00
Tomi Valkeinen
935509275c OMAPDSS: DISPC: Add DRA7xx support
Add DRA7xx support to DISPC driver. The DISPC block is the same as on
OMAP5, except the PLL's used for clocking are "videoX", not "dsiX".

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:06 +02:00
Tomi Valkeinen
99767548b1 OMAPDSS: Add Video PLLs for DRA7xx
DRA7xx SoCs have one (DRA72x) or two (DRA74x) video PLLs. They are
basically the same as DSI PLLs on OMAPs, but without the rest of the DSI
hardware. The video PLLs also require some configuration via the CONTROL
module.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:05 +02:00
Tomi Valkeinen
be40eecf8d OMAPDSS: Add functions for external control of PLL
Add functions which configure the control module register
CTRL_CORE_DSS_PLL_CONTROL found in DRA7xx SoCs. This register configures
whether the PLL registers are accessed internally by DSS, or externally
using OCP2SCP interface. They also configure muxes which route the PLL
output to a particular LCD overlay manager within DSS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:05 +02:00
Tomi Valkeinen
6d817880cd OMAPDSS: DSS: Add DRA7xx base support
Add base support for DRA7xx to DSS core.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:05 +02:00
Tomi Valkeinen
a87a6d6b09 OMAPDSS: encoder-tpd12s015: Fix race issue with LS_OE
A race issue has been observed with the encoder-tpd12s015 driver, which
leads to errors when trying to read EDID. This has only now been
observed, as OMAP4 and OMAP5 boards used SoC's GPIOs for LS_OE GPIO. On
dra7-evm boards, the LS_OE is behind a i2c controlled GPIO expander,
which increases the time to set the LS_OE.

This patch simplifies the handling of the LS_OE gpio in the driver by
removing the interrupt handling totally. The only time we actually need
to enable LS_OE is when we are reading the EDID, and thus we can just
set and clear the LS_OE gpio inside the read_edid() function.

This also has the additional benefit of very slightly decreasing the
power consumption.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:04 +02:00
Tomi Valkeinen
fa0c52ab23 OMAPDSS: OMAP5: fix digit output's allowed mgrs
The OMAP5 HW supports directing DIGIT channel to DPI output, but the
driver doesn't support that. However, we have marked that configuration
as possible in the dss features, so in certain cases the driver tries to
use that configuration, leading to broken display.

Fix the problem by allowing DIGIT channel to go only to HDMI output.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:03 +02:00
Tomi Valkeinen
234f9a22f4 OMAPDSS: constify port arrays
The port arrays are constant data, so set them as 'const'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:03 +02:00
Tomi Valkeinen
eb30199b46 OMAPDSS: PLL: add dss_pll_wait_reset_done()
Add a helper function to wait until the PLL's reset is done.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:03 +02:00
Tomi Valkeinen
64e22ffdab OMAPDSS: Add enum dss_pll_id
In some cases we need global identifiers for the DSS PLLs, for example
when configuring clock muxing on DRA7. For this purpose let's add a
'enum dss_pll_id'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04 12:32:02 +02:00
Mans Rullgard
ee06bd155b video: fbdev: fix sys_copyarea
The sys_copyarea() function performs the same operation as
cfb_copyarea() but using normal memory access instead of I/O
accessors.  Since the introduction of sys_copyarea(), there
have been two fixes to cfb_copyarea():

- 00a9d699 ("framebuffer: fix cfb_copyarea")
- 5b789da8 ("framebuffer: fix screen corruption when copying")

This patch incorporates the fixes into sys_copyarea() as well.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-30 09:46:59 +02:00
Arnd Bergmann
6984330a13 video/mmpfb: allow modular build
The frame buffer core can be a module, which means any fb drivers
should be able to build as modules too. This turns mmpfb into
a tristate option to allow that and fix a possible randconfig
build error.

drivers/built-in.o: In function `modes_setup':
:(.text+0x11b34): undefined reference to `fb_videomode_to_modelist'
:(.text+0x11b5c): undefined reference to `fb_videomode_to_var'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-30 09:45:20 +02:00
Arnd Bergmann
87f0fce775 fb: via: turn gpiolib and i2c selects into dependencies
Device driver should not directly select subsystems. In this case
we get build warnings like

warning: (ARCH_REQUIRE_GPIOLIB && PINCTRL_AT91 && PINCTRL_NOMADIK && MFD_TC6393XB && FB_VIA) selects GPIOLIB which has unmet direct dependencies (ARCH_WANT_OPTIONAL_GPIOLIB || ARCH_REQUIRE_GPIOLIB)

which we can avoid using the normal 'depends on' statement.

Also, this patch makes it possible for DRM drivers to have a dependency
on GPIOLIB without getting circular Kconfig dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-30 09:45:20 +02:00
Prabhakar Lad
5b72ae9a90 fbdev: ssd1307fb: return proper error code if write command fails
this patch fixes ssd1307fb_ssd1306_init() function to return
proper error codes in case of failures.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-30 09:40:00 +02:00
Hans Verkuil
dc189053e1 [media] hdmi: rename HDMI_AUDIO_CODING_TYPE_EXT_STREAM to _EXT_CT
As per the suggestion of Thierry Reding rename
HDMI_AUDIO_CODING_TYPE_EXT_STREAM to HDMI_AUDIO_CODING_TYPE_EXT_CT to
be consistent with the CEA-861 spec.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:19:12 -02:00
Martin Bugge
2c676f378e [media] hdmi: added unpack and logging functions for InfoFrames
When receiving video it is very useful to be able to unpack the InfoFrames.
Logging is useful as well, both for transmitters and receivers.

Especially when implementing the VIDIOC_LOG_STATUS ioctl (supported by many
V4L2 drivers) for a receiver it is important to be able to easily log what
the InfoFrame contains. This greatly simplifies debugging.

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:18:50 -02:00
Tomi Valkeinen
4d073292a7 fbdev: fix CVT vertical front and back porch values
CVT v1.1 spec says: "the vertical front porch shall in all cases be
fixed to 3 lines". The code in fbcvt.c instead sets the _back_ porch to
3 (plus margin).

After swapping cvt.v_front_porch and cvt.v_back_porch the resulting
timings were in line with CVT timings in VESA DMT spec.

The bug seems to be more than 9 years old, but I presume it has not been
noticed as usually the video timings come from the EDID or from the
timing tables in fbdev, and probably swapped values for vfp and vbp work
fine for most of the displays.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: David Ung <davidu@nvidia.com>
Cc: Antonino A. Daplas <adaplas@gmail.com>
2015-01-27 13:35:37 +02:00
Sudip Mukherjee
070a178331 video: hgafb: remove unneeded comparison
var->yoffset is of the type __u32, hence the comparison will always
be false.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-26 14:43:06 +02:00
Scot Doyle
5b28f0fabb fbcon: Remove unused vblank cursor code
commit 1fa0b29f3a ("fbdev: Kill Atari vblank cursor blinking")

rendered vbl_cursor_cnt and therefore CURSOR_DRAW_DELAY unused in fbcon.c,
so remove them.

Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-26 14:10:37 +02:00
David Ung
ba59bab753 video: fbdev: Fix sparse warning messages
Use NULL instead of 0 for the last entry of dmt_modes struct.
Supresses "sparse: Using plain integer as NULL pointer" warning.

Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-19 14:58:11 +02:00
Geert Uytterhoeven
1fc65d5124 video: atafb: Remove obsolete IRQ_TYPE_PRIO
IRQ_TYPE_PRIO is no longer used by the Atari platform interrupt code
since commit 734085651c ("[PATCH] m68k: convert atari irq code")
in v2.6.18-rc1, so drop it.

Note that its value has been reused for a different purpose
(IRQ_TYPE_EDGE_FALLING) since commit 6a6de9ef58 ("[PATCH] genirq:
core") in v2.6.18-rc1.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:44:51 +01:00
David Ung
72bbf10bf0 video: fbdev: Validate mode timing against monspec
fbmon may generate mode timings that are out of spec of the monitor.
eg DELL U2410 has a max clock 170mhz but advertises a resolutions of
1920x1200@60 in its Standard Timings using 2byte code of D1 00.
When this is looked up in the DMT table it gives it a 193mhz clock.
Although the DELL monitor supports 1920x1200@60, it can only run with
reduced timings at 154mhz or DMT id 0x44 which has no STD 2byte code.
This patch checks to see if the mode can be supported by the monitor
by comparing against monspecs.dclkmax.

Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:33:41 +02:00
David Ung
8f5ee77bb8 video: fbdev: Check Standard Timing against DMT
Add the VESA Display Monitor Timing (DMT) table.
During parsing of Standard Timings, it compare the 2 byte STD code
with DMT to see what the VESA mode should be.  If there is no entry
in the vesa_modes table or no match found, it fallsback to the
GTF timings.

Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:33:41 +02:00
David Ung
37715f556a video: fbdev: Add additional vesa modes
Add high resolution modes to vesa_modes struct.

Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:33:41 +02:00
Lad, Prabhakar
9561def041 fbdev: ssd1307fb: set default height if not found in DT node
this patch sets the default height if its not found in DT.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:25:28 +02:00
Lad, Prabhakar
f6535d21e3 fbdev: ssd1307fb: drop unused function ssd1307fb_write_data()
this patch drops the unused function ssd1307fb_write_data().

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-15 13:24:57 +02:00
Geert Uytterhoeven
0d77205688 video: Drop superfluous "select VT_HW_CONSOLE_BINDING"
commit 765d5b9c2b ("fbdev: fbcon: select
VT_HW_CONSOLE_BINDING") made FRAMEBUFFER_CONSOLE always select
VT_HW_CONSOLE_BINDING, but forgot to remove

	select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE

from the individual drivers' sections that already did this before.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 15:18:15 +02:00
Colin Ian King
ef6899cdc8 fbdev/broadsheetfb: fix memory leak
static code analysis from cppcheck reports:

[drivers/video/fbdev/broadsheetfb.c:673]:
  (error) Memory leak: sector_buffer

sector_buffer is not being kfree'd on each call to
broadsheet_spiflash_rewrite_sector(), so free it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 15:13:45 +02:00
Geert Uytterhoeven
8f5b1e6511 console/dummy: Move screen size selection from CPP to Kconfig
PA-RISC already handled the dummy console screen size selection in
Kconfig, so generalize this to other platforms.

ARM keeps on using screen_info, which is filled in by
platform-specific code, or from ATAGS.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 14:54:48 +02:00
Sudip Mukherjee
0fc50517cf video: vt8500lcdfb: remove unneeded continue
continue is not needed at the end of a for loop, also removed the
braces which were no longer required.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 13:35:04 +02:00
Sudip Mukherjee
8be02cdfee fbdev: savage: remove unused variable
vga_in8() was storing the return value in tmp, but that return value
was never used again. so it should be safe to remove those variables.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 13:31:51 +02:00
Sudip Mukherjee
9cb13ba435 fbdev: geocode: remove unneeded NULL check
the check for info is not required as we are checking it immediately
after gxfb_init_fbinfo() and lxfb_init_fbinfo() and returnig -ENOMEM
if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 13:29:22 +02:00
Rasmus Villemoes
493a584a8b fbdev: omap2: Fix typo in tvc_probe_pdata
Assigning ddata->invert_polarity to itself is not very useful; the
context suggests that the right-hand side should have been
pdata->invert_polarity.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 13:27:08 +02:00
Hans de Goede
d9e020197d simplefb: Fix build failure on Sparc
of_platform_device_create is only defined when CONFIG_OF_ADDRESS is set,
which is normally always the case when CONFIG_OF is defined, except on Sparc,
so explicitly check for CONFIG_OF_ADDRESS rather then for CONFIG_OF.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 13:25:16 +02:00
Asaf Vertz
96699b4004 fbdev: vgastate: remove trailing whitespaces
Fixed a coding style error, trailing whitespace.

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 12:53:25 +02:00
Qiang Chen
77989ee83c video: ocfb: Fix data type warning
When allocate framebuffer memory using dma_alloc_coherent(),
we'd better use dma_addr_t instead of phys_addr_t. Because the
address we got in fact is DMA or bus address for the platform.

This patch also fixes below build warning:
drivers/video/fbdev/ocfb.c:335:2:
	warning: passing argument 3 of ‘dma_alloc_attrs’
	from incompatible pointer type [enabled by default]

Signed-off-by: Qiang Chen <qiang2.chen@sonymobile.com>
Acked-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 12:53:25 +02:00
Marek Belisko
0e8787313a video: omapdss: Add opa362 driver
opa362 is amplifier for video and can be connected to the tvout pads
of the OMAP3. It has one gpio control for enable/disable of the output
(high impedance).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 12:53:15 +02:00
Sudip Mukherjee
77a7f1837a fbdev: geocode: remove unneeded NULL check
the check for info is not required as we are checking it immediately
after gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 12:52:43 +02:00
Mathias Krause
a8fc91afab atyfb: mark DMI system id table as __initconst
We can mark the DMI system id table as __initconst by using a helper
variable that'll tell us if we need to unregister the reboot notifier in
atyfb_exit() instead of matching the DMI system id again.

This frees up ~680 bytes of runtime memory, the DMI table occupies.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-01-13 12:52:42 +02:00
Tomi Valkeinen
a32442d4f8 OMAPDSS: SDI: fix output port_num
After the commit ef691ff48b (OMAPDSS: DT: Get source endpoint by
matching reg-id) we look for the SDI output using the port number.
However, the SDI driver doesn't set the port number, which causes the
SDI display to not initialize.

Fix this by setting the SDI port number to 1. We use a hardcoded value,
as SDI was used only on OMAP3 and it's always port number 1 there.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-30 11:18:30 +02:00
Tomi Valkeinen
30ea9c5218 video/fbdev: fix defio's fsync
fb_deferred_io_fsync() returns the value of schedule_delayed_work() as
an error code, but schedule_delayed_work() does not return an error. It
returns true/false depending on whether the work was already queued.

Fix this by ignoring the return value of schedule_delayed_work().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: stable@vger.kernel.org
2014-12-30 11:18:30 +02:00
Tomi Valkeinen
92b004d1aa video/logo: prevent use of logos after they have been freed
If the probe of an fb driver has been deferred due to missing
dependencies, and the probe is later ran when a module is loaded, the
fbdev framework will try to find a logo to use.

However, the logos are __initdata, and have already been freed. This
causes sometimes page faults, if the logo memory is not mapped,
sometimes other random crashes as the logo data is invalid, and
sometimes nothing, if the fbdev decides to reject the logo (e.g. the
random value depicting the logo's height is too big).

This patch adds a late_initcall function to mark the logos as freed. In
reality the logos are freed later, and fbdev probe may be ran between
this late_initcall and the freeing of the logos. In that case we will
miss drawing the logo, even if it would be possible.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: stable@vger.kernel.org
2014-12-29 10:06:55 +02:00
Dan Carpenter
811174f45f OMAPDSS: pll: NULL dereference in error handling
The regulator_disable() doesn't accept NULL pointers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-29 10:06:55 +02:00
Tomi Valkeinen
1616cf01a4 OMAPDSS: HDMI: remove double initializer entries
HDMI hardware parameters structs for OMAP4 and OMAP5 contained two
initializers for 'clkdco_max'. The first one was a remnant with wrong
value.

Remove the extra initializer entries.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-29 10:06:55 +02:00
Linus Torvalds
c0f486fde3 More ACPI and power management updates for 3.19-rc1
- Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by
    the driver (Fabio Estevam).
 
  - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken
    into account (Aaron Lu).
 
  - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should
    have used from the start and drop some other unuseful KERN_ERR
    messages printed by ACPI (Rafael J Wysocki).
 
  - Revert an incorrect commit modifying the cpupower tool
    (Prarit Bhargava).
 
  - Fix two regressions introduced by recent commits in the OPP
    library and clean up some existing minor issues in that code
    (Viresh Kumar).
 
  - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout
    the tree (or drop it where that can be done) in order to make
    it possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki,
    Ulf Hansson, Ludovic Desroches).  There will be one more
    "CONFIG_PM_RUNTIME removal" batch after this one, because some
    new uses of it have been introduced during the current merge
    window, but that should be sufficient to finally get rid of it.
 
  - Make the ACPI EC driver more robust against race conditions
    related to GPE handler installation failures (Lv Zheng).
 
  - Prevent the ACPI device PM core code from attempting to
    disable GPEs that it has not enabled which confuses ACPICA
    and makes it report errors unnecessarily (Rafael J Wysocki).
 
  - Add a "force" command line switch to the intel_pstate driver
    to make it possible to override the blacklisting of some
    systems in that driver if needed (Ethan Zhao).
 
  - Improve intel_pstate code documentation and add a MAINTAINERS
    entry for it (Kristen Carlson Accardi).
 
  - Make the ACPI fan driver create cooling device interfaces
    witn names that reflect the IDs of the ACPI device objects
    they are associated with, except for "generic" ACPI fans
    (PNP ID "PNP0C0B").  That's necessary for user space thermal
    management tools to be able to connect the fans with the
    parts of the system they are supposed to be cooling properly.
    From Srinivas Pandruvada.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJUk0IDAAoJEILEb/54YlRx7fgP/3+yF/0TnEW93j2ALDAQFiLF
 tSv2A2vQC8vtMJjjWx0z/HqPh86gfaReEFZmUJD/Q/e2LXEnxNZJ+QMjcekPVkDM
 mTvcIMc2MR8vOA/oMkgxeaKregrrx7RkCfojd+NWZhVukkjl+mvBHgAnYjXRL+NZ
 unDWGlbHG97vq/3kGjPYhDS00nxHblw8NHFBu5HL5RxwABdWoeZJITwqxXWyuPLw
 nlqNWlOxmwvtSbw2VMKz0uof1nFHyQLykYsMG0ZsyayCRdWUZYkEqmE7GGpCLkLu
 D6yfmlpen6ccIOsEAae0eXBt50IFY9Tihk5lovx1mZmci2SNRg29BqMI105wIn0u
 8b8Ej7MNHp7yMxRpB5WfU90p/y7ioJns9guFZxY0CKaRnrI2+BLt3RscMi3MPI06
 Cu2/WkSSa09fhDPA+pk+VDYsmWgyVawigesNmMP5/cvYO/yYywVRjOuO1k77qQGp
 4dSpFYEHfpxinejZnVZOk2V9MkvSLoSMux6wPV0xM0IE1iD0ulVpHjTJrwp80ph4
 +bfUFVr/vrD1y7EKbf1PD363ZKvJhWhvQWDgETsM1vgLf21PfWO7C2kflIAsWsdQ
 1ukD5nCBRlP4K73hG7bdM6kRztXhUdR0SHg85/t0KB/ExiVqtcXIzB60D0G1lENd
 QlKbq3O4lim1WGuhazQY
 =5fo2
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI and power management updates from Rafael Wysocki:
 "These are regression fixes (leds-gpio, ACPI backlight driver,
  operating performance points library, ACPI device enumeration
  messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
  PM), some cleanups in the operating performance points (OPP)
  framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
  minor intel_pstate driver changes, a new MAINTAINERS entry for it and
  an ACPI fan driver change needed for better support of thermal
  management in user space.

  Specifics:

   - Fix a regression in leds-gpio introduced by a recent commit that
     inadvertently changed the name of one of the properties used by the
     driver (Fabio Estevam).

   - Fix a regression in the ACPI backlight driver introduced by a
     recent fix that missed one special case that had to be taken into
     account (Aaron Lu).

   - Drop the level of some new kernel messages from the ACPI core
     introduced by a recent commit to KERN_DEBUG which they should have
     used from the start and drop some other unuseful KERN_ERR messages
     printed by ACPI (Rafael J Wysocki).

   - Revert an incorrect commit modifying the cpupower tool (Prarit
     Bhargava).

   - Fix two regressions introduced by recent commits in the OPP library
     and clean up some existing minor issues in that code (Viresh
     Kumar).

   - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
     tree (or drop it where that can be done) in order to make it
     possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
     Hansson, Ludovic Desroches).

     There will be one more "CONFIG_PM_RUNTIME removal" batch after this
     one, because some new uses of it have been introduced during the
     current merge window, but that should be sufficient to finally get
     rid of it.

   - Make the ACPI EC driver more robust against race conditions related
     to GPE handler installation failures (Lv Zheng).

   - Prevent the ACPI device PM core code from attempting to disable
     GPEs that it has not enabled which confuses ACPICA and makes it
     report errors unnecessarily (Rafael J Wysocki).

   - Add a "force" command line switch to the intel_pstate driver to
     make it possible to override the blacklisting of some systems in
     that driver if needed (Ethan Zhao).

   - Improve intel_pstate code documentation and add a MAINTAINERS entry
     for it (Kristen Carlson Accardi).

   - Make the ACPI fan driver create cooling device interfaces witn
     names that reflect the IDs of the ACPI device objects they are
     associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

     That's necessary for user space thermal management tools to be able
     to connect the fans with the parts of the system they are supposed
     to be cooling properly.  From Srinivas Pandruvada"

* tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
  MAINTAINERS: add entry for intel_pstate
  ACPI / video: update the skip case for acpi_video_device_in_dod()
  power / PM: Eliminate CONFIG_PM_RUNTIME
  NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  ACPI / EC: Fix unexpected ec_remove_handlers() invocations
  Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
  tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
  PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
  mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
  PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
  ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  ACPI / PM: Do not disable wakeup GPEs that have not been enabled
  ACPI / utils: Drop error messages from acpi_evaluate_reference()
  ...
2014-12-18 20:28:33 -08:00
Linus Torvalds
e6b5be2be4 Driver core patches for 3.19-rc1
Here's the set of driver core patches for 3.19-rc1.
 
 They are dominated by the removal of the .owner field in platform
 drivers.  They touch a lot of files, but they are "simple" changes, just
 removing a line in a structure.
 
 Other than that, a few minor driver core and debugfs changes.  There are
 some ath9k patches coming in through this tree that have been acked by
 the wireless maintainers as they relied on the debugfs changes.
 
 Everything has been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSOD20ACgkQMUfUDdst+ylLPACg2QrW1oHhdTMT9WI8jihlHVRM
 53kAoLeteByQ3iVwWurwwseRPiWa8+MI
 =OVRS
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core update from Greg KH:
 "Here's the set of driver core patches for 3.19-rc1.

  They are dominated by the removal of the .owner field in platform
  drivers.  They touch a lot of files, but they are "simple" changes,
  just removing a line in a structure.

  Other than that, a few minor driver core and debugfs changes.  There
  are some ath9k patches coming in through this tree that have been
  acked by the wireless maintainers as they relied on the debugfs
  changes.

  Everything has been in linux-next for a while"

* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
  Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
  fs: debugfs: add forward declaration for struct device type
  firmware class: Deletion of an unnecessary check before the function call "vunmap"
  firmware loader: fix hung task warning dump
  devcoredump: provide a one-way disable function
  device: Add dev_<level>_once variants
  ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
  ath: use seq_file api for ath9k debugfs files
  debugfs: add helper function to create device related seq_file
  drivers/base: cacheinfo: remove noisy error boot message
  Revert "core: platform: add warning if driver has no owner"
  drivers: base: support cpu cache information interface to userspace via sysfs
  drivers: base: add cpu_device_create to support per-cpu devices
  topology: replace custom attribute macros with standard DEVICE_ATTR*
  cpumask: factor out show_cpumap into separate helper function
  driver core: Fix unbalanced device reference in drivers_probe
  driver core: fix race with userland in device_add()
  sysfs/kernfs: make read requests on pre-alloc files use the buffer.
  sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
  fs: sysfs: return EGBIG on write if offset is larger than file size
  ...
2014-12-14 16:10:09 -08:00
Rafael J. Wysocki
739808c992 video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

The alternative of CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME may be
replaced with CONFIG_PM too.

Make these changes in 2 files under drivers/video/.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
2014-12-13 00:42:04 +01:00
Linus Torvalds
26ceb127f7 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King:
 "The major updates included in this update are:

   - Clang compatible stack pointer accesses by Behan Webster.
   - SA11x0 updates from Dmitry Eremin-Solenikov.
   - kgdb handling of breakpoints with read-only text/modules
   - Support for Privileged-no-execute feature on ARMv7 to prevent
     userspace code execution by the kernel.
   - AMBA primecell bus handling of irq-safe runtime PM
   - Unwinding support for memset/memzero/memmove/memcpy functions
   - VFP fixes for Krait CPUs and improvements in detecting the VFP
     architecture
   - A number of code cleanups (using pr_*, removing or reducing the
     severity of a couple of kernel messages, splitting ftrace asm code
     out to a separate file, etc.)
   - Add machine name to stack dump output"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (62 commits)
  ARM: 8247/2: pcmcia: sa1100: make use of device clock
  ARM: 8246/2: pcmcia: sa1111: provide device clock
  ARM: 8245/1: pcmcia: soc-common: enable/disable socket clocks
  ARM: 8244/1: fbdev: sa1100fb: make use of device clock
  ARM: 8243/1: sa1100: add a clock alias for sa1111 pcmcia device
  ARM: 8242/1: sa1100: add cpu clock
  ARM: 8221/1: PJ4: allow building in Thumb-2 mode
  ARM: 8234/1: sa1100: reorder IRQ handling code
  ARM: 8233/1: sa1100: switch to hwirq usage
  ARM: 8232/1: sa1100: merge GPIO multiplexer IRQ to "normal" irq domain
  ARM: 8231/1: sa1100: introduce irqdomains support
  ARM: 8230/1: sa1100: shift IRQs by one
  ARM: 8229/1: sa1100: replace irq numbers with names in irq driver
  ARM: 8228/1: sa1100: drop entry-macro.S
  ARM: 8227/1: sa1100: switch to MULTI_IRQ_HANDLER
  ARM: 8241/1: Update processor_modes for hyp and monitor mode
  ARM: 8240/1: MCPM: document mcpm_sync_init()
  ARM: 8239/1: Introduce {set,clear}_pte_bit
  ARM: 8238/1: mm: Refine set_memory_* functions
  ARM: 8237/1: fix flush_pfn_alias
  ...
2014-12-12 15:26:48 -08:00
Linus Torvalds
a7cb7bb664 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree update from Jiri Kosina:
 "Usual stuff: documentation updates, printk() fixes, etc"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
  intel_ips: fix a type in error message
  cpufreq: cpufreq-dt: Move newline to end of error message
  ps3rom: fix error return code
  treewide: fix typo in printk and Kconfig
  ARM: dts: bcm63138: change "interupts" to "interrupts"
  Replace mentions of "list_struct" to "list_head"
  kernel: trace: fix printk message
  scsi: mpt2sas: fix ioctl in comment
  zbud, zswap: change module author email
  clocksource: Fix 'clcoksource' typo in comment
  arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
  gpio: msm-v1: make boolean argument more obvious
  usb: Fix typo in usb-serial-simple.c
  PCI: Fix comment typo 'COMFIG_PM_OPS'
  powerpc: Fix comment typo 'CONIFG_8xx'
  powerpc: Fix comment typos 'CONFiG_ALTIVEC'
  clk: st: Spelling s/stucture/structure/
  isci: Spelling s/stucture/structure/
  usb: gadget: zero: Spelling s/infrastucture/infrastructure/
  treewide: Fix company name in module descriptions
  ...
2014-12-12 10:08:06 -08:00
Linus Torvalds
413fd0e3fb fbdev changes for 3.19
* support for mx6sl and mx6sx
 * OMAP HDMI audio rewrite to make it finally work
 * OMAP video PLL work to prepare for new DRA7xx SoCs
 * simplefb DT related improvements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUiZ3aAAoJEPo9qoy8lh71I4gP/0P0H7DtqwSRGWVDenVYC4o1
 IoRJgRBSu16gg9h1yEbluGIB0S/F+0vvgJLv83fXPIFYCApjeIyola60wzTxsCQO
 5+DY8IbioAiYCAC4brPbE17PQZhkqomVZy7Eo/WW8Bp7NRwhIVGgstjfKIKarRmR
 l7Zu7ciRt7A1677P8Te09w3hzWfvRNOCYi/lbSbHHeItpAfOqBQLI6WYh0WYFgbW
 oOqplfJKQDW67mj+DmnR8ep+CwN6/+AvmialkwiPKKBjE578zmTJuRXr/ZZMgqmY
 WiqC3O3yoTaDn9ReUw1CBmeYbWfhjdDotydTc0eUD+Z3cGIKlBh3coprpOEILuuU
 FCsbBWQGP2FtYPfvl0R80+VHLRhDxFXV0hcxocyvNzK78AfKrTKBMYTdPh/i+0M/
 +pA70thjlKpqZgBK6ukyMnB6KxiB9tOFdFx7PRXby4VgRGHqeYNRlvYPcYOPsgb2
 xRMIxCWhJHqZzNlv+bC6R4T8UTOIT4HoWthF0yN7SYrVujX0+1ky8Zz37jcTFnnS
 aNQ8MQL+6Uy1pa0v2c4oGH0qNVCWpsAXMtFBB1VkNzQg1vyuJHd3lgWYND33+3Uo
 C08lqzC3FZeA70g5iOhoP5IaW1JdQOe4EfDPU+ZjBQFB0Mgy025Z9dsAUcb08/2C
 s/ZXcRvzXMzpBSflsUzf
 =VAZB
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev updates from Tomi Valkeinen:
 - support for mx6sl and mx6sx
 - OMAP HDMI audio rewrite to make it finally work
 - OMAP video PLL work to prepare for new DRA7xx SoCs
 - simplefb DT related improvements

* tag 'fbdev-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (81 commits)
  video: uvesafb: Deletion of an unnecessary check before the function call "platform_device_put"
  video: fbdev-VIA: Deletion of an unnecessary check before the function call "framebuffer_release"
  video: fbdev-MMP: Deletion of an unnecessary check before the function call "mmp_unregister_path"
  video: mx3fb: Deletion of an unnecessary check before the function call "backlight_device_unregister"
  video: fbdev-OMAP2: Deletion of unnecessary checks before the function call "i2c_put_adapter"
  video: fbdev-SIS: Deletion of unnecessary checks before the function call "pci_dev_put"
  video: smscufx: Deletion of unnecessary checks before the function call "vfree"
  video: udlfb: Deletion of unnecessary checks before the function call "vfree"
  video: uvesafb: Deletion of an unnecessary check before the function call "uvesafb_free"
  video: fbdev-LCDC: Deletion of an unnecessary check before the function call "vfree"
  video: fbdev: arkfb: suppress build warning
  video: fbdev: s3fb: suppress build warning
  video: fbdev: vt8623fb: suppress build warning
  OMAPDSS: hdmi5: Fix bit field for IEC958_AES2_CON_SOURCE
  OMAPDSS: hdmi: Remove __exit qualifier from hdmi_uninit_output()
  OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback
  OMAPDSS: Remove all references to obsolete HDMI audio callbacks
  ASoC: omap: Remove obsolete HDMI audio code and Kconfig options
  OMAPDSS: hdmi5: Register ASoC platform device for omap hdmi audio
  OMAPDSS: hdmi5: Remove callbacks for the old ASoC DAI driver
  ...
2014-12-11 12:46:32 -08:00
Linus Torvalds
e28870f9b3 - Clean-up leaky resources; pwm_bl
- Simplify Device Tree initialisation; lp855x_bl
  - Add Regulator support; lp855x
  - Remove Bryan from the Maintainer list -- new baby, no time :)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUhsq0AAoJEFGvii+H/Hdh8HgQAKcv+1jK3Eouh7YJPBLOQu73
 qNBD6nwcCRjcf2gjW9DkoGxTyZVs2+ndXxG85z3CBOdhr84YeyF1ity76wLs7Dd+
 dQaR1zP+0H0sh0jMS+SGdEBnF5eSV/iBVvR2u8q0Wl8/m7zOJE1PIVEv6P7/+wNJ
 jv/MdzLvp8LEwANwaaknvePCGPnnbLcBcEonivx4u2lePF1Y1Vtk6tHWW8zm/GEG
 p7DrOwWGkCWJwFeROnbzy+oaR88oA5Ezrt5b56u+AMvcnRoSZqPF+cAV7U72AsnH
 wXiKtAE/oBsgMKQcXyeGiGD8/3uwNZPxO3h2kLme7Cw/oL25Z7D/ru0308/82ozo
 gK/9nYiXC8NhEWEhed9+3+Rp7mLGy6BaqZ8GX7uK2jeLhDqNSKDXCOpi7QTEl1mn
 z4mbXi5phTvbcSwcLyytzVIuFfOPAA7WzBVK6U+n0BkGMHrECCRyAEroO5wy/HST
 3B3Q49NNclrqg60/IMFxfaqDLnAw0DWUEshRJP5ggCfyWE9iK/NUSpKtzp3nzWKf
 7WcpiOwjC17emjH8nIDOu5xrbakGbNWLP3Z/keyzhtIP8bDqEvHrL7kFZhirFWOm
 g8z/9he6m93T15B7BwRi+O/gtsdsBp/mTxPNz35elQEvi4pKp0jmUp6F+GIQL3Vh
 xecI7iLhjiiLLB+wJDTU
 =0PNI
 -----END PGP SIGNATURE-----

Merge tag 'backlight-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 - Clean-up leaky resources; pwm_bl
 - Simplify Device Tree initialisation; lp855x_bl
 - Add Regulator support; lp855x
 - Remove Bryan from the Maintainer list -- new baby, no time :)

* tag 'backlight-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  MAINTAINERS: Remove my name from Backlight subsystem
  backlight: lp855x: Add supply regulator to lp855x
  backlight: lp855x: Refactor DT parsing code
  backlight: pwm: Clean-up pwm requested using legacy API
2014-12-11 11:39:03 -08:00
Linus Torvalds
a023748d53 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm tree changes from Ingo Molnar:
 "The biggest change is full PAT support from Jürgen Gross:

     The x86 architecture offers via the PAT (Page Attribute Table) a
     way to specify different caching modes in page table entries.  The
     PAT MSR contains 8 entries each specifying one of 6 possible cache
     modes.  A pte references one of those entries via 3 bits:
     _PAGE_PAT, _PAGE_PWT and _PAGE_PCD.

     The Linux kernel currently supports only 4 different cache modes.
     The PAT MSR is set up in a way that the setting of _PAGE_PAT in a
     pte doesn't matter: the top 4 entries in the PAT MSR are the same
     as the 4 lower entries.

     This results in the kernel not supporting e.g. write-through mode.
     Especially this cache mode would speed up drivers of video cards
     which now have to use uncached accesses.

     OTOH some old processors (Pentium) don't support PAT correctly and
     the Xen hypervisor has been using a different PAT MSR configuration
     for some time now and can't change that as this setting is part of
     the ABI.

     This patch set abstracts the cache mode from the pte and introduces
     tables to translate between cache mode and pte bits (the default
     cache mode "write back" is hard-wired to PAT entry 0).  The tables
     are statically initialized with values being compatible to old
     processors and current usage.  As soon as the PAT MSR is changed
     (or - in case of Xen - is read at boot time) the tables are changed
     accordingly.  Requests of mappings with special cache modes are
     always possible now, in case they are not supported there will be a
     fallback to a compatible but slower mode.

     Summing it up, this patch set adds the following features:

      - capability to support WT and WP cache modes on processors with
        full PAT support

      - processors with no or uncorrect PAT support are still working as
        today, even if WT or WP cache mode are selected by drivers for
        some pages

      - reduction of Xen special handling regarding cache mode

  Another change is a boot speedup on ridiculously large RAM systems,
  plus other smaller fixes"

* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
  x86: mm: Move PAT only functions to mm/pat.c
  xen: Support Xen pv-domains using PAT
  x86: Enable PAT to use cache mode translation tables
  x86: Respect PAT bit when copying pte values between large and normal pages
  x86: Support PAT bit in pagetable dump for lower levels
  x86: Clean up pgtable_types.h
  x86: Use new cache mode type in memtype related functions
  x86: Use new cache mode type in mm/ioremap.c
  x86: Use new cache mode type in setting page attributes
  x86: Remove looking for setting of _PAGE_PAT_LARGE in pageattr.c
  x86: Use new cache mode type in track_pfn_remap() and track_pfn_insert()
  x86: Use new cache mode type in mm/iomap_32.c
  x86: Use new cache mode type in asm/pgtable.h
  x86: Use new cache mode type in arch/x86/mm/init_64.c
  x86: Use new cache mode type in arch/x86/pci
  x86: Use new cache mode type in drivers/video/fbdev/vermilion
  x86: Use new cache mode type in drivers/video/fbdev/gbefb.c
  x86: Use new cache mode type in include/asm/fb.h
  x86: Make page cache mode a real type
  x86: mm: Use 2GB memory block size on large-memory x86-64 systems
  ...
2014-12-10 13:59:34 -08:00
Linus Torvalds
0563fdc0d9 ARM: SoC cleanup on mach-at91 for 3.19
On Atmel AT91, the conversion to device tree is now considered complete,
 and all machines that were not already converted in 3.18 are assumed to
 be unused and dropped by the maintainer.
 
 All remaining board files that were written in C are dropped, and the
 ancient at91x40 sub-platform (based on an MMU-less ARM7) is removed
 altogether.  Cleaning up the last pieces was great fun, so I took the
 time to do some of the coding myself and removed several hundred code
 lines that ended up unused after the board files were done.
 
 There are still a couple of AT91 specific device drivers that are not
 converted to DT (CF, USB-OTG) and currently not working, and the platform
 itself is not "multiplatform"-enabled, but both issues are going to be
 taken care of in the 3.20 cycle.
 
 This is split out from the other cleanups purely based on the size
 of the branch.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iD8DBQBUhyNX5t5GS2LDRf4RAnjxAKCER7eoLNadu1/93n/a9d1nUz4MoQCcCZUq
 BolxCOi0wr4YTcQtp7rHzWI=
 =ykAB
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanup on mach-at91 from Arnd Bergmann:
 "On Atmel AT91, the conversion to device tree is now considered
  complete, and all machines that were not already converted in 3.18 are
  assumed to be unused and dropped by the maintainer.

  All remaining board files that were written in C are dropped, and the
  ancient at91x40 sub-platform (based on an MMU-less ARM7) is removed
  altogether.  Cleaning up the last pieces was great fun, so I took the
  time to do some of the coding myself and removed several hundred code
  lines that ended up unused after the board files were done.

  There are still a couple of AT91 specific device drivers that are not
  converted to DT (CF, USB-OTG) and currently not working, and the
  platform itself is not "multiplatform"-enabled, but both issues are
  going to be taken care of in the 3.20 cycle.

  This is split out from the other cleanups purely based on the size of
  the branch"

* tag 'at91-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (33 commits)
  ARM: at91: remove unused board.h file
  ARM: at91: remove unneeded header files
  ARM: at91/clocksource: remove !DT PIT initializations
  ARM: at91: at91rm9200 ST initialization is now DT only
  ARM: at91: remove old AT91-specific drivers
  ARM: at91: cleanup initilisation code by removing dead code
  ARM: at91/Kconfig: select board files automatically
  ARM: at91: remove unused IRQ function declarations
  ARM: at91: remove legacy IRQ driver and related code
  ARM: at91: remove old at91-specific clock driver
  ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
  ARM: at91: remove all !DT related configuration options
  ARM: at91/trivial: update Kconfig comment to mention SAMA5
  ARM: at91: always USE_OF from now on
  ARM: at91/Kconfig: remove ARCH_AT91RM9200 option for drivers
  ARM: at91: switch configuration option to SOC_AT91RM9200
  ARM: at91: remove at91rm9200 legacy board support
  ARM: at91: remove at91rm9200 legacy boards files
  ARM: at91/Kconfig: remove useless fbdev Kconfig options
  ARM: at91: remove at91sam9261/at91sam9g10 legacy board support
  ...
2014-12-09 14:17:12 -08:00
Sean Paul
829b030e58 backlight: lp855x: Add supply regulator to lp855x
This patch adds a supply regulator to the lp855x platform data to facilitate
powering on/off the 3V rail attached to the controller.

Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Milo Kim <milo.kim@ti.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-12-09 09:24:45 +00:00
Sean Paul
47726656dd backlight: lp855x: Refactor DT parsing code
This patch refactors the dt parsing code to avoid setting platform_data,
instead just setting lp->pdata directly. This facilitates easier
probe deferral since the current scheme would require us to clear out
dev->platform_data before deferring.

Cc: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Milo Kim <milo.kim@ti.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-12-09 09:24:42 +00:00
Tomi Valkeinen
3315764efc Merge branches '3.19/omapdss' and '3.19/simplefb' into fbdev
Merge fbdev topic branches.
2014-12-08 09:16:31 +02:00
Dmitry Eremin-Solenikov
23834a4116 ARM: 8244/1: fbdev: sa1100fb: make use of device clock
Use per-device clock (instead of calling cpufreq_get(0), which can
return 0 if no cpu frequency driver is selected) to program timings.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-12-05 16:30:25 +00:00
Markus Elfring
3468562728 video: uvesafb: Deletion of an unnecessary check before the function call "platform_device_put"
The platform_device_put() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:02 +02:00
Markus Elfring
7728495127 video: fbdev-VIA: Deletion of an unnecessary check before the function call "framebuffer_release"
The framebuffer_release() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:02 +02:00
Markus Elfring
3163e4cd16 video: fbdev-MMP: Deletion of an unnecessary check before the function call "mmp_unregister_path"
The mmp_unregister_path() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:02 +02:00
Markus Elfring
8a8e411dc0 video: mx3fb: Deletion of an unnecessary check before the function call "backlight_device_unregister"
The backlight_device_unregister() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
bc500d6ed9 video: fbdev-OMAP2: Deletion of unnecessary checks before the function call "i2c_put_adapter"
The i2c_put_adapter() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
6049a7a253 video: fbdev-SIS: Deletion of unnecessary checks before the function call "pci_dev_put"
The pci_dev_put() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call
is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
2daff4d48d video: smscufx: Deletion of unnecessary checks before the function call "vfree"
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
177c0386ea video: udlfb: Deletion of unnecessary checks before the function call "vfree"
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
e87d9f295a video: uvesafb: Deletion of an unnecessary check before the function call "uvesafb_free"
The uvesafb_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Markus Elfring
f858275869 video: fbdev-LCDC: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 16:16:01 +02:00
Lad, Prabhakar
a96c92b69d video: fbdev: arkfb: suppress build warning
this patch fixes following build warning:

drivers/video/fbdev/arkfb.c: In function ‘ark_pci_probe’:
drivers/video/fbdev/arkfb.c:1019:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  par->state.vgabase = (void __iomem *) vga_res.start;
                       ^
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 15:41:18 +02:00
Lad, Prabhakar
c051af3152 video: fbdev: s3fb: suppress build warning
this patch fixes following build warning:
drivers/video/fbdev/s3fb.c: In function ‘s3_pci_probe’:
drivers/video/fbdev/s3fb.c:1185:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  par->state.vgabase = (void __iomem *) vga_res.start;
                       ^
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 15:41:18 +02:00
Lad, Prabhakar
a16a96d032 video: fbdev: vt8623fb: suppress build warning
this patch fixes following build warning:
drivers/video/fbdev/vt8623fb.c: In function ‘vt8623_pci_probe’:
drivers/video/fbdev/vt8623fb.c:734:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  par->state.vgabase = (void __iomem *) vga_res.start;
                       ^
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 15:41:18 +02:00
Jyri Sarha
f3b7d0efc6 OMAPDSS: hdmi5: Fix bit field for IEC958_AES2_CON_SOURCE
The bit field for IEC958_AES2_CON_SOURCE is bits 3-0 in
HDMI_CORE_FC_AUDSCHNLS2, not imaginary bits 3-4 (reverse order).

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-04 11:17:24 +02:00
Jyri Sarha
39c1b7bf72 OMAPDSS: hdmi: Remove __exit qualifier from hdmi_uninit_output()
Remove __exit qualifier from hdmi_uninit_output() because it is used
also in omapdss_hdmihw_probe().

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-02 14:16:05 +02:00
Jyri Sarha
2d7639bc02 OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback
Enabling idle mode during audio playback causes the glitches on OMAP5
HDMI. The TRM also suggests to use no-idle for HDMI audio playback.

This patch sets HDMI idle mode to no-idle for the duration of the
playback, and restores it back to original value afterwards.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:10:02 +02:00
Jyri Sarha
84a845de57 OMAPDSS: Remove all references to obsolete HDMI audio callbacks
In new model these callbacks are obsolete since the ASoC component
drivers are integrated into the HDMI drivers and no callbacks are
needed anymore.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:59 +02:00
Jyri Sarha
45302d7e1b OMAPDSS: hdmi5: Register ASoC platform device for omap hdmi audio
Implements callbacks for OMAP HDMI audio platform driver and registers
it in probe function. Unregistering is done in remove function.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:53 +02:00
Jyri Sarha
274a1e8b2b OMAPDSS: hdmi5: Remove callbacks for the old ASoC DAI driver
Removes the OMAP5 HDMI audio callbacks for the old external DAI driver.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:50 +02:00
Jyri Sarha
4d594dfffd OMAPDSS: hdmi4: Register ASoC platform device for omap hdmi audio
Implements callbacks for OMAP HDMI audio platform driver and registers
it in probe function. Unregistering is done in remove function.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:47 +02:00
Jyri Sarha
c49ad78e3c OMAPDSS: hdmi4: Remove callbacks for the old ASoC DAI driver
Removes the OMAP4 HDMI audio callbacks for the old external DAI driver.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:43 +02:00
Jyri Sarha
5a8bf632fb OMAPDSS: hdmi: Make hdmi_mode_has_audio() more user friedly
Make hdmi_mode_has_audio() more user friedly by taking hdmi_config as
parameter.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:40 +02:00
Jyri Sarha
4284c35f5d OMAPDSS: Kconfig: Remove HDMI audio booleans from Kconfig
The booleans are not used anymore. Just select SND_OMAP_SOC_HDMI_AUDIO
to enable OMAP HDMI audio support.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01 11:09:37 +02:00
Jyri Sarha
5872b35aaf OMAPDSS: hdmi.h: Add members to hdmi drvdata for audio implementation
Adds display_enabled flag and audio_abort_cb callback to struct hdmi.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 13:00:17 +02:00
Jyri Sarha
29c047b747 OMAPDSS: hdmi: Add pdev pointer for audio_pdev in HDMI DRV data
This is used to store omap-hdmi-audio pdev for unregistering it.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:45:29 +02:00
Jyri Sarha
945514b5e1 OMAPDSS: hdmi: Make hdmi structure public
Unify the private anonymous struct in hdmi4.c and hdmi5.c, name it as
struct omap_hdmi, and make it public in hdmi.h.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:45:29 +02:00
Jyri Sarha
58652163f6 OMAPDSS: hdmi_wp: Add function for getting audio dma address
The audio dma port is found in the hdmi_wp physical address space.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:08 +02:00
Jyri Sarha
a42808c747 OMAPDSS: hdmi4_core: Remove unused hdmi4_audio_get_dma_port()
hdmi4_audio_get_dma_port() is unused and and broken.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:07 +02:00
Jyri Sarha
12d3ea9a17 OMAPDSS: hdmi: Remove most of OMAP[45]_DSS_HDMI_AUDIO ifdefs
It does not waste too many bytes to compile all audio related core
functions always in with HDMI support. It should help readability and
in keeping the audio code in working shape. Leave the options just for
disabling and enabling the functionality in hdmi[45].c.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:07 +02:00
Jyri Sarha
652ce0434b OMAPDSS: hdmi.h: Add HDMI_AUDIO_LAYOUT_6CH enum value
The OMAP5 HDMI audio implementation needs HDMI_AUDIO_LAYOUT_6CH in
hdmi_core_audio_layout enum. I found the correct value from ti-linux
3.8 tree.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:07 +02:00
Jyri Sarha
de0ab1f3f8 OMAPDSS: hdmi5_core: Initialize mandatory sample_order parameter
The hdmi_wp_audio_config_format() expects sample_order of struct
hdmi_audio_format to be initialized. The only allowed value is
HDMI_AUDIO_SAMPLE_LEFT_FIRST.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:07 +02:00
Jyri Sarha
086f8281ca OMAPDSS: hdmi_wp: Protect reserved bits in hdmi_wp_audio_config_format()
Only OMAP4 DSS has non reserved bits above 6th bit in HDMI_WP_AUDIO_CFG.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-26 10:41:07 +02:00
Hans de Goede
8284731eb5 simplefb: Fix build errors when CONFIG_COMMON_CLK is not defined
Both CONFIG_OF and CONFIG_COMMON_CLK must be defined to be able to use of
clocks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-25 14:10:28 +02:00
Markus Elfring
23c12eac48 video: fbdev-MMP: Fix a typo for the word "destroyed"
A word was corrected in the description for a parameter of
the mmp_unregister_path() function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-25 12:54:17 +02:00
Markus Elfring
9e09d00f55 video: fbdev-MMP: Fix typos for the word "destroy"
Two mistyped words were corrected in the description for
the mmp_unregister_path() function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-25 12:54:17 +02:00
Nicolas Ferre
4fdfb67f24 ARM: at91/Kconfig: remove useless fbdev Kconfig options
Remove Kconfig options used nowhere.
The removal of CONFIG_ARCH_AT91SAM9261 option allowed to spot this oddness.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-21 12:18:40 +01:00
Jiri Kosina
a02001086b Merge Linus' tree to be be to apply submitted patches to newer code than
current trivial.git base
2014-11-20 14:42:02 +01:00
Qiang Chen
f0213fe85d video: ARM CLCD: Remove duplicated include in amba-clcd.c
This patch fixes duplicated include dma-mapping.h in
drivers/video/fbdev/amba-clcd.c

Signed-off-by: Qiang Chen <qiang2.chen@sonymobile.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-19 14:50:26 +02:00
Nicolas Ferre
9373090d9f ARM: at91/Kconfig: remove unused config options
When removing old board !DT support, several Kconfig options were deleted.
Propagate this removal to drivers Kconfig files.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-19 11:39:23 +01:00
Juergen Gross
5006e45a6b x86: Use new cache mode type in drivers/video/fbdev/vermilion
Instead of directly using the cache mode bits in the pte switch to
using the cache mode type.

Based-on-patch-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stefan.bader@canonical.com
Cc: xen-devel@lists.xensource.com
Cc: konrad.wilk@oracle.com
Cc: ville.syrjala@linux.intel.com
Cc: david.vrabel@citrix.com
Cc: jbeulich@suse.com
Cc: toshi.kani@hp.com
Cc: plagnioj@jcrosoft.com
Cc: tomi.valkeinen@ti.com
Cc: bhelgaas@google.com
Link: http://lkml.kernel.org/r/1415019724-4317-5-git-send-email-jgross@suse.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-11-16 11:04:25 +01:00
Juergen Gross
2d85ebf8e1 x86: Use new cache mode type in drivers/video/fbdev/gbefb.c
Instead of directly using the cache mode bits in the pte switch to
using the cache mode type.

Based-on-patch-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stefan.bader@canonical.com
Cc: xen-devel@lists.xensource.com
Cc: konrad.wilk@oracle.com
Cc: ville.syrjala@linux.intel.com
Cc: david.vrabel@citrix.com
Cc: jbeulich@suse.com
Cc: toshi.kani@hp.com
Cc: plagnioj@jcrosoft.com
Cc: tomi.valkeinen@ti.com
Cc: bhelgaas@google.com
Link: http://lkml.kernel.org/r/1415019724-4317-4-git-send-email-jgross@suse.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-11-16 11:04:25 +01:00
Hans de Goede
0c5b240c7e simplefb: Change simplefb_init from module_init to fs_initcall
One of the reasons for having the simplefb nodes in /chosen, and doing
explicit enumeration of the nodes there, is too allow enumerating them sooner,
so that we get a console earlier on.

Doing this earlier then fs_initcall is not useful, since the fb only turns
into a console when fbcon intializes, which is a fs_initcall too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:29:14 +02:00
Hans de Goede
ba168a3c7f fbcon: Change fbcon_init from module_init to fs_initcall
Various fb drivers register themselves before module_init so as to have a
console as early as possible, this is of little use if fbcon does not
initialize early too.

Fbcon cannot initialize earlier then fs_initcall, because then the creation
of /sys/class/graphics/fbcon will fail.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:29:11 +02:00
Hans de Goede
89c95001c0 simplefb: Add support for enumerating simplefb dt nodes in /chosen
Update simplefb to support the new preferred location for simplefb dt nodes
under /chosen.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:29:04 +02:00
Luc Verhaegen
fc219bfd5b simplefb: add clock handling code
This claims and enables clocks listed in the simple framebuffer dt node.
This is needed so that the display engine, in case the required clocks
are known by the kernel code and are described in the dt, will remain
properly enabled.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
[hdegoede@redhat.com: Change clks from list to dynamic array]
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:28:45 +02:00
Luc Verhaegen
bf2fda157a simplefb: add goto error path to probe
Use the usual kernel style of goto error_foo to free resources on probe
error. This is a preparation patch for adding clocks support.

While at it also update ioremap_wc error return from ENODEV to ENOMEM.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:28:39 +02:00
Luc Verhaegen
1270be4a4f simplefb: formalize pseudo palette handling
Add a proper struct describing simplefb private data, with the palette in there,
instead of directly storing the palette in the fb_info->par pointer.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Stephen Warren <swarren@nvidia.com>
[hdegoede@redhat.com: drop unnecessary void * cast]
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-14 15:28:33 +02:00
Tomi Valkeinen
dafea8fb58 OMAPDSS: features: remove unused DSI PLL features
Now that the DSS has the common DSS PLL, we no longer use the DSI PLL
feature flags from dss_features.c.

Remove all the unused feature flags.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:27 +02:00
Tomi Valkeinen
c84c3a5bb7 OMAPDSS: HDMI: use common DSS PLL support
Now that we have the common DSS PLL support, change HDMI to use it. This
results in quite a lot of changes, but almost all of them are trivial
name changes.

The function to program the PLL settings can be removed from hdmi_pll.c,
as the common PLL API contains the same functionality.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:27 +02:00
Tomi Valkeinen
d13cbb32c5 OMAPDSS: HDMI: remove extra poweroff
hdmi_pll_enable powers off the PLL as the first thing it does. Right
after that, it enables the PLL powers.

The initial power-off is pointless, so let's remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:26 +02:00
Tomi Valkeinen
c2fbd061a2 OMAPDSS: HDMI: split PLL enable & config
At the moment we have one function, hdmi_pll_enable, which enables the
PLL and writes the PLL configuration to registers.

To make the HDMI PLL ahere to the DSS PLL API, split the hdmi_pll_enable
into two parts: hdmi_pll_enable which enables the PLL HW, and
hdmi_pll_set_config which writes the config.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:26 +02:00
Tomi Valkeinen
03aafa2cd8 OMAPDSS: HDMI: store WP pointer to hdmi_pll_data
HDMI PLL code needs the pointer to the WP block so that it can manage
its power. Currently this is passed as a function parameter to
hdmi_pll_enable and hdmi_pll_disable. To make the PLL function adhere to
the DSS PLL API, we need to remove the WP parameter.

This patch stores the WP pointer to hdmi_pll_data in hdmi_pll_init, so
that it's available when needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:26 +02:00
Tomi Valkeinen
b0295f165f OMAPDSS: HDMI: Remove HDMI PLL reset
The SYSRESET bits in HDMI PLL do not reset the PLL itself, but only
affect the power used for the PLL.

Afaik there is no reason to use the SYSRESET bits, and we don't use it
in the other PLLs, so let's remove the HDMI PLL reset to make the PLL
code simpler and similar to other PLLs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:25 +02:00
Tomi Valkeinen
33f13120e5 OMAPDSS: HDMI: rewrite HDMI PLL calculation code
The code calculating HDMI PLL parameters has always been very confusing.
Now that we are implementing a common PLL library for the DSS, it's
important that the PLL code is understandable.

This patch rewrites the calculation code, and removes a few hacks that
were used there.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:25 +02:00
Tomi Valkeinen
31dd0f4be4 OMAPDSS: HDMI5: disable interlace modes
We don't support interlace modes properly on OMAP5+ HDMI, so we need to
reject interlace timings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:25 +02:00
Tomi Valkeinen
8530c41d7c OMAPDSS: HDMI: fix setting REFSEL
Only OMAP5+ has REFSEL field, but at the moment it's set also on OMAP4.

Fix this by adding a "has_refsel" field, and setting the REFSEL based on
that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:24 +02:00
Tomi Valkeinen
2daea7af77 OMAPDSS: DSI: use common DSS PLL support
Now that we have the common DSS PLL support, change DSI to use it. This
results in quite a lot of changes, but almost all of them are trivial
name changes.

The functions to calculate and program the PLL settings can be removed
from dsi.c, as the common PLL API contains the same functionality.

We also need to create struct dss_pll_hw entries for PLL hardware
features for different OMAP platforms, instead of using the
dss_features.c as the old code does.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:24 +02:00
Tomi Valkeinen
0a20170aa5 OMAPDSS: Add common PLL code
OMAP DSS currently contains two different PLLs: DSI PLL (Type A PLL) and
HDMI PLL (Type B PLL). When DRA7 support is added, we will also support
Video PLLs (Type A).

The driver currently handles all PLLs totally separately. This patch
adds common DSS PLL code, which

a) lets us have common code for the PLLs
b) lets the users of the PLLs use a common API, instead of DSI API or
   HDMI API.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:23 +02:00
Tomi Valkeinen
f76b178a78 OMAPDSS: DSI: dsi_runtime_get/put in pll_init
When DPI uses the DSI PLL for pixel clock, the DPI code will call
dsi_runtime_get/put to keep the DSI block enabled. A much simpler way to
handle this is to do dsi_runtime_get/put in DSI's dsi_pll_init() and
dsi_pll_uninit(), thus removing the need for DSI to call the runtime PM
functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:23 +02:00
Tomi Valkeinen
dbb26e53e5 OMAPDSS: DSI: features: combine dsi & dispc hsdivs
The HSDIV outputs of DSI PLL (and also other PLLs) all have the same
bit width for the divider value.

Simplify the code by merging HSDIV divider widths into one width.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:23 +02:00
Tomi Valkeinen
acf604b709 OMAPDSS: DSI: turn hsdivs fields to arrays
We are creating a common DSS PLL code, so having fixed DSI specific
hsdiv fields in the clock information is not ok.

This patch changes the hsdiv fields to arrays, so that we can use all
the 4 possible hsdiv outputs (DSI only usees 2), and we have generic way
to access the hsdivs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:22 +02:00
Tomi Valkeinen
4a38aedec7 OMAPDSS: DSI: rename clkin4ddr to clkdco
We are creating a common DSS PLL code, so rename 'clkin4ddr' field,
which is DSI specific name, to 'clkdco' which is a generic name.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:22 +02:00
Tomi Valkeinen
7cb6a87a88 OMAPDSS: DSI: use struct copy instead of individual field copy
Now that dsi_clock_info only contains information about the PLL, we can
just copy the whole struct when storing the clock information, instead
of copying individual fields.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:22 +02:00
Tomi Valkeinen
6a3d03e93e OMAPDSS: DSI: remove pll_locked field
We have pll_locked field in struct dsi_data, but it doesn't have any
meaningful use anymore, and can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:21 +02:00
Tomi Valkeinen
3640d9fa7a OMAPDSS: DSI: remove clkin from dsi_clock_info
struct dsi_clock_info contains clkin field, which is the rate of the
PLL's input clock. This field is not needed, as it can be easily
retrieved by using the clk_get_rate().

This patch removes the clkin field.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:21 +02:00
Tomi Valkeinen
7b71c410b2 OMAPDSS: DSI: separate LP clock info from dsi_clock_info
struct dsi_clock_info represents the clocks handled by the DSI, mostly
PLL related clocks. In an effort to create common PLL code, we need to
remove all the non-PLL items from dsi_clock_info.

This patch removes LP clock related fields from dsi_clock_info, and
creates a new struct dsi_lp_clock_info for holding clock info for the LP
clock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:21 +02:00
Tomi Valkeinen
1a7f4bf186 OMAPDSS: DSI: always power on hsclk & hsdiv
The DSS PLL has support to power on the PLL's highspeed clock output
and HSDIV output separately. In practice both need to powered on, as in
most OMAP's that's the only working configuration. We already do that in
dsi_pll_init(), by overriding the passed arguments so that both are
always powered.

Simplify the code by removing the support for choosing which outputs to
power on.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:20 +02:00
Tomi Valkeinen
d845600e2f OMAPDSS: DSI: remove unused hsdiv wait funcs
With the previous patch "OMAPDSS: DSI: wait for hsdiv clocks when
enabling PLL",  dsi_wait_pll_hsdiv_dispc_active and
dsi_wait_pll_hsdiv_dsi_active are no longer needed, so they and the
callers can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:20 +02:00
Tomi Valkeinen
544bfb6832 OMAPDSS: DSI: wait for hsdiv clocks when enabling PLL
At the moment we have two functions to wait for the HSDIV clocks to get
active, dsi_wait_pll_hsdiv_dispc_active and
dsi_wait_pll_hsdiv_dsi_active. Instead of such inconvenient functions,
let's just make sure that the hsdiv clocks are active after the pll has
been enabled.

This patch adds code to dsi_pll_set_clock_div() to wait until HSDIV
clocks are active.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:19 +02:00
Archit Taneja
064c2a475d OMAPDSS: DSS: add a param to dpi_select_source which specifies it's port number
Add a 'port' parameter in dpi_select_source. The param tells the port
number of the DPI instance that we want to configure. We use this number
to select the overlay manager for that DPI instance.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:15 +02:00
Archit Taneja
f7e38fe9e2 OMAPDSS: DPI: Add support for multiple instances
Register DPI outputs, and assign the port_num to them as specified by the
'reg' property in the DPI ports in DT.

To support multiple DPI instances, dpi_get_channel needs to take the DPI
instance's port number to get the corresponding channel. Make it take this
argument. We just pass 0 in the non-DT path, since we don't support multiple
instances in the non-DT case.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-12 13:40:10 +02:00