1
0
Fork 0
Commit Graph

1290 Commits (c8a4c63f8c136d3368625d640f2dd1cb505f1fea)

Author SHA1 Message Date
Linus Torvalds 9b0cd304f2 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
 "Been a bit busy, first week of kids school, and waiting on other trees
  to go in before I could send this, so its a bit later than I'd
  normally like.

  Highlights:
   - core:
      timestamp fixes, lots of misc cleanups
   - new drivers:
      bochs virtual vga
   - vmwgfx:
      major overhaul for their nextgen virt gpu.
   - i915:
      runtime D3 on HSW, watermark fixes, power well work, fbc fixes,
      bdw is no longer prelim.
   - nouveau:
      gk110/208 acceleration, more pm groundwork, old overlay support
   - radeon:
      dpm rework and clockgating for CIK, pci config reset, big endian
      fixes
   - tegra:
      panel support and DSI support, build as module, prime.
   - armada, omap, gma500, rcar, exynos, mgag200, cirrus, ast:
      fixes
   - msm:
      hdmi support for mdp5"

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (595 commits)
  drm/nouveau: resume display if any later suspend bits fail
  drm/nouveau: fix lock unbalance in nouveau_crtc_page_flip
  drm/nouveau: implement hooks for needed for drm vblank timestamping support
  drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping
  drm/nv50: fill in crtc mode struct members from crtc_mode_fixup
  drm/radeon/dce8: workaround for atom BlankCrtc table
  drm/radeon/DCE4+: clear bios scratch dpms bit (v2)
  drm/radeon: set si_notify_smc_display_change properly
  drm/radeon: fix DAC interrupt handling on DCE5+
  drm/radeon: clean up active vram sizing
  drm/radeon: skip async dma init on r6xx
  drm/radeon/runpm: don't runtime suspend non-PX cards
  drm/radeon: add ring to fence trace functions
  drm/radeon: add missing trace point
  drm/radeon: fix VMID use tracking
  drm: ast,cirrus,mgag200: use drm_can_sleep
  drm/gma500: Lock struct_mutex around cursor updates
  drm/i915: Fix the offset issue for the stolen GEM objects
  DRM: armada: fix missing DRM_KMS_FB_HELPER select
  drm/i915: Decouple GPU error reporting from ring initialisation
  ...
2014-01-29 20:49:12 -08:00
Tomi Valkeinen cb1fbad7ec Merge branches '3.14/fbdev', '3.14/dss-misc' and '3.14/dss-fclk' into for-next
Merge fbdev topic branches
2014-01-20 10:57:01 +02:00
Ivaylo Dimitrov e4998634dd OMAPDSS: DISPC: Fix 34xx overlay scaling calculation
commit 7faa92339b OMAPDSS: DISPC: Handle
synclost errors in OMAP3 introduces limits check to prevent SYNCLOST errors
on OMAP3. However, it misses the logic found in Nokia kernels that is
needed to correctly calculate whether 3 tap or 5 tap rescaler to be used as
well as the logic to fallback to 3 taps if 5 taps clock results in too
tight horizontal timings. Without that patch "horizontal timing too tight"
errors are seen when a video with resolution above 640x350 is tried to be
played. The patch is a forward-ported logic found in Nokia N900 and N9/50
kernels.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-14 10:06:45 +02:00
Tomi Valkeinen 0eb0dafb67 OMAPDSS: panel-acx565akm: clean-up locking
The locking in the acx565akm panel driver was getting too complex. Clean
it up by making new functions, acx565akm_bl_get_intensity_locked and
acx565akm_bl_update_status_locked, which are called by the backlight
subsystem. This way the non-locked versions can be called by the panel's
other funcs, simplifying the lock management.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:57 +02:00
Archit Taneja 8bc655521b OMAPDSS: DISPC: Preload more data in pipeline DMAs for OMAP4+ SoCs
DISPC pipeline DMAs preload some bytes of pixel data in the vertical blanking
region before the start of each frame. The preload ensures the pipeline doesn't
underflow when the active region of the display starts.

DISPC_GFX/VIDp_PRELOAD registers allow us to program how many bytes of data
should be preloaded for each pipeline. Calculating a precise preload value
would be a complex function of the pixel clock of the connected display, the
vertical blanking duration and the interconnect traffic at that instance. If
the register is left untouched, a default value is preloaded.

We observe underflows for OMAP4+ SoCs for certain bandwidth intensive use cases
with many other initiators active, and in situations where memory access isn't
very efficient(like accessing Tiler mapped buffers and EMIF configured in
non-interleaved more). The cause of the underflow is because the default preload
value isn't sufficient for the DMA to reach a steady state. We configure the
PRELOAD register such that the pipelines preload data up to the high threshold
of the FIFO.

Preloading lot of data for older SoCs can have a negative impact. Due to slower
interconnects, it's possible that the DISPC DMA cannot preload up to the high
threshold within the vertical blanking region of the panel. We leave the PRELOAD
registers to their reset values since we haven't faced underflows with these
SoCs because of low value of PRELOAD.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:56 +02:00
Tomi Valkeinen b52a6e7fb6 OMAPFB: disable overlays on driver removal
When omapfb module is removed, the driver will turn off all the displays
it manages. However, it leaves the overlays enabled. While the overlays
are obviously disabled as the displays are disabled, it causes issues
when the driver module is loaded again, as at that point the overlays
are still enabled on the hardware level. The result is that even if the
SW thinks overlays are disabled, they are actually enabled.

Fix this by making sure the overlays are disabled at module removal.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:56 +02:00
Tomi Valkeinen 40359a9b08 OMAPDSS: don't print errors on -EPROBE_DEFER
Nowadays it's normal to get -EPROBE_DEFER from, e.g., regulator_get. As
-EPROBE_DEFER is not really an error, and the driver will be probed fine
a bit later, printing an error message will just confuse the user.

This patch changes omapdss to print an error for regulator_gets only if
the error code is something else than -EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:55 +02:00
Tomi Valkeinen ab7bf423af OMAPFB: give informative print when probe succeeds
It is quite common to have omapfb probe deferred because of a missing
resource, and to get omapfb probed succesfully a bit later. This works
fine. However, omapfb does not give any print on a successful probe, so
if the omapfb is actually never probed again after deferral, this is not
shown in the log.

To help debugging, add a simple print from omapfb at the end of its
probe, saying which display it is using and in which resolution.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:55 +02:00
Tomi Valkeinen 77601507bc OMAPDSS: HDMI: rename resource names
The HDMI driver tries to get the needed memory resources by name and by
ID. Resources by name are not currently defined, and will be used with
DT boot.

The resource names used in the driver are not quite perfect, and as they
are not used yet, we can change them. This patch removes the unneeded
"hdmi_" prefix from the names, and simplifies the names (e.g. hdmi_txphy
-> phy).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:54 +02:00
Tomi Valkeinen 68104467ec OMAPDSS: DSI: split DSI memory map to smaller blocks
DSI contains three separate blocks: protocol engine, PHY and PLL. At the
moment, all these are memory mapped in one big chunk. We need to split
that memory map into smaller pieces so that we can add proper 'reg'
properties into the DT data for each block.

This patch changes the driver to map the blocks separately. It first
tries to get the memory resource using name, used when booting with DT,
and if that fails, it gets the memory resource by ID, in which case the
driver gets the big chunk from platform data. That big chunk is then
split into the smaller blocks manually.

After DSS DT code has been merged and the old platform code removed, we
can clean up the memory resource management.

Instead of changing the driver in all the places where a register is
read or written, this patch takes a shortcut: it adds an additional
number to the struct which represents the register index. This number is
used to decide which base address to use. In the future we should
consider other approaches.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:54 +02:00
Tomi Valkeinen 6873efe167 OMAPDSS: HDMI: add missing core irq
HDMI_IRQ_CORE was not defined in the hdmi.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:53 +02:00
Tomi Valkeinen 42116517d2 OMAPDSS: HDMI: fix HDMI_WP_CLK name
HDMI_WP_CLK was wrongly defined as HDMI_WP_WP_CLK. Fix that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:53 +02:00
Tomi Valkeinen 91b53e6a96 OMAPDSS: HDMI: fix hdmi_wait_for_bit_change
hdmi_wait_for_bit_change() has two issues:

The register index was passed as u16, even if the register index may be
u32. Fix the index to u32.

The function was copied from wait_for_bit_change() which waits for a
single bit to change, but the hdmi version was changed to wait for a bit
field. This change was not done correctly.

The function is supposed to return the (last) value of the bit field,
but it returned !val in case of timeout. This was correct for the single
bit version, but not for the hdmi version. Fix the function to return
the actual value in the register.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:52 +02:00
Tomi Valkeinen be07dcd7e2 OMAPDSS: DISPC: fix context restore
DISPC_MSTANDBY_CTRL register is used in the driver, but it's not
restored in dispc_restore_context(), causing problems after resume.

Instead of adding DISPC_MSTANDBY_CTRL to dispc_restore_context(), let's
call _omap_dispc_initial_config() as the first thing in
dispc_runtime_resume(). This will initialize the DISPC core registers
properly, and will avoid similar issues in the future.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:52 +02:00
Tomi Valkeinen f4f49c48b8 OMAPDSS: HDMI4: remove useless func calls
For some reason the hdmi driver first turns off the video output when
it's about to enable the video output. This serves no purpose, and can
be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:51 +02:00
Archit Taneja 1e676248c8 OMAPDSS: HDMI4: Accept non-standard timings
The hdmi4 driver currently rejects any timing which is not from the CEA or VESA
standards. This leads hdmi rejecting any non-standard mode. A non standard
timing may not have a valid code corresponding to it. In such cases, the HDMI
spec suggests to set the code to 0.

Modify the driver to check if the timings fall within the range of the DISPC
TV overlay manager, and remove the check for an invalid code. Add a debug print
specifying the mode and code in hdmi_display_set_timing.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-01-13 12:19:51 +02:00
Tomi Valkeinen 6da9f89172 drm/omap: fix (un)registering irqs inside an irq handler
omapdrm (un)registers irqs inside an irq handler. The problem is that
the (un)register function uses dispc_runtime_get/put() to enable the
clocks, and those functions are not irq safe by default.

This was kind of fixed in 48664b21ae
(OMAPDSS: DISPC: set irq_safe for runtime PM), which makes dispc's
runtime calls irq-safe.

However, using pm_runtime_irq_safe in dispc makes the parent of dispc,
dss, always enabled, effectively preventing PM for the whole DSS module.

This patch makes omapdrm behave better by adding new irq (un)register
functions that do not use dispc_runtime_get/put, and using those
functions in interrupt context. Thus we can make dispc again
non-irq-safe, allowing proper PM.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
2014-01-09 15:15:24 +02:00
Tomi Valkeinen 558c73e26e OMAPDSS: DSI: fix fifosize
DSI has separate TX and RX fifos. However, the current code only has one
field where the fifo size is stored, and the code for both TX and RX
config write to the same field. This has not caused issues, as we've
been using the same fifo sizes.

Fix this bug by creating separate fields for TX and RX fifo sizes.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Tomi Valkeinen 303e4697e7 OMAPDSS: rename display-sysfs 'name' entry
omapdss in compat mode creates some sysfs files into the device's sysfs
directory, including a 'name' file. This works fine for
platform_devices, but breaks with i2c or spi devices, as those already
have a 'name' file.

Fix this by renaming the omapdss's 'name' file to 'display_name'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Tomi Valkeinen 29fceeebb6 OMAPDSS: DISPC: Add MFLAG defines
OMAP5 has MFLAG feature in DISPC. Add the register definition and dump
it. The register is not used yet, though.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Tomi Valkeinen 7a53df2c08 OMAPDSS: apply fixes
When omapfb does ovl->get_overlay_info, ovl->set_overlay_info, the set
function may fail even if the info has not been changed. This is because
omapdss doesn't initialize the info, but expect the caller to set valid
values.

Normally that is the case, but there is at least one corner case: if
omapfb has not allocated memory for the overlay yet, and the user uses
ioctl to disable the overlay to make sure it's disabled. In this case
get_overlay_info returns invalid data, but the user is only interested
in setting the overlay to disabled, not configuring it, and
set_overlay_info fails.

The issue is made possible by the omapfb's setup_plane ioctl, which
groups overlay configuration and overlay enable/disable bit into the
same struct. Thus, when you are disabling an overlay, you are also
configuring it.

This is a bit counter intuitive, so I think it's better to initialize
the info to some valid values.

The fields requiring initialization are color_mode and rotation_type,
and also we need to remove the check for (paddr == 0), as paddr is 0 for
unallocated overlay (but it's still fine to disable the overlay).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Tomi Valkeinen ac9f24211e OMAPDSS: fix debug prints
Fix debug prints all over omapdss:
* add missing linefeeds
* change pr_err/pr_debug to DSSERR/DSSDBG
* add missing DSS_SUBSYS_NAMEs

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Tomi Valkeinen 8ee5c84271 OMAPDSS: fix missing EXPORT_SYMBOL()s
Functions dispc_ovl_set_fifo_threshold and
dispc_ovl_compute_fifo_thresholds need to be exported. Add the
EXPORT_SYMBOLs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-12-30 16:14:15 +02:00
Aaro Koskinen c37dd67798 ARM: OMAPFB: panel-sony-acx565akm: fix bad unlock balance
When booting Nokia N900 smartphone with v3.12 + omap2plus_defconfig
(LOCKDEP enabled) and CONFIG_DISPLAY_PANEL_SONY_ACX565AKM enabled,
the following BUG is seen during the boot:

[    7.302154] =====================================
[    7.307128] [ BUG: bad unlock balance detected! ]
[    7.312103] 3.12.0-los.git-2093492-00120-g5e01dc7 #3 Not tainted
[    7.318450] -------------------------------------
[    7.323425] kworker/u2:1/12 is trying to release lock (&ddata->mutex) at:
[    7.330657] [<c031b760>] acx565akm_enable+0x12c/0x18c
[    7.335998] but there are no more locks to release!

Fix by removing double unlock and handling the locking completely inside
acx565akm_panel_power_on() when doing the power on.

Reported-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-26 12:49:17 +02:00
Tomi Valkeinen fc1fe6e794 OMAPDSS: add dedicated fck PLL support
This patch adds support for SoCs that have a dedicated DSS PLL used for
DSS function clock.

If there is no dss parent clock defined, it is presumed that the
functionl clock rate can be set (almost) freely. The code calculates the
highest allowed fck rate, which when divided with some integer gives the
required pck.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:28 +02:00
Tomi Valkeinen 688af02d22 OMAPDSS: pass pck to dss fck clock calc
We need the required pixel clock rate when calculating the dss fclk on
SoCs that have a dedicated DSS PLL.

This patch changes the code to pass the pck to the calc functions. The
pck rate is taken into use in the next patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:28 +02:00
Tomi Valkeinen ada9443ff4 OMAPDSS: cleanup fck parent handling
The dss parent_clk_name currently points to a clock node which we use to
change the fclk rate. Now that we have CLK_SET_RATE_PARENT properly set,
we can set the rate directly to the fclk node.

However, we still need to calculate the possible clock rates. For this,
we need the rate of the parent of the current parent_clk.

To simplify the code, this patch changes the parent_clk_name to point to
the above mentioned parent, so that we can get the rate directly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:27 +02:00
Tomi Valkeinen 64ad846ffd OMAPDSS: rename parent clk variables
Rename the variables related to DSS fclk's parent: "clk_name" and
"dpll4_m4_ck", to "parent_clk_name" and "parent_clk", which much better
tell what they mean.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:27 +02:00
Tomi Valkeinen 9c15d76200 OMAPDSS: simplify dss clk dump
Simplify dss_dump_clocks() so that it doesn't make any presumptions
about the DSS fclks nature.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:26 +02:00
Tomi Valkeinen d0f58bd3bb OMAPDSS: remove struct dss_clock_info
Remove struct dss_clock_info, as it is not usable in a case where DSS
fclk comes from a dedicated PLL. Instead, just use the fclk rate in
place of dss_clock_info, as that is all that's needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:26 +02:00
Tomi Valkeinen 6e555e2752 OMAPDSS: fix omap2 dss fck handling
The driver considers OMAP2 DSS's functional clock as a fixed clock.
However, it can be changed, but the possible dividers are not continuous
which is why it was just handled as a fixed clock.

As a partial fix, this patch changes the code to handle the continous
part of the dividers, from 1 to 6. This let's us handle the OMAP2 fck
the same way as fcks on other OMAPs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-11-18 14:32:25 +02:00
Wolfram Sang 16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Linus Torvalds f0d55cc1a6 fbdev changes for 3.13
Nothing particularly stands out in this pull request. The biggest part of the
 changes are cleanups.
 
 Maybe one fix to mention is the "fb: reorder the lock sequence to fix potential
 dead lock" which hopefully fixes the fb locking issues reported by multiple
 persons.
 
 There are also a few commits that have changes to arch/arm/mach-at91 and
 arch/avr32, which have been acked by the maintainers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSg2oCAAoJEPo9qoy8lh71vXsP/2AjkzOlcKBPutMG/W30QMHT
 tkKfr/RL8C3oXcimkE6ch3ksbFj2t5corxa/DLTdESdTpeFAgxj72pcdhN3X4+Xs
 7IokExM2W5s6p4pP66PTr2A5XhEyAHtEMp+2JbHPRzwZitblzBLZvuPUJljwJDpj
 Z9+sD00xv/MZrXDCsEN8k2xdJ3rFn6JgX267y1qajlsocZoseTF2ed94IN/YnIM7
 B2hra1B4E21FPYLzRDOJRmZa0YGomLTymezPnPg33hLBhnJU/aG4HLDHKUZWhduz
 /6UwACH63ja7I2z/8AZHQ1ACdbGheRtHbjwV9LLYlbaAvPmUqNTZ4b6UeQOb/EZ0
 3SPCYbwD6+RMhSx/j/XhySvw82RY0i1aTlTDyjgOggfrfdi4x1Wk54bUWp5l9O3D
 SX1vSpNLGSh4GKXRzJjf3jouG/LcOzlpDlVZXzgsPzkyirluUv6QdMTopJwFwIGx
 rFgtsbkvhEsFvaNhhVIqQXKfwZ69r42U5JC+fDM5u7VX0mqyJ1usUNGvNSeifcDg
 EwUAI6RGnOXCO6crj2BZYpRTdc61tnY9b4CGLHDCeQkEXokEsEJ7Mz+8YfSwFo7X
 wqh+dAPQaixeHtUFZ8GhHXeAsjoQRSBXygf3NSNmCeP3WsmuozbauuujSrrTHITp
 LOXFPhU9uxHu4mDd6wrq
 =59+j
 -----END PGP SIGNATURE-----

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

Pull fbdev changes from Tomi Valkeinen:
 "Nothing particularly stands out in this pull request.  The biggest
  part of the changes are cleanups.

  Maybe one fix to mention is the "fb: reorder the lock sequence to fix
  potential dead lock" which hopefully fixes the fb locking issues
  reported by multiple persons.

  There are also a few commits that have changes to arch/arm/mach-at91
  and arch/avr32, which have been acked by the maintainers"

* tag 'fbdev-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (143 commits)
  fb: reorder the lock sequence to fix potential dead lock
  fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare
  fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare
  omapdss: Add new panel driver for Topolly td028ttec1 LCD.
  video: exynos_mipi_dsi: Unlock the mutex before returning
  video: da8xx-fb: remove unwanted define
  video: Remove unnecessary semicolons
  simplefb: use write-combined remapping
  simplefb: fix unmapping fb during destruction
  OMAPDSS: connector-dvi: fix releasing i2c_adapter
  OMAPDSS: DSI: fix perf measuring ifdefs
  framebuffer: Use fb_<level>
  framebuffer: Add fb_<level> convenience logging macros
  efifb: prevent null-deref when iterating dmi_list
  fbdev: fix error return code in metronomefb_probe()
  video: xilinxfb: Fix for "Use standard variable name convention"
  OMAPDSS: Fix de_level in videomode_to_omap_video_timings()
  video: xilinxfb: Simplify error path
  video: xilinxfb: Use devm_kzalloc instead of kzalloc
  video: xilinxfb: Use standard variable name convention
  ...
2013-11-14 14:44:20 +09:00
Marek Belisko 8623ec220b omapdss: Add new panel driver for Topolly td028ttec1 LCD.
Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
[tomi.valkeinen@ti.com: made a few funcs static]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-31 12:30:36 +02:00
Joe Perches cf6ac4ce1b video: Remove unnecessary semicolons
These aren't necessary after switch, for, and if blocks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-30 13:34:52 +02:00
Tomi Valkeinen cc9fd77c08 OMAPDSS: connector-dvi: fix releasing i2c_adapter
i2c adapter is not released correctly on error paths. Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-29 13:36:17 +02:00
Tomi Valkeinen 477fed7029 OMAPDSS: DSI: fix perf measuring ifdefs
DSI performance measuring code is meant to be explicitly enabled at
compile time. At some point in time the perf code was changed to be
enabled if DEBUG is defined. This is not right, so this patch fixes it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-29 13:27:06 +02:00
Roel Kluin 9b842a470a OMAPDSS: Fix de_level in videomode_to_omap_video_timings()
In videomode_to_omap_video_timings, de_level is always set to HIGH
regardless of what the vm->flags says. Fix this to set it to high or low
according to vm->flags.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
[tomi.valkeinen@ti.com: rewrote the desc]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-18 10:57:43 +03:00
Richard Röjfors 7831b2ae4a OMAPDSS: HDMI: Correctly compare timings
There is currently a copy and paste error where the hdmi vsync timings are not
compared correctly, this patch fixes this.

Signed-off-by: Richard Röjfors <richard.rojfors@gmail.com>
[tomi.valkeinen@ti.com: fixed to apply on top of latest tree]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:41 +03:00
Archit Taneja 08d83e4e17 omapdss: HDMI: move common functions to a separate file
The OMAP4 HDMI encoder driver(hdmi4.c) contains timings tables, and helper
functions which can be used as is by the OMAP5/DRA7x encoder driver. Move these
to hdmi_common.c so that it's not replicated in the future.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:37 +03:00
Archit Taneja c8a0d959b7 omapdss: OMAP4: HDMI: remove unnecessary edid macros
The hdmi4 driver has edid macros that aren't used at all. Remove them.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:33 +03:00
Archit Taneja ef26958a0c omapdss: HDMI: Rename hdmi driver files to nicer names
Replace the ti_hdmi_4xxx* notation for OMAP4 HDMI driver with hdmi4. Rename
the hdmi.c encoder driver to hdmi4.c. Rename ti_hdmi.h to hdmi.h

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:30 +03:00
Archit Taneja 8696131fad omapdss: HDMI: add HDMI wrapper IRQ flags
Add flags for the interrupts present in HDMI wrapper block, these will be used
to configure HDMI_IRQENABLE_SET/CLEAR and HDMI_IRQSTATUS registers.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:27 +03:00
Archit Taneja bdb8bfc652 omapdss: HDMI: Clean up the header files
Keep only OMAP4 HDMI core block related structs and enums in ti_hdmi_4xxx_ip.h,
move the rest to ti_hdmi.h. This holds all library specific data which will be
shared between OMAP4 and OMAP5/DRA7x HDMI encoder drivers.

Move the duplicate register read/write/wait_for_bit_change functions in the hdmi
library files to ti_hdmi.h

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:23 +03:00
Archit Taneja 275cfa1a9d omapdss: HDMI: remove hdmi_ip_data struct
The struct hdmi_ip_data contains information related to HDMI wrapper, PLL, PHY
and core sub-blocks. Now that each of these sub blocks has it's own struct,
hdmi_ip_data serves no purpose. The mutex lock in the struct was also never
used.

Remove this struct to make things cleaner.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:19 +03:00
Archit Taneja 425f02fdee omapdss: HDMI: Use OMAP4 HDMI core functions directly and remove hdmi_ip_ops
After removing wrapper, pll and phy funcs from ti_hdmi_4xxx_ip.c, we are left
with OMAP4 HDMI core functions. Use these directly in hdmi.c rather than using
hdmi_ip_ops. Rename the core functions with a 'hdmi4' suffix.

We used to have hdmi_ip_ops so that one could support HDMI within a TI SoC which
had a non-DSS display subsytem. This however never got put into use, and hence
these ops aren't useful any more.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:15 +03:00
Archit Taneja 5cac5aee18 omapdss: HDMI: create a PHY library
HDMI PHY is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are
called directly from the hdmi driver rather than hdmi_ip_ops function pointer
calls.

Add the PHY library function declarations to ti_hdmi.h. These will be shared
amongst the omap4/5 hdmi platform drivers. Remove the PHY function pointer ops
from the ti_hdmi_ip_ops struct.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:11 +03:00
Archit Taneja c1577c1ea0 omapdss: HDMI: create a PLL library
HDMI PLL is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing PLL functions from ti_hdmi_4xxx_ip.c and hdmi.c to a separate file.
These funcs are called directly from the hdmi driver rather than hdmi_ip_ops
function pointer calls.

Add the PLL library function declarations to ti_hdmi.h. These will be shared
amongst the omap4/5 hdmi platform drivers. Remove the PLL function pointer ops
from the ti_hdmi_ip_ops struct. These will be shared amongst the omap4/5 hdmi
platform drivers and other libraries.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:07 +03:00
Archit Taneja f382d9eb82 omapdss: HDMI: create a Wrapper library
HDMI wrapper is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are
called directly from the hdmi driver rather than hdmi_ip_ops funtion pointer
calls.

Add new wrapper funcs which can be used by other hdmi libraries like core, pll
and phy. Move some of the enums, structs and funcs related to the wrapper from
ti_hdmi_4xxx_ip.h to ti_hdmi.h. These will be shared amongst the omap4/5 hdmi
platform drivers and other libraries.

The old hdmi_wp_init() is removed since it didn't do anything. Timing parameters
like interlace, hsync_level and vsync_level weren't copied correctly before.
Those are copied correctly now.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-09 12:42:03 +03:00
Ricardo Neri 78145a95fb OMAPDSS: HDMI: OMAP4: Complete dumping of core registers
Add missing register entries when dumping the core.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-09-27 09:58:23 +03:00