* [PATCH 12/17] drm/mgag200: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:55 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index dc13c48..af8b4c1 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1479,13 +1479,6 @@ void mga_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
* These functions are analagous to those in the CRTC code, but are intended
* to handle any encoder-specific limitations
*/
-static bool mga_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mga_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -1515,7 +1508,6 @@ static void mga_encoder_destroy(struct drm_encoder *encoder)
static const struct drm_encoder_helper_funcs mga_encoder_helper_funcs = {
.dpms = mga_encoder_dpms,
- .mode_fixup = mga_encoder_mode_fixup,
.mode_set = mga_encoder_mode_set,
.prepare = mga_encoder_prepare,
.commit = mga_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 11/17] drm/msm/mdp: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:55 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 9 ---------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 8 --------
5 files changed, 41 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c
index 2f57e94..106f0e7 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c
@@ -47,13 +47,6 @@ static const struct drm_encoder_funcs mdp4_dsi_encoder_funcs = {
.destroy = mdp4_dsi_encoder_destroy,
};
-static bool mdp4_dsi_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mdp4_dsi_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -163,7 +156,6 @@ static void mdp4_dsi_encoder_enable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs mdp4_dsi_encoder_helper_funcs = {
- .mode_fixup = mdp4_dsi_encoder_mode_fixup,
.mode_set = mdp4_dsi_encoder_mode_set,
.disable = mdp4_dsi_encoder_disable,
.enable = mdp4_dsi_encoder_enable,
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c
index a21df54..35ad78a 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c
@@ -94,13 +94,6 @@ static const struct drm_encoder_funcs mdp4_dtv_encoder_funcs = {
.destroy = mdp4_dtv_encoder_destroy,
};
-static bool mdp4_dtv_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mdp4_dtv_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -234,7 +227,6 @@ static void mdp4_dtv_encoder_enable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs mdp4_dtv_encoder_helper_funcs = {
- .mode_fixup = mdp4_dtv_encoder_mode_fixup,
.mode_set = mdp4_dtv_encoder_mode_set,
.enable = mdp4_dtv_encoder_enable,
.disable = mdp4_dtv_encoder_disable,
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c
index cd63fed..bc3d8e7 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c
@@ -260,13 +260,6 @@ static void setup_phy(struct drm_encoder *encoder)
mdp4_write(mdp4_kms, REG_MDP4_LVDS_PHY_CFG0, lvds_phy_cfg0);
}
-static bool mdp4_lcdc_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mdp4_lcdc_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -430,7 +423,6 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs mdp4_lcdc_encoder_helper_funcs = {
- .mode_fixup = mdp4_lcdc_encoder_mode_fixup,
.mode_set = mdp4_lcdc_encoder_mode_set,
.disable = mdp4_lcdc_encoder_disable,
.enable = mdp4_lcdc_encoder_enable,
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c
index 1aa21db..69094cb 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c
@@ -188,13 +188,6 @@ static const struct drm_encoder_funcs mdp5_cmd_encoder_funcs = {
.destroy = mdp5_cmd_encoder_destroy,
};
-static bool mdp5_cmd_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mdp5_cmd_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -256,7 +249,6 @@ static void mdp5_cmd_encoder_enable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs mdp5_cmd_encoder_helper_funcs = {
- .mode_fixup = mdp5_cmd_encoder_mode_fixup,
.mode_set = mdp5_cmd_encoder_mode_set,
.disable = mdp5_cmd_encoder_disable,
.enable = mdp5_cmd_encoder_enable,
@@ -340,4 +332,3 @@ fail:
return ERR_PTR(ret);
}
-
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
index 0d737ca..1d95f9f 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
@@ -112,13 +112,6 @@ static const struct drm_encoder_funcs mdp5_encoder_funcs = {
.destroy = mdp5_encoder_destroy,
};
-static bool mdp5_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void mdp5_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -287,7 +280,6 @@ static void mdp5_encoder_enable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs mdp5_encoder_helper_funcs = {
- .mode_fixup = mdp5_encoder_mode_fixup,
.mode_set = mdp5_encoder_mode_set,
.disable = mdp5_encoder_disable,
.enable = mdp5_encoder_enable,
--
2.5.0
^ permalink raw reply related
* [PATCH 10/17] drm/imx: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:55 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/imx/dw_hdmi-imx.c | 8 --------
drivers/gpu/drm/imx/imx-ldb.c | 8 --------
drivers/gpu/drm/imx/imx-tve.c | 8 --------
drivers/gpu/drm/imx/parallel-display.c | 8 --------
4 files changed, 32 deletions(-)
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index 063825f..21d6158 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -109,13 +109,6 @@ static void dw_hdmi_imx_encoder_disable(struct drm_encoder *encoder)
{
}
-static bool dw_hdmi_imx_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adj_mode)
-{
- return true;
-}
-
static void dw_hdmi_imx_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adj_mode)
@@ -138,7 +131,6 @@ static void dw_hdmi_imx_encoder_prepare(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = {
- .mode_fixup = dw_hdmi_imx_encoder_mode_fixup,
.mode_set = dw_hdmi_imx_encoder_mode_set,
.prepare = dw_hdmi_imx_encoder_prepare,
.commit = dw_hdmi_imx_encoder_commit,
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 22ac482..024d613 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -139,13 +139,6 @@ static void imx_ldb_encoder_dpms(struct drm_encoder *encoder, int mode)
{
}
-static bool imx_ldb_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void imx_ldb_set_clock(struct imx_ldb *ldb, int mux, int chno,
unsigned long serial_clk, unsigned long di_clk)
{
@@ -376,7 +369,6 @@ static const struct drm_encoder_funcs imx_ldb_encoder_funcs = {
static const struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = {
.dpms = imx_ldb_encoder_dpms,
- .mode_fixup = imx_ldb_encoder_mode_fixup,
.prepare = imx_ldb_encoder_prepare,
.commit = imx_ldb_encoder_commit,
.mode_set = imx_ldb_encoder_mode_set,
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c
index 292349f..ae7a9fb 100644
--- a/drivers/gpu/drm/imx/imx-tve.c
+++ b/drivers/gpu/drm/imx/imx-tve.c
@@ -286,13 +286,6 @@ static void imx_tve_encoder_dpms(struct drm_encoder *encoder, int mode)
dev_err(tve->dev, "failed to disable TVOUT: %d\n", ret);
}
-static bool imx_tve_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void imx_tve_encoder_prepare(struct drm_encoder *encoder)
{
struct imx_tve *tve = enc_to_tve(encoder);
@@ -379,7 +372,6 @@ static const struct drm_encoder_funcs imx_tve_encoder_funcs = {
static const struct drm_encoder_helper_funcs imx_tve_encoder_helper_funcs = {
.dpms = imx_tve_encoder_dpms,
- .mode_fixup = imx_tve_encoder_mode_fixup,
.prepare = imx_tve_encoder_prepare,
.mode_set = imx_tve_encoder_mode_set,
.commit = imx_tve_encoder_commit,
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c
index 0ffef17..363e2c7 100644
--- a/drivers/gpu/drm/imx/parallel-display.c
+++ b/drivers/gpu/drm/imx/parallel-display.c
@@ -112,13 +112,6 @@ static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode)
drm_panel_enable(imxpd->panel);
}
-static bool imx_pd_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void imx_pd_encoder_prepare(struct drm_encoder *encoder)
{
struct imx_parallel_display *imxpd = enc_to_imxpd(encoder);
@@ -166,7 +159,6 @@ static const struct drm_encoder_funcs imx_pd_encoder_funcs = {
static const struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = {
.dpms = imx_pd_encoder_dpms,
- .mode_fixup = imx_pd_encoder_mode_fixup,
.prepare = imx_pd_encoder_prepare,
.commit = imx_pd_encoder_commit,
.mode_set = imx_pd_encoder_mode_set,
--
2.5.0
^ permalink raw reply related
* [PATCH 09/17] drm/gma500: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:54 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/gma500/cdv_intel_crt.c | 1 -
drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 1 -
drivers/gpu/drm/gma500/gma_display.c | 7 -------
drivers/gpu/drm/gma500/gma_display.h | 3 ---
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 -
5 files changed, 13 deletions(-)
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
index d0717a8..b837e7a 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
@@ -217,7 +217,6 @@ static int cdv_intel_crt_set_property(struct drm_connector *connector,
static const struct drm_encoder_helper_funcs cdv_intel_crt_helper_funcs = {
.dpms = cdv_intel_crt_dpms,
- .mode_fixup = gma_encoder_mode_fixup,
.prepare = gma_encoder_prepare,
.commit = gma_encoder_commit,
.mode_set = cdv_intel_crt_mode_set,
diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
index ddf2d77..28f9d90 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
@@ -255,7 +255,6 @@ static void cdv_hdmi_destroy(struct drm_connector *connector)
static const struct drm_encoder_helper_funcs cdv_hdmi_helper_funcs = {
.dpms = cdv_hdmi_dpms,
- .mode_fixup = gma_encoder_mode_fixup,
.prepare = gma_encoder_prepare,
.mode_set = cdv_hdmi_mode_set,
.commit = gma_encoder_commit,
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c
index ff17af4..9270821 100644
--- a/drivers/gpu/drm/gma500/gma_display.c
+++ b/drivers/gpu/drm/gma500/gma_display.c
@@ -478,13 +478,6 @@ int gma_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
return 0;
}
-bool gma_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
bool gma_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h
index ed569d8..78b9f98 100644
--- a/drivers/gpu/drm/gma500/gma_display.h
+++ b/drivers/gpu/drm/gma500/gma_display.h
@@ -90,9 +90,6 @@ extern void gma_crtc_restore(struct drm_crtc *crtc);
extern void gma_encoder_prepare(struct drm_encoder *encoder);
extern void gma_encoder_commit(struct drm_encoder *encoder);
extern void gma_encoder_destroy(struct drm_encoder *encoder);
-extern bool gma_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode);
/* Common clock related functions */
extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk);
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index 2d18499..8b2eb32 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -601,7 +601,6 @@ static void oaktrail_hdmi_destroy(struct drm_connector *connector)
static const struct drm_encoder_helper_funcs oaktrail_hdmi_helper_funcs = {
.dpms = oaktrail_hdmi_dpms,
- .mode_fixup = gma_encoder_mode_fixup,
.prepare = gma_encoder_prepare,
.mode_set = oaktrail_hdmi_mode_set,
.commit = gma_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 08/17] drm/exynos: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:54 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/exynos/exynos_dp_core.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 --------
3 files changed, 24 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c
index 673164b..9fd12c62 100644
--- a/drivers/gpu/drm/exynos/exynos_dp_core.c
+++ b/drivers/gpu/drm/exynos/exynos_dp_core.c
@@ -1155,13 +1155,6 @@ static int exynos_dp_create_connector(struct drm_encoder *encoder)
return 0;
}
-static bool exynos_dp_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void exynos_dp_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -1177,7 +1170,6 @@ static void exynos_dp_disable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = {
- .mode_fixup = exynos_dp_mode_fixup,
.mode_set = exynos_dp_mode_set,
.enable = exynos_dp_enable,
.disable = exynos_dp_disable,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 05350ae..75e570f 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -128,13 +128,6 @@ static int exynos_dpi_create_connector(struct drm_encoder *encoder)
return 0;
}
-static bool exynos_dpi_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void exynos_dpi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -162,7 +155,6 @@ static void exynos_dpi_disable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = {
- .mode_fixup = exynos_dpi_mode_fixup,
.mode_set = exynos_dpi_mode_set,
.enable = exynos_dpi_enable,
.disable = exynos_dpi_disable,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 62ac4e5..65108cb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -410,13 +410,6 @@ static int vidi_create_connector(struct drm_encoder *encoder)
return 0;
}
-static bool exynos_vidi_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void exynos_vidi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -432,7 +425,6 @@ static void exynos_vidi_disable(struct drm_encoder *encoder)
}
static const struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = {
- .mode_fixup = exynos_vidi_mode_fixup,
.mode_set = exynos_vidi_mode_set,
.enable = exynos_vidi_enable,
.disable = exynos_vidi_disable,
--
2.5.0
^ permalink raw reply related
* [PATCH 07/17] drm/cirrus: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:54 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 4a02854..432ce94 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -430,14 +430,6 @@ void cirrus_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
*blue = cirrus_crtc->lut_b[regno];
}
-
-static bool cirrus_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void cirrus_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -466,7 +458,6 @@ static void cirrus_encoder_destroy(struct drm_encoder *encoder)
static const struct drm_encoder_helper_funcs cirrus_encoder_helper_funcs = {
.dpms = cirrus_encoder_dpms,
- .mode_fixup = cirrus_encoder_mode_fixup,
.mode_set = cirrus_encoder_mode_set,
.prepare = cirrus_encoder_prepare,
.commit = cirrus_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 06/17] drm/bochs: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:54 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/bochs/bochs_kms.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 2849f1b..317c27f 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -152,13 +152,6 @@ static void bochs_crtc_init(struct drm_device *dev)
drm_crtc_helper_add(crtc, &bochs_helper_funcs);
}
-static bool bochs_encoder_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void bochs_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -179,7 +172,6 @@ static void bochs_encoder_commit(struct drm_encoder *encoder)
static const struct drm_encoder_helper_funcs bochs_encoder_helper_funcs = {
.dpms = bochs_encoder_dpms,
- .mode_fixup = bochs_encoder_mode_fixup,
.mode_set = bochs_encoder_mode_set,
.prepare = bochs_encoder_prepare,
.commit = bochs_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 05/17] drm/ast: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:53 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
---
drivers/gpu/drm/ast/ast_mode.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 0123458..f221e2d 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -710,13 +710,6 @@ static void ast_encoder_dpms(struct drm_encoder *encoder, int mode)
}
-static bool ast_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void ast_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -736,7 +729,6 @@ static void ast_encoder_commit(struct drm_encoder *encoder)
static const struct drm_encoder_helper_funcs ast_enc_helper_funcs = {
.dpms = ast_encoder_dpms,
- .mode_fixup = ast_mode_fixup,
.prepare = ast_encoder_prepare,
.commit = ast_encoder_commit,
.mode_set = ast_encoder_mode_set,
--
2.5.0
^ permalink raw reply related
* [PATCH 04/17] drm/amdgpu: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285069-2819-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --------
3 files changed, 24 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 093599a..3483018 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -3624,16 +3624,8 @@ dce_v10_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v10_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v10_0_ext_helper_funcs = {
.dpms = dce_v10_0_ext_dpms,
- .mode_fixup = dce_v10_0_ext_mode_fixup,
.prepare = dce_v10_0_ext_prepare,
.mode_set = dce_v10_0_ext_mode_set,
.commit = dce_v10_0_ext_commit,
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 8e67249..36deea1 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -3619,16 +3619,8 @@ dce_v11_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v11_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v11_0_ext_helper_funcs = {
.dpms = dce_v11_0_ext_dpms,
- .mode_fixup = dce_v11_0_ext_mode_fixup,
.prepare = dce_v11_0_ext_prepare,
.mode_set = dce_v11_0_ext_mode_set,
.commit = dce_v11_0_ext_commit,
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index d0e128c..25dd8b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -3554,16 +3554,8 @@ dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v8_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v8_0_ext_helper_funcs = {
.dpms = dce_v8_0_ext_dpms,
- .mode_fixup = dce_v8_0_ext_mode_fixup,
.prepare = dce_v8_0_ext_prepare,
.mode_set = dce_v8_0_ext_mode_set,
.commit = dce_v8_0_ext_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 03/17] drm/exynos: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285069-2819-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index e977a81..736115c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1597,13 +1597,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
return 0;
}
-static bool exynos_dsi_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void exynos_dsi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -1623,7 +1616,6 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder,
}
static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
- .mode_fixup = exynos_dsi_mode_fixup,
.mode_set = exynos_dsi_mode_set,
.enable = exynos_dsi_enable,
.disable = exynos_dsi_disable,
--
2.5.0
^ permalink raw reply related
* [PATCH 02/17] drm/udl: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285069-2819-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/udl/udl_encoder.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_encoder.c b/drivers/gpu/drm/udl/udl_encoder.c
index a181a64..59a4b34 100644
--- a/drivers/gpu/drm/udl/udl_encoder.c
+++ b/drivers/gpu/drm/udl/udl_encoder.c
@@ -26,13 +26,6 @@ static void udl_encoder_disable(struct drm_encoder *encoder)
{
}
-static bool udl_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void udl_encoder_prepare(struct drm_encoder *encoder)
{
}
@@ -54,7 +47,6 @@ udl_encoder_dpms(struct drm_encoder *encoder, int mode)
static const struct drm_encoder_helper_funcs udl_helper_funcs = {
.dpms = udl_encoder_dpms,
- .mode_fixup = udl_mode_fixup,
.prepare = udl_encoder_prepare,
.mode_set = udl_encoder_mode_set,
.commit = udl_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 01/17] drm/virtio: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285069-2819-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index a165f03..429aa31 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -282,13 +282,6 @@ static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
.atomic_check = virtio_gpu_crtc_atomic_check,
};
-static bool virtio_gpu_enc_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -362,7 +355,6 @@ virtio_gpu_best_encoder(struct drm_connector *connector)
}
static const struct drm_encoder_helper_funcs virtio_gpu_enc_helper_funcs = {
- .mode_fixup = virtio_gpu_enc_mode_fixup,
.mode_set = virtio_gpu_enc_mode_set,
.enable = virtio_gpu_enc_enable,
.disable = virtio_gpu_enc_disable,
--
2.5.0
^ permalink raw reply related
* [PATCH 00/17] drm encoders cleanup: nuke optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <daniel.vetter@ffwll.ch,>
mode_fixup function for encoder drivers became optional with patch
http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha@synopsys.com
This patch set nukes all the dummy mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Carlos Palminha (17):
drm/virtio: removed optional dummy encoder mode_fixup function.
drm/udl: removed optional dummy encoder mode_fixup function.
drm/exynos: removed optional dummy encoder mode_fixup function.
drm/amdgpu: removed optional dummy encoder mode_fixup function.
drm/ast: removed optional dummy encoder mode_fixup function.
drm/bochs: removed optional dummy encoder mode_fixup function.
drm/cirrus: removed optional dummy encoder mode_fixup function.
drm/exynos: removed optional dummy encoder mode_fixup function.
drm/gma500: removed optional dummy encoder mode_fixup function.
drm/imx: removed optional dummy encoder mode_fixup function.
drm/msm/mdp: removed optional dummy encoder mode_fixup function.
drm/mgag200: removed optional dummy encoder mode_fixup function.
drm/qxl: removed optional dummy encoder mode_fixup function.
drm/radeon: removed optional dummy encoder mode_fixup function.
drm/rockchip: removed optional dummy encoder mode_fixup function.
drm/sti: removed optional dummy encoder mode_fixup function.
drm/tilcdc: removed optional dummy encoder mode_fixup function.
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --------
drivers/gpu/drm/ast/ast_mode.c | 8 --------
drivers/gpu/drm/bochs/bochs_kms.c | 8 --------
drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ---------
drivers/gpu/drm/exynos/exynos_dp_core.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 --------
drivers/gpu/drm/gma500/cdv_intel_crt.c | 1 -
drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 1 -
drivers/gpu/drm/gma500/gma_display.c | 7 -------
drivers/gpu/drm/gma500/gma_display.h | 3 ---
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 -
drivers/gpu/drm/imx/dw_hdmi-imx.c | 8 --------
drivers/gpu/drm/imx/imx-ldb.c | 8 --------
drivers/gpu/drm/imx/imx-tve.c | 8 --------
drivers/gpu/drm/imx/parallel-display.c | 8 --------
drivers/gpu/drm/mgag200/mgag200_mode.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 9 ---------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 8 --------
drivers/gpu/drm/qxl/qxl_display.c | 9 ---------
drivers/gpu/drm/radeon/atombios_encoders.c | 8 --------
drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 --------
drivers/gpu/drm/sti/sti_tvout.c | 10 ----------
drivers/gpu/drm/tilcdc/tilcdc_panel.c | 9 ---------
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 9 ---------
drivers/gpu/drm/udl/udl_encoder.c | 8 --------
drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
33 files changed, 244 deletions(-)
--
2.5.0
^ permalink raw reply
* [PATCH 04/17] drm/amdgpu: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel, daniel.vetter, lars, laurent.pinchart
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285017-2771-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --------
3 files changed, 24 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 093599a..3483018 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -3624,16 +3624,8 @@ dce_v10_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v10_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v10_0_ext_helper_funcs = {
.dpms = dce_v10_0_ext_dpms,
- .mode_fixup = dce_v10_0_ext_mode_fixup,
.prepare = dce_v10_0_ext_prepare,
.mode_set = dce_v10_0_ext_mode_set,
.commit = dce_v10_0_ext_commit,
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 8e67249..36deea1 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -3619,16 +3619,8 @@ dce_v11_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v11_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v11_0_ext_helper_funcs = {
.dpms = dce_v11_0_ext_dpms,
- .mode_fixup = dce_v11_0_ext_mode_fixup,
.prepare = dce_v11_0_ext_prepare,
.mode_set = dce_v11_0_ext_mode_set,
.commit = dce_v11_0_ext_commit,
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index d0e128c..25dd8b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -3554,16 +3554,8 @@ dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode)
}
-static bool dce_v8_0_ext_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static const struct drm_encoder_helper_funcs dce_v8_0_ext_helper_funcs = {
.dpms = dce_v8_0_ext_dpms,
- .mode_fixup = dce_v8_0_ext_mode_fixup,
.prepare = dce_v8_0_ext_prepare,
.mode_set = dce_v8_0_ext_mode_set,
.commit = dce_v8_0_ext_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 03/17] drm/exynos: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel, daniel.vetter, lars, laurent.pinchart
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285017-2771-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index e977a81..736115c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1597,13 +1597,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
return 0;
}
-static bool exynos_dsi_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void exynos_dsi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -1623,7 +1616,6 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder,
}
static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
- .mode_fixup = exynos_dsi_mode_fixup,
.mode_set = exynos_dsi_mode_set,
.enable = exynos_dsi_enable,
.disable = exynos_dsi_disable,
--
2.5.0
^ permalink raw reply related
* [PATCH 02/17] drm/udl: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel, daniel.vetter, lars, laurent.pinchart
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285017-2771-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/udl/udl_encoder.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_encoder.c b/drivers/gpu/drm/udl/udl_encoder.c
index a181a64..59a4b34 100644
--- a/drivers/gpu/drm/udl/udl_encoder.c
+++ b/drivers/gpu/drm/udl/udl_encoder.c
@@ -26,13 +26,6 @@ static void udl_encoder_disable(struct drm_encoder *encoder)
{
}
-static bool udl_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void udl_encoder_prepare(struct drm_encoder *encoder)
{
}
@@ -54,7 +47,6 @@ udl_encoder_dpms(struct drm_encoder *encoder, int mode)
static const struct drm_encoder_helper_funcs udl_helper_funcs = {
.dpms = udl_encoder_dpms,
- .mode_fixup = udl_mode_fixup,
.prepare = udl_encoder_prepare,
.mode_set = udl_encoder_mode_set,
.commit = udl_encoder_commit,
--
2.5.0
^ permalink raw reply related
* [PATCH 01/17] drm/virtio: removed optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel, daniel.vetter, lars, laurent.pinchart
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
In-Reply-To: <1455285017-2771-1-git-send-email-palminha@synopsys.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index a165f03..429aa31 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -282,13 +282,6 @@ static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
.atomic_check = virtio_gpu_crtc_atomic_check,
};
-static bool virtio_gpu_enc_mode_fixup(struct drm_encoder *encoder,
- const struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- return true;
-}
-
static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -362,7 +355,6 @@ virtio_gpu_best_encoder(struct drm_connector *connector)
}
static const struct drm_encoder_helper_funcs virtio_gpu_enc_helper_funcs = {
- .mode_fixup = virtio_gpu_enc_mode_fixup,
.mode_set = virtio_gpu_enc_mode_set,
.enable = virtio_gpu_enc_enable,
.disable = virtio_gpu_enc_disable,
--
2.5.0
^ permalink raw reply related
* [PATCH 00/17] drm encoders cleanup: nuke optional dummy encoder mode_fixup function.
From: Carlos Palminha @ 2016-02-12 13:50 UTC (permalink / raw)
To: dri-devel, daniel.vetter, lars, laurent.pinchart
Cc: k.kozlowski, linux-samsung-soc, heiko, benjamin.gaignard, airlied,
jingoohan1, CARLOS.PALMINHA, patrik.r.jakobsson, virtualization,
linux-rockchip, kgene, p.zabel, vincent.abriou, linux-arm-kernel,
mark.yao
mode_fixup function for encoder drivers became optional with patch
http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha@synopsys.com
This patch set nukes all the dummy mode_fixup implementations.
(made on top of Daniel topic/drm-misc branch)
Carlos Palminha (17):
drm/virtio: removed optional dummy encoder mode_fixup function.
drm/udl: removed optional dummy encoder mode_fixup function.
drm/exynos: removed optional dummy encoder mode_fixup function.
drm/amdgpu: removed optional dummy encoder mode_fixup function.
drm/ast: removed optional dummy encoder mode_fixup function.
drm/bochs: removed optional dummy encoder mode_fixup function.
drm/cirrus: removed optional dummy encoder mode_fixup function.
drm/exynos: removed optional dummy encoder mode_fixup function.
drm/gma500: removed optional dummy encoder mode_fixup function.
drm/imx: removed optional dummy encoder mode_fixup function.
drm/msm/mdp: removed optional dummy encoder mode_fixup function.
drm/mgag200: removed optional dummy encoder mode_fixup function.
drm/qxl: removed optional dummy encoder mode_fixup function.
drm/radeon: removed optional dummy encoder mode_fixup function.
drm/rockchip: removed optional dummy encoder mode_fixup function.
drm/sti: removed optional dummy encoder mode_fixup function.
drm/tilcdc: removed optional dummy encoder mode_fixup function.
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 --------
drivers/gpu/drm/ast/ast_mode.c | 8 --------
drivers/gpu/drm/bochs/bochs_kms.c | 8 --------
drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ---------
drivers/gpu/drm/exynos/exynos_dp_core.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 --------
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 --------
drivers/gpu/drm/gma500/cdv_intel_crt.c | 1 -
drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 1 -
drivers/gpu/drm/gma500/gma_display.c | 7 -------
drivers/gpu/drm/gma500/gma_display.h | 3 ---
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 -
drivers/gpu/drm/imx/dw_hdmi-imx.c | 8 --------
drivers/gpu/drm/imx/imx-ldb.c | 8 --------
drivers/gpu/drm/imx/imx-tve.c | 8 --------
drivers/gpu/drm/imx/parallel-display.c | 8 --------
drivers/gpu/drm/mgag200/mgag200_mode.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dsi_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_dtv_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 8 --------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 9 ---------
drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 8 --------
drivers/gpu/drm/qxl/qxl_display.c | 9 ---------
drivers/gpu/drm/radeon/atombios_encoders.c | 8 --------
drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 --------
drivers/gpu/drm/sti/sti_tvout.c | 10 ----------
drivers/gpu/drm/tilcdc/tilcdc_panel.c | 9 ---------
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 9 ---------
drivers/gpu/drm/udl/udl_encoder.c | 8 --------
drivers/gpu/drm/virtio/virtgpu_display.c | 8 --------
33 files changed, 244 deletions(-)
--
2.5.0
^ permalink raw reply
* attention all undergrads: BigDataX REU Site in Chicago IL -- applications due 02/29/2016
From: Ioan Raicu @ 2016-02-11 18:40 UTC (permalink / raw)
To: virtualization, micro_publicity, performance, sigplan-l
[-- Attachment #1.1: Type: text/plain, Size: 2527 bytes --]
BigDataX REU Program -- Summer 2016
http://datasys.cs.iit.edu/grants/BigDataX/2016/index.html
The BigDataX (from theory to practice in Big Data computing at eXtreme
scales) is a Research Experiences for Undergraduates (REU) site in
Chicago Illinois. The program has four mentors at two institutions, the
Illinois Institute of Technology and University of Chicago, with a
variety of complementing expertise from theory to programming languages
to distributed systems. To apply to the program, see the online
application at
https://docs.google.com/forms/d/1ix7gAqroBhT199Yh3kDDg_fGuCj6dndZSbD1PG-_dy4/viewform
(deadline February 29th, 2016).
Institutions:
- Illinois Institute of Technology (IIT): Computer Science &
Data-Intensive Distributed Systems Laboratory
- UChicago: University of Chicago (UChicago): Computation Institute
Mentors (bigdatax@datasys.cs.iit.edu):
- Ioan Raicu (IIT)
- Gruia Calinescu (IIT)
- Mike Wilde (UChicago)
- Justin Wozniak (UChicago)
Projects:
- Data-Intensive Computing Applications
- Parallel Programming Systems
- Distributed Storage Systems
- Theory of Big Data
Eligibility Requirements:
- Undergraduate student in Mathematics, Computer Science, or Engineering
at a US institution
- US citizen or permanent resident on or before May 23rd, 2015
- Minimum GPA 3.3
- 2 letters of recommendation
Important Dates:
- Application deadline: February 29th, 2016
- Letters of recommendation deadline: March 7th, 2016
- Notification of decision: March 21st, 2016
- Program starts: May 23rd, 2016
- Program ends: July 29th, 2016
Program Highlights:
- Spend 10 weeks immersed in research on Big Data at Illinois Institute
of Technology and University of Chicago
- Prepare for graduate school
- Publish papers and attend international conferences
- Spend the summer in one of the greatest cities in the world, Chicago
Illinois
Finances (per summer):
- $5000 stipend
- $600 relocation allowance
- $650 travel funds to attend conference
- Housing included on the IIT campus
Online Application:
To apply to the program, please submit your complete online application
by the February 29th deadline at
https://docs.google.com/forms/d/1ix7gAqroBhT199Yh3kDDg_fGuCj6dndZSbD1PG-_dy4/viewform.
For any questions, please send email to bigdatax@datasys.cs.iit.edu.
--
Ioan Raicu, Ph.D.
Assistant Professor
Computer Science, Illinois Institute of Technology
Guest Research Faculty
Math & Computer Science, Argonne National Laboratory
http://www.cs.iit.edu/~iraicu/
http://datasys.cs.iit.edu/
[-- Attachment #1.2: Type: text/html, Size: 4391 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness
From: Greg Kurz @ 2016-02-10 15:27 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160210170404-mutt-send-email-mst@redhat.com>
On Wed, 10 Feb 2016 17:08:52 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Wed, Feb 10, 2016 at 01:11:34PM +0100, Greg Kurz wrote:
> > On Wed, 10 Feb 2016 13:21:22 +0200
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >
> > > On Wed, Jan 13, 2016 at 06:09:41PM +0100, Greg Kurz wrote:
> > > > The default use case for vhost is when the host and the vring have the
> > > > same endianness (default native endianness). But there are cases where
> > > > they differ and vhost should byteswap when accessing the vring:
> > > > - the host is big endian and the vring comes from a virtio 1.0 device
> > > > which is always little endian
> > > > - the architecture is bi-endian and the vring comes from a legacy virtio
> > > > device with a different endianness than the endianness of the host (aka
> > > > legacy cross-endian)
> > > >
> > > > These cases are handled by the vq->is_le and the optional vq->user_be,
> > > > with the following logic:
> > > > - if none of the fields is enabled, vhost access the vring without byteswap
> > > > - if the vring is virtio 1.0 and the host is big endian, vq->is_le is
> > > > enabled to enforce little endian access to the vring
> > > > - if the vring is legacy cross-endian, userspace enables vq->user_be
> > > > to inform vhost about the vring endianness. This endianness is then
> > > > enforced for vring accesses through vq->is_le again
> > > >
> > > > The logic is unclear in the current code.
> > > >
> > > > This patch introduces helpers with explicit enable and disable semantics,
> > > > for better clarity.
> > > >
> > > > No behaviour change.
> > > >
> > > > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> > > > ---
> > > > drivers/vhost/vhost.c | 28 +++++++++++++++++++---------
> > > > 1 file changed, 19 insertions(+), 9 deletions(-)
> > > >
> > > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > > index ad2146a9ab2d..e02e06755ab7 100644
> > > > --- a/drivers/vhost/vhost.c
> > > > +++ b/drivers/vhost/vhost.c
> > > > @@ -43,11 +43,16 @@ enum {
> > > > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> > > >
> > > > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > > > +static void vhost_disable_user_be(struct vhost_virtqueue *vq)
> > > > {
> > > > vq->user_be = !virtio_legacy_is_little_endian();
> > > > }
> > > >
> > >
> > > Hmm this doesn't look like an improvement to me.
> > > What does it mean to disable big endian? Make it little endian?
> >
> > The default behavior for the device is native endian.
> >
> > The SET_VRING_ENDIAN ioctl is used to make the device big endian
> > on little endian hosts, hence "enabling" cross-endian mode...
> >
> > > Existing reset seems to make sense.
> > >
> >
> > ... and we "disable" cross-endian mode on reset.
>
> OK but that's enable cross-endian. Not enable be. We could have
> something like vhost_disable_user_byte_swap though each time we try,
> the result makes my head hurt: "swap" is a relative thing and hard to
> keep track of.
>
What about having something like below then ?
vhost_enable_cross_endian_big() to be called on little endian hosts with big endian devices
vhost_enable_cross_endian_little() to be called on big endian hosts with little endian devices
vhost_disable_cross_endian() to go back to the native endian default
> > > > +static void vhost_enable_user_be(struct vhost_virtqueue *vq, bool user_be)
> > > > +{
> > > > + vq->user_be = user_be;
> > > > +}
> > > > +
> > >
> > > And this is maybe "init_user_be"?
> > >
> >
> > Anyway I don't mind changing the names to reset/init_user_be if you think it
> > is clearer.
> >
> > > > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> > > > {
> > > > struct vhost_vring_state s;
> > > > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> > > > s.num != VHOST_VRING_BIG_ENDIAN)
> > > > return -EINVAL;
> > > >
> > > > - vq->user_be = s.num;
> > > > + vhost_enable_user_be(vq, !!s.num);
> > > >
> > > > return 0;
> > > > }
> > > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx,
> > > > return 0;
> > > > }
> > > >
> > > > -static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > > {
> > > > /* Note for legacy virtio: user_be is initialized at reset time
> > > > * according to the host endianness. If userspace does not set an
> > >
> > > Same thing really. I'd rather add "reset_is_le".
> > >
> > > > @@ -91,7 +96,7 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be;
> > > > }
> > > > #else
> > > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > > > +static void vhost_disable_user_be(struct vhost_virtqueue *vq)
> > > > {
> > > > }
> > > >
> > > > @@ -106,13 +111,18 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx,
> > > > return -ENOIOCTLCMD;
> > > > }
> > > >
> > > > -static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > > {
> > > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> > > > vq->is_le = true;
> > > > }
> > > > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
> > > >
> > > > +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > > > +{
> > > > + vq->is_le = virtio_legacy_is_little_endian();
> > > > +}
> > > > +
> > > > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > > > poll_table *pt)
> > > > {
> > > > @@ -276,8 +286,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
> > > > vq->call = NULL;
> > > > vq->log_ctx = NULL;
> > > > vq->memory = NULL;
> > > > - vq->is_le = virtio_legacy_is_little_endian();
> > > > - vhost_vq_reset_user_be(vq);
> > > > + vhost_disable_is_le(vq);
> > > > + vhost_disable_user_be(vq);
> > > > }
> > > >
> > > > static int vhost_worker(void *data)
> > > > @@ -1157,11 +1167,11 @@ int vhost_init_used(struct vhost_virtqueue *vq)
> > > > __virtio16 last_used_idx;
> > > > int r;
> > > > if (!vq->private_data) {
> > > > - vq->is_le = virtio_legacy_is_little_endian();
> > > > + vhost_disable_is_le(vq);
> > > > return 0;
> > > > }
> > > >
> > > > - vhost_init_is_le(vq);
> > > > + vhost_enable_is_le(vq);
> > > >
> > > > r = vhost_update_used_flags(vq);
> > > > if (r)
> > >
>
^ permalink raw reply
* Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness
From: Michael S. Tsirkin @ 2016-02-10 15:08 UTC (permalink / raw)
To: Greg Kurz; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160210131134.747352bd@bahia.huguette.org>
On Wed, Feb 10, 2016 at 01:11:34PM +0100, Greg Kurz wrote:
> On Wed, 10 Feb 2016 13:21:22 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
> > On Wed, Jan 13, 2016 at 06:09:41PM +0100, Greg Kurz wrote:
> > > The default use case for vhost is when the host and the vring have the
> > > same endianness (default native endianness). But there are cases where
> > > they differ and vhost should byteswap when accessing the vring:
> > > - the host is big endian and the vring comes from a virtio 1.0 device
> > > which is always little endian
> > > - the architecture is bi-endian and the vring comes from a legacy virtio
> > > device with a different endianness than the endianness of the host (aka
> > > legacy cross-endian)
> > >
> > > These cases are handled by the vq->is_le and the optional vq->user_be,
> > > with the following logic:
> > > - if none of the fields is enabled, vhost access the vring without byteswap
> > > - if the vring is virtio 1.0 and the host is big endian, vq->is_le is
> > > enabled to enforce little endian access to the vring
> > > - if the vring is legacy cross-endian, userspace enables vq->user_be
> > > to inform vhost about the vring endianness. This endianness is then
> > > enforced for vring accesses through vq->is_le again
> > >
> > > The logic is unclear in the current code.
> > >
> > > This patch introduces helpers with explicit enable and disable semantics,
> > > for better clarity.
> > >
> > > No behaviour change.
> > >
> > > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> > > ---
> > > drivers/vhost/vhost.c | 28 +++++++++++++++++++---------
> > > 1 file changed, 19 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > index ad2146a9ab2d..e02e06755ab7 100644
> > > --- a/drivers/vhost/vhost.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -43,11 +43,16 @@ enum {
> > > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> > >
> > > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > > +static void vhost_disable_user_be(struct vhost_virtqueue *vq)
> > > {
> > > vq->user_be = !virtio_legacy_is_little_endian();
> > > }
> > >
> >
> > Hmm this doesn't look like an improvement to me.
> > What does it mean to disable big endian? Make it little endian?
>
> The default behavior for the device is native endian.
>
> The SET_VRING_ENDIAN ioctl is used to make the device big endian
> on little endian hosts, hence "enabling" cross-endian mode...
>
> > Existing reset seems to make sense.
> >
>
> ... and we "disable" cross-endian mode on reset.
OK but that's enable cross-endian. Not enable be. We could have
something like vhost_disable_user_byte_swap though each time we try,
the result makes my head hurt: "swap" is a relative thing and hard to
keep track of.
> > > +static void vhost_enable_user_be(struct vhost_virtqueue *vq, bool user_be)
> > > +{
> > > + vq->user_be = user_be;
> > > +}
> > > +
> >
> > And this is maybe "init_user_be"?
> >
>
> Anyway I don't mind changing the names to reset/init_user_be if you think it
> is clearer.
>
> > > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> > > {
> > > struct vhost_vring_state s;
> > > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> > > s.num != VHOST_VRING_BIG_ENDIAN)
> > > return -EINVAL;
> > >
> > > - vq->user_be = s.num;
> > > + vhost_enable_user_be(vq, !!s.num);
> > >
> > > return 0;
> > > }
> > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx,
> > > return 0;
> > > }
> > >
> > > -static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > {
> > > /* Note for legacy virtio: user_be is initialized at reset time
> > > * according to the host endianness. If userspace does not set an
> >
> > Same thing really. I'd rather add "reset_is_le".
> >
> > > @@ -91,7 +96,7 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be;
> > > }
> > > #else
> > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > > +static void vhost_disable_user_be(struct vhost_virtqueue *vq)
> > > {
> > > }
> > >
> > > @@ -106,13 +111,18 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx,
> > > return -ENOIOCTLCMD;
> > > }
> > >
> > > -static void vhost_init_is_le(struct vhost_virtqueue *vq)
> > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > {
> > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> > > vq->is_le = true;
> > > }
> > > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
> > >
> > > +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > > +{
> > > + vq->is_le = virtio_legacy_is_little_endian();
> > > +}
> > > +
> > > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > > poll_table *pt)
> > > {
> > > @@ -276,8 +286,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
> > > vq->call = NULL;
> > > vq->log_ctx = NULL;
> > > vq->memory = NULL;
> > > - vq->is_le = virtio_legacy_is_little_endian();
> > > - vhost_vq_reset_user_be(vq);
> > > + vhost_disable_is_le(vq);
> > > + vhost_disable_user_be(vq);
> > > }
> > >
> > > static int vhost_worker(void *data)
> > > @@ -1157,11 +1167,11 @@ int vhost_init_used(struct vhost_virtqueue *vq)
> > > __virtio16 last_used_idx;
> > > int r;
> > > if (!vq->private_data) {
> > > - vq->is_le = virtio_legacy_is_little_endian();
> > > + vhost_disable_is_le(vq);
> > > return 0;
> > > }
> > >
> > > - vhost_init_is_le(vq);
> > > + vhost_enable_is_le(vq);
> > >
> > > r = vhost_update_used_flags(vq);
> > > if (r)
> >
^ permalink raw reply
* Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
From: Greg Kurz @ 2016-02-10 13:40 UTC (permalink / raw)
To: Cornelia Huck
Cc: netdev, virtualization, linux-kernel, kvm, Michael S. Tsirkin
In-Reply-To: <20160210142333.744e4446.cornelia.huck@de.ibm.com>
On Wed, 10 Feb 2016 14:23:33 +0100
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> On Wed, 10 Feb 2016 14:08:43 +0100
> Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:
>
> > But you are right, there is a bug: we should rollback if vhost_init_used()
> > fails. Something like below:
> >
> > err_used:
> > vq->private_data = oldsock;
> > vhost_net_enable_vq(n, vq);
> > + vhost_adjust_vring_endian(vq);
>
> Shouldn't we switch back before we reenable? Or have I lost myself in
> this maze here again?
>
I haven't spotted any path under vhost_net_enable_vq() that needs
the vring endianness, but indeed it looks safer to switch back
before a worker thread may be woken up.
> > if (ubufs)
> > vhost_net_ubuf_put_wait_and_free(ubufs);
> > err_ubufs:
^ permalink raw reply
* Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
From: Cornelia Huck @ 2016-02-10 13:23 UTC (permalink / raw)
To: Greg Kurz; +Cc: netdev, virtualization, linux-kernel, kvm, Michael S. Tsirkin
In-Reply-To: <20160210140843.64ea5aa1@bahia.huguette.org>
On Wed, 10 Feb 2016 14:08:43 +0100
Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:
> But you are right, there is a bug: we should rollback if vhost_init_used()
> fails. Something like below:
>
> err_used:
> vq->private_data = oldsock;
> vhost_net_enable_vq(n, vq);
> + vhost_adjust_vring_endian(vq);
Shouldn't we switch back before we reenable? Or have I lost myself in
this maze here again?
> if (ubufs)
> vhost_net_ubuf_put_wait_and_free(ubufs);
> err_ubufs:
^ permalink raw reply
* Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness
From: Cornelia Huck @ 2016-02-10 13:12 UTC (permalink / raw)
To: Greg Kurz; +Cc: netdev, virtualization, linux-kernel, kvm, Michael S. Tsirkin
In-Reply-To: <20160210131134.747352bd@bahia.huguette.org>
On Wed, 10 Feb 2016 13:11:34 +0100
Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:
> On Wed, 10 Feb 2016 13:21:22 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
> > On Wed, Jan 13, 2016 at 06:09:41PM +0100, Greg Kurz wrote:
> > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > index ad2146a9ab2d..e02e06755ab7 100644
> > > --- a/drivers/vhost/vhost.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -43,11 +43,16 @@ enum {
> > > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> > >
> > > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > > +static void vhost_disable_user_be(struct vhost_virtqueue *vq)
> > > {
> > > vq->user_be = !virtio_legacy_is_little_endian();
> > > }
> > >
> >
> > Hmm this doesn't look like an improvement to me.
> > What does it mean to disable big endian? Make it little endian?
>
> The default behavior for the device is native endian.
>
> The SET_VRING_ENDIAN ioctl is used to make the device big endian
> on little endian hosts, hence "enabling" cross-endian mode...
>
> > Existing reset seems to make sense.
> >
>
> ... and we "disable" cross-endian mode on reset.
>
> > > +static void vhost_enable_user_be(struct vhost_virtqueue *vq, bool user_be)
> > > +{
> > > + vq->user_be = user_be;
> > > +}
> > > +
> >
> > And this is maybe "init_user_be"?
> >
>
> Anyway I don't mind changing the names to reset/init_user_be if you think it
> is clearer.
FWIW, I find the enable/disable terminology less confusing.
^ permalink raw reply
* Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
From: Greg Kurz @ 2016-02-10 13:08 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20160210132240-mutt-send-email-mst@redhat.com>
On Wed, 10 Feb 2016 13:48:09 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Wed, Jan 13, 2016 at 06:09:47PM +0100, Greg Kurz wrote:
> > The way vring endianness is being handled currently obfuscates
> > the code in vhost_init_used().
> >
> > This patch tries to fix that by doing the following:
> > - move the the code that adjusts endianness to a dedicated helper
> > - export this helper so that backends explicitely call it
> >
> > No behaviour change.
> >
> > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> > ---
> > drivers/vhost/net.c | 3 +++
> > drivers/vhost/scsi.c | 3 +++
> > drivers/vhost/test.c | 2 ++
> > drivers/vhost/vhost.c | 16 +++++++++++-----
> > drivers/vhost/vhost.h | 1 +
> > 5 files changed, 20 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> > index 9eda69e40678..df01c939cd00 100644
> > --- a/drivers/vhost/net.c
> > +++ b/drivers/vhost/net.c
> > @@ -917,6 +917,9 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)
> >
> > vhost_net_disable_vq(n, vq);
> > vq->private_data = sock;
> > +
> > + vhost_adjust_vring_endian(vq);
> > +
> > r = vhost_init_used(vq);
> > if (r)
> > goto err_used;
>
>
> This is in fact a bug in existing code: if vhost_init_used
> fails, it preferably should not have side-effects.
> It's best to update it last thing.
>
I'm afraid we can't because the following path needs the
vring endianness:
vhost_init_used()->vhost_update_used_flags()->cpu_to_vhost16()
But you are right, there is a bug: we should rollback if vhost_init_used()
fails. Something like below:
err_used:
vq->private_data = oldsock;
vhost_net_enable_vq(n, vq);
+ vhost_adjust_vring_endian(vq);
if (ubufs)
vhost_net_ubuf_put_wait_and_free(ubufs);
err_ubufs:
> > diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> > index 29cfc57d496e..5a8363bfcb74 100644
> > --- a/drivers/vhost/scsi.c
> > +++ b/drivers/vhost/scsi.c
> > @@ -1274,6 +1274,9 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs,
> > vq = &vs->vqs[i].vq;
> > mutex_lock(&vq->mutex);
> > vq->private_data = vs_tpg;
> > +
> > + vhost_adjust_vring_endian(vq);
> > +
> > vhost_init_used(vq);
> > mutex_unlock(&vq->mutex);
> > }
> > diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
> > index f2882ac98726..75e3e0e9f5a8 100644
> > --- a/drivers/vhost/test.c
> > +++ b/drivers/vhost/test.c
> > @@ -196,6 +196,8 @@ static long vhost_test_run(struct vhost_test *n, int test)
> > oldpriv = vq->private_data;
> > vq->private_data = priv;
> >
> > + vhost_adjust_vring_endian(vq);
> > +
> > r = vhost_init_used(&n->vqs[index]);
> >
> > mutex_unlock(&vq->mutex);
> > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > index e02e06755ab7..b0a00340309e 100644
> > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -123,6 +123,15 @@ static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > vq->is_le = virtio_legacy_is_little_endian();
> > }
> >
> > +void vhost_adjust_vring_endian(struct vhost_virtqueue *vq)
> > +{
> > + if (!vq->private_data)
> > + vhost_disable_is_le(vq);
> > + else
> > + vhost_enable_is_le(vq);
> > +}
> > +EXPORT_SYMBOL_GPL(vhost_adjust_vring_endian);
> > +
> > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > poll_table *pt)
> > {
>
> I'd prefer "vhost_update_is_le" here. "endian" might also mean
> "user_be". But see below pls.
>
Ok, I will rename if this patch survives the review.
>
> > @@ -1166,12 +1175,9 @@ int vhost_init_used(struct vhost_virtqueue *vq)
> > {
> > __virtio16 last_used_idx;
> > int r;
> > - if (!vq->private_data) {
> > - vhost_disable_is_le(vq);
> > - return 0;
> > - }
> >
> > - vhost_enable_is_le(vq);
> > + if (!vq->private_data)
> > + return 0;
> >
> > r = vhost_update_used_flags(vq);
> > if (r)
>
> Looking at how callers use this, maybe we should just rename init_used
> to vhost_vq_init_access. The _used suffix was a hint that we
> access the vq used ring. But maybe what callers care about is
> that it must be called after access_ok.
>
And so we would keep the current logic where it is up to the core
code to update is_le... that is basically getting rid of this patch :)
So IIUC you're asking for:
- fix the side-effect in vhost_init_used()
- rename vhost_init_used() to vhost_vq_init_access()
> > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
> > index d3f767448a72..88d86f45f756 100644
> > --- a/drivers/vhost/vhost.h
> > +++ b/drivers/vhost/vhost.h
> > @@ -162,6 +162,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *);
> >
> > int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
> > unsigned int log_num, u64 len);
> > +void vhost_adjust_vring_endian(struct vhost_virtqueue *vq);
> >
> > #define vq_err(vq, fmt, ...) do { \
> > pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox