OMAPDSS: DISPC: Add writeback register offsets and dss features structs

Since writeback has many overlay like properties, and most of it's registers are
similar to that of overlays, it's possible to reuse most of the overlay related
DISPC code for writeback when considering it as a plane. Writeback was added as
a plane in the omap_plane field as OMAP_DSS_WB.

Add the writeback register offsets in dispc.h, add minimal WB plane related info
needed in dss_features. Add a function which returns the number of writeback
pipelines an OMAP version has.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Configure input and output sizes for writeback

Writeback uses the WB_PICTURE_SIZE register to define the size of the content
written to memory, this is the output of the scaler. It uses the WB_SIZE
register to define the size of the content coming from the overlay/manager to
which it is connected, this is the input to the scaler. This naming is different
as compared to overlays.

Add checks for writeback in dispc_ovl_set_input_size() and
dispc_ovl_set_output_size() to write to the correct registers.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Downscale chroma if plane is writeback

When converting YUYV444 content to YUV422 or NV12 formats through writeback
pipeline, the scaler needs to downscale the chroma plane. Ensure that chroma
is downscaled when the pipeline is writeback.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Don't set chroma resampling bit for writeback

The bit YUVCHROMARESAMPLING isn't there for writeback in DISPC_WB_ATTRIBUTES2.
It isn't there because we don't upsample chroma like for video pipelines, we
downsample chroma in writeback to get YUV422 or NV12 formats from the YUV444
input.

Ignore this bit in dispc_ovl_set_scaling_uv() if the plane is OMAP_DSS_WB.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Add function to set channel in for writeback

Writeback can take input from either one of the overlays, or one of the overlay
managers. Add an enum which represents the channel_in for writeback, and maps
to the register field programming.

Add a function to configure channel in for writeback. This will be used later in
APPLY.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup

Create struct omap_dss_writeback_info, this is similar to omap_overlay_info,
the major difference is that there is no parameter which describes the input
size to writeback, this is because this is always fixed, and decided by the
connected overlay or overlay manager. One more difference is that screen_width
is renamed to buf_width, to give the value of stride the writeback buffer has.

Call dispc_ovl_setup_common() through dispc_wb_setup() to configure overlay-like
parameters. The parameters in dispc_ovl_setup_common() which do not hold for
writeback are filled passed as zeroes or false, the code takes care of not
configuring them as they won't possess the needed overlay caps.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup()

Configure some of the writeback specific parameters in dispc_wb_setup(). The
writeback parameters configured are:

truncation: This needs to be set if the color depth input to writeback is more
than the color depth of the color mode we want to store in memory.

writeback mode: This configures whether we want to use writeback in mem to mem
or capture mode. This information will be directly passed by APPLY later.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Configure writeback FIFOs

Extend the DISPC fifo functions to also configure the writeback FIFO thresholds.

The most optimal configuration for writeback is to push out data to the
interconnect the moment writeback pushes enough pixels in the FIFO to form a
burst. This reduces the chance of writeback overflowing it's FIFO.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Add manager like functions for writeback

Add functions to enable writeback, and set/check state of GO bit. These bits are
identical in behaviour with the corresponding overlay manager bits. Configure
them in a similar way to mgr_enable() and mgr_go_* functions. Add a helper to
get the FRAMEDONE irq corresponding to writeback.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: DISPC: Configure color conversion coefficients for writeback

Writeback pipeline receives RGB data from one of the overlays or one of the
overlay managers. If the target color mode is YUV422 or NV12, we need to convert
the RGB pixels to YUV. The scaler in WB then converts it to the target color
mode.

Hence, the color conversion coefficients that need to be programmed are the ones
which convert a RGB24 pixel to YUV444. Program these coefficients for writeback
pipeline.

Rearrange the code a bit to configure different coefficients for overlays and
writeback.

Signed-off-by: Archit Taneja <archit@ti.com>
Merge branch 'archit/outputs-for-3.7'

Merge omapdss output work, that creates a new entity "output" to represent the
outputs (DPI, DSI, HDMI, ...) from DSS. An output sits in between an overlay
manager and a panel, and helps us to remove references to panel devices from
the omapdss core.

* archit/outputs-for-3.7: (23 commits)
  OMAPDSS: Remove old way of setting manager and device links
  OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable
  OMAPDSS: OVERLAY/MANAGER: Get device via output
  OMAPDSS: MANAGER: Update display sysfs store
  OMAPFB: Change dssdev->manager references
  OMAPDSS: HDMI: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: VENC: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: RFBI: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: SDI: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: DSI: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: DSI: Remove dsi_pdev_map global struct
  OMAPDSS: DPI: Replace dssdev->manager with dssdev->output->manager references
  OMAPDSS: Create links between managers, outputs and devices
  OMAPDRM: Remove manager->device references
  OMAPFB: remove manager->device references
  OMAP_VOUT: Remove manager->device references
  OMAPDSS: Remove manager->device references
  OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager
  OMAPDSS: output: Add set/unset device ops for omap_dss_output
  OMAPDSS: outputs: Create and register output instances
  ...
Merge branch 'archit/wb-dispc-for-3.7'

Merge omapdss writeback work. These patches implement the low level writeback
features in the DISPC, but do not yet add a way to actually use the writeback
from the userspace.

* archit/wb-dispc-for-3.7:
  OMAPDSS: DISPC: Configure color conversion coefficients for writeback
  OMAPDSS: DISPC: Add manager like functions for writeback
  OMAPDSS: DISPC: Configure writeback FIFOs
  OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup()
  OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup
  OMAPDSS: DISPC: Add function to set channel in for writeback
  OMAPDSS: DISPC: Don't set chroma resampling bit for writeback
  OMAPDSS: DISPC: Downscale chroma if plane is writeback
  OMAPDSS: DISPC: Configure input and output sizes for writeback
  OMAPDSS: DISPC: Add writeback register offsets and dss features structs
  OMAPDSS: DISPC: Allow both upscaling and downscaling of chroma
  OMAPDSS: DIPSC: Relax scaling limitations when in memory to memory mode
  OMAPDSS: DISPC: Don't pass channel out when configuring overlays
  OMAPDSS: DISPC: Make dispc_ovl_setup call dispc_ovl_setup_common
  OMAPDSS: OVERLAY: Add position and replication as overlay caps
  OMAPDSS: DISPC: Pass overlay caps as a parameter to dispc plane functions
  OMAPDSS: DISPC: Simplify function names for setting pipeline input and output sizes
  OMAPDSS: DISPC: Constify omap_overlay_info in dispc_ovl_setup()
Merge branch 'cache-louis' of git://linux-arm.org/linux-2.6-lp into devel-stable
Thermal: Fix bug on cpu_cooling, cooling device's id conflict problem.

This patch fixes small bug on cpu_cooling. CPU cooling device has own
id generated with idr mathod. However in the previous version, it swapped
to all same id at last stage of probing as 0. This makes id's collision and
also occures error when it releases that id.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Kbuild: use normal compression settings for tar*-pkg

For large kernel configurations (like a distribution kernel)
targz-pkg takes a quite long time to just do the compression.
I clocked it at 15+mins for a SUSE kernel like config on a fast
system.  And tarxz and bzip2 are even slower.

The main reason is that the script that is doing the taring sets
the highest compression level (-9).  When I change it to just
use the defaults the gzip time for the same kernel goes down
to ~3 mins. I haven't tested xz and bzip, but I expect those
to be much faster too.

I'm not willing to wait that long for a small compression
gain. So just change the script to use the defaults.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
menuconfig: Remove superfluous conditionnal

Because end_reached is set to 0 before the loop, the test "!end_reached" is
always true and can be removed. This structure was perhaps copied from the
similar one in back_lines().

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses

The caller will be able to perform actions based on hotkeys in the displayed
text.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
menuconfig: Extend dialog_textbox so that it can return to a scrolled position

We can now display other UI elements (menus) "on top" of a textbox and then
seemingly come back to it in the same state it was left.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
menuconfig: Add jump keys to search results

makes it possible to jump directly to the menu for a configuration entry after
having searched for it with '/'. If this menu is not currently accessible we
jump to the nearest accessible parent instead. After exiting this menu, the
user is returned to the search results where he may jump further in or
elsewhere.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
menuconfig: Do not open code textbox scroll up/down

We don't need to explicitely use ncurses' scroll(). ncurses performs
vertical-motion optimization at wrefresh() time.

Using strace I confirmed that with the following patch curses still sends only
the new line of text to the terminal when scrolling up/down one line at a
time.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>