viafb: modetable conversion

This patch converts the modetables used in viafb to
- remove the strange thing that sync_end and blanking_end contained
  the length and not the absolute value
- remove hundreds of useless defines
- use fb_videomode and not our own definition so modes defined in
  the subsystem and received via EDID are compatible with ours

As the modes are now stored in a flat structure and no longer in a
tree like thing the lookup time was increased but as it is a rare
event anyway it shouldn't matter. Otherwise the behaviour should be
the same as before.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
viafb: avoid refresh and mode lookup in set_par

As check_var already ensures that the mode is valid there is no need
to do those expensive lookups here again. The only thing that might
change is that the deprecated interface could report slightly
different refresh rates due to rounding errors.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
fbdev: sh_mobile_lcdc: Reorder code into sections

Make the driver more readable by reordering code and splitting it into
logical sections. Reorder the headers alphabetically.

No modification to the code have been performed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Mark init-only symbols with __devinit(const)

default_720p and sh_mobile_lcdc_check_interface are used at device
initialization time only. Mark them as __devinitconst and __devinit
respectively.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Move pm runtime enable to probe()

The pm_runtime_enable() and pm_runtime_resume() calls don't belong to
sh_mobile_lcdc_setup_clocks(). Move them to the probe function. Remove
the unneeded pm_runtime_resume() call.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Don't pass struct device around

Pass a pointer to a struct sh_mobile_lcdc_priv instead, which stores a
pointer to the device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Create functions to turn the display on/off

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_hdmi: Don't access LCDC channel in notifier callback

Instead of relying on info->par being a pointer to an LCDC channel, cast
the notifier block pointer to an sh_hdmi pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
sh_mobile_hdmi: Remove platform data lcd_dev field

The field is used to print debug messages only. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Add sh_mobile_lcdc_entity definition

The sh_mobile_lcdc_entity structure will be used to abstract operations
performed by transceivers (such as MIPI/DSI and HDMI).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_hdmi: Implement sh_mobile_lcdc_entity interface

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mipi_dsi: Implement sh_mobile_lcdc_entity interface

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Handle HDMI/MIPI transmitter device directly

Pass a pointer to the transmitter device through platform data, retrieve
the corresponding sh_mobile_lcdc_entity structure in the probe method
and call the transmitter display_on/off methods directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
arm: mach-shmobile: Add LCDC tx_dev field to platform data

Make sure the transmitter devices get registered before the associated
LCDC devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mipi_dsi: Don't hook up into board_cfg display operations

The display_on/off operations are now accessed through the
sh_mobile_lcdc_entity operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_hdmi: Don't hook up into board_cfg display operations

The display_on/off operations are now accessed through the
sh_mobile_lcdc_entity operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
arm: mach-shmobile: Don't initialize the hdmi_info lcd_chan field

The field is unused and will be removed. Don't initialize it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_hdmi: Remove sh_mobile_hdmi_info lcd_chan field

The field is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Remove board configuration owner field

The field is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
fbdev: sh_mobile_lcdc: Remove board configuration board_data field

The field is unused, remove it. Update board code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>