Drop all uses of legacy drm_bus_flags, and then drop the flags. Follow-up with a patch to inline the documentation of the flags.
The conversion was triggered by Laurent's clean-up of the bus_flags use in panel-simple. https://lore.kernel.org/dri-devel/20200630135802.GA581802@ravnborg.org/T/#t
Build tested only. Patches on top of latest drm-misc-next.
Sam
(Procrastination, was supposed to review patches, not producing them).
Sam Ravnborg (7): drm/tidss: drop use of legacy drm_bus_flags drm/ingenic-drm: drop use of legacy drm_bus_flags drm/panel: raydium-rm67191: drop use of legacy drm_bus_flags drm/panel: novatek-nt39016: drop use of legacy drm_bus_flags drm/panel: panel-simple: drop use of legacy drm_bus_flags drm/drm_connector: drop legacy drm_bus_flags values drm/drm_connector: use inline comments for drm_bus_flags
drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 28 +++--- drivers/gpu/drm/tidss/tidss_dispc.c | 4 +- include/drm/drm_connector.h | 124 ++++++++++++++++++-------- 6 files changed, 104 insertions(+), 58 deletions(-)
Use the more descriptive _DRIVE_ variants thus avoiding the legacy drm_bus_flags values.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Jyri Sarha jsarha@ti.com Cc: Tomi Valkeinen tomi.valkeinen@ti.com --- drivers/gpu/drm/tidss/tidss_dispc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index 629dd06393f6..772a497e8c57 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -997,12 +997,12 @@ void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport,
ieo = !!(tstate->bus_flags & DRM_BUS_FLAG_DE_LOW);
- ipc = !!(tstate->bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE); + ipc = !!(tstate->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE);
/* always use the 'rf' setting */ onoff = true;
- rf = !!(tstate->bus_flags & DRM_BUS_FLAG_SYNC_POSEDGE); + rf = !!(tstate->bus_flags & DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE);
/* always use aligned syncs */ align = true;
On 30/06/2020 21:05, Sam Ravnborg wrote:
Use the more descriptive _DRIVE_ variants thus avoiding the legacy drm_bus_flags values.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Jyri Sarha jsarha@ti.com Cc: Tomi Valkeinen tomi.valkeinen@ti.com
Acked-by: Jyri Sarha jsarha@ti.com
drivers/gpu/drm/tidss/tidss_dispc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index 629dd06393f6..772a497e8c57 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -997,12 +997,12 @@ void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport,
ieo = !!(tstate->bus_flags & DRM_BUS_FLAG_DE_LOW);
- ipc = !!(tstate->bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE);
ipc = !!(tstate->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE);
/* always use the 'rf' setting */ onoff = true;
- rf = !!(tstate->bus_flags & DRM_BUS_FLAG_SYNC_POSEDGE);
rf = !!(tstate->bus_flags & DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE);
/* always use aligned syncs */ align = true;
Replace the legacy member with the more descriptive _DRIVE_ variant. No functional change.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Paul Cercueil paul@crapouillou.net --- drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 16f0740df507..deb37b4a8e91 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -419,7 +419,7 @@ static void ingenic_drm_encoder_atomic_mode_set(struct drm_encoder *encoder, cfg |= JZ_LCD_CFG_VSYNC_ACTIVE_LOW; if (info->bus_flags & DRM_BUS_FLAG_DE_LOW) cfg |= JZ_LCD_CFG_DE_ACTIVE_LOW; - if (info->bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) + if (info->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE) cfg |= JZ_LCD_CFG_PCLK_FALLING_EDGE;
if (!priv->panel_is_sharp) {
Use the non-legacy drm_bus_flag _SAMPLE_ member. No functional change.
Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Robert Chiras robert.chiras@nxp.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org --- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c index d001c52e0ca9..57ff2b1f6361 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c @@ -192,7 +192,7 @@ static const u32 rad_bus_formats[] = { };
static const u32 rad_bus_flags = DRM_BUS_FLAG_DE_LOW | - DRM_BUS_FLAG_PIXDATA_NEGEDGE; + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE;
struct rad_panel { struct drm_panel panel;
Drop use of the legacy drm_bus_flags member and use the more descriptive _SAMPLE_ variant. No functional change.
Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org --- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c index 79be3dc4e817..91df050ba3f6 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c @@ -357,7 +357,7 @@ static const struct nt39016_panel_info kd035g6_info = { .width_mm = 71, .height_mm = 53, .bus_format = MEDIA_BUS_FMT_RGB888_1X24, - .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE, + .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, };
static const struct of_device_id nt39016_of_match[] = {
Replace all uses of the legacy drm_bus_flags with their relevant _SAMPLE_ variant. This is a 1:1 replacement, no effort was made to validate the actual bus flags for the panels.
Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_POSEDGE
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org --- drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3a35f74d6cb7..4f0ec5e5b0aa 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -681,7 +681,7 @@ static const struct panel_desc armadeus_st0700_adapt = { .height = 86, }, .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_SAMPLE_NEGEDGE, };
static const struct drm_display_mode auo_b101aw03_mode = { @@ -1339,7 +1339,7 @@ static const struct panel_desc cdtech_s070pws19hp_fc21 = { .height = 86, }, .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_SAMPLE_NEGEDGE, .connector_type = DRM_MODE_CONNECTOR_DPI, };
@@ -1366,7 +1366,7 @@ static const struct panel_desc cdtech_s070swv29hg_dc44 = { .height = 86, }, .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_SAMPLE_NEGEDGE, .connector_type = DRM_MODE_CONNECTOR_DPI, };
@@ -1577,7 +1577,7 @@ static const struct panel_desc edt_et035012dm6 = { .height = 52, }, .bus_format = MEDIA_BUS_FMT_RGB888_1X24, - .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_NEGEDGE, + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, };
static const struct drm_display_mode edt_etm043080dh6gp_mode = { @@ -1720,7 +1720,7 @@ static const struct panel_desc evervision_vgg804821 = { .height = 64, }, .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_SAMPLE_POSEDGE, };
static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { @@ -1768,7 +1768,7 @@ static const struct panel_desc frida_frd350h54004 = { .height = 64, }, .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_SAMPLE_NEGEDGE, .connector_type = DRM_MODE_CONNECTOR_DPI, };
@@ -1839,7 +1839,7 @@ static const struct panel_desc giantplus_gpm940b0 = { .height = 45, }, .bus_format = MEDIA_BUS_FMT_RGB888_3X8, - .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, };
static const struct display_timing hannstar_hsd070pww1_timing = { @@ -2885,7 +2885,7 @@ static const struct panel_desc ortustech_com37h3m = { .height = 75, /* 74.88mm */ }, .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_SAMPLE_NEGEDGE | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, };
@@ -3184,7 +3184,7 @@ static const struct panel_desc sharp_lq070y3dg3b = { .height = 91, /* 91.4mm */ }, .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_SAMPLE_NEGEDGE | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, };
@@ -3287,7 +3287,7 @@ static const struct panel_desc sharp_ls020b1dd01d = { }, .bus_format = MEDIA_BUS_FMT_RGB565_1X16, .bus_flags = DRM_BUS_FLAG_DE_HIGH - | DRM_BUS_FLAG_PIXDATA_NEGEDGE + | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | DRM_BUS_FLAG_SHARP_SIGNALS, };
@@ -3386,7 +3386,7 @@ static const struct panel_desc tfc_s9700rtwv43tr_01b = { .height = 90, }, .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_SAMPLE_NEGEDGE, };
static const struct display_timing tianma_tm070jdhg30_timing = { @@ -3475,7 +3475,7 @@ static const struct panel_desc ti_nspire_cx_lcd_panel = { .height = 49, }, .bus_format = MEDIA_BUS_FMT_RGB888_1X24, - .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE, + .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, };
static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = { @@ -3504,7 +3504,7 @@ static const struct panel_desc ti_nspire_classic_lcd_panel = { }, /* This is the grayscale bus format */ .bus_format = MEDIA_BUS_FMT_Y8_1X8, - .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, + .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, };
static const struct drm_display_mode toshiba_lt089ac29000_mode = { @@ -3633,7 +3633,7 @@ static const struct panel_desc vl050_8048nt_c01 = { .height = 76, }, .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_SAMPLE_NEGEDGE, };
static const struct drm_display_mode winstar_wf35ltiacd_mode = {
Drop the now unused legacy drm_bus_flags values.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Cc: Maxime Ripard mripard@kernel.org Cc: Thomas Zimmermann tzimmermann@suse.de Cc: David Airlie airlied@linux.ie Cc: Daniel Vetter daniel.vetter@ffwll.ch --- include/drm/drm_connector.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 6a451b86c454..7dc804488ccd 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -323,8 +323,6 @@ struct drm_monitor_range_info { * * @DRM_BUS_FLAG_DE_LOW: The Data Enable signal is active low * @DRM_BUS_FLAG_DE_HIGH: The Data Enable signal is active high - * @DRM_BUS_FLAG_PIXDATA_POSEDGE: Legacy value, do not use - * @DRM_BUS_FLAG_PIXDATA_NEGEDGE: Legacy value, do not use * @DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE: Data is driven on the rising edge of * the pixel clock * @DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE: Data is driven on the falling edge of @@ -335,8 +333,6 @@ struct drm_monitor_range_info { * the pixel clock * @DRM_BUS_FLAG_DATA_MSB_TO_LSB: Data is transmitted MSB to LSB on the bus * @DRM_BUS_FLAG_DATA_LSB_TO_MSB: Data is transmitted LSB to MSB on the bus - * @DRM_BUS_FLAG_SYNC_POSEDGE: Legacy value, do not use - * @DRM_BUS_FLAG_SYNC_NEGEDGE: Legacy value, do not use * @DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE: Sync signals are driven on the rising * edge of the pixel clock * @DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE: Sync signals are driven on the falling @@ -351,20 +347,16 @@ struct drm_monitor_range_info { enum drm_bus_flags { DRM_BUS_FLAG_DE_LOW = BIT(0), DRM_BUS_FLAG_DE_HIGH = BIT(1), - DRM_BUS_FLAG_PIXDATA_POSEDGE = BIT(2), - DRM_BUS_FLAG_PIXDATA_NEGEDGE = BIT(3), - DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE = DRM_BUS_FLAG_PIXDATA_POSEDGE, - DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE, - DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE, - DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_POSEDGE, + DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE = BIT(2), + DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE = BIT(3), + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, DRM_BUS_FLAG_DATA_MSB_TO_LSB = BIT(4), DRM_BUS_FLAG_DATA_LSB_TO_MSB = BIT(5), - DRM_BUS_FLAG_SYNC_POSEDGE = BIT(6), - DRM_BUS_FLAG_SYNC_NEGEDGE = BIT(7), - DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE = DRM_BUS_FLAG_SYNC_POSEDGE, - DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE, - DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE, - DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_POSEDGE, + DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE = BIT(6), + DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = BIT(7), + DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, + DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8), };
Use inline comments for the drm_bus_flags enum. This makes it easier to add more description comments in the future should the need arise.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Cc: Maxime Ripard mripard@kernel.org Cc: Thomas Zimmermann tzimmermann@suse.de Cc: David Airlie airlied@linux.ie Cc: Daniel Vetter daniel.vetter@ffwll.ch --- include/drm/drm_connector.h | 100 +++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 23 deletions(-)
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 7dc804488ccd..af145608b5ed 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -320,43 +320,97 @@ struct drm_monitor_range_info { * opposite edge of the driving edge. Transmitters and receivers may however * need to take other signal timings into account to convert between driving * and sample edges. - * - * @DRM_BUS_FLAG_DE_LOW: The Data Enable signal is active low - * @DRM_BUS_FLAG_DE_HIGH: The Data Enable signal is active high - * @DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE: Data is driven on the rising edge of - * the pixel clock - * @DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE: Data is driven on the falling edge of - * the pixel clock - * @DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE: Data is sampled on the rising edge of - * the pixel clock - * @DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE: Data is sampled on the falling edge of - * the pixel clock - * @DRM_BUS_FLAG_DATA_MSB_TO_LSB: Data is transmitted MSB to LSB on the bus - * @DRM_BUS_FLAG_DATA_LSB_TO_MSB: Data is transmitted LSB to MSB on the bus - * @DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE: Sync signals are driven on the rising - * edge of the pixel clock - * @DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE: Sync signals are driven on the falling - * edge of the pixel clock - * @DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE: Sync signals are sampled on the rising - * edge of the pixel clock - * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE: Sync signals are sampled on the falling - * edge of the pixel clock - * @DRM_BUS_FLAG_SHARP_SIGNALS: Set if the Sharp-specific signals - * (SPL, CLS, PS, REV) must be used */ enum drm_bus_flags { + /** + * @DRM_BUS_FLAG_DE_LOW: + * + * The Data Enable signal is active low + */ DRM_BUS_FLAG_DE_LOW = BIT(0), + + /** + * @DRM_BUS_FLAG_DE_HIGH: + * + * The Data Enable signal is active high + */ DRM_BUS_FLAG_DE_HIGH = BIT(1), + + /** + * @DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE: + * + * Data is driven on the rising edge of the pixel clock + */ DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE = BIT(2), + + /** + * @DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE: + * + * Data is driven on the falling edge of the pixel clock + */ DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE = BIT(3), + + /** + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE: + * + * Data is sampled on the rising edge of the pixel clock + */ DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + + /** + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE: + * + * Data is sampled on the falling edge of the pixel clock + */ DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, + + /** + * @DRM_BUS_FLAG_DATA_MSB_TO_LSB: + * + * Data is transmitted MSB to LSB on the bus + */ DRM_BUS_FLAG_DATA_MSB_TO_LSB = BIT(4), + + /** + * @DRM_BUS_FLAG_DATA_LSB_TO_MSB: + * + * Data is transmitted LSB to MSB on the bus + */ DRM_BUS_FLAG_DATA_LSB_TO_MSB = BIT(5), + + /** + * @DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE: + * + * Sync signals are driven on the rising edge of the pixel clock + */ DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE = BIT(6), + + /** + * @DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE: + * + * Sync signals are driven on the falling edge of the pixel clock + */ DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = BIT(7), + + /** + * @DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE: + * + * Sync signals are sampled on the rising edge of the pixel clock + */ DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, + + /** + * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE: + * + * Sync signals are sampled on the falling edge of the pixel clock + */ DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, + + /** + * @DRM_BUS_FLAG_SHARP_SIGNALS: + * + * Set if the Sharp-specific signals (SPL, CLS, PS, REV) must be used + */ DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8), };
Hi Sam,
Thank you for the patches.
On Tue, Jun 30, 2020 at 08:05:38PM +0200, Sam Ravnborg wrote:
Drop all uses of legacy drm_bus_flags, and then drop the flags. Follow-up with a patch to inline the documentation of the flags.
The conversion was triggered by Laurent's clean-up of the bus_flags use in panel-simple. https://lore.kernel.org/dri-devel/20200630135802.GA581802@ravnborg.org/T/#t
Build tested only. Patches on top of latest drm-misc-next.
For the whole series,
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
(Procrastination, was supposed to review patches, not producing them).
Sam Ravnborg (7): drm/tidss: drop use of legacy drm_bus_flags drm/ingenic-drm: drop use of legacy drm_bus_flags drm/panel: raydium-rm67191: drop use of legacy drm_bus_flags drm/panel: novatek-nt39016: drop use of legacy drm_bus_flags drm/panel: panel-simple: drop use of legacy drm_bus_flags drm/drm_connector: drop legacy drm_bus_flags values drm/drm_connector: use inline comments for drm_bus_flags
drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 28 +++--- drivers/gpu/drm/tidss/tidss_dispc.c | 4 +- include/drm/drm_connector.h | 124 ++++++++++++++++++-------- 6 files changed, 104 insertions(+), 58 deletions(-)
On Tue, Jun 30, 2020 at 08:05:38PM +0200, Sam Ravnborg wrote:
Drop all uses of legacy drm_bus_flags, and then drop the flags. Follow-up with a patch to inline the documentation of the flags.
The conversion was triggered by Laurent's clean-up of the bus_flags use in panel-simple. https://lore.kernel.org/dri-devel/20200630135802.GA581802@ravnborg.org/T/#t
Build tested only. Patches on top of latest drm-misc-next.
Sam
(Procrastination, was supposed to review patches, not producing them).
Sam Ravnborg (7): drm/tidss: drop use of legacy drm_bus_flags drm/ingenic-drm: drop use of legacy drm_bus_flags drm/panel: raydium-rm67191: drop use of legacy drm_bus_flags drm/panel: novatek-nt39016: drop use of legacy drm_bus_flags drm/panel: panel-simple: drop use of legacy drm_bus_flags drm/drm_connector: drop legacy drm_bus_flags values drm/drm_connector: use inline comments for drm_bus_flags
With the quick feedback from Jyri ack and Laurent I have applied this set to drm-misc-next.
Sam
drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 2 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 28 +++--- drivers/gpu/drm/tidss/tidss_dispc.c | 4 +- include/drm/drm_connector.h | 124 ++++++++++++++++++-------- 6 files changed, 104 insertions(+), 58 deletions(-)
dri-devel@lists.freedesktop.org