mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
Merge omapdss header refactoring
Merge omapdss public header refactoring, which separates the public header into omapdrm and omapfb parts.
This commit is contained in:
commit
a1dec226a6
@ -39,7 +39,7 @@
|
||||
#include "gpmc.h"
|
||||
#include "gpmc-smsc911x.h"
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "board-flash.h"
|
||||
@ -47,6 +47,7 @@
|
||||
#include "hsmmc.h"
|
||||
#include "control.h"
|
||||
#include "common-board-devices.h"
|
||||
#include "display.h"
|
||||
|
||||
#define LDP_SMSC911X_CS 1
|
||||
#define LDP_SMSC911X_GPIO 152
|
||||
|
@ -15,13 +15,14 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "board-rx51.h"
|
||||
#include "display.h"
|
||||
|
||||
#include "mux.h"
|
||||
|
||||
@ -32,7 +33,6 @@
|
||||
static struct connector_atv_platform_data rx51_tv_pdata = {
|
||||
.name = "tv",
|
||||
.source = "venc.0",
|
||||
.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
|
||||
.invert_polarity = false,
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
#include "omap_hwmod.h"
|
||||
#include "omap_device.h"
|
||||
#include "omap-pm.h"
|
||||
|
@ -33,4 +33,9 @@ int omap_init_vout(void);
|
||||
|
||||
struct device_node * __init omapdss_find_dss_of_node(void);
|
||||
|
||||
struct omap_dss_board_info;
|
||||
|
||||
/* Init with the board info */
|
||||
int omap_display_init(struct omap_dss_board_info *board_data);
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "soc.h"
|
||||
|
@ -14,9 +14,10 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
struct omap_dss_device *in;
|
||||
@ -25,7 +26,6 @@ struct panel_drv_data {
|
||||
|
||||
struct omap_video_timings timings;
|
||||
|
||||
enum omap_dss_venc_type connector_type;
|
||||
bool invert_polarity;
|
||||
};
|
||||
|
||||
@ -45,10 +45,6 @@ static const struct omap_video_timings tvc_pal_timings = {
|
||||
|
||||
static const struct of_device_id tvc_of_match[];
|
||||
|
||||
struct tvc_of_data {
|
||||
enum omap_dss_venc_type connector_type;
|
||||
};
|
||||
|
||||
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
|
||||
|
||||
static int tvc_connect(struct omap_dss_device *dssdev)
|
||||
@ -99,7 +95,7 @@ static int tvc_enable(struct omap_dss_device *dssdev)
|
||||
in->ops.atv->set_timings(in, &ddata->timings);
|
||||
|
||||
if (!ddata->dev->of_node) {
|
||||
in->ops.atv->set_type(in, ddata->connector_type);
|
||||
in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE);
|
||||
|
||||
in->ops.atv->invert_vid_out_polarity(in,
|
||||
ddata->invert_polarity);
|
||||
@ -207,7 +203,6 @@ static int tvc_probe_pdata(struct platform_device *pdev)
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->connector_type = pdata->connector_type;
|
||||
ddata->invert_polarity = pdata->invert_polarity;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
|
@ -15,10 +15,10 @@
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
static const struct omap_video_timings dvic_default_timings = {
|
||||
.x_res = 640,
|
||||
.y_res = 480,
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
static const struct omap_video_timings hdmic_default_timings = {
|
||||
.x_res = 640,
|
||||
.y_res = 480,
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -17,10 +17,11 @@
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/of_display_timing.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
struct omap_dss_device *in;
|
||||
|
@ -25,10 +25,10 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
/* DSI Virtual channel. Hardcoded for now. */
|
||||
#define TCH 0
|
||||
|
||||
|
@ -17,8 +17,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
static struct omap_video_timings lb035q02_timings = {
|
||||
.x_res = 320,
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -16,7 +16,8 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -33,9 +33,10 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
#define MIPID_CMD_READ_DISP_ID 0x04
|
||||
#define MIPID_CMD_READ_RED 0x06
|
||||
#define MIPID_CMD_READ_GREEN 0x07
|
||||
|
@ -28,7 +28,8 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "../dss/omapdss.h"
|
||||
|
||||
#define TPO_R02_MODE(x) ((x) & 7)
|
||||
#define TPO_R02_MODE_800x480 7
|
||||
|
@ -35,8 +35,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
@ -196,8 +195,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
||||
core.default_display_name = def_disp_name;
|
||||
else if (pdata->default_display_name)
|
||||
core.default_display_name = pdata->default_display_name;
|
||||
else if (pdata->default_device)
|
||||
core.default_display_name = pdata->default_device->name;
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -41,8 +41,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
#include "dispc.h"
|
||||
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dispc.h"
|
||||
|
||||
static const struct dispc_coef coef3_M8[8] = {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -34,8 +34,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -42,9 +42,9 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -18,8 +18,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
struct device_node *
|
||||
|
@ -42,8 +42,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -23,8 +23,9 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/hdmi.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
/* HDMI Wrapper */
|
||||
|
@ -34,9 +34,9 @@
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <linux/of.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "hdmi4_core.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -39,9 +39,9 @@
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <linux/of.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "hdmi5_core.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "hdmi.h"
|
||||
|
||||
int hdmi_parse_lanes_of(struct platform_device *pdev, struct device_node *ep,
|
||||
|
@ -14,8 +14,8 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
||||
|
@ -18,7 +18,871 @@
|
||||
#ifndef __OMAP_DRM_DSS_H
|
||||
#define __OMAP_DRM_DSS_H
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <video/videomode.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
|
||||
#define DISPC_IRQ_FRAMEDONE (1 << 0)
|
||||
#define DISPC_IRQ_VSYNC (1 << 1)
|
||||
#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)
|
||||
#define DISPC_IRQ_EVSYNC_ODD (1 << 3)
|
||||
#define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4)
|
||||
#define DISPC_IRQ_PROG_LINE_NUM (1 << 5)
|
||||
#define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6)
|
||||
#define DISPC_IRQ_GFX_END_WIN (1 << 7)
|
||||
#define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8)
|
||||
#define DISPC_IRQ_OCP_ERR (1 << 9)
|
||||
#define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10)
|
||||
#define DISPC_IRQ_VID1_END_WIN (1 << 11)
|
||||
#define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12)
|
||||
#define DISPC_IRQ_VID2_END_WIN (1 << 13)
|
||||
#define DISPC_IRQ_SYNC_LOST (1 << 14)
|
||||
#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15)
|
||||
#define DISPC_IRQ_WAKEUP (1 << 16)
|
||||
#define DISPC_IRQ_SYNC_LOST2 (1 << 17)
|
||||
#define DISPC_IRQ_VSYNC2 (1 << 18)
|
||||
#define DISPC_IRQ_VID3_END_WIN (1 << 19)
|
||||
#define DISPC_IRQ_VID3_FIFO_UNDERFLOW (1 << 20)
|
||||
#define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21)
|
||||
#define DISPC_IRQ_FRAMEDONE2 (1 << 22)
|
||||
#define DISPC_IRQ_FRAMEDONEWB (1 << 23)
|
||||
#define DISPC_IRQ_FRAMEDONETV (1 << 24)
|
||||
#define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25)
|
||||
#define DISPC_IRQ_WBUNCOMPLETEERROR (1 << 26)
|
||||
#define DISPC_IRQ_SYNC_LOST3 (1 << 27)
|
||||
#define DISPC_IRQ_VSYNC3 (1 << 28)
|
||||
#define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29)
|
||||
#define DISPC_IRQ_FRAMEDONE3 (1 << 30)
|
||||
|
||||
struct omap_dss_device;
|
||||
struct omap_overlay_manager;
|
||||
struct dss_lcd_mgr_config;
|
||||
struct snd_aes_iec958;
|
||||
struct snd_cea_861_aud_if;
|
||||
struct hdmi_avi_infoframe;
|
||||
|
||||
enum omap_display_type {
|
||||
OMAP_DISPLAY_TYPE_NONE = 0,
|
||||
OMAP_DISPLAY_TYPE_DPI = 1 << 0,
|
||||
OMAP_DISPLAY_TYPE_DBI = 1 << 1,
|
||||
OMAP_DISPLAY_TYPE_SDI = 1 << 2,
|
||||
OMAP_DISPLAY_TYPE_DSI = 1 << 3,
|
||||
OMAP_DISPLAY_TYPE_VENC = 1 << 4,
|
||||
OMAP_DISPLAY_TYPE_HDMI = 1 << 5,
|
||||
OMAP_DISPLAY_TYPE_DVI = 1 << 6,
|
||||
};
|
||||
|
||||
enum omap_plane {
|
||||
OMAP_DSS_GFX = 0,
|
||||
OMAP_DSS_VIDEO1 = 1,
|
||||
OMAP_DSS_VIDEO2 = 2,
|
||||
OMAP_DSS_VIDEO3 = 3,
|
||||
OMAP_DSS_WB = 4,
|
||||
};
|
||||
|
||||
enum omap_channel {
|
||||
OMAP_DSS_CHANNEL_LCD = 0,
|
||||
OMAP_DSS_CHANNEL_DIGIT = 1,
|
||||
OMAP_DSS_CHANNEL_LCD2 = 2,
|
||||
OMAP_DSS_CHANNEL_LCD3 = 3,
|
||||
OMAP_DSS_CHANNEL_WB = 4,
|
||||
};
|
||||
|
||||
enum omap_color_mode {
|
||||
OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */
|
||||
OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */
|
||||
OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */
|
||||
OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */
|
||||
OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */
|
||||
OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
|
||||
OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
|
||||
OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */
|
||||
OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */
|
||||
OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
|
||||
OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
|
||||
OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
|
||||
OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
|
||||
OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
|
||||
OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */
|
||||
OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */
|
||||
OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */
|
||||
OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */
|
||||
OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */
|
||||
};
|
||||
|
||||
enum omap_dss_load_mode {
|
||||
OMAP_DSS_LOAD_CLUT_AND_FRAME = 0,
|
||||
OMAP_DSS_LOAD_CLUT_ONLY = 1,
|
||||
OMAP_DSS_LOAD_FRAME_ONLY = 2,
|
||||
OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3,
|
||||
};
|
||||
|
||||
enum omap_dss_trans_key_type {
|
||||
OMAP_DSS_COLOR_KEY_GFX_DST = 0,
|
||||
OMAP_DSS_COLOR_KEY_VID_SRC = 1,
|
||||
};
|
||||
|
||||
enum omap_rfbi_te_mode {
|
||||
OMAP_DSS_RFBI_TE_MODE_1 = 1,
|
||||
OMAP_DSS_RFBI_TE_MODE_2 = 2,
|
||||
};
|
||||
|
||||
enum omap_dss_signal_level {
|
||||
OMAPDSS_SIG_ACTIVE_LOW,
|
||||
OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
};
|
||||
|
||||
enum omap_dss_signal_edge {
|
||||
OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
};
|
||||
|
||||
enum omap_dss_venc_type {
|
||||
OMAP_DSS_VENC_TYPE_COMPOSITE,
|
||||
OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
};
|
||||
|
||||
enum omap_dss_dsi_pixel_format {
|
||||
OMAP_DSS_DSI_FMT_RGB888,
|
||||
OMAP_DSS_DSI_FMT_RGB666,
|
||||
OMAP_DSS_DSI_FMT_RGB666_PACKED,
|
||||
OMAP_DSS_DSI_FMT_RGB565,
|
||||
};
|
||||
|
||||
enum omap_dss_dsi_mode {
|
||||
OMAP_DSS_DSI_CMD_MODE = 0,
|
||||
OMAP_DSS_DSI_VIDEO_MODE,
|
||||
};
|
||||
|
||||
enum omap_display_caps {
|
||||
OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0,
|
||||
OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1,
|
||||
};
|
||||
|
||||
enum omap_dss_display_state {
|
||||
OMAP_DSS_DISPLAY_DISABLED = 0,
|
||||
OMAP_DSS_DISPLAY_ACTIVE,
|
||||
};
|
||||
|
||||
enum omap_dss_rotation_type {
|
||||
OMAP_DSS_ROT_DMA = 1 << 0,
|
||||
OMAP_DSS_ROT_VRFB = 1 << 1,
|
||||
OMAP_DSS_ROT_TILER = 1 << 2,
|
||||
};
|
||||
|
||||
/* clockwise rotation angle */
|
||||
enum omap_dss_rotation_angle {
|
||||
OMAP_DSS_ROT_0 = 0,
|
||||
OMAP_DSS_ROT_90 = 1,
|
||||
OMAP_DSS_ROT_180 = 2,
|
||||
OMAP_DSS_ROT_270 = 3,
|
||||
};
|
||||
|
||||
enum omap_overlay_caps {
|
||||
OMAP_DSS_OVL_CAP_SCALE = 1 << 0,
|
||||
OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1,
|
||||
OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2,
|
||||
OMAP_DSS_OVL_CAP_ZORDER = 1 << 3,
|
||||
OMAP_DSS_OVL_CAP_POS = 1 << 4,
|
||||
OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5,
|
||||
};
|
||||
|
||||
enum omap_overlay_manager_caps {
|
||||
OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */
|
||||
};
|
||||
|
||||
enum omap_dss_clk_source {
|
||||
OMAP_DSS_CLK_SRC_FCK = 0, /* OMAP2/3: DSS1_ALWON_FCLK
|
||||
* OMAP4: DSS_FCLK */
|
||||
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK
|
||||
* OMAP4: PLL1_CLK1 */
|
||||
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK
|
||||
* OMAP4: PLL1_CLK2 */
|
||||
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, /* OMAP4: PLL2_CLK1 */
|
||||
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, /* OMAP4: PLL2_CLK2 */
|
||||
};
|
||||
|
||||
enum omap_hdmi_flags {
|
||||
OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0,
|
||||
};
|
||||
|
||||
enum omap_dss_output_id {
|
||||
OMAP_DSS_OUTPUT_DPI = 1 << 0,
|
||||
OMAP_DSS_OUTPUT_DBI = 1 << 1,
|
||||
OMAP_DSS_OUTPUT_SDI = 1 << 2,
|
||||
OMAP_DSS_OUTPUT_DSI1 = 1 << 3,
|
||||
OMAP_DSS_OUTPUT_DSI2 = 1 << 4,
|
||||
OMAP_DSS_OUTPUT_VENC = 1 << 5,
|
||||
OMAP_DSS_OUTPUT_HDMI = 1 << 6,
|
||||
};
|
||||
|
||||
/* RFBI */
|
||||
|
||||
struct rfbi_timings {
|
||||
int cs_on_time;
|
||||
int cs_off_time;
|
||||
int we_on_time;
|
||||
int we_off_time;
|
||||
int re_on_time;
|
||||
int re_off_time;
|
||||
int we_cycle_time;
|
||||
int re_cycle_time;
|
||||
int cs_pulse_width;
|
||||
int access_time;
|
||||
|
||||
int clk_div;
|
||||
|
||||
u32 tim[5]; /* set by rfbi_convert_timings() */
|
||||
|
||||
int converted;
|
||||
};
|
||||
|
||||
/* DSI */
|
||||
|
||||
enum omap_dss_dsi_trans_mode {
|
||||
/* Sync Pulses: both sync start and end packets sent */
|
||||
OMAP_DSS_DSI_PULSE_MODE,
|
||||
/* Sync Events: only sync start packets sent */
|
||||
OMAP_DSS_DSI_EVENT_MODE,
|
||||
/* Burst: only sync start packets sent, pixels are time compressed */
|
||||
OMAP_DSS_DSI_BURST_MODE,
|
||||
};
|
||||
|
||||
struct omap_dss_dsi_videomode_timings {
|
||||
unsigned long hsclk;
|
||||
|
||||
unsigned ndl;
|
||||
unsigned bitspp;
|
||||
|
||||
/* pixels */
|
||||
u16 hact;
|
||||
/* lines */
|
||||
u16 vact;
|
||||
|
||||
/* DSI video mode blanking data */
|
||||
/* Unit: byte clock cycles */
|
||||
u16 hss;
|
||||
u16 hsa;
|
||||
u16 hse;
|
||||
u16 hfp;
|
||||
u16 hbp;
|
||||
/* Unit: line clocks */
|
||||
u16 vsa;
|
||||
u16 vfp;
|
||||
u16 vbp;
|
||||
|
||||
/* DSI blanking modes */
|
||||
int blanking_mode;
|
||||
int hsa_blanking_mode;
|
||||
int hbp_blanking_mode;
|
||||
int hfp_blanking_mode;
|
||||
|
||||
enum omap_dss_dsi_trans_mode trans_mode;
|
||||
|
||||
bool ddr_clk_always_on;
|
||||
int window_sync;
|
||||
};
|
||||
|
||||
struct omap_dss_dsi_config {
|
||||
enum omap_dss_dsi_mode mode;
|
||||
enum omap_dss_dsi_pixel_format pixel_format;
|
||||
const struct omap_video_timings *timings;
|
||||
|
||||
unsigned long hs_clk_min, hs_clk_max;
|
||||
unsigned long lp_clk_min, lp_clk_max;
|
||||
|
||||
bool ddr_clk_always_on;
|
||||
enum omap_dss_dsi_trans_mode trans_mode;
|
||||
};
|
||||
|
||||
struct omap_video_timings {
|
||||
/* Unit: pixels */
|
||||
u16 x_res;
|
||||
/* Unit: pixels */
|
||||
u16 y_res;
|
||||
/* Unit: Hz */
|
||||
u32 pixelclock;
|
||||
/* Unit: pixel clocks */
|
||||
u16 hsw; /* Horizontal synchronization pulse width */
|
||||
/* Unit: pixel clocks */
|
||||
u16 hfp; /* Horizontal front porch */
|
||||
/* Unit: pixel clocks */
|
||||
u16 hbp; /* Horizontal back porch */
|
||||
/* Unit: line clocks */
|
||||
u16 vsw; /* Vertical synchronization pulse width */
|
||||
/* Unit: line clocks */
|
||||
u16 vfp; /* Vertical front porch */
|
||||
/* Unit: line clocks */
|
||||
u16 vbp; /* Vertical back porch */
|
||||
|
||||
/* Vsync logic level */
|
||||
enum omap_dss_signal_level vsync_level;
|
||||
/* Hsync logic level */
|
||||
enum omap_dss_signal_level hsync_level;
|
||||
/* Interlaced or Progressive timings */
|
||||
bool interlace;
|
||||
/* Pixel clock edge to drive LCD data */
|
||||
enum omap_dss_signal_edge data_pclk_edge;
|
||||
/* Data enable logic level */
|
||||
enum omap_dss_signal_level de_level;
|
||||
/* Pixel clock edges to drive HSYNC and VSYNC signals */
|
||||
enum omap_dss_signal_edge sync_pclk_edge;
|
||||
|
||||
bool double_pixel;
|
||||
};
|
||||
|
||||
/* Hardcoded timings for tv modes. Venc only uses these to
|
||||
* identify the mode, and does not actually use the configs
|
||||
* itself. However, the configs should be something that
|
||||
* a normal monitor can also show */
|
||||
extern const struct omap_video_timings omap_dss_pal_timings;
|
||||
extern const struct omap_video_timings omap_dss_ntsc_timings;
|
||||
|
||||
struct omap_dss_cpr_coefs {
|
||||
s16 rr, rg, rb;
|
||||
s16 gr, gg, gb;
|
||||
s16 br, bg, bb;
|
||||
};
|
||||
|
||||
struct omap_overlay_info {
|
||||
dma_addr_t paddr;
|
||||
dma_addr_t p_uv_addr; /* for NV12 format */
|
||||
u16 screen_width;
|
||||
u16 width;
|
||||
u16 height;
|
||||
enum omap_color_mode color_mode;
|
||||
u8 rotation;
|
||||
enum omap_dss_rotation_type rotation_type;
|
||||
bool mirror;
|
||||
|
||||
u16 pos_x;
|
||||
u16 pos_y;
|
||||
u16 out_width; /* if 0, out_width == width */
|
||||
u16 out_height; /* if 0, out_height == height */
|
||||
u8 global_alpha;
|
||||
u8 pre_mult_alpha;
|
||||
u8 zorder;
|
||||
};
|
||||
|
||||
struct omap_overlay {
|
||||
struct kobject kobj;
|
||||
struct list_head list;
|
||||
|
||||
/* static fields */
|
||||
const char *name;
|
||||
enum omap_plane id;
|
||||
enum omap_color_mode supported_modes;
|
||||
enum omap_overlay_caps caps;
|
||||
|
||||
/* dynamic fields */
|
||||
struct omap_overlay_manager *manager;
|
||||
|
||||
/*
|
||||
* The following functions do not block:
|
||||
*
|
||||
* is_enabled
|
||||
* set_overlay_info
|
||||
* get_overlay_info
|
||||
*
|
||||
* The rest of the functions may block and cannot be called from
|
||||
* interrupt context
|
||||
*/
|
||||
|
||||
int (*enable)(struct omap_overlay *ovl);
|
||||
int (*disable)(struct omap_overlay *ovl);
|
||||
bool (*is_enabled)(struct omap_overlay *ovl);
|
||||
|
||||
int (*set_manager)(struct omap_overlay *ovl,
|
||||
struct omap_overlay_manager *mgr);
|
||||
int (*unset_manager)(struct omap_overlay *ovl);
|
||||
|
||||
int (*set_overlay_info)(struct omap_overlay *ovl,
|
||||
struct omap_overlay_info *info);
|
||||
void (*get_overlay_info)(struct omap_overlay *ovl,
|
||||
struct omap_overlay_info *info);
|
||||
|
||||
int (*wait_for_go)(struct omap_overlay *ovl);
|
||||
|
||||
struct omap_dss_device *(*get_device)(struct omap_overlay *ovl);
|
||||
};
|
||||
|
||||
struct omap_overlay_manager_info {
|
||||
u32 default_color;
|
||||
|
||||
enum omap_dss_trans_key_type trans_key_type;
|
||||
u32 trans_key;
|
||||
bool trans_enabled;
|
||||
|
||||
bool partial_alpha_enabled;
|
||||
|
||||
bool cpr_enable;
|
||||
struct omap_dss_cpr_coefs cpr_coefs;
|
||||
};
|
||||
|
||||
struct omap_overlay_manager {
|
||||
struct kobject kobj;
|
||||
|
||||
/* static fields */
|
||||
const char *name;
|
||||
enum omap_channel id;
|
||||
enum omap_overlay_manager_caps caps;
|
||||
struct list_head overlays;
|
||||
enum omap_display_type supported_displays;
|
||||
enum omap_dss_output_id supported_outputs;
|
||||
|
||||
/* dynamic fields */
|
||||
struct omap_dss_device *output;
|
||||
|
||||
/*
|
||||
* The following functions do not block:
|
||||
*
|
||||
* set_manager_info
|
||||
* get_manager_info
|
||||
* apply
|
||||
*
|
||||
* The rest of the functions may block and cannot be called from
|
||||
* interrupt context
|
||||
*/
|
||||
|
||||
int (*set_output)(struct omap_overlay_manager *mgr,
|
||||
struct omap_dss_device *output);
|
||||
int (*unset_output)(struct omap_overlay_manager *mgr);
|
||||
|
||||
int (*set_manager_info)(struct omap_overlay_manager *mgr,
|
||||
struct omap_overlay_manager_info *info);
|
||||
void (*get_manager_info)(struct omap_overlay_manager *mgr,
|
||||
struct omap_overlay_manager_info *info);
|
||||
|
||||
int (*apply)(struct omap_overlay_manager *mgr);
|
||||
int (*wait_for_go)(struct omap_overlay_manager *mgr);
|
||||
int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
|
||||
|
||||
struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr);
|
||||
};
|
||||
|
||||
/* 22 pins means 1 clk lane and 10 data lanes */
|
||||
#define OMAP_DSS_MAX_DSI_PINS 22
|
||||
|
||||
struct omap_dsi_pin_config {
|
||||
int num_pins;
|
||||
/*
|
||||
* pin numbers in the following order:
|
||||
* clk+, clk-
|
||||
* data1+, data1-
|
||||
* data2+, data2-
|
||||
* ...
|
||||
*/
|
||||
int pins[OMAP_DSS_MAX_DSI_PINS];
|
||||
};
|
||||
|
||||
struct omap_dss_writeback_info {
|
||||
u32 paddr;
|
||||
u32 p_uv_addr;
|
||||
u16 buf_width;
|
||||
u16 width;
|
||||
u16 height;
|
||||
enum omap_color_mode color_mode;
|
||||
u8 rotation;
|
||||
enum omap_dss_rotation_type rotation_type;
|
||||
bool mirror;
|
||||
u8 pre_mult_alpha;
|
||||
};
|
||||
|
||||
struct omapdss_dpi_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines);
|
||||
};
|
||||
|
||||
struct omapdss_sdi_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs);
|
||||
};
|
||||
|
||||
struct omapdss_dvi_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
};
|
||||
|
||||
struct omapdss_atv_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
void (*set_type)(struct omap_dss_device *dssdev,
|
||||
enum omap_dss_venc_type type);
|
||||
void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev,
|
||||
bool invert_polarity);
|
||||
|
||||
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
|
||||
u32 (*get_wss)(struct omap_dss_device *dssdev);
|
||||
};
|
||||
|
||||
struct omapdss_hdmi_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
|
||||
bool (*detect)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
|
||||
int (*set_infoframe)(struct omap_dss_device *dssdev,
|
||||
const struct hdmi_avi_infoframe *avi);
|
||||
};
|
||||
|
||||
struct omapdss_dsi_ops {
|
||||
int (*connect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev,
|
||||
struct omap_dss_device *dst);
|
||||
|
||||
int (*enable)(struct omap_dss_device *dssdev);
|
||||
void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
|
||||
bool enter_ulps);
|
||||
|
||||
/* bus configuration */
|
||||
int (*set_config)(struct omap_dss_device *dssdev,
|
||||
const struct omap_dss_dsi_config *cfg);
|
||||
int (*configure_pins)(struct omap_dss_device *dssdev,
|
||||
const struct omap_dsi_pin_config *pin_cfg);
|
||||
|
||||
void (*enable_hs)(struct omap_dss_device *dssdev, int channel,
|
||||
bool enable);
|
||||
int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
|
||||
|
||||
int (*update)(struct omap_dss_device *dssdev, int channel,
|
||||
void (*callback)(int, void *), void *data);
|
||||
|
||||
void (*bus_lock)(struct omap_dss_device *dssdev);
|
||||
void (*bus_unlock)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*enable_video_output)(struct omap_dss_device *dssdev, int channel);
|
||||
void (*disable_video_output)(struct omap_dss_device *dssdev,
|
||||
int channel);
|
||||
|
||||
int (*request_vc)(struct omap_dss_device *dssdev, int *channel);
|
||||
int (*set_vc_id)(struct omap_dss_device *dssdev, int channel,
|
||||
int vc_id);
|
||||
void (*release_vc)(struct omap_dss_device *dssdev, int channel);
|
||||
|
||||
/* data transfer */
|
||||
int (*dcs_write)(struct omap_dss_device *dssdev, int channel,
|
||||
u8 *data, int len);
|
||||
int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel,
|
||||
u8 *data, int len);
|
||||
int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd,
|
||||
u8 *data, int len);
|
||||
|
||||
int (*gen_write)(struct omap_dss_device *dssdev, int channel,
|
||||
u8 *data, int len);
|
||||
int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel,
|
||||
u8 *data, int len);
|
||||
int (*gen_read)(struct omap_dss_device *dssdev, int channel,
|
||||
u8 *reqdata, int reqlen,
|
||||
u8 *data, int len);
|
||||
|
||||
int (*bta_sync)(struct omap_dss_device *dssdev, int channel);
|
||||
|
||||
int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev,
|
||||
int channel, u16 plen);
|
||||
};
|
||||
|
||||
struct omap_dss_device {
|
||||
struct kobject kobj;
|
||||
struct device *dev;
|
||||
|
||||
struct module *owner;
|
||||
|
||||
struct list_head panel_list;
|
||||
|
||||
/* alias in the form of "display%d" */
|
||||
char alias[16];
|
||||
|
||||
enum omap_display_type type;
|
||||
enum omap_display_type output_type;
|
||||
|
||||
union {
|
||||
struct {
|
||||
u8 data_lines;
|
||||
} dpi;
|
||||
|
||||
struct {
|
||||
u8 channel;
|
||||
u8 data_lines;
|
||||
} rfbi;
|
||||
|
||||
struct {
|
||||
u8 datapairs;
|
||||
} sdi;
|
||||
|
||||
struct {
|
||||
int module;
|
||||
} dsi;
|
||||
|
||||
struct {
|
||||
enum omap_dss_venc_type type;
|
||||
bool invert_polarity;
|
||||
} venc;
|
||||
} phy;
|
||||
|
||||
struct {
|
||||
struct omap_video_timings timings;
|
||||
|
||||
enum omap_dss_dsi_pixel_format dsi_pix_fmt;
|
||||
enum omap_dss_dsi_mode dsi_mode;
|
||||
} panel;
|
||||
|
||||
struct {
|
||||
u8 pixel_size;
|
||||
struct rfbi_timings rfbi_timings;
|
||||
} ctrl;
|
||||
|
||||
const char *name;
|
||||
|
||||
/* used to match device to driver */
|
||||
const char *driver_name;
|
||||
|
||||
void *data;
|
||||
|
||||
struct omap_dss_driver *driver;
|
||||
|
||||
union {
|
||||
const struct omapdss_dpi_ops *dpi;
|
||||
const struct omapdss_sdi_ops *sdi;
|
||||
const struct omapdss_dvi_ops *dvi;
|
||||
const struct omapdss_hdmi_ops *hdmi;
|
||||
const struct omapdss_atv_ops *atv;
|
||||
const struct omapdss_dsi_ops *dsi;
|
||||
} ops;
|
||||
|
||||
/* helper variable for driver suspend/resume */
|
||||
bool activate_after_resume;
|
||||
|
||||
enum omap_display_caps caps;
|
||||
|
||||
struct omap_dss_device *src;
|
||||
|
||||
enum omap_dss_display_state state;
|
||||
|
||||
/* OMAP DSS output specific fields */
|
||||
|
||||
struct list_head list;
|
||||
|
||||
/* DISPC channel for this output */
|
||||
enum omap_channel dispc_channel;
|
||||
bool dispc_channel_connected;
|
||||
|
||||
/* output instance */
|
||||
enum omap_dss_output_id id;
|
||||
|
||||
/* the port number in the DT node */
|
||||
int port_num;
|
||||
|
||||
/* dynamic fields */
|
||||
struct omap_overlay_manager *manager;
|
||||
|
||||
struct omap_dss_device *dst;
|
||||
};
|
||||
|
||||
struct omap_dss_driver {
|
||||
int (*probe)(struct omap_dss_device *);
|
||||
void (*remove)(struct omap_dss_device *);
|
||||
|
||||
int (*connect)(struct omap_dss_device *dssdev);
|
||||
void (*disconnect)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*enable)(struct omap_dss_device *display);
|
||||
void (*disable)(struct omap_dss_device *display);
|
||||
int (*run_test)(struct omap_dss_device *display, int test);
|
||||
|
||||
int (*update)(struct omap_dss_device *dssdev,
|
||||
u16 x, u16 y, u16 w, u16 h);
|
||||
int (*sync)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
|
||||
int (*get_te)(struct omap_dss_device *dssdev);
|
||||
|
||||
u8 (*get_rotate)(struct omap_dss_device *dssdev);
|
||||
int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate);
|
||||
|
||||
bool (*get_mirror)(struct omap_dss_device *dssdev);
|
||||
int (*set_mirror)(struct omap_dss_device *dssdev, bool enable);
|
||||
|
||||
int (*memory_read)(struct omap_dss_device *dssdev,
|
||||
void *buf, size_t size,
|
||||
u16 x, u16 y, u16 w, u16 h);
|
||||
|
||||
void (*get_resolution)(struct omap_dss_device *dssdev,
|
||||
u16 *xres, u16 *yres);
|
||||
void (*get_dimensions)(struct omap_dss_device *dssdev,
|
||||
u32 *width, u32 *height);
|
||||
int (*get_recommended_bpp)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*check_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*set_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
void (*get_timings)(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
|
||||
u32 (*get_wss)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
|
||||
bool (*detect)(struct omap_dss_device *dssdev);
|
||||
|
||||
int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
|
||||
int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev,
|
||||
const struct hdmi_avi_infoframe *avi);
|
||||
};
|
||||
|
||||
enum omapdss_version omapdss_get_version(void);
|
||||
bool omapdss_is_initialized(void);
|
||||
|
||||
int omap_dss_register_driver(struct omap_dss_driver *);
|
||||
void omap_dss_unregister_driver(struct omap_dss_driver *);
|
||||
|
||||
int omapdss_register_display(struct omap_dss_device *dssdev);
|
||||
void omapdss_unregister_display(struct omap_dss_device *dssdev);
|
||||
|
||||
struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev);
|
||||
void omap_dss_put_device(struct omap_dss_device *dssdev);
|
||||
#define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL)
|
||||
struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from);
|
||||
struct omap_dss_device *omap_dss_find_device(void *data,
|
||||
int (*match)(struct omap_dss_device *dssdev, void *data));
|
||||
const char *omapdss_get_default_display_name(void);
|
||||
|
||||
void videomode_to_omap_video_timings(const struct videomode *vm,
|
||||
struct omap_video_timings *ovt);
|
||||
void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
|
||||
struct videomode *vm);
|
||||
|
||||
int dss_feat_get_num_mgrs(void);
|
||||
int dss_feat_get_num_ovls(void);
|
||||
enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
|
||||
|
||||
|
||||
|
||||
int omap_dss_get_num_overlay_managers(void);
|
||||
struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
|
||||
|
||||
int omap_dss_get_num_overlays(void);
|
||||
struct omap_overlay *omap_dss_get_overlay(int num);
|
||||
|
||||
int omapdss_register_output(struct omap_dss_device *output);
|
||||
void omapdss_unregister_output(struct omap_dss_device *output);
|
||||
struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
|
||||
struct omap_dss_device *omap_dss_find_output(const char *name);
|
||||
struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port);
|
||||
int omapdss_output_set_device(struct omap_dss_device *out,
|
||||
struct omap_dss_device *dssdev);
|
||||
int omapdss_output_unset_device(struct omap_dss_device *out);
|
||||
|
||||
struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev);
|
||||
struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev);
|
||||
|
||||
void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
|
||||
u16 *xres, u16 *yres);
|
||||
int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
|
||||
void omapdss_default_get_timings(struct omap_dss_device *dssdev,
|
||||
struct omap_video_timings *timings);
|
||||
|
||||
typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
|
||||
int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
|
||||
int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
|
||||
|
||||
int omapdss_compat_init(void);
|
||||
void omapdss_compat_uninit(void);
|
||||
|
||||
static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return dssdev->src;
|
||||
}
|
||||
|
||||
static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
|
||||
}
|
||||
|
||||
struct device_node *
|
||||
omapdss_of_get_next_port(const struct device_node *parent,
|
||||
struct device_node *prev);
|
||||
|
||||
struct device_node *
|
||||
omapdss_of_get_next_endpoint(const struct device_node *parent,
|
||||
struct device_node *prev);
|
||||
|
||||
struct device_node *
|
||||
omapdss_of_get_first_endpoint(const struct device_node *parent);
|
||||
|
||||
struct omap_dss_device *
|
||||
omapdss_of_find_source_for_first_ep(struct device_node *node);
|
||||
|
||||
u32 dispc_read_irqstatus(void);
|
||||
void dispc_clear_irqstatus(u32 mask);
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
static LIST_HEAD(output_list);
|
||||
|
@ -22,8 +22,7 @@
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
#define PLL_CONTROL 0x0000
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
struct rfbi_reg { u16 idx; };
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
|
||||
static struct {
|
||||
|
@ -37,8 +37,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -17,8 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include "omapdss.h"
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <linux/platform_data/omap_drm.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/wait.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_crtc_helper.h>
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#include <video/omapvrfb.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "omap_voutlib.h"
|
||||
#include "omap_voutdef.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#ifndef OMAP_VOUTDEF_H
|
||||
#define OMAP_VOUTDEF_H
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#define YUYV_BPP 2
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "omap_voutlib.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
@ -25,7 +25,6 @@ struct panel_drv_data {
|
||||
|
||||
struct omap_video_timings timings;
|
||||
|
||||
enum omap_dss_venc_type connector_type;
|
||||
bool invert_polarity;
|
||||
};
|
||||
|
||||
@ -45,10 +44,6 @@ static const struct omap_video_timings tvc_pal_timings = {
|
||||
|
||||
static const struct of_device_id tvc_of_match[];
|
||||
|
||||
struct tvc_of_data {
|
||||
enum omap_dss_venc_type connector_type;
|
||||
};
|
||||
|
||||
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
|
||||
|
||||
static int tvc_connect(struct omap_dss_device *dssdev)
|
||||
@ -99,7 +94,7 @@ static int tvc_enable(struct omap_dss_device *dssdev)
|
||||
in->ops.atv->set_timings(in, &ddata->timings);
|
||||
|
||||
if (!ddata->dev->of_node) {
|
||||
in->ops.atv->set_type(in, ddata->connector_type);
|
||||
in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE);
|
||||
|
||||
in->ops.atv->invert_vid_out_polarity(in,
|
||||
ddata->invert_polarity);
|
||||
@ -207,7 +202,6 @@ static int tvc_probe_pdata(struct platform_device *pdev)
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->connector_type = pdata->connector_type;
|
||||
ddata->invert_polarity = pdata->invert_polarity;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
|
@ -16,8 +16,7 @@
|
||||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static const struct omap_video_timings dvic_default_timings = {
|
||||
.x_res = 640,
|
||||
@ -236,46 +235,6 @@ static struct omap_dss_driver dvic_driver = {
|
||||
.detect = dvic_detect,
|
||||
};
|
||||
|
||||
static int dvic_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct connector_dvi_platform_data *pdata;
|
||||
struct omap_dss_device *in, *dssdev;
|
||||
int i2c_bus_num;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
i2c_bus_num = pdata->i2c_bus_num;
|
||||
|
||||
if (i2c_bus_num != -1) {
|
||||
struct i2c_adapter *adapter;
|
||||
|
||||
adapter = i2c_get_adapter(i2c_bus_num);
|
||||
if (!adapter) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to get I2C adapter, bus %d\n",
|
||||
i2c_bus_num);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->i2c_adapter = adapter;
|
||||
}
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
i2c_put_adapter(ddata->i2c_adapter);
|
||||
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dvic_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
@ -313,23 +272,18 @@ static int dvic_probe(struct platform_device *pdev)
|
||||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = dvic_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = dvic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = dvic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->timings = dvic_default_timings;
|
||||
|
||||
|
@ -17,8 +17,7 @@
|
||||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static const struct omap_video_timings hdmic_default_timings = {
|
||||
.x_res = 640,
|
||||
@ -206,30 +205,6 @@ static struct omap_dss_driver hdmic_driver = {
|
||||
.set_hdmi_infoframe = hdmic_set_infoframe,
|
||||
};
|
||||
|
||||
static int hdmic_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct connector_hdmi_platform_data *pdata;
|
||||
struct omap_dss_device *in, *dssdev;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
ddata->hpd_gpio = -ENODEV;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hdmic_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
@ -261,6 +236,9 @@ static int hdmic_probe(struct platform_device *pdev)
|
||||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
@ -268,17 +246,9 @@ static int hdmic_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
ddata->dev = &pdev->dev;
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = hdmic_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = hdmic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = hdmic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->hpd_gpio)) {
|
||||
r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
@ -166,32 +165,6 @@ static const struct omapdss_dvi_ops tfp410_dvi_ops = {
|
||||
.get_timings = tfp410_get_timings,
|
||||
};
|
||||
|
||||
static int tfp410_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct encoder_tfp410_platform_data *pdata;
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
ddata->pd_gpio = pdata->power_down_gpio;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tfp410_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
@ -225,23 +198,18 @@ static int tfp410_probe(struct platform_device *pdev)
|
||||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = tfp410_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = tfp410_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = tfp410_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->pd_gpio)) {
|
||||
r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio,
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/of_display_timing.h>
|
||||
|
||||
|
@ -25,8 +25,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
/* DSI Virtual channel. Hardcoded for now. */
|
||||
@ -1127,40 +1126,6 @@ static struct omap_dss_driver dsicm_ops = {
|
||||
.memory_read = dsicm_memory_read,
|
||||
};
|
||||
|
||||
static int dsicm_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
const struct panel_dsicm_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->reset_gpio = pdata->reset_gpio;
|
||||
|
||||
if (pdata->use_ext_te)
|
||||
ddata->ext_te_gpio = pdata->ext_te_gpio;
|
||||
else
|
||||
ddata->ext_te_gpio = -1;
|
||||
|
||||
ddata->ulps_timeout = pdata->ulps_timeout;
|
||||
|
||||
ddata->use_dsi_backlight = pdata->use_dsi_backlight;
|
||||
|
||||
ddata->pin_config = pdata->pin_config;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dsicm_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
@ -1207,6 +1172,9 @@ static int dsicm_probe(struct platform_device *pdev)
|
||||
|
||||
dev_dbg(dev, "probe\n");
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
@ -1214,17 +1182,9 @@ static int dsicm_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
ddata->pdev = pdev;
|
||||
|
||||
if (dev_get_platdata(dev)) {
|
||||
r = dsicm_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = dsicm_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = dsicm_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->timings.x_res = 864;
|
||||
ddata->timings.y_res = 480;
|
||||
|
@ -16,8 +16,7 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static struct omap_video_timings lb035q02_timings = {
|
||||
.x_res = 320,
|
||||
@ -240,44 +239,6 @@ static struct omap_dss_driver lb035q02_ops = {
|
||||
.get_resolution = omapdss_default_get_resolution,
|
||||
};
|
||||
|
||||
static int lb035q02_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_lb035q02_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
int r;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
r = devm_gpio_request_one(&spi->dev, pdata->enable_gpio,
|
||||
GPIOF_OUT_INIT_LOW, "panel enable");
|
||||
if (r)
|
||||
goto err_gpio;
|
||||
|
||||
ddata->enable_gpio = gpio_to_desc(pdata->enable_gpio);
|
||||
|
||||
ddata->backlight_gpio = pdata->backlight_gpio;
|
||||
|
||||
return 0;
|
||||
err_gpio:
|
||||
omap_dss_put_device(ddata->in);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int lb035q02_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
@ -312,6 +273,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
|
||||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (ddata == NULL)
|
||||
return -ENOMEM;
|
||||
@ -320,17 +284,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
|
||||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = lb035q02_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = lb035q02_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = lb035q02_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->backlight_gpio)) {
|
||||
r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio,
|
||||
|
@ -18,8 +18,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
@ -233,33 +232,6 @@ static struct omap_dss_driver nec_8048_ops = {
|
||||
};
|
||||
|
||||
|
||||
static int nec_8048_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_nec_nl8048hl11_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
ddata->qvga_gpio = pdata->qvga_gpio;
|
||||
ddata->res_gpio = pdata->res_gpio;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nec_8048_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
@ -296,6 +268,9 @@ static int nec_8048_probe(struct spi_device *spi)
|
||||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->mode = SPI_MODE_0;
|
||||
spi->bits_per_word = 32;
|
||||
|
||||
@ -315,17 +290,9 @@ static int nec_8048_probe(struct spi_device *spi)
|
||||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = nec_8048_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = nec_8048_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = nec_8048_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->qvga_gpio)) {
|
||||
r = devm_gpio_request_one(&spi->dev, ddata->qvga_gpio,
|
||||
|
@ -17,8 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
@ -197,69 +196,6 @@ static struct omap_dss_driver sharp_ls_ops = {
|
||||
.get_resolution = omapdss_default_get_resolution,
|
||||
};
|
||||
|
||||
static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
|
||||
char *desc, struct gpio_desc **gpiod)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = devm_gpio_request_one(dev, gpio, flags, desc);
|
||||
if (r) {
|
||||
*gpiod = NULL;
|
||||
return r == -ENOENT ? 0 : r;
|
||||
}
|
||||
|
||||
*gpiod = gpio_to_desc(gpio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sharp_ls_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
const struct panel_sharp_ls037v7dw01_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
int r;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->mo_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd MO", &ddata->mo_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->lr_gpio, GPIOF_OUT_INIT_HIGH,
|
||||
"lcd LR", &ddata->lr_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->ud_gpio, GPIOF_OUT_INIT_HIGH,
|
||||
"lcd UD", &ddata->ud_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->resb_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd RESB", &ddata->resb_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->ini_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd INI", &ddata->ini_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sharp_ls_get_gpio_of(struct device *dev, int index, int val,
|
||||
const char *desc, struct gpio_desc **gpiod)
|
||||
{
|
||||
@ -330,23 +266,18 @@ static int sharp_ls_probe(struct platform_device *pdev)
|
||||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (ddata == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = sharp_ls_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = sharp_ls_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = sharp_ls_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->videomode = sharp_ls_timings;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#define MIPID_CMD_READ_DISP_ID 0x04
|
||||
|
@ -28,8 +28,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
@ -365,31 +364,6 @@ static struct omap_dss_driver td028ttec1_ops = {
|
||||
.check_timings = td028ttec1_panel_check_timings,
|
||||
};
|
||||
|
||||
static int td028ttec1_panel_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_tpo_td028ttec1_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int td028ttec1_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
@ -415,6 +389,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
|
||||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->bits_per_word = 9;
|
||||
spi->mode = SPI_MODE_3;
|
||||
|
||||
@ -432,17 +409,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
|
||||
|
||||
ddata->spi_dev = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = td028ttec1_panel_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = td028ttec1_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = td028ttec1_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->videomode = td028ttec1_panel_timings;
|
||||
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#define TPO_R02_MODE(x) ((x) & 7)
|
||||
#define TPO_R02_MODE_800x480 7
|
||||
@ -465,32 +464,6 @@ static struct omap_dss_driver tpo_td043_ops = {
|
||||
};
|
||||
|
||||
|
||||
static int tpo_td043_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_tpo_td043mtea1_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
ddata->nreset_gpio = pdata->nreset_gpio;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tpo_td043_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
@ -524,6 +497,9 @@ static int tpo_td043_probe(struct spi_device *spi)
|
||||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->bits_per_word = 16;
|
||||
spi->mode = SPI_MODE_0;
|
||||
|
||||
@ -541,17 +517,9 @@ static int tpo_td043_probe(struct spi_device *spi)
|
||||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = tpo_td043_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = tpo_td043_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = tpo_td043_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->mode = TPO_R02_MODE_800x480;
|
||||
memcpy(ddata->gamma, tpo_td043_def_gamma, sizeof(ddata->gamma));
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
@ -208,8 +208,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
||||
core.default_display_name = def_disp_name;
|
||||
else if (pdata->default_display_name)
|
||||
core.default_display_name = pdata->default_display_name;
|
||||
else if (pdata->default_device)
|
||||
core.default_display_name = pdata->default_device->name;
|
||||
|
||||
register_pm_notifier(&omap_dss_pm_notif_block);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dispc.h"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf)
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -23,7 +23,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/hdmi.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "hdmi4_core.h"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "hdmi5_core.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "hdmi.h"
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
struct rfbi_reg { u16 idx; };
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
static struct {
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/omapfb.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/omapfb.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <linux/dma-attrs.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
extern bool omapfb_debug;
|
||||
|
37
include/linux/platform_data/omapdss.h
Normal file
37
include/linux/platform_data/omapdss.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Texas Instruments, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __OMAPDSS_PDATA_H
|
||||
#define __OMAPDSS_PDATA_H
|
||||
|
||||
enum omapdss_version {
|
||||
OMAPDSS_VER_UNKNOWN = 0,
|
||||
OMAPDSS_VER_OMAP24xx,
|
||||
OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */
|
||||
OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */
|
||||
OMAPDSS_VER_OMAP3630,
|
||||
OMAPDSS_VER_AM35xx,
|
||||
OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */
|
||||
OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */
|
||||
OMAPDSS_VER_OMAP4, /* All other OMAP4s */
|
||||
OMAPDSS_VER_OMAP5,
|
||||
OMAPDSS_VER_AM43xx,
|
||||
OMAPDSS_VER_DRA7xx,
|
||||
};
|
||||
|
||||
/* Board specific data */
|
||||
struct omap_dss_board_info {
|
||||
const char *default_display_name;
|
||||
int (*dsi_enable_pads)(int dsi_id, unsigned int lane_mask);
|
||||
void (*dsi_disable_pads)(int dsi_id, unsigned int lane_mask);
|
||||
int (*set_min_bus_tput)(struct device *dev, unsigned long r);
|
||||
enum omapdss_version version;
|
||||
};
|
||||
|
||||
#endif /* __OMAPDSS_PDATA_H */
|
@ -16,11 +16,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#ifndef __OMAP_HDMI_AUDIO_H__
|
||||
#define __OMAP_HDMI_AUDIO_H__
|
||||
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
|
||||
struct omap_dss_audio {
|
||||
struct snd_aes_iec958 *iec;
|
||||
struct snd_cea_861_aud_if *cea;
|
||||
};
|
||||
|
||||
struct omap_hdmi_audio_ops {
|
||||
int (*audio_startup)(struct device *dev,
|
||||
void (*abort_cb)(struct device *dev));
|
||||
|
@ -27,59 +27,18 @@
|
||||
#ifndef __OMAP_PANEL_DATA_H
|
||||
#define __OMAP_PANEL_DATA_H
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/display_timing.h>
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
/**
|
||||
* encoder_tfp410 platform data
|
||||
* @name: name for this display entity
|
||||
* @power_down_gpio: gpio number for PD pin (or -1 if not available)
|
||||
* @data_lines: number of DPI datalines
|
||||
*/
|
||||
struct encoder_tfp410_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
int power_down_gpio;
|
||||
int data_lines;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* connector_dvi platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @i2c_bus_num: i2c bus number to be used for reading EDID
|
||||
*/
|
||||
struct connector_dvi_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
int i2c_bus_num;
|
||||
};
|
||||
|
||||
/**
|
||||
* connector_hdmi platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
*/
|
||||
struct connector_hdmi_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
};
|
||||
|
||||
/**
|
||||
* connector_atv platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @connector_type: composite/svideo
|
||||
* @invert_polarity: invert signal polarity
|
||||
*/
|
||||
struct connector_atv_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
enum omap_dss_venc_type connector_type;
|
||||
bool invert_polarity;
|
||||
};
|
||||
|
||||
@ -104,33 +63,6 @@ struct panel_dpi_platform_data {
|
||||
int enable_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel_dsicm platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @reset_gpio: gpio to reset the panel (or -1)
|
||||
* @use_ext_te: use external TE GPIO
|
||||
* @ext_te_gpio: external TE GPIO
|
||||
* @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
|
||||
* @use_dsi_backlight: true if panel uses DSI command to control backlight
|
||||
* @pin_config: DSI pin configuration
|
||||
*/
|
||||
struct panel_dsicm_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int reset_gpio;
|
||||
|
||||
bool use_ext_te;
|
||||
int ext_te_gpio;
|
||||
|
||||
unsigned ulps_timeout;
|
||||
|
||||
bool use_dsi_backlight;
|
||||
|
||||
struct omap_dsi_pin_config pin_config;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel_acx565akm platform data
|
||||
* @name: name for this display entity
|
||||
@ -147,93 +79,4 @@ struct panel_acx565akm_platform_data {
|
||||
int datapairs;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel_lb035q02 platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @data_lines: number of DPI datalines
|
||||
* @backlight_gpio: gpio to enable/disable the backlight (or -1)
|
||||
* @enable_gpio: gpio to enable/disable the panel (or -1)
|
||||
*/
|
||||
struct panel_lb035q02_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int data_lines;
|
||||
|
||||
int backlight_gpio;
|
||||
int enable_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel_sharp_ls037v7dw01 platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @data_lines: number of DPI datalines
|
||||
* @resb_gpio: reset signal GPIO
|
||||
* @ini_gpio: power on control GPIO
|
||||
* @mo_gpio: selection for resolution(VGA/QVGA) GPIO
|
||||
* @lr_gpio: selection for horizontal scanning direction GPIO
|
||||
* @ud_gpio: selection for vertical scanning direction GPIO
|
||||
*/
|
||||
struct panel_sharp_ls037v7dw01_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int data_lines;
|
||||
|
||||
int resb_gpio;
|
||||
int ini_gpio;
|
||||
int mo_gpio;
|
||||
int lr_gpio;
|
||||
int ud_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel-tpo-td043mtea1 platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @data_lines: number of DPI datalines
|
||||
* @nreset_gpio: reset signal
|
||||
*/
|
||||
struct panel_tpo_td043mtea1_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int data_lines;
|
||||
|
||||
int nreset_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel-nec-nl8048hl11 platform data
|
||||
* @name: name for this display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @data_lines: number of DPI datalines
|
||||
* @res_gpio: reset signal
|
||||
* @qvga_gpio: selection for resolution(QVGA/WVGA)
|
||||
*/
|
||||
struct panel_nec_nl8048hl11_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int data_lines;
|
||||
|
||||
int res_gpio;
|
||||
int qvga_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* panel-tpo-td028ttec1 platform data
|
||||
* @name: name for display entity
|
||||
* @source: name of the display entity used as a video source
|
||||
* @data_lines: number of DPI datalines
|
||||
*/
|
||||
struct panel_tpo_td028ttec1_platform_data {
|
||||
const char *name;
|
||||
const char *source;
|
||||
|
||||
int data_lines;
|
||||
};
|
||||
|
||||
#endif /* __OMAP_PANEL_DATA_H */
|
||||
|
@ -1,27 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Nokia Corporation
|
||||
* Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
|
||||
* Copyright (C) 2016 Texas Instruments, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_OMAPDSS_H
|
||||
#define __OMAP_OMAPDSS_H
|
||||
#ifndef __OMAPFB_DSS_H
|
||||
#define __OMAPFB_DSS_H
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_data/omapdss.h>
|
||||
|
||||
#include <video/videomode.h>
|
||||
|
||||
@ -167,11 +160,6 @@ enum omap_dss_display_state {
|
||||
OMAP_DSS_DISPLAY_ACTIVE,
|
||||
};
|
||||
|
||||
struct omap_dss_audio {
|
||||
struct snd_aes_iec958 *iec;
|
||||
struct snd_cea_861_aud_if *cea;
|
||||
};
|
||||
|
||||
enum omap_dss_rotation_type {
|
||||
OMAP_DSS_ROT_DMA = 1 << 0,
|
||||
OMAP_DSS_ROT_VRFB = 1 << 1,
|
||||
@ -284,36 +272,6 @@ struct omap_dss_dsi_config {
|
||||
enum omap_dss_dsi_trans_mode trans_mode;
|
||||
};
|
||||
|
||||
enum omapdss_version {
|
||||
OMAPDSS_VER_UNKNOWN = 0,
|
||||
OMAPDSS_VER_OMAP24xx,
|
||||
OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */
|
||||
OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */
|
||||
OMAPDSS_VER_OMAP3630,
|
||||
OMAPDSS_VER_AM35xx,
|
||||
OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */
|
||||
OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */
|
||||
OMAPDSS_VER_OMAP4, /* All other OMAP4s */
|
||||
OMAPDSS_VER_OMAP5,
|
||||
OMAPDSS_VER_AM43xx,
|
||||
OMAPDSS_VER_DRA7xx,
|
||||
};
|
||||
|
||||
/* Board specific data */
|
||||
struct omap_dss_board_info {
|
||||
int num_devices;
|
||||
struct omap_dss_device **devices;
|
||||
struct omap_dss_device *default_device;
|
||||
const char *default_display_name;
|
||||
int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
|
||||
void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
|
||||
int (*set_min_bus_tput)(struct device *dev, unsigned long r);
|
||||
enum omapdss_version version;
|
||||
};
|
||||
|
||||
/* Init with the board info */
|
||||
extern int omap_display_init(struct omap_dss_board_info *board_data);
|
||||
|
||||
struct omap_video_timings {
|
||||
/* Unit: pixels */
|
||||
u16 x_res;
|
||||
@ -899,4 +857,4 @@ omapdss_of_get_first_endpoint(const struct device_node *parent);
|
||||
struct omap_dss_device *
|
||||
omapdss_of_find_source_for_first_ep(struct device_node *node);
|
||||
|
||||
#endif
|
||||
#endif /* __OMAPFB_DSS_H */
|
@ -28,7 +28,6 @@
|
||||
#include <sound/asoundef.h>
|
||||
#include <sound/omap-pcm.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#define DRV_NAME "omap-hdmi-audio"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user