ASoC: omap-hdmi-audio: Set SNDRV_PCM_HW_PARAM_BUFFER_BYTES constraint

Set SNDRV_PCM_HW_PARAM_BUFFER_BYTES contraint that matches with
SNDRV_PCM_HW_PARAM_PERIOD_BYTES constraint.

For some reason setting the hw params with snd_pcm_hw_params_*_near()
functions sometimes fails if the period bytes constraint is set
without a matching buffer bytes constraint.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
PM / Runtime: Better support for nested irq_safe drivers

Do not lock parent of irq safe device to enabled state if the parent
is also irq safe.

Before this patch the pm_runtime_irq_safe() always called
pm_runtime_get_sync() for the parent, locking the parent to enabled
state and for sure making any parent irq_safe. This is hardly optimal
if the parent device PM code is also irq_safe.

After this patch the PM runtime core synchronously enables any
irq_safe parents of an irq_safe device when pm_runtime_get_sync() is
called. The parents are checked asyncronously after pm_runtime_put()
call.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: make dss & dispc runtime PM irq-safe

Both dss and dispc runtime PM suspend & resume can be called in atomic
context. As omapdrm has a habit of calling runtime get/put from atomic
context, set both dss and dispc as irq-safe to solve fix omapdrm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drm/omap: fbdev: add a module option controlling num backbuffers allocated

Some software requires the use of the fbdev PAN ioctl (SGX driver in flip
mode for instance).  This commit adds a new kernel parameter:
omapdrm.num_fbdev_backbuffers=<int>
that can be used to specify how many buffers get allocated when the
omapdrm/fbdev driver gets initialized.  It defaults to 1 if it is not
specified which is the existing behavior.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drm/irq: Implement a generic vblank_wait function

[ Upstream commit e8450f51a4b39cfe0878b4aee339820b2bfff240 ]

As usual in both a crtc index and a struct drm_crtc * version.

The function assumes that no one drivers their display below 10Hz, and
it will complain if the vblank wait takes longer than that.

v2: Also check dev->max_vblank_counter since some drivers register a
fake get_vblank_counter function.

v3: Use drm_vblank_count instead of calling the low-level
->get_vblank_counter callback. That way we'll get the sw-cooked
counter for platforms without proper vblank support and so can ditch
the max_vblank_counter check again.

v4: Review from Michel Dänzer:
- Restore lost notes about v3:
- Spelling in kerneldoc.
- Inline wait_event condition.
- s/vblank_wait/wait_one_vblank/

Cc: Michel Dänzer <michel@daenzer.net>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Merge branch 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree into ti-linux-3.14.y

TI-Feature: audio-display
TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
TI-Branch: audio-display-ti-linux-3.14.y

* 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
  drm/irq: Implement a generic vblank_wait function
  drm/omap: fbdev: add a module option controlling num backbuffers allocated
  OMAPDSS: make dss & dispc runtime PM irq-safe
  PM / Runtime: Better support for nested irq_safe drivers
  ASoC: omap-hdmi-audio: Set SNDRV_PCM_HW_PARAM_BUFFER_BYTES constraint

Signed-off-by: Texas Instruments Auto Merger <lcpd_integration@list.ti.com>