Commit 88bc4178 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags

The DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE and
DRM_BUS_FLAG_SYNC_(POS|NEG)EDGE flags are deprecated in favour of the
new DRM_BUS_FLAG_PIXDATA_(DRIVE|SAMPLE)_(POS|NEG)EDGE and
new DRM_BUS_FLAG_SYNC_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags. Replace them
through the code.

This effectively changes the value of the .sampling_edge bridge timings
field in the dumb-vga-dac driver. This is safe to do as no driver
consumes these values yet.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarStefan Agner <stefan@agner.ch>
Tested-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent a792fa0e
...@@ -234,7 +234,7 @@ static int dumb_vga_remove(struct platform_device *pdev) ...@@ -234,7 +234,7 @@ static int dumb_vga_remove(struct platform_device *pdev)
*/ */
static const struct drm_bridge_timings default_dac_timings = { static const struct drm_bridge_timings default_dac_timings = {
/* Timing specifications, datasheet page 7 */ /* Timing specifications, datasheet page 7 */
.sampling_edge = DRM_BUS_FLAG_PIXDATA_POSEDGE, .sampling_edge = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
.setup_time_ps = 500, .setup_time_ps = 500,
.hold_time_ps = 1500, .hold_time_ps = 1500,
}; };
...@@ -245,7 +245,7 @@ static const struct drm_bridge_timings default_dac_timings = { ...@@ -245,7 +245,7 @@ static const struct drm_bridge_timings default_dac_timings = {
*/ */
static const struct drm_bridge_timings ti_ths8134_dac_timings = { static const struct drm_bridge_timings ti_ths8134_dac_timings = {
/* From timing diagram, datasheet page 9 */ /* From timing diagram, datasheet page 9 */
.sampling_edge = DRM_BUS_FLAG_PIXDATA_POSEDGE, .sampling_edge = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
/* From datasheet, page 12 */ /* From datasheet, page 12 */
.setup_time_ps = 3000, .setup_time_ps = 3000,
/* I guess this means latched input */ /* I guess this means latched input */
...@@ -258,7 +258,7 @@ static const struct drm_bridge_timings ti_ths8134_dac_timings = { ...@@ -258,7 +258,7 @@ static const struct drm_bridge_timings ti_ths8134_dac_timings = {
*/ */
static const struct drm_bridge_timings ti_ths8135_dac_timings = { static const struct drm_bridge_timings ti_ths8135_dac_timings = {
/* From timing diagram, datasheet page 14 */ /* From timing diagram, datasheet page 14 */
.sampling_edge = DRM_BUS_FLAG_PIXDATA_POSEDGE, .sampling_edge = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
/* From datasheet, page 16 */ /* From datasheet, page 16 */
.setup_time_ps = 2000, .setup_time_ps = 2000,
.hold_time_ps = 500, .hold_time_ps = 500,
......
...@@ -1222,8 +1222,8 @@ static int tc_bridge_attach(struct drm_bridge *bridge) ...@@ -1222,8 +1222,8 @@ static int tc_bridge_attach(struct drm_bridge *bridge)
&bus_format, 1); &bus_format, 1);
tc->connector.display_info.bus_flags = tc->connector.display_info.bus_flags =
DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_DE_HIGH |
DRM_BUS_FLAG_PIXDATA_NEGEDGE | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE |
DRM_BUS_FLAG_SYNC_NEGEDGE; DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE;
drm_connector_attach_encoder(&tc->connector, tc->bridge.encoder); drm_connector_attach_encoder(&tc->connector, tc->bridge.encoder);
return 0; return 0;
......
...@@ -655,22 +655,22 @@ EXPORT_SYMBOL_GPL(drm_display_mode_to_videomode); ...@@ -655,22 +655,22 @@ EXPORT_SYMBOL_GPL(drm_display_mode_to_videomode);
* @bus_flags: information about pixelclk, sync and DE polarity will be stored * @bus_flags: information about pixelclk, sync and DE polarity will be stored
* here * here
* *
* Sets DRM_BUS_FLAG_DE_(LOW|HIGH), DRM_BUS_FLAG_PIXDATA_(POS|NEG)EDGE and * Sets DRM_BUS_FLAG_DE_(LOW|HIGH), DRM_BUS_FLAG_PIXDATA_DRIVE_(POS|NEG)EDGE
* DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in @bus_flags according to DISPLAY_FLAGS * and DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in @bus_flags according to DISPLAY_FLAGS
* found in @vm * found in @vm
*/ */
void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags) void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags)
{ {
*bus_flags = 0; *bus_flags = 0;
if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
*bus_flags |= DRM_BUS_FLAG_PIXDATA_POSEDGE; *bus_flags |= DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
*bus_flags |= DRM_BUS_FLAG_PIXDATA_NEGEDGE; *bus_flags |= DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE;
if (vm->flags & DISPLAY_FLAGS_SYNC_POSEDGE) if (vm->flags & DISPLAY_FLAGS_SYNC_POSEDGE)
*bus_flags |= DRM_BUS_FLAG_SYNC_POSEDGE; *bus_flags |= DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE;
if (vm->flags & DISPLAY_FLAGS_SYNC_NEGEDGE) if (vm->flags & DISPLAY_FLAGS_SYNC_NEGEDGE)
*bus_flags |= DRM_BUS_FLAG_SYNC_NEGEDGE; *bus_flags |= DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE;
if (vm->flags & DISPLAY_FLAGS_DE_LOW) if (vm->flags & DISPLAY_FLAGS_DE_LOW)
*bus_flags |= DRM_BUS_FLAG_DE_LOW; *bus_flags |= DRM_BUS_FLAG_DE_LOW;
......
...@@ -94,7 +94,7 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) ...@@ -94,7 +94,7 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
drm_display_mode_to_videomode(mode, &vm); drm_display_mode_to_videomode(mode, &vm);
/* INV_PXCK as default (most display sample data on rising edge) */ /* INV_PXCK as default (most display sample data on rising edge) */
if (!(con->display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE)) if (!(con->display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE))
pol |= DCU_SYN_POL_INV_PXCK; pol |= DCU_SYN_POL_INV_PXCK;
if (vm.flags & DISPLAY_FLAGS_HSYNC_LOW) if (vm.flags & DISPLAY_FLAGS_HSYNC_LOW)
......
...@@ -295,7 +295,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc) ...@@ -295,7 +295,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc)
sig_cfg.enable_pol = !(imx_crtc_state->bus_flags & DRM_BUS_FLAG_DE_LOW); sig_cfg.enable_pol = !(imx_crtc_state->bus_flags & DRM_BUS_FLAG_DE_LOW);
/* Default to driving pixel data on negative clock edges */ /* Default to driving pixel data on negative clock edges */
sig_cfg.clk_pol = !!(imx_crtc_state->bus_flags & sig_cfg.clk_pol = !!(imx_crtc_state->bus_flags &
DRM_BUS_FLAG_PIXDATA_POSEDGE); DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE);
sig_cfg.bus_format = imx_crtc_state->bus_format; sig_cfg.bus_format = imx_crtc_state->bus_format;
sig_cfg.v_to_h_sync = 0; sig_cfg.v_to_h_sync = 0;
sig_cfg.hsync_pin = imx_crtc_state->di_hsync_pin; sig_cfg.hsync_pin = imx_crtc_state->di_hsync_pin;
......
...@@ -253,12 +253,12 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) ...@@ -253,12 +253,12 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb)
if (!(bus_flags & DRM_BUS_FLAG_DE_LOW)) if (!(bus_flags & DRM_BUS_FLAG_DE_LOW))
vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH;
/* /*
* DRM_BUS_FLAG_PIXDATA_ defines are controller centric, * DRM_BUS_FLAG_PIXDATA_DRIVE_ defines are controller centric,
* controllers VDCTRL0_DOTCLK is display centric. * controllers VDCTRL0_DOTCLK is display centric.
* Drive on positive edge -> display samples on falling edge * Drive on positive edge -> display samples on falling edge
* DRM_BUS_FLAG_PIXDATA_POSEDGE -> VDCTRL0_DOTCLK_ACT_FALLING * DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE -> VDCTRL0_DOTCLK_ACT_FALLING
*/ */
if (bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) if (bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE)
vdctrl0 |= VDCTRL0_DOTCLK_ACT_FALLING; vdctrl0 |= VDCTRL0_DOTCLK_ACT_FALLING;
writel(vdctrl0, mxsfb->base + LCDC_VDCTRL0); writel(vdctrl0, mxsfb->base + LCDC_VDCTRL0);
......
...@@ -86,8 +86,9 @@ static int tfp410_probe(struct platform_device *pdev) ...@@ -86,8 +86,9 @@ static int tfp410_probe(struct platform_device *pdev)
dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->type = OMAP_DISPLAY_TYPE_DPI;
dssdev->owner = THIS_MODULE; dssdev->owner = THIS_MODULE;
dssdev->of_ports = BIT(1) | BIT(0); dssdev->of_ports = BIT(1) | BIT(0);
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_POSEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
dssdev->next = omapdss_of_find_connected_device(pdev->dev.of_node, 1); dssdev->next = omapdss_of_find_connected_device(pdev->dev.of_node, 1);
if (IS_ERR(dssdev->next)) { if (IS_ERR(dssdev->next)) {
......
...@@ -207,8 +207,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) ...@@ -207,8 +207,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
* DE is active LOW * DE is active LOW
* DATA needs to be driven on the FALLING edge * DATA needs to be driven on the FALLING edge
*/ */
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_NEGEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -196,8 +196,9 @@ static int nec_8048_probe(struct spi_device *spi) ...@@ -196,8 +196,9 @@ static int nec_8048_probe(struct spi_device *spi)
dssdev->owner = THIS_MODULE; dssdev->owner = THIS_MODULE;
dssdev->of_ports = BIT(0); dssdev->of_ports = BIT(0);
dssdev->ops_flags = OMAP_DSS_DEVICE_OP_MODES; dssdev->ops_flags = OMAP_DSS_DEVICE_OP_MODES;
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_POSEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -216,8 +216,9 @@ static int sharp_ls_probe(struct platform_device *pdev) ...@@ -216,8 +216,9 @@ static int sharp_ls_probe(struct platform_device *pdev)
* Note: According to the panel documentation: * Note: According to the panel documentation:
* DATA needs to be driven on the FALLING edge * DATA needs to be driven on the FALLING edge
*/ */
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_NEGEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -710,8 +710,9 @@ static int acx565akm_probe(struct spi_device *spi) ...@@ -710,8 +710,9 @@ static int acx565akm_probe(struct spi_device *spi)
dssdev->owner = THIS_MODULE; dssdev->owner = THIS_MODULE;
dssdev->of_ports = BIT(0); dssdev->of_ports = BIT(0);
dssdev->ops_flags = OMAP_DSS_DEVICE_OP_MODES; dssdev->ops_flags = OMAP_DSS_DEVICE_OP_MODES;
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_NEGEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -330,8 +330,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi) ...@@ -330,8 +330,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
* Note: According to the panel documentation: * Note: According to the panel documentation:
* SYNC needs to be driven on the FALLING edge * SYNC needs to be driven on the FALLING edge
*/ */
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_POSEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_NEGEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -429,8 +429,9 @@ static int tpo_td043_probe(struct spi_device *spi) ...@@ -429,8 +429,9 @@ static int tpo_td043_probe(struct spi_device *spi)
* Note: According to the panel documentation: * Note: According to the panel documentation:
* SYNC needs to be driven on the FALLING edge * SYNC needs to be driven on the FALLING edge
*/ */
dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_SYNC_POSEDGE dssdev->bus_flags = DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_NEGEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE
| DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE;
omapdss_display_init(dssdev); omapdss_display_init(dssdev);
omapdss_device_register(dssdev); omapdss_device_register(dssdev);
......
...@@ -5127,9 +5127,9 @@ static int dsi_init_output(struct dsi_data *dsi) ...@@ -5127,9 +5127,9 @@ static int dsi_init_output(struct dsi_data *dsi)
out->ops = &dsi_ops; out->ops = &dsi_ops;
out->owner = THIS_MODULE; out->owner = THIS_MODULE;
out->of_ports = BIT(0); out->of_ports = BIT(0);
out->bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE out->bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE
| DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_SYNC_NEGEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE;
r = omapdss_device_init_output(out); r = omapdss_device_init_output(out);
if (r < 0) if (r < 0)
......
...@@ -279,8 +279,8 @@ static int sdi_init_output(struct sdi_device *sdi) ...@@ -279,8 +279,8 @@ static int sdi_init_output(struct sdi_device *sdi)
out->of_ports = BIT(1); out->of_ports = BIT(1);
out->ops = &sdi_ops; out->ops = &sdi_ops;
out->owner = THIS_MODULE; out->owner = THIS_MODULE;
out->bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE /* 15.5.9.1.2 */ out->bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE /* 15.5.9.1.2 */
| DRM_BUS_FLAG_SYNC_POSEDGE; | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE;
r = omapdss_device_init_output(out); r = omapdss_device_init_output(out);
if (r < 0) if (r < 0)
......
...@@ -114,17 +114,17 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder, ...@@ -114,17 +114,17 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
if (!(vm.flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE | if (!(vm.flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
DISPLAY_FLAGS_PIXDATA_NEGEDGE))) { DISPLAY_FLAGS_PIXDATA_NEGEDGE))) {
if (bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) if (bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE)
vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE; vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
else if (bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) else if (bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
vm.flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE; vm.flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE;
} }
if (!(vm.flags & (DISPLAY_FLAGS_SYNC_POSEDGE | if (!(vm.flags & (DISPLAY_FLAGS_SYNC_POSEDGE |
DISPLAY_FLAGS_SYNC_NEGEDGE))) { DISPLAY_FLAGS_SYNC_NEGEDGE))) {
if (bus_flags & DRM_BUS_FLAG_SYNC_POSEDGE) if (bus_flags & DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE)
vm.flags |= DISPLAY_FLAGS_SYNC_POSEDGE; vm.flags |= DISPLAY_FLAGS_SYNC_POSEDGE;
else if (bus_flags & DRM_BUS_FLAG_SYNC_NEGEDGE) else if (bus_flags & DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE)
vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE; vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
} }
} }
......
...@@ -191,7 +191,7 @@ static const struct versatile_panel_type versatile_panels[] = { ...@@ -191,7 +191,7 @@ static const struct versatile_panel_type versatile_panels[] = {
.vrefresh = 390, .vrefresh = 390,
.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
}, },
/* /*
* Sanyo ALR252RGT 240x320 portrait display found on the * Sanyo ALR252RGT 240x320 portrait display found on the
...@@ -215,7 +215,7 @@ static const struct versatile_panel_type versatile_panels[] = { ...@@ -215,7 +215,7 @@ static const struct versatile_panel_type versatile_panels[] = {
.vrefresh = 116, .vrefresh = 116,
.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
.ib2 = true, .ib2 = true,
}, },
}; };
......
...@@ -412,11 +412,11 @@ static int ili9322_init(struct drm_panel *panel, struct ili9322 *ili) ...@@ -412,11 +412,11 @@ static int ili9322_init(struct drm_panel *panel, struct ili9322 *ili)
if (ili->conf->dclk_active_high) { if (ili->conf->dclk_active_high) {
reg = ILI9322_POL_DCLK; reg = ILI9322_POL_DCLK;
connector->display_info.bus_flags |= connector->display_info.bus_flags |=
DRM_BUS_FLAG_PIXDATA_POSEDGE; DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
} else { } else {
reg = 0; reg = 0;
connector->display_info.bus_flags |= connector->display_info.bus_flags |=
DRM_BUS_FLAG_PIXDATA_NEGEDGE; DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE;
} }
if (ili->conf->de_active_high) { if (ili->conf->de_active_high) {
reg |= ILI9322_POL_DE; reg |= ILI9322_POL_DE;
......
...@@ -328,7 +328,7 @@ static const struct seiko_panel_desc seiko_43wvf1g = { ...@@ -328,7 +328,7 @@ static const struct seiko_panel_desc seiko_43wvf1g = {
.height = 57, .height = 57,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
}; };
static const struct of_device_id platform_of_match[] = { static const struct of_device_id platform_of_match[] = {
......
...@@ -914,7 +914,7 @@ static const struct panel_desc cdtech_s043wq26h_ct7 = { ...@@ -914,7 +914,7 @@ static const struct panel_desc cdtech_s043wq26h_ct7 = {
.width = 95, .width = 95,
.height = 54, .height = 54,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode cdtech_s070wv95_ct16_mode = { static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
...@@ -1034,7 +1034,7 @@ static const struct panel_desc dataimage_scf0700c48ggu18 = { ...@@ -1034,7 +1034,7 @@ static const struct panel_desc dataimage_scf0700c48ggu18 = {
.height = 91, .height = 91,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct display_timing dlc_dlc0700yzg_1_timing = { static const struct display_timing dlc_dlc0700yzg_1_timing = {
...@@ -1119,7 +1119,7 @@ static const struct panel_desc edt_et057090dhu = { ...@@ -1119,7 +1119,7 @@ static const struct panel_desc edt_et057090dhu = {
.height = 86, .height = 86,
}, },
.bus_format = MEDIA_BUS_FMT_RGB666_1X18, .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
}; };
static const struct drm_display_mode edt_etm0700g0dh6_mode = { static const struct drm_display_mode edt_etm0700g0dh6_mode = {
...@@ -1145,7 +1145,7 @@ static const struct panel_desc edt_etm0700g0dh6 = { ...@@ -1145,7 +1145,7 @@ static const struct panel_desc edt_etm0700g0dh6 = {
.height = 91, .height = 91,
}, },
.bus_format = MEDIA_BUS_FMT_RGB666_1X18, .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
}; };
static const struct panel_desc edt_etm0700g0bdh6 = { static const struct panel_desc edt_etm0700g0bdh6 = {
...@@ -1157,7 +1157,7 @@ static const struct panel_desc edt_etm0700g0bdh6 = { ...@@ -1157,7 +1157,7 @@ static const struct panel_desc edt_etm0700g0bdh6 = {
.height = 91, .height = 91,
}, },
.bus_format = MEDIA_BUS_FMT_RGB666_1X18, .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
...@@ -1311,7 +1311,7 @@ static const struct panel_desc innolux_at043tn24 = { ...@@ -1311,7 +1311,7 @@ static const struct panel_desc innolux_at043tn24 = {
.height = 54, .height = 54,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode innolux_at070tn92_mode = { static const struct drm_display_mode innolux_at070tn92_mode = {
...@@ -1818,7 +1818,7 @@ static const struct panel_desc nec_nl4827hc19_05b = { ...@@ -1818,7 +1818,7 @@ static const struct panel_desc nec_nl4827hc19_05b = {
.height = 54, .height = 54,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode netron_dy_e231732_mode = { static const struct drm_display_mode netron_dy_e231732_mode = {
...@@ -1867,8 +1867,8 @@ static const struct panel_desc newhaven_nhd_43_480272ef_atxl = { ...@@ -1867,8 +1867,8 @@ static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
.height = 54, .height = 54,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
DRM_BUS_FLAG_SYNC_POSEDGE, DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
}; };
static const struct display_timing nlt_nl192108ac18_02d_timing = { static const struct display_timing nlt_nl192108ac18_02d_timing = {
...@@ -2029,7 +2029,7 @@ static const struct panel_desc ortustech_com43h4m85ulc = { ...@@ -2029,7 +2029,7 @@ static const struct panel_desc ortustech_com43h4m85ulc = {
.height = 93, .height = 93,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode pda_91_00156_a0_mode = { static const struct drm_display_mode pda_91_00156_a0_mode = {
...@@ -2398,7 +2398,7 @@ static const struct panel_desc toshiba_lt089ac29000 = { ...@@ -2398,7 +2398,7 @@ static const struct panel_desc toshiba_lt089ac29000 = {
.height = 116, .height = 116,
}, },
.bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode tpk_f07a_0102_mode = { static const struct drm_display_mode tpk_f07a_0102_mode = {
...@@ -2421,7 +2421,7 @@ static const struct panel_desc tpk_f07a_0102 = { ...@@ -2421,7 +2421,7 @@ static const struct panel_desc tpk_f07a_0102 = {
.width = 152, .width = 152,
.height = 91, .height = 91,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
static const struct drm_display_mode tpk_f10a_0102_mode = { static const struct drm_display_mode tpk_f10a_0102_mode = {
......
...@@ -118,7 +118,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = { ...@@ -118,7 +118,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = {
.vtotal = 480 + 10 + 1 + 35, .vtotal = 480 + 10 + 1 + 35,
.vrefresh = 60, .vrefresh = 60,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}, },
{ {
.name = "640x480 RGB", .name = "640x480 RGB",
...@@ -135,7 +135,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = { ...@@ -135,7 +135,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = {
.vtotal = 480 + 18 + 1 + 27, .vtotal = 480 + 18 + 1 + 27,
.vrefresh = 60, .vrefresh = 60,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}, },
{ {
.name = "480x272 RGB", .name = "480x272 RGB",
...@@ -152,7 +152,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = { ...@@ -152,7 +152,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = {
.vtotal = 272 + 2 + 1 + 12, .vtotal = 272 + 2 + 1 + 12,
.vrefresh = 60, .vrefresh = 60,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}, },
{ {
.name = "480x640 RGB", .name = "480x640 RGB",
...@@ -169,7 +169,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = { ...@@ -169,7 +169,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = {
.vtotal = 640 + 4 + 1 + 8, .vtotal = 640 + 4 + 1 + 8,
.vrefresh = 60, .vrefresh = 60,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}, },
{ {
.name = "400x240 RGB", .name = "400x240 RGB",
...@@ -186,7 +186,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = { ...@@ -186,7 +186,7 @@ static const struct tpg110_panel_mode tpg110_modes[] = {
.vtotal = 240 + 2 + 1 + 20, .vtotal = 240 + 2 + 1 + 20,
.vrefresh = 60, .vrefresh = 60,
}, },
.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}, },
}; };
......
...@@ -188,7 +188,7 @@ static void pl111_display_enable(struct drm_simple_display_pipe *pipe, ...@@ -188,7 +188,7 @@ static void pl111_display_enable(struct drm_simple_display_pipe *pipe,
tim2 |= TIM2_IOE; tim2 |= TIM2_IOE;
if (connector->display_info.bus_flags & if (connector->display_info.bus_flags &
DRM_BUS_FLAG_PIXDATA_NEGEDGE) DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
tim2 |= TIM2_IPC; tim2 |= TIM2_IPC;
} }
......
...@@ -561,10 +561,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, ...@@ -561,10 +561,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
* Following code is a way to avoid quirks all around TCON * Following code is a way to avoid quirks all around TCON
* and DOTCLOCK drivers. * and DOTCLOCK drivers.
*/ */
if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE)
clk_set_phase(tcon->dclk, 240); clk_set_phase(tcon->dclk, 240);
if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
clk_set_phase(tcon->dclk, 0); clk_set_phase(tcon->dclk, 0);
regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
......
...@@ -149,7 +149,8 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe, ...@@ -149,7 +149,8 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
/* Vsync IRQ at start of Vsync at first */ /* Vsync IRQ at start of Vsync at first */
ctrl1 |= TVE200_VSTSTYPE_VSYNC; ctrl1 |= TVE200_VSTSTYPE_VSYNC;
if (connector->display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) if (connector->display_info.bus_flags &
DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
ctrl1 |= TVE200_CTRL_TVCLKP; ctrl1 |= TVE200_CTRL_TVCLKP;
if ((mode->hdisplay == 352 && mode->vdisplay == 240) || /* SIF(525) */ if ((mode->hdisplay == 352 && mode->vdisplay == 240) || /* SIF(525) */
......
...@@ -246,10 +246,11 @@ struct drm_bridge_timings { ...@@ -246,10 +246,11 @@ struct drm_bridge_timings {
/** /**
* @sampling_edge: * @sampling_edge:
* *
* Tells whether the bridge samples the digital input signal * Tells whether the bridge samples the digital input signals from the
* from the display engine on the positive or negative edge of the * display engine on the positive or negative edge of the clock. This
* clock, this should reuse the DRM_BUS_FLAG_PIXDATA_[POS|NEG]EDGE * should use the DRM_BUS_FLAG_PIXDATA_SAMPLE_[POS|NEG]EDGE and
* bitwise flags from the DRM connector (bit 2 and 3 valid). * DRM_BUS_FLAG_SYNC_SAMPLE_[POS|NEG]EDGE bitwise flags from the DRM
* connector (bit 2, 3, 6 and 7 valid).
*/ */
u32 sampling_edge; u32 sampling_edge;
/** /**
......
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