OMAP4: DSS: Fix to correct the manager index for VSYNC irq handler

Patch to fix the Manager id in dss_completion_irq_handler.
DSSCOMP is expecting the manager id 1 to be mapped to HDMI display.
This patch fixes the DSSCOMP_STATE_DISPLAYED callback in DSSCOMP.

Change-Id: I0aab3e494cb305d75a64fabc4cd6919def636285
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
Signed-off-by: Varadarajan Charulatha <charu@ti.com>
OMAP: DSS2: Fix callback completion issue in mgr->blank

Uncommitted callbacks were not completed yet eclipsed in mgr->blank.

Also fixed mgr index in ECLIPSED_CACHE callback.
This patch is co-authored with Muralidhar Dixit <murali.dixit@ti.com>

Change-Id: Ia20b79e9a6308441423d9900469e0c4adfc30eee
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAP:DSS2: Fix FIFO threshold calculation

    Calculated low-threshold value did not seem to work for
    the case of 1 > LineSize/MemoryLineBufferSize > 1/2.  Increased
    calculated value to avoid FIFO THRESHOLD UNDERFLOW errors.

    Change-Id: I60c7fa25de8737ef984bd1506cd70f1d39736acb
    Signed-off-by: Lajos Molnar <molnar@ti.com>

Rebased on latest c-model calculation fixes.

Change-Id: Icf086e71cf70385a0eaf6dbafe8377da92d053ba
Signed-off-by: Girish S G <girishsg@ti.com>
Add header for dsscomp and optional bltsville data from Android HWC

In order to support the OMAP4470 GC320 blit IP from HWC, we will
optionally add blit data to the payload of information passed from
HWC to the SGX display driver (OMAPLFB).

Change-Id: Ia764810b0db0d5d7b0e3f777eeabf879b4552282
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
omap_hwc: Describe the api agreement with omaplfb

Change-Id: I1ec9348a661999d536dcec1ba47247289075790e
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
omap_hwc: Adds a flag to hint omaplfb a blit FB is needed

When HWC generates blits a DSS pipe is configured and assigned
for the blit framebuffer, this patch adds a flag to give a
hint to omaplfb to use such pipe when it is present.

This helps in situations where there are not blits but blit
buffers to synchronize with and a blit buffer must be used.
In such case the rgz_items and num_ovls from dsscomp where not
enough data to recognize this scenario.

Change-Id: I70542b5d4a865b783277a46afe5e030d17b90f8f
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
OMAPDSS: DISPC: do not lose taps selection

Move taps selection logic before scaling check, so 3- of 5-tap always
get selected, no metter whether we do scaling or not.

Change-Id: I284b29933ca9fd69ae2088f279554dab9a66542c
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
OMAPDSS: DSSCOMP: Fix incorrect num_ovls check

In setup manager IOCTL, the check to validate the number of overlays
is incorrect. Hence when all overlays are passed to setup manager IOCTL
with enable/disable, error was returned. Fix the same.

Change-Id: I8ec1a6dee9f074ebf83a39bdf113a97e2543cc70
Signed-off-by: Varadarajan, Charulatha <charu@ti.com>
Remove unnecessary dsscomp hack from board-tuna.c
OMAP4: HDMI: Add suspend handler for LCD panel

Add a suspend handler for LCD panel.
HDMI suspend/ resume path is broken due to lack of a suspend handler
for LCD panel. When a HPD signal is received
during resume it sends a device switch setting to user space causing
set_mode call from user space for reconfiguring the HDMI panel.
this enables the LCD panel but when the system goes to suspend again
it fails as the LCD doesn't have a suspend handler. LCD is currently
being disabled / enabled from DSSCOMP as part of Early suspend/Late Resume
But if the LCD is enabled after early suspend is completed there is no
way to disable it. This patch will fix this issue.
Remove the device switch setting for HDMI panel as this wiil cause
the user space to wake up for handling the switch setting and result
in the suspend path being broken.

Change-Id: Ia6c003d096fdce96935158fb17e9e079e0b8705a
Signed-off-by: Srinivas Pulukuru <srinivas.pulukuru@ti.com>
[OMAP4-DSS-TABLET2]: tc358765: Set first_vsync flag during panel poweron()

During poweron(), the first_vsync has not been received yet,
hence set the flag as false.

Change-Id: I907f64ac26d422168e6d2791f8aa3b51d6475c48
Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com>
OMAPDSS: tc358765: dynamically select video mode

Enable specific DSI video mode based on current pixel size,
instead of static definition of 24bit mode.

Change-Id: I7b5d0ec8ffd46dd7b5968b71bfa2a5df62ec7336
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
OMAPDSS: panel tc358765 initialization delay after power-on

This change adds delay for 100ms between powering on of display
panel tc358765 and its initialization. This delay is needed,
because time to time registers of the panel may be not initialized
directly after power-on. The value for delay was found
experimentally. Delay in tc358765_hw_reset() function (100ms) also
plays role.

Change-Id: I889a498787490adb004d0324a44fa44047278f6a
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
Tablet2: tc358765: Resetting tc358765 on power off.

Due to hardware bug backlight is not disabled by PWM. Gpio 102
is shared between resetting tc358765 and backlight enabling.
For the case when we put a tablet into suspend we can reset
tc358765 on it's power off and disable backlight. Backlight
will be enabled on tc358765 power on.

Change-Id: I092be7eedfcc6ca077472aa7c9350c1527017aff
Signed-off-by: Andrii Anisov <andrii.anisov@ti.com>
OMAPDSS: DSS: Fixing display's state-machine for suspend

Issue with entering blaze to suspend state fixed.
Also fixed error during hdmi driver resume when actual
hdmi device was not connected.

Change-Id: Iffb151982f020afb40dc2b39b35aa80a03091b32
Signed-off-by: Andrii Guriev <x0160204@ti.com>
tsl2771 prox/als: Update suspend/resume to dev_pm_ops

Update the power management suspend/resume to use
the dev_pm_ops instead of legacy suspend/resume callbacks

Change-Id: Id6d89fdd72049ae1bf21053cab544253ae23437b
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TSL2771 prox/als: Remove unneeded logging statement

The logging statement "not powering the device down" does not make
sense and always is shown if the device was not enabled.

Change-Id: Ic8c2eed25b2fd99791a40f66a5a0c3a0ef72113b
Signed-off-by: Dan Murphy <dmurphy@ti.com>
tsl2771 prox/als: Change suspend/resume and enable/disable logic

Logic in suspend/resume path is not correct.
Even if proximity sensor is disabled -
resume logic will enable it. This patch fixed this.

Also, patch resolve issue with disabling ALS sensor.
TSL2771's datasheet says that AEN bit should be enable,
even if only proximity sensor is used. This patch
keep AEN-bit if sensors are enabled and clear it
during disabling last of them.

Change-Id: Ib134429d36af2c640ff0b52235d91f7f0cf754ef
Signed-off-by: Sergii Postulga <x0153364@ti.com>
[Tablet] Added missing APIs for TSL2771 Proximity driver

Added __set_bit and input_set_abs_params APIs to tsl2771.c
This change stopped kernel panic from occurring
Also allows the driver to function properly

Change-Id: Ie5b9083880a90cb73e606bbbb9e0b4b84a741f88
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
OMAP: remove pvr services and omaplfb from kernel

These sources are now defunct

Change-Id: I06218925b9b6b2fceb3e4595c623448b74e5d397
Signed-off-by: Tony Lofthouse <a0741364@ti.com>

Conflicts:
	drivers/gpu/pvr/Kconfig
	drivers/gpu/pvr/Makefile
	drivers/gpu/pvr/bridged_pvr_bridge.c
	drivers/gpu/pvr/buffer_manager.c
	drivers/gpu/pvr/buffer_manager.h
	drivers/gpu/pvr/deviceclass.c
	drivers/gpu/pvr/devicemem.c
	drivers/gpu/pvr/ion.h
	drivers/gpu/pvr/kerneldisplay.h
	drivers/gpu/pvr/mm.c
	drivers/gpu/pvr/mm.h
	drivers/gpu/pvr/module.c
	drivers/gpu/pvr/omap4/sysconfig.c
	drivers/gpu/pvr/omap4/syslocal.h
	drivers/gpu/pvr/omaplfb/omaplfb.h
	drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
	drivers/gpu/pvr/osfunc.c
	drivers/gpu/pvr/osfunc.h
	drivers/gpu/pvr/pvr_bridge_k.c
	drivers/gpu/pvr/pvr_bridge_km.h
	drivers/gpu/pvr/pvrsrv.c
	drivers/gpu/pvr/pvrversion.h
	drivers/gpu/pvr/queue.c
	drivers/gpu/pvr/refcount.c
	drivers/gpu/pvr/refcount.h
	drivers/gpu/pvr/resman.c
	drivers/gpu/pvr/services.h
	drivers/gpu/pvr/servicesext.h
	drivers/gpu/pvr/servicesint.h
	drivers/gpu/pvr/sgx/bridged_sgx_bridge.c
	drivers/gpu/pvr/sgx/mmu.c
	drivers/gpu/pvr/sgx/mmu.h
	drivers/gpu/pvr/sgx/sgxinfokm.h
	drivers/gpu/pvr/sgx/sgxinit.c
	drivers/gpu/pvr/sgx/sgxkick.c
	drivers/gpu/pvr/sgx/sgxreset.c
	drivers/gpu/pvr/sgx/sgxtransfer.c
	drivers/gpu/pvr/sgx/sgxutils.c
	drivers/gpu/pvr/sgx/sgxutils.h
	drivers/gpu/pvr/sgx_mkif_km.h
	drivers/gpu/pvr/sgxapi_km.h
	drivers/gpu/pvr/sgxerrata.h
	drivers/gpu/pvr/sgxfeaturedefs.h
	drivers/gpu/pvr/sgxinfo.h
	drivers/gpu/pvr/ttrace_common.h