Commit 4520ff28 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Tomi Valkeinen

drm/omap: Replace struct omap_video_timings with videomode

omap_video_timings can be replaced with the generic videomode in omapdrm
and the omap_video_timings can be removed.

This patch will replace the omap_video_timings with videomode.
With the change we no longer need the functions to convert to/from
videomode and drm_display_mode to omap_video_timings, these can be removed
as well.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 7aa91e76
...@@ -24,12 +24,12 @@ struct panel_drv_data { ...@@ -24,12 +24,12 @@ struct panel_drv_data {
struct device *dev; struct device *dev;
struct omap_video_timings timings; struct videomode timings;
bool invert_polarity; bool invert_polarity;
}; };
static const struct omap_video_timings tvc_pal_timings = { static const struct videomode tvc_pal_timings = {
.hactive = 720, .hactive = 720,
.vactive = 574, .vactive = 574,
.pixelclock = 13500000, .pixelclock = 13500000,
...@@ -127,7 +127,7 @@ static void tvc_disable(struct omap_dss_device *dssdev) ...@@ -127,7 +127,7 @@ static void tvc_disable(struct omap_dss_device *dssdev)
} }
static void tvc_set_timings(struct omap_dss_device *dssdev, static void tvc_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -139,7 +139,7 @@ static void tvc_set_timings(struct omap_dss_device *dssdev, ...@@ -139,7 +139,7 @@ static void tvc_set_timings(struct omap_dss_device *dssdev,
} }
static void tvc_get_timings(struct omap_dss_device *dssdev, static void tvc_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -147,7 +147,7 @@ static void tvc_get_timings(struct omap_dss_device *dssdev, ...@@ -147,7 +147,7 @@ static void tvc_get_timings(struct omap_dss_device *dssdev,
} }
static int tvc_check_timings(struct omap_dss_device *dssdev, static int tvc_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "../dss/omapdss.h" #include "../dss/omapdss.h"
static const struct omap_video_timings dvic_default_timings = { static const struct videomode dvic_default_timings = {
.hactive = 640, .hactive = 640,
.vactive = 480, .vactive = 480,
...@@ -42,7 +42,7 @@ struct panel_drv_data { ...@@ -42,7 +42,7 @@ struct panel_drv_data {
struct omap_dss_device dssdev; struct omap_dss_device dssdev;
struct omap_dss_device *in; struct omap_dss_device *in;
struct omap_video_timings timings; struct videomode timings;
struct i2c_adapter *i2c_adapter; struct i2c_adapter *i2c_adapter;
}; };
...@@ -113,7 +113,7 @@ static void dvic_disable(struct omap_dss_device *dssdev) ...@@ -113,7 +113,7 @@ static void dvic_disable(struct omap_dss_device *dssdev)
} }
static void dvic_set_timings(struct omap_dss_device *dssdev, static void dvic_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -125,7 +125,7 @@ static void dvic_set_timings(struct omap_dss_device *dssdev, ...@@ -125,7 +125,7 @@ static void dvic_set_timings(struct omap_dss_device *dssdev,
} }
static void dvic_get_timings(struct omap_dss_device *dssdev, static void dvic_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -133,7 +133,7 @@ static void dvic_get_timings(struct omap_dss_device *dssdev, ...@@ -133,7 +133,7 @@ static void dvic_get_timings(struct omap_dss_device *dssdev,
} }
static int dvic_check_timings(struct omap_dss_device *dssdev, static int dvic_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "../dss/omapdss.h" #include "../dss/omapdss.h"
static const struct omap_video_timings hdmic_default_timings = { static const struct videomode hdmic_default_timings = {
.hactive = 640, .hactive = 640,
.vactive = 480, .vactive = 480,
.pixelclock = 25175000, .pixelclock = 25175000,
...@@ -41,7 +41,7 @@ struct panel_drv_data { ...@@ -41,7 +41,7 @@ struct panel_drv_data {
struct device *dev; struct device *dev;
struct omap_video_timings timings; struct videomode timings;
int hpd_gpio; int hpd_gpio;
}; };
...@@ -120,7 +120,7 @@ static void hdmic_disable(struct omap_dss_device *dssdev) ...@@ -120,7 +120,7 @@ static void hdmic_disable(struct omap_dss_device *dssdev)
} }
static void hdmic_set_timings(struct omap_dss_device *dssdev, static void hdmic_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -132,7 +132,7 @@ static void hdmic_set_timings(struct omap_dss_device *dssdev, ...@@ -132,7 +132,7 @@ static void hdmic_set_timings(struct omap_dss_device *dssdev,
} }
static void hdmic_get_timings(struct omap_dss_device *dssdev, static void hdmic_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -140,7 +140,7 @@ static void hdmic_get_timings(struct omap_dss_device *dssdev, ...@@ -140,7 +140,7 @@ static void hdmic_get_timings(struct omap_dss_device *dssdev,
} }
static int hdmic_check_timings(struct omap_dss_device *dssdev, static int hdmic_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -27,7 +27,7 @@ struct panel_drv_data { ...@@ -27,7 +27,7 @@ struct panel_drv_data {
struct gpio_desc *enable_gpio; struct gpio_desc *enable_gpio;
struct omap_video_timings timings; struct videomode timings;
}; };
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
...@@ -123,7 +123,7 @@ static void opa362_disable(struct omap_dss_device *dssdev) ...@@ -123,7 +123,7 @@ static void opa362_disable(struct omap_dss_device *dssdev)
} }
static void opa362_set_timings(struct omap_dss_device *dssdev, static void opa362_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -137,7 +137,7 @@ static void opa362_set_timings(struct omap_dss_device *dssdev, ...@@ -137,7 +137,7 @@ static void opa362_set_timings(struct omap_dss_device *dssdev,
} }
static void opa362_get_timings(struct omap_dss_device *dssdev, static void opa362_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -147,7 +147,7 @@ static void opa362_get_timings(struct omap_dss_device *dssdev, ...@@ -147,7 +147,7 @@ static void opa362_get_timings(struct omap_dss_device *dssdev,
} }
static int opa362_check_timings(struct omap_dss_device *dssdev, static int opa362_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -24,7 +24,7 @@ struct panel_drv_data { ...@@ -24,7 +24,7 @@ struct panel_drv_data {
int pd_gpio; int pd_gpio;
int data_lines; int data_lines;
struct omap_video_timings timings; struct videomode timings;
}; };
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
...@@ -113,7 +113,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev) ...@@ -113,7 +113,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
dssdev->state = OMAP_DSS_DISPLAY_DISABLED; dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
} }
static void tfp410_fix_timings(struct omap_video_timings *timings) static void tfp410_fix_timings(struct videomode *timings)
{ {
timings->flags |= DISPLAY_FLAGS_DE_HIGH | timings->flags |= DISPLAY_FLAGS_DE_HIGH |
DISPLAY_FLAGS_PIXDATA_POSEDGE | DISPLAY_FLAGS_PIXDATA_POSEDGE |
...@@ -121,7 +121,7 @@ static void tfp410_fix_timings(struct omap_video_timings *timings) ...@@ -121,7 +121,7 @@ static void tfp410_fix_timings(struct omap_video_timings *timings)
} }
static void tfp410_set_timings(struct omap_dss_device *dssdev, static void tfp410_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -135,7 +135,7 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev, ...@@ -135,7 +135,7 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev,
} }
static void tfp410_get_timings(struct omap_dss_device *dssdev, static void tfp410_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -143,7 +143,7 @@ static void tfp410_get_timings(struct omap_dss_device *dssdev, ...@@ -143,7 +143,7 @@ static void tfp410_get_timings(struct omap_dss_device *dssdev,
} }
static int tfp410_check_timings(struct omap_dss_device *dssdev, static int tfp410_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -26,7 +26,7 @@ struct panel_drv_data { ...@@ -26,7 +26,7 @@ struct panel_drv_data {
struct gpio_desc *ls_oe_gpio; struct gpio_desc *ls_oe_gpio;
struct gpio_desc *hpd_gpio; struct gpio_desc *hpd_gpio;
struct omap_video_timings timings; struct videomode timings;
}; };
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
...@@ -105,7 +105,7 @@ static void tpd_disable(struct omap_dss_device *dssdev) ...@@ -105,7 +105,7 @@ static void tpd_disable(struct omap_dss_device *dssdev)
} }
static void tpd_set_timings(struct omap_dss_device *dssdev, static void tpd_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -117,7 +117,7 @@ static void tpd_set_timings(struct omap_dss_device *dssdev, ...@@ -117,7 +117,7 @@ static void tpd_set_timings(struct omap_dss_device *dssdev,
} }
static void tpd_get_timings(struct omap_dss_device *dssdev, static void tpd_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -125,7 +125,7 @@ static void tpd_get_timings(struct omap_dss_device *dssdev, ...@@ -125,7 +125,7 @@ static void tpd_get_timings(struct omap_dss_device *dssdev,
} }
static int tpd_check_timings(struct omap_dss_device *dssdev, static int tpd_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -28,7 +28,7 @@ struct panel_drv_data { ...@@ -28,7 +28,7 @@ struct panel_drv_data {
int data_lines; int data_lines;
struct omap_video_timings videomode; struct videomode videomode;
/* used for non-DT boot, to be removed */ /* used for non-DT boot, to be removed */
int backlight_gpio; int backlight_gpio;
...@@ -122,7 +122,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) ...@@ -122,7 +122,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
} }
static void panel_dpi_set_timings(struct omap_dss_device *dssdev, static void panel_dpi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -134,7 +134,7 @@ static void panel_dpi_set_timings(struct omap_dss_device *dssdev, ...@@ -134,7 +134,7 @@ static void panel_dpi_set_timings(struct omap_dss_device *dssdev,
} }
static void panel_dpi_get_timings(struct omap_dss_device *dssdev, static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -142,7 +142,7 @@ static void panel_dpi_get_timings(struct omap_dss_device *dssdev, ...@@ -142,7 +142,7 @@ static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
} }
static int panel_dpi_check_timings(struct omap_dss_device *dssdev, static int panel_dpi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -169,7 +169,6 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev) ...@@ -169,7 +169,6 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
const struct panel_dpi_platform_data *pdata; const struct panel_dpi_platform_data *pdata;
struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev, *in; struct omap_dss_device *dssdev, *in;
struct videomode vm;
int r; int r;
pdata = dev_get_platdata(&pdev->dev); pdata = dev_get_platdata(&pdev->dev);
...@@ -185,8 +184,7 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev) ...@@ -185,8 +184,7 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
ddata->data_lines = pdata->data_lines; ddata->data_lines = pdata->data_lines;
videomode_from_timing(pdata->display_timing, &vm); videomode_from_timing(pdata->display_timing, &ddata->videomode);
videomode_to_omap_video_timings(&vm, &ddata->videomode);
dssdev = &ddata->dssdev; dssdev = &ddata->dssdev;
dssdev->name = pdata->name; dssdev->name = pdata->name;
...@@ -214,7 +212,6 @@ static int panel_dpi_probe_of(struct platform_device *pdev) ...@@ -214,7 +212,6 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
struct omap_dss_device *in; struct omap_dss_device *in;
int r; int r;
struct display_timing timing; struct display_timing timing;
struct videomode vm;
struct gpio_desc *gpio; struct gpio_desc *gpio;
gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW); gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW);
...@@ -245,8 +242,7 @@ static int panel_dpi_probe_of(struct platform_device *pdev) ...@@ -245,8 +242,7 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
return r; return r;
} }
videomode_from_timing(&timing, &vm); videomode_from_timing(&timing, &ddata->videomode);
videomode_to_omap_video_timings(&vm, &ddata->videomode);
in = omapdss_of_find_source_for_first_ep(node); in = omapdss_of_find_source_for_first_ep(node);
if (IS_ERR(in)) { if (IS_ERR(in)) {
......
...@@ -42,7 +42,7 @@ struct panel_drv_data { ...@@ -42,7 +42,7 @@ struct panel_drv_data {
struct omap_dss_device dssdev; struct omap_dss_device dssdev;
struct omap_dss_device *in; struct omap_dss_device *in;
struct omap_video_timings timings; struct videomode timings;
struct platform_device *pdev; struct platform_device *pdev;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "../dss/omapdss.h" #include "../dss/omapdss.h"
static struct omap_video_timings lb035q02_timings = { static struct videomode lb035q02_timings = {
.hactive = 320, .hactive = 320,
.vactive = 240, .vactive = 240,
...@@ -46,7 +46,7 @@ struct panel_drv_data { ...@@ -46,7 +46,7 @@ struct panel_drv_data {
int data_lines; int data_lines;
struct omap_video_timings videomode; struct videomode videomode;
struct gpio_desc *enable_gpio; struct gpio_desc *enable_gpio;
}; };
...@@ -187,7 +187,7 @@ static void lb035q02_disable(struct omap_dss_device *dssdev) ...@@ -187,7 +187,7 @@ static void lb035q02_disable(struct omap_dss_device *dssdev)
} }
static void lb035q02_set_timings(struct omap_dss_device *dssdev, static void lb035q02_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -199,7 +199,7 @@ static void lb035q02_set_timings(struct omap_dss_device *dssdev, ...@@ -199,7 +199,7 @@ static void lb035q02_set_timings(struct omap_dss_device *dssdev,
} }
static void lb035q02_get_timings(struct omap_dss_device *dssdev, static void lb035q02_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -207,7 +207,7 @@ static void lb035q02_get_timings(struct omap_dss_device *dssdev, ...@@ -207,7 +207,7 @@ static void lb035q02_get_timings(struct omap_dss_device *dssdev,
} }
static int lb035q02_check_timings(struct omap_dss_device *dssdev, static int lb035q02_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -23,7 +23,7 @@ struct panel_drv_data { ...@@ -23,7 +23,7 @@ struct panel_drv_data {
struct omap_dss_device dssdev; struct omap_dss_device dssdev;
struct omap_dss_device *in; struct omap_dss_device *in;
struct omap_video_timings videomode; struct videomode videomode;
int data_lines; int data_lines;
...@@ -65,7 +65,7 @@ static const struct { ...@@ -65,7 +65,7 @@ static const struct {
{ 156, 0x00 }, { 157, 0x00 }, { 2, 0x00 }, { 156, 0x00 }, { 157, 0x00 }, { 2, 0x00 },
}; };
static const struct omap_video_timings nec_8048_panel_timings = { static const struct videomode nec_8048_panel_timings = {
.hactive = LCD_XRES, .hactive = LCD_XRES,
.vactive = LCD_YRES, .vactive = LCD_YRES,
.pixelclock = LCD_PIXEL_CLOCK, .pixelclock = LCD_PIXEL_CLOCK,
...@@ -186,7 +186,7 @@ static void nec_8048_disable(struct omap_dss_device *dssdev) ...@@ -186,7 +186,7 @@ static void nec_8048_disable(struct omap_dss_device *dssdev)
} }
static void nec_8048_set_timings(struct omap_dss_device *dssdev, static void nec_8048_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -198,7 +198,7 @@ static void nec_8048_set_timings(struct omap_dss_device *dssdev, ...@@ -198,7 +198,7 @@ static void nec_8048_set_timings(struct omap_dss_device *dssdev,
} }
static void nec_8048_get_timings(struct omap_dss_device *dssdev, static void nec_8048_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -206,7 +206,7 @@ static void nec_8048_get_timings(struct omap_dss_device *dssdev, ...@@ -206,7 +206,7 @@ static void nec_8048_get_timings(struct omap_dss_device *dssdev,
} }
static int nec_8048_check_timings(struct omap_dss_device *dssdev, static int nec_8048_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -26,7 +26,7 @@ struct panel_drv_data { ...@@ -26,7 +26,7 @@ struct panel_drv_data {
int data_lines; int data_lines;
struct omap_video_timings videomode; struct videomode videomode;
struct gpio_desc *resb_gpio; /* low = reset active min 20 us */ struct gpio_desc *resb_gpio; /* low = reset active min 20 us */
struct gpio_desc *ini_gpio; /* high = power on */ struct gpio_desc *ini_gpio; /* high = power on */
...@@ -35,7 +35,7 @@ struct panel_drv_data { ...@@ -35,7 +35,7 @@ struct panel_drv_data {
struct gpio_desc *ud_gpio; /* high = conventional vertical scanning */ struct gpio_desc *ud_gpio; /* high = conventional vertical scanning */
}; };
static const struct omap_video_timings sharp_ls_timings = { static const struct videomode sharp_ls_timings = {
.hactive = 480, .hactive = 480,
.vactive = 640, .vactive = 640,
...@@ -152,7 +152,7 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev) ...@@ -152,7 +152,7 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev)
} }
static void sharp_ls_set_timings(struct omap_dss_device *dssdev, static void sharp_ls_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -164,7 +164,7 @@ static void sharp_ls_set_timings(struct omap_dss_device *dssdev, ...@@ -164,7 +164,7 @@ static void sharp_ls_set_timings(struct omap_dss_device *dssdev,
} }
static void sharp_ls_get_timings(struct omap_dss_device *dssdev, static void sharp_ls_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -172,7 +172,7 @@ static void sharp_ls_get_timings(struct omap_dss_device *dssdev, ...@@ -172,7 +172,7 @@ static void sharp_ls_get_timings(struct omap_dss_device *dssdev,
} }
static int sharp_ls_check_timings(struct omap_dss_device *dssdev, static int sharp_ls_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -71,7 +71,7 @@ struct panel_drv_data { ...@@ -71,7 +71,7 @@ struct panel_drv_data {
int reset_gpio; int reset_gpio;
int datapairs; int datapairs;
struct omap_video_timings videomode; struct videomode videomode;
char *name; char *name;
int enabled; int enabled;
...@@ -92,7 +92,7 @@ struct panel_drv_data { ...@@ -92,7 +92,7 @@ struct panel_drv_data {
struct backlight_device *bl_dev; struct backlight_device *bl_dev;
}; };
static const struct omap_video_timings acx565akm_panel_timings = { static const struct videomode acx565akm_panel_timings = {
.hactive = 800, .hactive = 800,
.vactive = 480, .vactive = 480,
.pixelclock = 24000000, .pixelclock = 24000000,
...@@ -659,7 +659,7 @@ static void acx565akm_disable(struct omap_dss_device *dssdev) ...@@ -659,7 +659,7 @@ static void acx565akm_disable(struct omap_dss_device *dssdev)
} }
static void acx565akm_set_timings(struct omap_dss_device *dssdev, static void acx565akm_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -671,7 +671,7 @@ static void acx565akm_set_timings(struct omap_dss_device *dssdev, ...@@ -671,7 +671,7 @@ static void acx565akm_set_timings(struct omap_dss_device *dssdev,
} }
static void acx565akm_get_timings(struct omap_dss_device *dssdev, static void acx565akm_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -679,7 +679,7 @@ static void acx565akm_get_timings(struct omap_dss_device *dssdev, ...@@ -679,7 +679,7 @@ static void acx565akm_get_timings(struct omap_dss_device *dssdev,
} }
static int acx565akm_check_timings(struct omap_dss_device *dssdev, static int acx565akm_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -37,12 +37,12 @@ struct panel_drv_data { ...@@ -37,12 +37,12 @@ struct panel_drv_data {
int data_lines; int data_lines;
struct omap_video_timings videomode; struct videomode videomode;
struct spi_device *spi_dev; struct spi_device *spi_dev;
}; };
static struct omap_video_timings td028ttec1_panel_timings = { static struct videomode td028ttec1_panel_timings = {
.hactive = 480, .hactive = 480,
.vactive = 640, .vactive = 640,
.pixelclock = 22153000, .pixelclock = 22153000,
...@@ -322,7 +322,7 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev) ...@@ -322,7 +322,7 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
} }
static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev, static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -334,7 +334,7 @@ static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev, ...@@ -334,7 +334,7 @@ static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev,
} }
static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev, static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -342,7 +342,7 @@ static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev, ...@@ -342,7 +342,7 @@ static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
} }
static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev, static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -56,7 +56,7 @@ struct panel_drv_data { ...@@ -56,7 +56,7 @@ struct panel_drv_data {
struct omap_dss_device dssdev; struct omap_dss_device dssdev;
struct omap_dss_device *in; struct omap_dss_device *in;
struct omap_video_timings videomode; struct videomode videomode;
int data_lines; int data_lines;
...@@ -72,7 +72,7 @@ struct panel_drv_data { ...@@ -72,7 +72,7 @@ struct panel_drv_data {
u32 power_on_resume:1; u32 power_on_resume:1;
}; };
static const struct omap_video_timings tpo_td043_timings = { static const struct videomode tpo_td043_timings = {
.hactive = 800, .hactive = 800,
.vactive = 480, .vactive = 480,
...@@ -416,7 +416,7 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev) ...@@ -416,7 +416,7 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev)
} }
static void tpo_td043_set_timings(struct omap_dss_device *dssdev, static void tpo_td043_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
...@@ -428,7 +428,7 @@ static void tpo_td043_set_timings(struct omap_dss_device *dssdev, ...@@ -428,7 +428,7 @@ static void tpo_td043_set_timings(struct omap_dss_device *dssdev,
} }
static void tpo_td043_get_timings(struct omap_dss_device *dssdev, static void tpo_td043_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
...@@ -436,7 +436,7 @@ static void tpo_td043_get_timings(struct omap_dss_device *dssdev, ...@@ -436,7 +436,7 @@ static void tpo_td043_get_timings(struct omap_dss_device *dssdev,
} }
static int tpo_td043_check_timings(struct omap_dss_device *dssdev, static int tpo_td043_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
......
...@@ -75,7 +75,7 @@ struct dispc_features { ...@@ -75,7 +75,7 @@ struct dispc_features {
unsigned long max_lcd_pclk; unsigned long max_lcd_pclk;
unsigned long max_tv_pclk; unsigned long max_tv_pclk;
int (*calc_scaling) (unsigned long pclk, unsigned long lclk, int (*calc_scaling) (unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *mgr_timings, const struct videomode *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps, enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
...@@ -2179,7 +2179,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width, ...@@ -2179,7 +2179,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width,
* undocumented horizontal position and timing related limitations. * undocumented horizontal position and timing related limitations.
*/ */
static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *t, u16 pos_x, const struct videomode *t, u16 pos_x,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
bool five_taps) bool five_taps)
{ {
...@@ -2233,7 +2233,7 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, ...@@ -2233,7 +2233,7 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
} }
static unsigned long calc_core_clk_five_taps(unsigned long pclk, static unsigned long calc_core_clk_five_taps(unsigned long pclk,
const struct omap_video_timings *mgr_timings, u16 width, const struct videomode *mgr_timings, u16 width,
u16 height, u16 out_width, u16 out_height, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode) enum omap_color_mode color_mode)
{ {
...@@ -2326,7 +2326,7 @@ static unsigned long calc_core_clk_44xx(unsigned long pclk, u16 width, ...@@ -2326,7 +2326,7 @@ static unsigned long calc_core_clk_44xx(unsigned long pclk, u16 width,
} }
static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *mgr_timings, const struct videomode *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps, enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
...@@ -2372,7 +2372,7 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, ...@@ -2372,7 +2372,7 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
} }
static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *mgr_timings, const struct videomode *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps, enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
...@@ -2457,7 +2457,7 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, ...@@ -2457,7 +2457,7 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
} }
static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *mgr_timings, const struct videomode *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps, enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
...@@ -2503,7 +2503,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, ...@@ -2503,7 +2503,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
enum omap_overlay_caps caps, enum omap_overlay_caps caps,
const struct omap_video_timings *mgr_timings, const struct videomode *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height, u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps, enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, u16 pos_x, int *x_predecim, int *y_predecim, u16 pos_x,
...@@ -2593,7 +2593,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, ...@@ -2593,7 +2593,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
u16 out_width, u16 out_height, enum omap_color_mode color_mode, u16 out_width, u16 out_height, enum omap_color_mode color_mode,
u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha, u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha,
u8 global_alpha, enum omap_dss_rotation_type rotation_type, u8 global_alpha, enum omap_dss_rotation_type rotation_type,
bool replication, const struct omap_video_timings *mgr_timings, bool replication, const struct videomode *mgr_timings,
bool mem_to_mem) bool mem_to_mem)
{ {
bool five_taps = true; bool five_taps = true;
...@@ -2786,7 +2786,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, ...@@ -2786,7 +2786,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
} }
int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
bool replication, const struct omap_video_timings *mgr_timings, bool replication, const struct videomode *mgr_timings,
bool mem_to_mem) bool mem_to_mem)
{ {
int r; int r;
...@@ -2812,7 +2812,7 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, ...@@ -2812,7 +2812,7 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
EXPORT_SYMBOL(dispc_ovl_setup); EXPORT_SYMBOL(dispc_ovl_setup);
int dispc_wb_setup(const struct omap_dss_writeback_info *wi, int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
bool mem_to_mem, const struct omap_video_timings *mgr_timings) bool mem_to_mem, const struct videomode *mgr_timings)
{ {
int r; int r;
u32 l; u32 l;
...@@ -3119,7 +3119,7 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel, ...@@ -3119,7 +3119,7 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
} }
bool dispc_mgr_timings_ok(enum omap_channel channel, bool dispc_mgr_timings_ok(enum omap_channel channel,
const struct omap_video_timings *timings) const struct videomode *timings)
{ {
if (!_dispc_mgr_size_ok(timings->hactive, timings->vactive)) if (!_dispc_mgr_size_ok(timings->hactive, timings->vactive))
return false; return false;
...@@ -3143,7 +3143,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel, ...@@ -3143,7 +3143,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel,
} }
static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
const struct omap_video_timings *ovt) const struct videomode *ovt)
{ {
u32 timing_h, timing_v, l; u32 timing_h, timing_v, l;
bool onoff, rf, ipc, vs, hs, de; bool onoff, rf, ipc, vs, hs, de;
...@@ -3221,11 +3221,11 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, ...@@ -3221,11 +3221,11 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
/* change name to mode? */ /* change name to mode? */
void dispc_mgr_set_timings(enum omap_channel channel, void dispc_mgr_set_timings(enum omap_channel channel,
const struct omap_video_timings *timings) const struct videomode *timings)
{ {
unsigned xtot, ytot; unsigned xtot, ytot;
unsigned long ht, vt; unsigned long ht, vt;
struct omap_video_timings t = *timings; struct videomode t = *timings;
DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive); DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive);
...@@ -4185,7 +4185,7 @@ EXPORT_SYMBOL(dispc_free_irq); ...@@ -4185,7 +4185,7 @@ EXPORT_SYMBOL(dispc_free_irq);
*/ */
static const struct dispc_errata_i734_data { static const struct dispc_errata_i734_data {
struct omap_video_timings timings; struct videomode timings;
struct omap_overlay_info ovli; struct omap_overlay_info ovli;
struct omap_overlay_manager_info mgri; struct omap_overlay_manager_info mgri;
struct dss_lcd_mgr_config lcd_conf; struct dss_lcd_mgr_config lcd_conf;
......
...@@ -72,7 +72,7 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev) ...@@ -72,7 +72,7 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev)
EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); EXPORT_SYMBOL(omapdss_default_get_recommended_bpp);
void omapdss_default_get_timings(struct omap_dss_device *dssdev, void omapdss_default_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
*timings = dssdev->panel.timings; *timings = dssdev->panel.timings;
} }
...@@ -217,40 +217,3 @@ struct omap_dss_device *omap_dss_find_device(void *data, ...@@ -217,40 +217,3 @@ struct omap_dss_device *omap_dss_find_device(void *data,
return NULL; return NULL;
} }
EXPORT_SYMBOL(omap_dss_find_device); EXPORT_SYMBOL(omap_dss_find_device);
void videomode_to_omap_video_timings(const struct videomode *vm,
struct omap_video_timings *ovt)
{
memset(ovt, 0, sizeof(*ovt));
ovt->pixelclock = vm->pixelclock;
ovt->hactive = vm->hactive;
ovt->hback_porch = vm->hback_porch;
ovt->hfront_porch = vm->hfront_porch;
ovt->hsync_len = vm->hsync_len;
ovt->vactive = vm->vactive;
ovt->vback_porch = vm->vback_porch;
ovt->vfront_porch = vm->vfront_porch;
ovt->vsync_len = vm->vsync_len;
ovt->flags = vm->flags;
}
EXPORT_SYMBOL(videomode_to_omap_video_timings);
void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
struct videomode *vm)
{
memset(vm, 0, sizeof(*vm));
vm->pixelclock = ovt->pixelclock;
vm->hactive = ovt->hactive;
vm->hback_porch = ovt->hback_porch;
vm->hfront_porch = ovt->hfront_porch;
vm->hsync_len = ovt->hsync_len;
vm->vactive = ovt->vactive;
vm->vback_porch = ovt->vback_porch;
vm->vfront_porch = ovt->vfront_porch;
vm->vsync_len = ovt->vsync_len;
vm->flags = ovt->flags;
}
EXPORT_SYMBOL(omap_video_timings_to_videomode);
...@@ -47,7 +47,7 @@ struct dpi_data { ...@@ -47,7 +47,7 @@ struct dpi_data {
struct mutex lock; struct mutex lock;
struct omap_video_timings timings; struct videomode timings;
struct dss_lcd_mgr_config mgr_config; struct dss_lcd_mgr_config mgr_config;
int data_lines; int data_lines;
...@@ -333,7 +333,7 @@ static int dpi_set_mode(struct dpi_data *dpi) ...@@ -333,7 +333,7 @@ static int dpi_set_mode(struct dpi_data *dpi)
{ {
struct omap_dss_device *out = &dpi->output; struct omap_dss_device *out = &dpi->output;
enum omap_channel channel = out->dispc_channel; enum omap_channel channel = out->dispc_channel;
struct omap_video_timings *t = &dpi->timings; struct videomode *t = &dpi->timings;
int lck_div = 0, pck_div = 0; int lck_div = 0, pck_div = 0;
unsigned long fck = 0; unsigned long fck = 0;
unsigned long pck; unsigned long pck;
...@@ -476,7 +476,7 @@ static void dpi_display_disable(struct omap_dss_device *dssdev) ...@@ -476,7 +476,7 @@ static void dpi_display_disable(struct omap_dss_device *dssdev)
} }
static void dpi_set_timings(struct omap_dss_device *dssdev, static void dpi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
...@@ -490,7 +490,7 @@ static void dpi_set_timings(struct omap_dss_device *dssdev, ...@@ -490,7 +490,7 @@ static void dpi_set_timings(struct omap_dss_device *dssdev,
} }
static void dpi_get_timings(struct omap_dss_device *dssdev, static void dpi_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
...@@ -502,7 +502,7 @@ static void dpi_get_timings(struct omap_dss_device *dssdev, ...@@ -502,7 +502,7 @@ static void dpi_get_timings(struct omap_dss_device *dssdev,
} }
static int dpi_check_timings(struct omap_dss_device *dssdev, static int dpi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
enum omap_channel channel = dpi->output.dispc_channel; enum omap_channel channel = dpi->output.dispc_channel;
......
...@@ -289,7 +289,7 @@ struct dsi_clk_calc_ctx { ...@@ -289,7 +289,7 @@ struct dsi_clk_calc_ctx {
struct dss_pll_clock_info dsi_cinfo; struct dss_pll_clock_info dsi_cinfo;
struct dispc_clock_info dispc_cinfo; struct dispc_clock_info dispc_cinfo;
struct omap_video_timings dispc_vm; struct videomode dispc_vm;
struct omap_dss_dsi_videomode_timings dsi_vm; struct omap_dss_dsi_videomode_timings dsi_vm;
}; };
...@@ -383,7 +383,7 @@ struct dsi_data { ...@@ -383,7 +383,7 @@ struct dsi_data {
unsigned scp_clk_refcount; unsigned scp_clk_refcount;
struct dss_lcd_mgr_config mgr_config; struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings; struct videomode timings;
enum omap_dss_dsi_pixel_format pix_fmt; enum omap_dss_dsi_pixel_format pix_fmt;
enum omap_dss_dsi_mode mode; enum omap_dss_dsi_mode mode;
struct omap_dss_dsi_videomode_timings vm_timings; struct omap_dss_dsi_videomode_timings vm_timings;
...@@ -3321,7 +3321,7 @@ static void dsi_config_vp_num_line_buffers(struct platform_device *dsidev) ...@@ -3321,7 +3321,7 @@ static void dsi_config_vp_num_line_buffers(struct platform_device *dsidev)
if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
int bpp = dsi_get_pixel_size(dsi->pix_fmt); int bpp = dsi_get_pixel_size(dsi->pix_fmt);
struct omap_video_timings *timings = &dsi->timings; struct videomode *timings = &dsi->timings;
/* /*
* Don't use line buffers if width is greater than the video * Don't use line buffers if width is greater than the video
* port's line buffer size * port's line buffer size
...@@ -3453,7 +3453,7 @@ static void dsi_config_cmd_mode_interleaving(struct platform_device *dsidev) ...@@ -3453,7 +3453,7 @@ static void dsi_config_cmd_mode_interleaving(struct platform_device *dsidev)
int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat; int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat;
int tclk_trail, ths_exit, exiths_clk; int tclk_trail, ths_exit, exiths_clk;
bool ddr_alwon; bool ddr_alwon;
struct omap_video_timings *timings = &dsi->timings; struct videomode *timings = &dsi->timings;
int bpp = dsi_get_pixel_size(dsi->pix_fmt); int bpp = dsi_get_pixel_size(dsi->pix_fmt);
int ndl = dsi->num_lanes_used - 1; int ndl = dsi->num_lanes_used - 1;
int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1; int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1;
...@@ -3705,7 +3705,7 @@ static void dsi_proto_timings(struct platform_device *dsidev) ...@@ -3705,7 +3705,7 @@ static void dsi_proto_timings(struct platform_device *dsidev)
int vbp = dsi->vm_timings.vbp; int vbp = dsi->vm_timings.vbp;
int window_sync = dsi->vm_timings.window_sync; int window_sync = dsi->vm_timings.window_sync;
bool hsync_end; bool hsync_end;
struct omap_video_timings *timings = &dsi->timings; struct videomode *timings = &dsi->timings;
int bpp = dsi_get_pixel_size(dsi->pix_fmt); int bpp = dsi_get_pixel_size(dsi->pix_fmt);
int tl, t_he, width_bytes; int tl, t_he, width_bytes;
...@@ -4120,7 +4120,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, ...@@ -4120,7 +4120,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
/* /*
* override interlace, logic level and edge related parameters in * override interlace, logic level and edge related parameters in
* omap_video_timings with default values * videomode with default values
*/ */
dsi->timings.flags &= ~DISPLAY_FLAGS_INTERLACED; dsi->timings.flags &= ~DISPLAY_FLAGS_INTERLACED;
dsi->timings.flags &= ~DISPLAY_FLAGS_HSYNC_LOW; dsi->timings.flags &= ~DISPLAY_FLAGS_HSYNC_LOW;
...@@ -4361,7 +4361,7 @@ static void print_dsi_vm(const char *str, ...@@ -4361,7 +4361,7 @@ static void print_dsi_vm(const char *str,
#undef TO_DSI_T #undef TO_DSI_T
} }
static void print_dispc_vm(const char *str, const struct omap_video_timings *t) static void print_dispc_vm(const char *str, const struct videomode *t)
{ {
unsigned long pck = t->pixelclock; unsigned long pck = t->pixelclock;
int hact, bl, tot; int hact, bl, tot;
...@@ -4392,7 +4392,7 @@ static void print_dispc_vm(const char *str, const struct omap_video_timings *t) ...@@ -4392,7 +4392,7 @@ static void print_dispc_vm(const char *str, const struct omap_video_timings *t)
static void print_dsi_dispc_vm(const char *str, static void print_dsi_dispc_vm(const char *str,
const struct omap_dss_dsi_videomode_timings *t) const struct omap_dss_dsi_videomode_timings *t)
{ {
struct omap_video_timings vm = { 0 }; struct videomode vm = { 0 };
unsigned long byteclk = t->hsclk / 4; unsigned long byteclk = t->hsclk / 4;
unsigned long pck; unsigned long pck;
u64 dsi_tput; u64 dsi_tput;
...@@ -4417,7 +4417,7 @@ static bool dsi_cm_calc_dispc_cb(int lckd, int pckd, unsigned long lck, ...@@ -4417,7 +4417,7 @@ static bool dsi_cm_calc_dispc_cb(int lckd, int pckd, unsigned long lck,
unsigned long pck, void *data) unsigned long pck, void *data)
{ {
struct dsi_clk_calc_ctx *ctx = data; struct dsi_clk_calc_ctx *ctx = data;
struct omap_video_timings *t = &ctx->dispc_vm; struct videomode *t = &ctx->dispc_vm;
ctx->dispc_cinfo.lck_div = lckd; ctx->dispc_cinfo.lck_div = lckd;
ctx->dispc_cinfo.pck_div = pckd; ctx->dispc_cinfo.pck_div = pckd;
...@@ -4515,8 +4515,8 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx) ...@@ -4515,8 +4515,8 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
int dispc_htot, dispc_hbl; /* pixels */ int dispc_htot, dispc_hbl; /* pixels */
int dsi_htot, dsi_hact, dsi_hbl, hss, hse; /* byteclks */ int dsi_htot, dsi_hact, dsi_hbl, hss, hse; /* byteclks */
int hfp, hsa, hbp; int hfp, hsa, hbp;
const struct omap_video_timings *req_vm; const struct videomode *req_vm;
struct omap_video_timings *dispc_vm; struct videomode *dispc_vm;
struct omap_dss_dsi_videomode_timings *dsi_vm; struct omap_dss_dsi_videomode_timings *dsi_vm;
u64 dsi_tput, dispc_tput; u64 dsi_tput, dispc_tput;
...@@ -4764,7 +4764,7 @@ static bool dsi_vm_calc(struct dsi_data *dsi, ...@@ -4764,7 +4764,7 @@ static bool dsi_vm_calc(struct dsi_data *dsi,
const struct omap_dss_dsi_config *cfg, const struct omap_dss_dsi_config *cfg,
struct dsi_clk_calc_ctx *ctx) struct dsi_clk_calc_ctx *ctx)
{ {
const struct omap_video_timings *t = cfg->timings; const struct videomode *t = cfg->timings;
unsigned long clkin; unsigned long clkin;
unsigned long pll_min; unsigned long pll_min;
unsigned long pll_max; unsigned long pll_max;
......
...@@ -367,7 +367,7 @@ bool dispc_div_calc(unsigned long dispc, ...@@ -367,7 +367,7 @@ bool dispc_div_calc(unsigned long dispc,
dispc_div_calc_func func, void *data); dispc_div_calc_func func, void *data);
bool dispc_mgr_timings_ok(enum omap_channel channel, bool dispc_mgr_timings_ok(enum omap_channel channel,
const struct omap_video_timings *timings); const struct videomode *timings);
int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, int dispc_calc_clock_rates(unsigned long dispc_fclk_rate,
struct dispc_clock_info *cinfo); struct dispc_clock_info *cinfo);
...@@ -390,7 +390,7 @@ void dispc_wb_enable(bool enable); ...@@ -390,7 +390,7 @@ void dispc_wb_enable(bool enable);
bool dispc_wb_is_enabled(void); bool dispc_wb_is_enabled(void);
void dispc_wb_set_channel_in(enum dss_writeback_channel channel); void dispc_wb_set_channel_in(enum dss_writeback_channel channel);
int dispc_wb_setup(const struct omap_dss_writeback_info *wi, int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
bool mem_to_mem, const struct omap_video_timings *timings); bool mem_to_mem, const struct videomode *timings);
/* VENC */ /* VENC */
int venc_init_platform_driver(void) __init; int venc_init_platform_driver(void) __init;
......
...@@ -181,7 +181,7 @@ struct hdmi_video_format { ...@@ -181,7 +181,7 @@ struct hdmi_video_format {
}; };
struct hdmi_config { struct hdmi_config {
struct omap_video_timings timings; struct videomode timings;
struct hdmi_avi_infoframe infoframe; struct hdmi_avi_infoframe infoframe;
enum hdmi_core_hdmi_dvi hdmi_dvi_mode; enum hdmi_core_hdmi_dvi hdmi_dvi_mode;
}; };
...@@ -298,11 +298,11 @@ int hdmi_wp_set_pll_pwr(struct hdmi_wp_data *wp, enum hdmi_pll_pwr val); ...@@ -298,11 +298,11 @@ int hdmi_wp_set_pll_pwr(struct hdmi_wp_data *wp, enum hdmi_pll_pwr val);
void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, void hdmi_wp_video_config_format(struct hdmi_wp_data *wp,
struct hdmi_video_format *video_fmt); struct hdmi_video_format *video_fmt);
void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp,
struct omap_video_timings *timings); struct videomode *timings);
void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp,
struct omap_video_timings *timings); struct videomode *timings);
void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt,
struct omap_video_timings *timings, struct hdmi_config *param); struct videomode *timings, struct hdmi_config *param);
int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp); int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp);
phys_addr_t hdmi_wp_get_audio_dma_addr(struct hdmi_wp_data *wp); phys_addr_t hdmi_wp_get_audio_dma_addr(struct hdmi_wp_data *wp);
......
...@@ -155,7 +155,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev) ...@@ -155,7 +155,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev)
static int hdmi_power_on_full(struct omap_dss_device *dssdev) static int hdmi_power_on_full(struct omap_dss_device *dssdev)
{ {
int r; int r;
struct omap_video_timings *p; struct videomode *p;
enum omap_channel channel = dssdev->dispc_channel; enum omap_channel channel = dssdev->dispc_channel;
struct hdmi_wp_data *wp = &hdmi.wp; struct hdmi_wp_data *wp = &hdmi.wp;
struct dss_pll_clock_info hdmi_cinfo = { 0 }; struct dss_pll_clock_info hdmi_cinfo = { 0 };
...@@ -256,7 +256,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) ...@@ -256,7 +256,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev)
} }
static int hdmi_display_check_timing(struct omap_dss_device *dssdev, static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings))
return -EINVAL; return -EINVAL;
...@@ -265,7 +265,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev, ...@@ -265,7 +265,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
} }
static void hdmi_display_set_timing(struct omap_dss_device *dssdev, static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
mutex_lock(&hdmi.lock); mutex_lock(&hdmi.lock);
...@@ -277,7 +277,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev, ...@@ -277,7 +277,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
} }
static void hdmi_display_get_timings(struct omap_dss_device *dssdev, static void hdmi_display_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
*timings = hdmi.cfg.timings; *timings = hdmi.cfg.timings;
} }
......
...@@ -310,7 +310,7 @@ void hdmi4_configure(struct hdmi_core_data *core, ...@@ -310,7 +310,7 @@ void hdmi4_configure(struct hdmi_core_data *core,
struct hdmi_wp_data *wp, struct hdmi_config *cfg) struct hdmi_wp_data *wp, struct hdmi_config *cfg)
{ {
/* HDMI */ /* HDMI */
struct omap_video_timings video_timing; struct videomode video_timing;
struct hdmi_video_format video_format; struct hdmi_video_format video_format;
/* HDMI core */ /* HDMI core */
struct hdmi_core_video_config v_core_cfg; struct hdmi_core_video_config v_core_cfg;
......
...@@ -172,7 +172,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev) ...@@ -172,7 +172,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev)
static int hdmi_power_on_full(struct omap_dss_device *dssdev) static int hdmi_power_on_full(struct omap_dss_device *dssdev)
{ {
int r; int r;
struct omap_video_timings *p; struct videomode *p;
enum omap_channel channel = dssdev->dispc_channel; enum omap_channel channel = dssdev->dispc_channel;
struct dss_pll_clock_info hdmi_cinfo = { 0 }; struct dss_pll_clock_info hdmi_cinfo = { 0 };
unsigned pc; unsigned pc;
...@@ -273,7 +273,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) ...@@ -273,7 +273,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev)
} }
static int hdmi_display_check_timing(struct omap_dss_device *dssdev, static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings))
return -EINVAL; return -EINVAL;
...@@ -282,7 +282,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev, ...@@ -282,7 +282,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
} }
static void hdmi_display_set_timing(struct omap_dss_device *dssdev, static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
mutex_lock(&hdmi.lock); mutex_lock(&hdmi.lock);
...@@ -294,7 +294,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev, ...@@ -294,7 +294,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
} }
static void hdmi_display_get_timings(struct omap_dss_device *dssdev, static void hdmi_display_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
*timings = hdmi.cfg.timings; *timings = hdmi.cfg.timings;
} }
......
...@@ -329,7 +329,7 @@ static void hdmi_core_video_config(struct hdmi_core_data *core, ...@@ -329,7 +329,7 @@ static void hdmi_core_video_config(struct hdmi_core_data *core,
struct hdmi_core_vid_config *cfg) struct hdmi_core_vid_config *cfg)
{ {
void __iomem *base = core->base; void __iomem *base = core->base;
struct omap_video_timings *ovt = &cfg->v_fc_config.timings; struct videomode *ovt = &cfg->v_fc_config.timings;
unsigned char r = 0; unsigned char r = 0;
bool vsync_pol, hsync_pol; bool vsync_pol, hsync_pol;
...@@ -609,7 +609,7 @@ int hdmi5_core_handle_irqs(struct hdmi_core_data *core) ...@@ -609,7 +609,7 @@ int hdmi5_core_handle_irqs(struct hdmi_core_data *core)
void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp, void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
struct hdmi_config *cfg) struct hdmi_config *cfg)
{ {
struct omap_video_timings video_timing; struct videomode video_timing;
struct hdmi_video_format video_format; struct hdmi_video_format video_format;
struct hdmi_core_vid_config v_core_cfg; struct hdmi_core_vid_config v_core_cfg;
......
...@@ -144,7 +144,7 @@ void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, ...@@ -144,7 +144,7 @@ void hdmi_wp_video_config_format(struct hdmi_wp_data *wp,
} }
void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp,
struct omap_video_timings *timings) struct videomode *timings)
{ {
u32 r; u32 r;
bool vsync_pol, hsync_pol; bool vsync_pol, hsync_pol;
...@@ -162,7 +162,7 @@ void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, ...@@ -162,7 +162,7 @@ void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp,
} }
void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp,
struct omap_video_timings *timings) struct videomode *timings)
{ {
u32 timing_h = 0; u32 timing_h = 0;
u32 timing_v = 0; u32 timing_v = 0;
...@@ -193,7 +193,7 @@ void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, ...@@ -193,7 +193,7 @@ void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp,
} }
void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt,
struct omap_video_timings *timings, struct hdmi_config *param) struct videomode *timings, struct hdmi_config *param)
{ {
DSSDBG("Enter hdmi_wp_video_init_format\n"); DSSDBG("Enter hdmi_wp_video_init_format\n");
......
...@@ -290,7 +290,7 @@ struct omap_dss_dsi_videomode_timings { ...@@ -290,7 +290,7 @@ struct omap_dss_dsi_videomode_timings {
struct omap_dss_dsi_config { struct omap_dss_dsi_config {
enum omap_dss_dsi_mode mode; enum omap_dss_dsi_mode mode;
enum omap_dss_dsi_pixel_format pixel_format; enum omap_dss_dsi_pixel_format pixel_format;
const struct omap_video_timings *timings; const struct videomode *timings;
unsigned long hs_clk_min, hs_clk_max; unsigned long hs_clk_min, hs_clk_max;
unsigned long lp_clk_min, lp_clk_max; unsigned long lp_clk_min, lp_clk_max;
...@@ -299,35 +299,12 @@ struct omap_dss_dsi_config { ...@@ -299,35 +299,12 @@ struct omap_dss_dsi_config {
enum omap_dss_dsi_trans_mode trans_mode; enum omap_dss_dsi_trans_mode trans_mode;
}; };
struct omap_video_timings {
/* Unit: pixels */
u32 hactive;
/* Unit: pixels */
u32 vactive;
/* Unit: Hz */
unsigned long pixelclock;
/* Unit: pixel clocks */
u32 hsync_len; /* Horizontal synchronization pulse width */
/* Unit: pixel clocks */
u32 hfront_porch; /* Horizontal front porch */
/* Unit: pixel clocks */
u32 hback_porch; /* Horizontal back porch */
/* Unit: line clocks */
u32 vsync_len; /* Vertical synchronization pulse width */
/* Unit: line clocks */
u32 vfront_porch; /* Vertical front porch */
/* Unit: line clocks */
u32 vback_porch; /* Vertical back porch */
enum display_flags flags;
};
/* Hardcoded timings for tv modes. Venc only uses these to /* Hardcoded timings for tv modes. Venc only uses these to
* identify the mode, and does not actually use the configs * identify the mode, and does not actually use the configs
* itself. However, the configs should be something that * itself. However, the configs should be something that
* a normal monitor can also show */ * a normal monitor can also show */
extern const struct omap_video_timings omap_dss_pal_timings; extern const struct videomode omap_dss_pal_timings;
extern const struct omap_video_timings omap_dss_ntsc_timings; extern const struct videomode omap_dss_ntsc_timings;
struct omap_dss_cpr_coefs { struct omap_dss_cpr_coefs {
s16 rr, rg, rb; s16 rr, rg, rb;
...@@ -489,11 +466,11 @@ struct omapdss_dpi_ops { ...@@ -489,11 +466,11 @@ struct omapdss_dpi_ops {
void (*disable)(struct omap_dss_device *dssdev); void (*disable)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines);
}; };
...@@ -508,11 +485,11 @@ struct omapdss_sdi_ops { ...@@ -508,11 +485,11 @@ struct omapdss_sdi_ops {
void (*disable)(struct omap_dss_device *dssdev); void (*disable)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs);
}; };
...@@ -527,11 +504,11 @@ struct omapdss_dvi_ops { ...@@ -527,11 +504,11 @@ struct omapdss_dvi_ops {
void (*disable)(struct omap_dss_device *dssdev); void (*disable)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
}; };
struct omapdss_atv_ops { struct omapdss_atv_ops {
...@@ -544,11 +521,11 @@ struct omapdss_atv_ops { ...@@ -544,11 +521,11 @@ struct omapdss_atv_ops {
void (*disable)(struct omap_dss_device *dssdev); void (*disable)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_type)(struct omap_dss_device *dssdev, void (*set_type)(struct omap_dss_device *dssdev,
enum omap_dss_venc_type type); enum omap_dss_venc_type type);
...@@ -569,11 +546,11 @@ struct omapdss_hdmi_ops { ...@@ -569,11 +546,11 @@ struct omapdss_hdmi_ops {
void (*disable)(struct omap_dss_device *dssdev); void (*disable)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
bool (*detect)(struct omap_dss_device *dssdev); bool (*detect)(struct omap_dss_device *dssdev);
...@@ -679,7 +656,7 @@ struct omap_dss_device { ...@@ -679,7 +656,7 @@ struct omap_dss_device {
} phy; } phy;
struct { struct {
struct omap_video_timings timings; struct videomode timings;
enum omap_dss_dsi_pixel_format dsi_pix_fmt; enum omap_dss_dsi_pixel_format dsi_pix_fmt;
enum omap_dss_dsi_mode dsi_mode; enum omap_dss_dsi_mode dsi_mode;
...@@ -772,11 +749,11 @@ struct omap_dss_driver { ...@@ -772,11 +749,11 @@ struct omap_dss_driver {
int (*get_recommended_bpp)(struct omap_dss_device *dssdev); int (*get_recommended_bpp)(struct omap_dss_device *dssdev);
int (*check_timings)(struct omap_dss_device *dssdev, int (*check_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*set_timings)(struct omap_dss_device *dssdev, void (*set_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
void (*get_timings)(struct omap_dss_device *dssdev, void (*get_timings)(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
u32 (*get_wss)(struct omap_dss_device *dssdev); u32 (*get_wss)(struct omap_dss_device *dssdev);
...@@ -806,11 +783,6 @@ struct omap_dss_device *omap_dss_find_device(void *data, ...@@ -806,11 +783,6 @@ struct omap_dss_device *omap_dss_find_device(void *data,
int (*match)(struct omap_dss_device *dssdev, void *data)); int (*match)(struct omap_dss_device *dssdev, void *data));
const char *omapdss_get_default_display_name(void); 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_mgrs(void);
int dss_feat_get_num_ovls(void); int dss_feat_get_num_ovls(void);
enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
...@@ -839,7 +811,7 @@ void omapdss_default_get_resolution(struct omap_dss_device *dssdev, ...@@ -839,7 +811,7 @@ void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
u16 *xres, u16 *yres); u16 *xres, u16 *yres);
int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
void omapdss_default_get_timings(struct omap_dss_device *dssdev, void omapdss_default_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct videomode *timings);
typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); 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_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
...@@ -893,7 +865,7 @@ void dispc_mgr_go(enum omap_channel channel); ...@@ -893,7 +865,7 @@ void dispc_mgr_go(enum omap_channel channel);
void dispc_mgr_set_lcd_config(enum omap_channel channel, void dispc_mgr_set_lcd_config(enum omap_channel channel,
const struct dss_lcd_mgr_config *config); const struct dss_lcd_mgr_config *config);
void dispc_mgr_set_timings(enum omap_channel channel, void dispc_mgr_set_timings(enum omap_channel channel,
const struct omap_video_timings *timings); const struct videomode *timings);
void dispc_mgr_setup(enum omap_channel channel, void dispc_mgr_setup(enum omap_channel channel,
const struct omap_overlay_manager_info *info); const struct omap_overlay_manager_info *info);
u32 dispc_mgr_gamma_size(enum omap_channel channel); u32 dispc_mgr_gamma_size(enum omap_channel channel);
...@@ -906,7 +878,7 @@ bool dispc_ovl_enabled(enum omap_plane plane); ...@@ -906,7 +878,7 @@ bool dispc_ovl_enabled(enum omap_plane plane);
void dispc_ovl_set_channel_out(enum omap_plane plane, void dispc_ovl_set_channel_out(enum omap_plane plane,
enum omap_channel channel); enum omap_channel channel);
int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
bool replication, const struct omap_video_timings *mgr_timings, bool replication, const struct videomode *mgr_timings,
bool mem_to_mem); bool mem_to_mem);
enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel); enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel);
...@@ -921,7 +893,7 @@ struct dss_mgr_ops { ...@@ -921,7 +893,7 @@ struct dss_mgr_ops {
int (*enable)(enum omap_channel channel); int (*enable)(enum omap_channel channel);
void (*disable)(enum omap_channel channel); void (*disable)(enum omap_channel channel);
void (*set_timings)(enum omap_channel channel, void (*set_timings)(enum omap_channel channel,
const struct omap_video_timings *timings); const struct videomode *timings);
void (*set_lcd_config)(enum omap_channel channel, void (*set_lcd_config)(enum omap_channel channel,
const struct dss_lcd_mgr_config *config); const struct dss_lcd_mgr_config *config);
int (*register_framedone_handler)(enum omap_channel channel, int (*register_framedone_handler)(enum omap_channel channel,
...@@ -938,7 +910,7 @@ int dss_mgr_connect(enum omap_channel channel, ...@@ -938,7 +910,7 @@ int dss_mgr_connect(enum omap_channel channel,
void dss_mgr_disconnect(enum omap_channel channel, void dss_mgr_disconnect(enum omap_channel channel,
struct omap_dss_device *dst); struct omap_dss_device *dst);
void dss_mgr_set_timings(enum omap_channel channel, void dss_mgr_set_timings(enum omap_channel channel,
const struct omap_video_timings *timings); const struct videomode *timings);
void dss_mgr_set_lcd_config(enum omap_channel channel, void dss_mgr_set_lcd_config(enum omap_channel channel,
const struct dss_lcd_mgr_config *config); const struct dss_lcd_mgr_config *config);
int dss_mgr_enable(enum omap_channel channel); int dss_mgr_enable(enum omap_channel channel);
......
...@@ -202,7 +202,7 @@ void dss_mgr_disconnect(enum omap_channel channel, ...@@ -202,7 +202,7 @@ void dss_mgr_disconnect(enum omap_channel channel,
EXPORT_SYMBOL(dss_mgr_disconnect); EXPORT_SYMBOL(dss_mgr_disconnect);
void dss_mgr_set_timings(enum omap_channel channel, void dss_mgr_set_timings(enum omap_channel channel,
const struct omap_video_timings *timings) const struct videomode *timings)
{ {
dss_mgr_ops->set_timings(channel, timings); dss_mgr_ops->set_timings(channel, timings);
} }
......
...@@ -113,7 +113,7 @@ static struct { ...@@ -113,7 +113,7 @@ static struct {
struct semaphore bus_lock; struct semaphore bus_lock;
struct omap_video_timings timings; struct videomode timings;
int pixel_size; int pixel_size;
int data_lines; int data_lines;
struct rfbi_timings intf_timings; struct rfbi_timings intf_timings;
......
...@@ -39,7 +39,7 @@ static struct { ...@@ -39,7 +39,7 @@ static struct {
struct regulator *vdds_sdi_reg; struct regulator *vdds_sdi_reg;
struct dss_lcd_mgr_config mgr_config; struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings; struct videomode timings;
int datapairs; int datapairs;
struct omap_dss_device output; struct omap_dss_device output;
...@@ -131,7 +131,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -131,7 +131,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_device *out = &sdi.output; struct omap_dss_device *out = &sdi.output;
enum omap_channel channel = dssdev->dispc_channel; enum omap_channel channel = dssdev->dispc_channel;
struct omap_video_timings *t = &sdi.timings; struct videomode *t = &sdi.timings;
unsigned long fck; unsigned long fck;
struct dispc_clock_info dispc_cinfo; struct dispc_clock_info dispc_cinfo;
unsigned long pck; unsigned long pck;
...@@ -228,19 +228,19 @@ static void sdi_display_disable(struct omap_dss_device *dssdev) ...@@ -228,19 +228,19 @@ static void sdi_display_disable(struct omap_dss_device *dssdev)
} }
static void sdi_set_timings(struct omap_dss_device *dssdev, static void sdi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
sdi.timings = *timings; sdi.timings = *timings;
} }
static void sdi_get_timings(struct omap_dss_device *dssdev, static void sdi_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
*timings = sdi.timings; *timings = sdi.timings;
} }
static int sdi_check_timings(struct omap_dss_device *dssdev, static int sdi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
enum omap_channel channel = dssdev->dispc_channel; enum omap_channel channel = dssdev->dispc_channel;
......
...@@ -262,7 +262,7 @@ static const struct venc_config venc_config_pal_bdghi = { ...@@ -262,7 +262,7 @@ static const struct venc_config venc_config_pal_bdghi = {
.fid_ext_start_y__fid_ext_offset_y = 0x01380005, .fid_ext_start_y__fid_ext_offset_y = 0x01380005,
}; };
const struct omap_video_timings omap_dss_pal_timings = { const struct videomode omap_dss_pal_timings = {
.hactive = 720, .hactive = 720,
.vactive = 574, .vactive = 574,
.pixelclock = 13500000, .pixelclock = 13500000,
...@@ -280,7 +280,7 @@ const struct omap_video_timings omap_dss_pal_timings = { ...@@ -280,7 +280,7 @@ const struct omap_video_timings omap_dss_pal_timings = {
}; };
EXPORT_SYMBOL(omap_dss_pal_timings); EXPORT_SYMBOL(omap_dss_pal_timings);
const struct omap_video_timings omap_dss_ntsc_timings = { const struct videomode omap_dss_ntsc_timings = {
.hactive = 720, .hactive = 720,
.vactive = 482, .vactive = 482,
.pixelclock = 13500000, .pixelclock = 13500000,
...@@ -307,7 +307,7 @@ static struct { ...@@ -307,7 +307,7 @@ static struct {
struct clk *tv_dac_clk; struct clk *tv_dac_clk;
struct omap_video_timings timings; struct videomode timings;
enum omap_dss_venc_type type; enum omap_dss_venc_type type;
bool invert_polarity; bool invert_polarity;
...@@ -422,7 +422,7 @@ static void venc_runtime_put(void) ...@@ -422,7 +422,7 @@ static void venc_runtime_put(void)
} }
static const struct venc_config *venc_timings_to_config( static const struct venc_config *venc_timings_to_config(
struct omap_video_timings *timings) struct videomode *timings)
{ {
if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0) if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0)
return &venc_config_pal_trm; return &venc_config_pal_trm;
...@@ -540,7 +540,7 @@ static void venc_display_disable(struct omap_dss_device *dssdev) ...@@ -540,7 +540,7 @@ static void venc_display_disable(struct omap_dss_device *dssdev)
} }
static void venc_set_timings(struct omap_dss_device *dssdev, static void venc_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
DSSDBG("venc_set_timings\n"); DSSDBG("venc_set_timings\n");
...@@ -558,7 +558,7 @@ static void venc_set_timings(struct omap_dss_device *dssdev, ...@@ -558,7 +558,7 @@ static void venc_set_timings(struct omap_dss_device *dssdev,
} }
static int venc_check_timings(struct omap_dss_device *dssdev, static int venc_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
DSSDBG("venc_check_timings\n"); DSSDBG("venc_check_timings\n");
...@@ -572,7 +572,7 @@ static int venc_check_timings(struct omap_dss_device *dssdev, ...@@ -572,7 +572,7 @@ static int venc_check_timings(struct omap_dss_device *dssdev,
} }
static void venc_get_timings(struct omap_dss_device *dssdev, static void venc_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct videomode *timings)
{ {
mutex_lock(&venc.venc_lock); mutex_lock(&venc.venc_lock);
......
...@@ -42,76 +42,6 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector) ...@@ -42,76 +42,6 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector)
return omap_connector->hdmi_mode; return omap_connector->hdmi_mode;
} }
void copy_timings_omap_to_drm(struct drm_display_mode *mode,
struct omap_video_timings *timings)
{
mode->clock = timings->pixelclock / 1000;
mode->hdisplay = timings->hactive;
mode->hsync_start = mode->hdisplay + timings->hfront_porch;
mode->hsync_end = mode->hsync_start + timings->hsync_len;
mode->htotal = mode->hsync_end + timings->hback_porch;
mode->vdisplay = timings->vactive;
mode->vsync_start = mode->vdisplay + timings->vfront_porch;
mode->vsync_end = mode->vsync_start + timings->vsync_len;
mode->vtotal = mode->vsync_end + timings->vback_porch;
mode->flags = 0;
if (timings->flags & DISPLAY_FLAGS_INTERLACED)
mode->flags |= DRM_MODE_FLAG_INTERLACE;
if (timings->flags & DISPLAY_FLAGS_DOUBLECLK)
mode->flags |= DRM_MODE_FLAG_DBLCLK;
if (timings->flags & DISPLAY_FLAGS_HSYNC_HIGH)
mode->flags |= DRM_MODE_FLAG_PHSYNC;
else
mode->flags |= DRM_MODE_FLAG_NHSYNC;
if (timings->flags & DISPLAY_FLAGS_VSYNC_HIGH)
mode->flags |= DRM_MODE_FLAG_PVSYNC;
else
mode->flags |= DRM_MODE_FLAG_NVSYNC;
}
void copy_timings_drm_to_omap(struct omap_video_timings *timings,
struct drm_display_mode *mode)
{
timings->pixelclock = mode->clock * 1000;
timings->hactive = mode->hdisplay;
timings->hfront_porch = mode->hsync_start - mode->hdisplay;
timings->hsync_len = mode->hsync_end - mode->hsync_start;
timings->hback_porch = mode->htotal - mode->hsync_end;
timings->vactive = mode->vdisplay;
timings->vfront_porch = mode->vsync_start - mode->vdisplay;
timings->vsync_len = mode->vsync_end - mode->vsync_start;
timings->vback_porch = mode->vtotal - mode->vsync_end;
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
timings->flags |= DISPLAY_FLAGS_INTERLACED;
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
timings->flags |= DISPLAY_FLAGS_DOUBLECLK;
if (mode->flags & DRM_MODE_FLAG_PHSYNC)
timings->flags |= DISPLAY_FLAGS_HSYNC_HIGH;
else
timings->flags |= DISPLAY_FLAGS_HSYNC_LOW;
if (mode->flags & DRM_MODE_FLAG_PVSYNC)
timings->flags |= DISPLAY_FLAGS_VSYNC_HIGH;
else
timings->flags |= DISPLAY_FLAGS_VSYNC_LOW;
timings->flags |= DISPLAY_FLAGS_DE_HIGH |
DISPLAY_FLAGS_PIXDATA_POSEDGE |
DISPLAY_FLAGS_SYNC_NEGEDGE;
}
static enum drm_connector_status omap_connector_detect( static enum drm_connector_status omap_connector_detect(
struct drm_connector *connector, bool force) struct drm_connector *connector, bool force)
{ {
...@@ -188,11 +118,11 @@ static int omap_connector_get_modes(struct drm_connector *connector) ...@@ -188,11 +118,11 @@ static int omap_connector_get_modes(struct drm_connector *connector)
kfree(edid); kfree(edid);
} else { } else {
struct drm_display_mode *mode = drm_mode_create(dev); struct drm_display_mode *mode = drm_mode_create(dev);
struct omap_video_timings timings = {0}; struct videomode timings = {0};
dssdrv->get_timings(dssdev, &timings); dssdrv->get_timings(dssdev, &timings);
copy_timings_omap_to_drm(mode, &timings); drm_display_mode_from_videomode(&timings, mode);
mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
drm_mode_set_name(mode); drm_mode_set_name(mode);
...@@ -210,12 +140,14 @@ static int omap_connector_mode_valid(struct drm_connector *connector, ...@@ -210,12 +140,14 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
struct omap_connector *omap_connector = to_omap_connector(connector); struct omap_connector *omap_connector = to_omap_connector(connector);
struct omap_dss_device *dssdev = omap_connector->dssdev; struct omap_dss_device *dssdev = omap_connector->dssdev;
struct omap_dss_driver *dssdrv = dssdev->driver; struct omap_dss_driver *dssdrv = dssdev->driver;
struct omap_video_timings timings = {0}; struct videomode timings = {0};
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct drm_display_mode *new_mode; struct drm_display_mode *new_mode;
int r, ret = MODE_BAD; int r, ret = MODE_BAD;
copy_timings_drm_to_omap(&timings, mode); drm_display_mode_to_videomode(mode, &timings);
timings.flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
DISPLAY_FLAGS_SYNC_NEGEDGE;
mode->vrefresh = drm_mode_vrefresh(mode); mode->vrefresh = drm_mode_vrefresh(mode);
/* /*
...@@ -226,11 +158,11 @@ static int omap_connector_mode_valid(struct drm_connector *connector, ...@@ -226,11 +158,11 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
if (dssdrv->check_timings) { if (dssdrv->check_timings) {
r = dssdrv->check_timings(dssdev, &timings); r = dssdrv->check_timings(dssdev, &timings);
} else { } else {
struct omap_video_timings t = {0}; struct videomode t = {0};
dssdrv->get_timings(dssdev, &t); dssdrv->get_timings(dssdev, &t);
if (memcmp(&timings, &t, sizeof(struct omap_video_timings))) if (memcmp(&timings, &t, sizeof(struct videomode)))
r = -EINVAL; r = -EINVAL;
else else
r = 0; r = 0;
......
...@@ -34,7 +34,7 @@ struct omap_crtc { ...@@ -34,7 +34,7 @@ struct omap_crtc {
const char *name; const char *name;
enum omap_channel channel; enum omap_channel channel;
struct omap_video_timings timings; struct videomode timings;
struct omap_drm_irq vblank_irq; struct omap_drm_irq vblank_irq;
struct omap_drm_irq error_irq; struct omap_drm_irq error_irq;
...@@ -56,7 +56,7 @@ uint32_t pipe2vbl(struct drm_crtc *crtc) ...@@ -56,7 +56,7 @@ uint32_t pipe2vbl(struct drm_crtc *crtc)
return dispc_mgr_get_vsync_irq(omap_crtc->channel); return dispc_mgr_get_vsync_irq(omap_crtc->channel);
} }
struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc) struct videomode *omap_crtc_timings(struct drm_crtc *crtc)
{ {
struct omap_crtc *omap_crtc = to_omap_crtc(crtc); struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
return &omap_crtc->timings; return &omap_crtc->timings;
...@@ -215,7 +215,7 @@ static void omap_crtc_dss_disable(enum omap_channel channel) ...@@ -215,7 +215,7 @@ static void omap_crtc_dss_disable(enum omap_channel channel)
} }
static void omap_crtc_dss_set_timings(enum omap_channel channel, static void omap_crtc_dss_set_timings(enum omap_channel channel,
const struct omap_video_timings *timings) const struct videomode *timings)
{ {
struct omap_crtc *omap_crtc = omap_crtcs[channel]; struct omap_crtc *omap_crtc = omap_crtcs[channel];
DBG("%s", omap_crtc->name); DBG("%s", omap_crtc->name);
...@@ -369,7 +369,10 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) ...@@ -369,7 +369,10 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc)
mode->vdisplay, mode->vsync_start, mode->vsync_end, mode->vtotal, mode->vdisplay, mode->vsync_start, mode->vsync_end, mode->vtotal,
mode->type, mode->flags); mode->type, mode->flags);
copy_timings_drm_to_omap(&omap_crtc->timings, mode); drm_display_mode_to_videomode(mode, &omap_crtc->timings);
omap_crtc->timings.flags |= DISPLAY_FLAGS_DE_HIGH |
DISPLAY_FLAGS_PIXDATA_POSEDGE |
DISPLAY_FLAGS_SYNC_NEGEDGE;
} }
static int omap_crtc_atomic_check(struct drm_crtc *crtc, static int omap_crtc_atomic_check(struct drm_crtc *crtc,
......
...@@ -148,7 +148,7 @@ static inline void omap_fbdev_free(struct drm_device *dev) ...@@ -148,7 +148,7 @@ static inline void omap_fbdev_free(struct drm_device *dev)
} }
#endif #endif
struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc); struct videomode *omap_crtc_timings(struct drm_crtc *crtc);
enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); enum omap_channel omap_crtc_channel(struct drm_crtc *crtc);
void omap_crtc_pre_init(void); void omap_crtc_pre_init(void);
void omap_crtc_pre_uninit(void); void omap_crtc_pre_uninit(void);
...@@ -171,11 +171,6 @@ struct drm_encoder *omap_connector_attached_encoder( ...@@ -171,11 +171,6 @@ struct drm_encoder *omap_connector_attached_encoder(
struct drm_connector *connector); struct drm_connector *connector);
bool omap_connector_get_hdmi_mode(struct drm_connector *connector); bool omap_connector_get_hdmi_mode(struct drm_connector *connector);
void copy_timings_omap_to_drm(struct drm_display_mode *mode,
struct omap_video_timings *timings);
void copy_timings_drm_to_omap(struct omap_video_timings *timings,
struct drm_display_mode *mode);
uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats,
uint32_t max_formats, enum omap_color_mode supported_modes); uint32_t max_formats, enum omap_color_mode supported_modes);
struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
......
...@@ -102,7 +102,7 @@ static void omap_encoder_disable(struct drm_encoder *encoder) ...@@ -102,7 +102,7 @@ static void omap_encoder_disable(struct drm_encoder *encoder)
static int omap_encoder_update(struct drm_encoder *encoder, static int omap_encoder_update(struct drm_encoder *encoder,
enum omap_channel channel, enum omap_channel channel,
struct omap_video_timings *timings) struct videomode *timings)
{ {
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct omap_encoder *omap_encoder = to_omap_encoder(encoder); struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
...@@ -113,11 +113,11 @@ static int omap_encoder_update(struct drm_encoder *encoder, ...@@ -113,11 +113,11 @@ static int omap_encoder_update(struct drm_encoder *encoder,
if (dssdrv->check_timings) { if (dssdrv->check_timings) {
ret = dssdrv->check_timings(dssdev, timings); ret = dssdrv->check_timings(dssdev, timings);
} else { } else {
struct omap_video_timings t = {0}; struct videomode t = {0};
dssdrv->get_timings(dssdev, &t); dssdrv->get_timings(dssdev, &t);
if (memcmp(timings, &t, sizeof(struct omap_video_timings))) if (memcmp(timings, &t, sizeof(struct videomode)))
ret = -EINVAL; ret = -EINVAL;
else else
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment