Carlos Palminha
2016-Feb-16 14:09 UTC
[PATCH 00/16] drm crtc cleanup: nuke optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Carlos Palminha (16): drm: fixes crct set_mode when crtc mode_fixup is null. drm/cirrus: removed optional dummy crtc mode_fixup function. drm/mgag200: removed optional dummy crtc mode_fixup function. drm/udl: removed optional dummy crtc mode_fixup function. drm/gma: removed optional dummy crtc mode_fixup function. drm/rcar-du: removed optional dummy crtc mode_fixup function. drm/omapdrm: removed optional dummy crtc mode_fixup function. drm/msm/mdp: removed optional dummy crtc mode_fixup function. drm/shmobile: removed optional dummy crtc mode_fixup function. drm/sti: removed optional dummy crtc mode_fixup function. drm/atmel-hldcd: removed optional dummy crtc mode_fixup function. drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function. drm/virtio: removed optional dummy crtc mode_fixup function. drm/fsl-dcu: removed optional dummy crtc mode_fixup function. drm/bochs: removed optional dummy crtc mode_fixup function. drm/ast: removed optional dummy crtc mode_fixup function. drivers/gpu/drm/ast/ast_mode.c | 8 -------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 --------- drivers/gpu/drm/bochs/bochs_kms.c | 8 -------- drivers/gpu/drm/cirrus/cirrus_mode.c | 13 ------------- drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++--- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 -------- drivers/gpu/drm/gma500/cdv_intel_display.c | 13 ++++++------- drivers/gpu/drm/gma500/gma_display.c | 7 ------- drivers/gpu/drm/gma500/gma_display.h | 3 --- drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 -- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 - drivers/gpu/drm/gma500/psb_intel_display.c | 1 - drivers/gpu/drm/mgag200/mgag200_mode.c | 13 ------------- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 8 -------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 -------- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 8 -------- drivers/gpu/drm/omapdrm/omap_crtc.c | 8 -------- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 9 --------- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 -------- drivers/gpu/drm/sti/sti_crtc.c | 9 --------- drivers/gpu/drm/udl/udl_modeset.c | 9 --------- drivers/gpu/drm/virtio/virtgpu_display.c | 8 -------- 22 files changed, 12 insertions(+), 158 deletions(-) -- 2.5.0
Carlos Palminha
2016-Feb-16 14:10 UTC
[PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index e70d064..7539eea 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, } } - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) { - DRM_DEBUG_KMS("CRTC fixup failed\n"); - goto done; + if (crtc_funcs->mode_fixup) { + if (!(ret = crtc_funcs->mode_fixup(crtc, mode, + adjusted_mode))) { + DRM_DEBUG_KMS("CRTC fixup failed\n"); + goto done; + } } DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name); -- 2.5.0
Carlos Palminha
2016-Feb-16 14:16 UTC
[PATCH 02/16] drm/cirrus: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/cirrus/cirrus_mode.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 4a02854..e7334a8 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -91,18 +91,6 @@ static void cirrus_crtc_dpms(struct drm_crtc *crtc, int mode) WREG_GFX(0xe, gr0e); } -/* - * The core passes the desired mode to the CRTC code to see whether any - * CRTC-specific modifications need to be made to it. We're in a position - * to just pass that straight through, so this does nothing - */ -static bool cirrus_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void cirrus_set_start_address(struct drm_crtc *crtc, unsigned offset) { struct cirrus_device *cdev = crtc->dev->dev_private; @@ -372,7 +360,6 @@ static const struct drm_crtc_funcs cirrus_crtc_funcs = { static const struct drm_crtc_helper_funcs cirrus_helper_funcs = { .dpms = cirrus_crtc_dpms, - .mode_fixup = cirrus_crtc_mode_fixup, .mode_set = cirrus_crtc_mode_set, .mode_set_base = cirrus_crtc_mode_set_base, .prepare = cirrus_crtc_prepare, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:17 UTC
[PATCH 03/16] drm/mgag200: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/mgag200/mgag200_mode.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index dc13c48..aa99c40 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -92,18 +92,6 @@ static inline void mga_wait_busy(struct mga_device *mdev) } while ((status & 0x01) && time_before(jiffies, timeout)); } -/* - * The core passes the desired mode to the CRTC code to see whether any - * CRTC-specific modifications need to be made to it. We're in a position - * to just pass that straight through, so this does nothing - */ -static bool mga_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - #define P_ARRAY_SIZE 9 static int mga_g200se_set_plls(struct mga_device *mdev, long clock) @@ -1410,7 +1398,6 @@ static const struct drm_crtc_funcs mga_crtc_funcs = { static const struct drm_crtc_helper_funcs mga_helper_funcs = { .disable = mga_crtc_disable, .dpms = mga_crtc_dpms, - .mode_fixup = mga_crtc_mode_fixup, .mode_set = mga_crtc_mode_set, .mode_set_base = mga_crtc_mode_set_base, .prepare = mga_crtc_prepare, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:17 UTC
[PATCH 04/16] drm/udl: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/udl/udl_modeset.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index 160ef2a..b87afee 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -279,14 +279,6 @@ static void udl_crtc_dpms(struct drm_crtc *crtc, int mode) } -static bool udl_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) - -{ - return true; -} - #if 0 static int udl_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb, @@ -402,7 +394,6 @@ static void udl_crtc_commit(struct drm_crtc *crtc) static const struct drm_crtc_helper_funcs udl_helper_funcs = { .dpms = udl_crtc_dpms, - .mode_fixup = udl_crtc_mode_fixup, .mode_set = udl_crtc_mode_set, .prepare = udl_crtc_prepare, .commit = udl_crtc_commit, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:17 UTC
[PATCH 05/16] drm/gma: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/gma500/cdv_intel_display.c | 13 ++++++------- drivers/gpu/drm/gma500/gma_display.c | 7 ------- drivers/gpu/drm/gma500/gma_display.h | 3 --- drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 -- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 - drivers/gpu/drm/gma500/psb_intel_display.c | 1 - 6 files changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index 6126546..17db4b4 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -116,7 +116,7 @@ static const struct gma_limit_t cdv_intel_limits[] = { .p1 = {.min = 1, .max = 10}, .p2 = {.dot_limit = 225000, .p2_slow = 10, .p2_fast = 10}, .find_pll = cdv_intel_find_dp_pll, - } + } }; #define _wait_for(COND, MS, W) ({ \ @@ -245,7 +245,7 @@ cdv_dpll_set_clock_cdv(struct drm_device *dev, struct drm_crtc *crtc, /* We don't know what the other fields of these regs are, so * leave them in place. */ - /* + /* * The BIT 14:13 of 0x8010/0x8030 is used to select the ref clk * for the pipe A/B. Display spec 1.06 has wrong definition. * Correct definition is like below: @@ -256,7 +256,7 @@ cdv_dpll_set_clock_cdv(struct drm_device *dev, struct drm_crtc *crtc, * * if DPLLA sets 01 and DPLLB sets 02, both use clk from DPLLA * - */ + */ ret = cdv_sb_read(dev, ref_sfr, &ref_value); if (ret) return ret; @@ -646,7 +646,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, * for DP/eDP. When using SSC clock, the ref clk is 100MHz.Otherwise * it will be 27MHz. From the VBIOS code it seems that the pipe A choose * 27MHz for DP/eDP while the Pipe B chooses the 100MHz. - */ + */ if (pipe == 0) refclk = 27000; else @@ -659,7 +659,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, } drm_mode_debug_printmodeline(adjusted_mode); - + limit = gma_crtc->clock_funcs->limit(crtc, refclk); ok = limit->find_pll(limit, crtc, adjusted_mode->clock, refclk, @@ -721,7 +721,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, pipeconf |= PIPE_6BPC; } else pipeconf |= PIPE_8BPC; - + /* Set up the display plane register */ dspcntr = DISPPLANE_GAMMA_ENABLE; @@ -974,7 +974,6 @@ struct drm_display_mode *cdv_intel_crtc_mode_get(struct drm_device *dev, const struct drm_crtc_helper_funcs cdv_intel_helper_funcs = { .dpms = gma_crtc_dpms, - .mode_fixup = gma_crtc_mode_fixup, .mode_set = cdv_intel_crtc_mode_set, .mode_set_base = gma_pipe_set_base, .prepare = gma_crtc_prepare, diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index ff17af4..d6a5c77 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c @@ -485,13 +485,6 @@ bool gma_encoder_mode_fixup(struct drm_encoder *encoder, return true; } -bool gma_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - void gma_crtc_prepare(struct drm_crtc *crtc) { const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h index ed569d8..fc64241 100644 --- a/drivers/gpu/drm/gma500/gma_display.h +++ b/drivers/gpu/drm/gma500/gma_display.h @@ -75,9 +75,6 @@ extern void gma_crtc_load_lut(struct drm_crtc *crtc); extern void gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, u32 start, u32 size); extern void gma_crtc_dpms(struct drm_crtc *crtc, int mode); -extern bool gma_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode); extern void gma_crtc_prepare(struct drm_crtc *crtc); extern void gma_crtc_commit(struct drm_crtc *crtc); extern void gma_crtc_disable(struct drm_crtc *crtc); diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c index acd3834..92e3f93e 100644 --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c @@ -1026,10 +1026,8 @@ mrst_crtc_mode_set_exit: const struct drm_crtc_helper_funcs mdfld_helper_funcs = { .dpms = mdfld_crtc_dpms, - .mode_fixup = gma_crtc_mode_fixup, .mode_set = mdfld_crtc_mode_set, .mode_set_base = mdfld__intel_pipe_set_base, .prepare = gma_crtc_prepare, .commit = gma_crtc_commit, }; - diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c index 1048f0c..da9fd34 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c @@ -657,7 +657,6 @@ pipe_set_base_exit: const struct drm_crtc_helper_funcs oaktrail_helper_funcs = { .dpms = oaktrail_crtc_dpms, - .mode_fixup = gma_crtc_mode_fixup, .mode_set = oaktrail_crtc_mode_set, .mode_set_base = oaktrail_pipe_set_base, .prepare = gma_crtc_prepare, diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index dcdbc37..398015b 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c @@ -430,7 +430,6 @@ struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev, const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { .dpms = gma_crtc_dpms, - .mode_fixup = gma_crtc_mode_fixup, .mode_set = psb_intel_crtc_mode_set, .mode_set_base = gma_pipe_set_base, .prepare = gma_crtc_prepare, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:18 UTC
[PATCH 06/16] drm/rcar-du: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 4ec80ae..627abc80 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -468,14 +468,6 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc) rcrtc->outputs = 0; } -static bool rcar_du_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - /* TODO Fixup modes */ - return true; -} - static void rcar_du_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { @@ -502,7 +494,6 @@ static void rcar_du_crtc_atomic_flush(struct drm_crtc *crtc, } static const struct drm_crtc_helper_funcs crtc_helper_funcs = { - .mode_fixup = rcar_du_crtc_mode_fixup, .disable = rcar_du_crtc_disable, .enable = rcar_du_crtc_enable, .atomic_begin = rcar_du_crtc_atomic_begin, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:18 UTC
[PATCH 07/16] drm/omapdrm: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/omapdrm/omap_crtc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index d38fcbc..483acdb 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -330,13 +330,6 @@ static void omap_crtc_destroy(struct drm_crtc *crtc) kfree(omap_crtc); } -static bool omap_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void omap_crtc_enable(struct drm_crtc *crtc) { struct omap_crtc *omap_crtc = to_omap_crtc(crtc); @@ -451,7 +444,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { }; static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = { - .mode_fixup = omap_crtc_mode_fixup, .mode_set_nofb = omap_crtc_mode_set_nofb, .disable = omap_crtc_disable, .enable = omap_crtc_enable, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:18 UTC
[PATCH 08/16] drm/msm/mdp: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 8 -------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 -------- 2 files changed, 16 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index 909d742..38329a6 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -147,13 +147,6 @@ static void mdp4_crtc_destroy(struct drm_crtc *crtc) kfree(mdp4_crtc); } -static bool mdp4_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - /* statically (for now) map planes to mixer stage (z-order): */ static const int idxs[] = { [VG1] = 1, @@ -508,7 +501,6 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = { }; static const struct drm_crtc_helper_funcs mdp4_crtc_helper_funcs = { - .mode_fixup = mdp4_crtc_mode_fixup, .mode_set_nofb = mdp4_crtc_mode_set_nofb, .disable = mdp4_crtc_disable, .enable = mdp4_crtc_enable, diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index 46682aa..d6b45eb 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -185,13 +185,6 @@ static void mdp5_crtc_destroy(struct drm_crtc *crtc) kfree(mdp5_crtc); } -static bool mdp5_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - /* * blend_setup() - blend all the planes of a CRTC * @@ -634,7 +627,6 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = { }; static const struct drm_crtc_helper_funcs mdp5_crtc_helper_funcs = { - .mode_fixup = mdp5_crtc_mode_fixup, .mode_set_nofb = mdp5_crtc_mode_set_nofb, .disable = mdp5_crtc_disable, .enable = mdp5_crtc_enable, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:18 UTC
[PATCH 09/16] drm/shmobile: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 27342fd..88643ab 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -359,13 +359,6 @@ static void shmob_drm_crtc_dpms(struct drm_crtc *crtc, int mode) scrtc->dpms = mode; } -static bool shmob_drm_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void shmob_drm_crtc_mode_prepare(struct drm_crtc *crtc) { shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); @@ -431,7 +424,6 @@ static int shmob_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, static const struct drm_crtc_helper_funcs crtc_helper_funcs = { .dpms = shmob_drm_crtc_dpms, - .mode_fixup = shmob_drm_crtc_mode_fixup, .prepare = shmob_drm_crtc_mode_prepare, .commit = shmob_drm_crtc_mode_commit, .mode_set = shmob_drm_crtc_mode_set, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:18 UTC
[PATCH 10/16] drm/sti: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/sti/sti_crtc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c index de11c7c..e04deed 100644 --- a/drivers/gpu/drm/sti/sti_crtc.c +++ b/drivers/gpu/drm/sti/sti_crtc.c @@ -51,14 +51,6 @@ static void sti_crtc_disabling(struct drm_crtc *crtc) mixer->status = STI_MIXER_DISABLING; } -static bool sti_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - /* accept the provided drm_display_mode, do not fix it up */ - return true; -} - static int sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) { @@ -229,7 +221,6 @@ static void sti_crtc_atomic_flush(struct drm_crtc *crtc, static const struct drm_crtc_helper_funcs sti_crtc_helper_funcs = { .enable = sti_crtc_enable, .disable = sti_crtc_disabling, - .mode_fixup = sti_crtc_mode_fixup, .mode_set = drm_helper_crtc_mode_set, .mode_set_nofb = sti_crtc_mode_set_nofb, .mode_set_base = drm_helper_crtc_mode_set_base, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:19 UTC
[PATCH 11/16] drm/atmel-hldcd: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 9863291..58c4f78 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -121,13 +121,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) cfg); } -static bool atmel_hlcdc_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void atmel_hlcdc_crtc_disable(struct drm_crtc *c) { struct drm_device *dev = c->dev; @@ -261,7 +254,6 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc, } static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = { - .mode_fixup = atmel_hlcdc_crtc_mode_fixup, .mode_set = drm_helper_crtc_mode_set, .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb, .mode_set_base = drm_helper_crtc_mode_set_base, @@ -349,4 +341,3 @@ fail: atmel_hlcdc_crtc_destroy(&crtc->base); return ret; } - -- 2.5.0
Carlos Palminha
2016-Feb-16 14:19 UTC
[PATCH 12/16] drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 6f04397..55ccbf0 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -227,13 +227,6 @@ nv_crtc_dpms(struct drm_crtc *crtc, int mode) NVWriteVgaCrtc(dev, nv_crtc->index, NV_CIO_CRE_RPC1_INDEX, crtc1A); } -static bool -nv_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) { @@ -1093,7 +1086,6 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = { .dpms = nv_crtc_dpms, .prepare = nv_crtc_prepare, .commit = nv_crtc_commit, - .mode_fixup = nv_crtc_mode_fixup, .mode_set = nv_crtc_mode_set, .mode_set_base = nv04_crtc_mode_set_base, .mode_set_base_atomic = nv04_crtc_mode_set_base_atomic, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:19 UTC
[PATCH 13/16] drm/virtio: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at 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..6a6cb73 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -237,13 +237,6 @@ virtio_gpu_framebuffer_init(struct drm_device *dev, return 0; } -static bool virtio_gpu_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void virtio_gpu_crtc_mode_set_nofb(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; @@ -277,7 +270,6 @@ static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc, static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = { .enable = virtio_gpu_crtc_enable, .disable = virtio_gpu_crtc_disable, - .mode_fixup = virtio_gpu_crtc_mode_fixup, .mode_set_nofb = virtio_gpu_crtc_mode_set_nofb, .atomic_check = virtio_gpu_crtc_atomic_check, }; -- 2.5.0
Carlos Palminha
2016-Feb-16 14:19 UTC
[PATCH 14/16] drm/fsl-dcu: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c index d8ab8f0..9aa6ad5 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c @@ -72,13 +72,6 @@ static void fsl_dcu_drm_crtc_enable(struct drm_crtc *crtc) dev_err(fsl_dev->dev, "Enable CRTC failed\n"); } -static bool fsl_dcu_drm_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void fsl_dcu_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; @@ -153,7 +146,6 @@ static const struct drm_crtc_helper_funcs fsl_dcu_drm_crtc_helper_funcs = { .atomic_flush = fsl_dcu_drm_crtc_atomic_flush, .disable = fsl_dcu_drm_disable_crtc, .enable = fsl_dcu_drm_crtc_enable, - .mode_fixup = fsl_dcu_drm_crtc_mode_fixup, .mode_set_nofb = fsl_dcu_drm_crtc_mode_set_nofb, }; -- 2.5.0
Carlos Palminha
2016-Feb-16 14:20 UTC
[PATCH 15/16] drm/bochs: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- 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..c922b48 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -30,13 +30,6 @@ static void bochs_crtc_dpms(struct drm_crtc *crtc, int mode) } } -static bool bochs_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) { @@ -135,7 +128,6 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = { static const struct drm_crtc_helper_funcs bochs_helper_funcs = { .dpms = bochs_crtc_dpms, - .mode_fixup = bochs_crtc_mode_fixup, .mode_set = bochs_crtc_mode_set, .mode_set_base = bochs_crtc_mode_set_base, .prepare = bochs_crtc_prepare, -- 2.5.0
Carlos Palminha
2016-Feb-16 14:20 UTC
[PATCH 16/16] drm/ast: removed optional dummy crtc mode_fixup function.
This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- 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..0deeecd 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -497,13 +497,6 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode) } } -static bool ast_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - /* ast is different - we will force move buffers out of VRAM */ static int ast_crtc_do_set_base(struct drm_crtc *crtc, struct drm_framebuffer *fb, @@ -617,7 +610,6 @@ static void ast_crtc_commit(struct drm_crtc *crtc) static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = { .dpms = ast_crtc_dpms, - .mode_fixup = ast_crtc_mode_fixup, .mode_set = ast_crtc_mode_set, .mode_set_base = ast_crtc_mode_set_base, .disable = ast_crtc_disable, -- 2.5.0
Daniel Vetter
2016-Feb-16 14:37 UTC
[PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
On Tue, Feb 16, 2016 at 02:10:03PM +0000, Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com>Applied this one to drm-misc. I'll let the others hang out there for a bit more to collect acks. Thanks, Daniel> --- > drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c > index e70d064..7539eea 100644 > --- a/drivers/gpu/drm/drm_crtc_helper.c > +++ b/drivers/gpu/drm/drm_crtc_helper.c > @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, > } > } > > - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) { > - DRM_DEBUG_KMS("CRTC fixup failed\n"); > - goto done; > + if (crtc_funcs->mode_fixup) { > + if (!(ret = crtc_funcs->mode_fixup(crtc, mode, > + adjusted_mode))) { > + DRM_DEBUG_KMS("CRTC fixup failed\n"); > + goto done; > + } > } > DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name); > > -- > 2.5.0 >-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Boris Brezillon
2016-Feb-16 16:58 UTC
[PATCH 11/16] drm/atmel-hldcd: removed optional dummy crtc mode_fixup function.
On Tue, 16 Feb 2016 14:19:06 +0000 Carlos Palminha <CARLOS.PALMINHA at synopsys.com> wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch)There's 2 typos in the subject line (s/hldcd/hlcdc/ and s/removed/remove/), and you're removing an empty line after atmel_hlcdc_crtc_create() definition (which is correct, but I'm not sure it should be part of the same patch). Otherwise it looks good to me. Once you've fixed those 2 things, you can add my Acked-by: Boris Brezillon <boris.brezillon at free-electrons.com>> > Signed-off-by: Carlos Palminha <palminha at synopsys.com> > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > index 9863291..58c4f78 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > @@ -121,13 +121,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) > cfg); > } > > -static bool atmel_hlcdc_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode) > -{ > - return true; > -} > - > static void atmel_hlcdc_crtc_disable(struct drm_crtc *c) > { > struct drm_device *dev = c->dev; > @@ -261,7 +254,6 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc, > } > > static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = { > - .mode_fixup = atmel_hlcdc_crtc_mode_fixup, > .mode_set = drm_helper_crtc_mode_set, > .mode_set_nofb = atmel_hlcdc_crtc_mode_set_nofb, > .mode_set_base = drm_helper_crtc_mode_set_base, > @@ -349,4 +341,3 @@ fail: > atmel_hlcdc_crtc_destroy(&crtc->base); > return ret; > } > --- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Sergei Shtylyov
2016-Feb-16 17:37 UTC
[PATCH 01/16] drm: fixes crct set_mode when crtc mode_fixup is null.
Hello. On 02/16/2016 05:10 PM, Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com> > --- > drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c > index e70d064..7539eea 100644 > --- a/drivers/gpu/drm/drm_crtc_helper.c > +++ b/drivers/gpu/drm/drm_crtc_helper.c > @@ -343,9 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, > } > } > > - if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) { > - DRM_DEBUG_KMS("CRTC fixup failed\n"); > - goto done; > + if (crtc_funcs->mode_fixup) { > + if (!(ret = crtc_funcs->mode_fixup(crtc, mode, > + adjusted_mode))) {You haven't run the patch thru scripts/checkpatch.pl, have you? :-) (It curses on assignment inside the *if* expression.) [...] MBR, Sergei
Laurent Pinchart
2016-Feb-17 15:23 UTC
[PATCH 06/16] drm/rcar-du: removed optional dummy crtc mode_fixup function.
Hi Carlos, Thank you for the patch. On Tuesday 16 February 2016 14:18:00 Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com>Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>> --- > drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 4ec80ae..627abc80 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > @@ -468,14 +468,6 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc) > rcrtc->outputs = 0; > } > > -static bool rcar_du_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode) > -{ > - /* TODO Fixup modes */ > - return true; > -} > - > static void rcar_du_crtc_atomic_begin(struct drm_crtc *crtc, > struct drm_crtc_state *old_crtc_state) > { > @@ -502,7 +494,6 @@ static void rcar_du_crtc_atomic_flush(struct drm_crtc > *crtc, } > > static const struct drm_crtc_helper_funcs crtc_helper_funcs = { > - .mode_fixup = rcar_du_crtc_mode_fixup, > .disable = rcar_du_crtc_disable, > .enable = rcar_du_crtc_enable, > .atomic_begin = rcar_du_crtc_atomic_begin,-- Regards, Laurent Pinchart
Laurent Pinchart
2016-Feb-17 15:24 UTC
[PATCH 07/16] drm/omapdrm: removed optional dummy crtc mode_fixup function.
Hi Carlos, Thank you for the patch. On Tuesday 16 February 2016 14:18:12 Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com>Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>> --- > drivers/gpu/drm/omapdrm/omap_crtc.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c > b/drivers/gpu/drm/omapdrm/omap_crtc.c index d38fcbc..483acdb 100644 > --- a/drivers/gpu/drm/omapdrm/omap_crtc.c > +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c > @@ -330,13 +330,6 @@ static void omap_crtc_destroy(struct drm_crtc *crtc) > kfree(omap_crtc); > } > > -static bool omap_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode) > -{ > - return true; > -} > - > static void omap_crtc_enable(struct drm_crtc *crtc) > { > struct omap_crtc *omap_crtc = to_omap_crtc(crtc); > @@ -451,7 +444,6 @@ static const struct drm_crtc_funcs omap_crtc_funcs = { > }; > > static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = { > - .mode_fixup = omap_crtc_mode_fixup, > .mode_set_nofb = omap_crtc_mode_set_nofb, > .disable = omap_crtc_disable, > .enable = omap_crtc_enable,-- Regards, Laurent Pinchart
Laurent Pinchart
2016-Feb-17 15:24 UTC
[PATCH 09/16] drm/shmobile: removed optional dummy crtc mode_fixup function.
Hi Carlos, Thank you for the patch. On Tuesday 16 February 2016 14:18:40 Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com>Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>> --- > drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 27342fd..88643ab 100644 > --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > @@ -359,13 +359,6 @@ static void shmob_drm_crtc_dpms(struct drm_crtc *crtc, > int mode) scrtc->dpms = mode; > } > > -static bool shmob_drm_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode) > -{ > - return true; > -} > - > static void shmob_drm_crtc_mode_prepare(struct drm_crtc *crtc) > { > shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); > @@ -431,7 +424,6 @@ static int shmob_drm_crtc_mode_set_base(struct drm_crtc > *crtc, int x, int y, > > static const struct drm_crtc_helper_funcs crtc_helper_funcs = { > .dpms = shmob_drm_crtc_dpms, > - .mode_fixup = shmob_drm_crtc_mode_fixup, > .prepare = shmob_drm_crtc_mode_prepare, > .commit = shmob_drm_crtc_mode_commit, > .mode_set = shmob_drm_crtc_mode_set,-- Regards, Laurent Pinchart
Daniel Vetter
2016-Mar-04 17:18 UTC
[PATCH 00/16] drm crtc cleanup: nuke optional dummy crtc mode_fixup function.
On Tue, Feb 16, 2016 at 02:09:44PM +0000, Carlos Palminha wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Carlos Palminha (16): > drm: fixes crct set_mode when crtc mode_fixup is null. > drm/cirrus: removed optional dummy crtc mode_fixup function. > drm/mgag200: removed optional dummy crtc mode_fixup function. > drm/udl: removed optional dummy crtc mode_fixup function. > drm/gma: removed optional dummy crtc mode_fixup function. > drm/rcar-du: removed optional dummy crtc mode_fixup function. > drm/omapdrm: removed optional dummy crtc mode_fixup function. > drm/msm/mdp: removed optional dummy crtc mode_fixup function. > drm/shmobile: removed optional dummy crtc mode_fixup function. > drm/sti: removed optional dummy crtc mode_fixup function. > drm/atmel-hldcd: removed optional dummy crtc mode_fixup function. > drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function. > drm/virtio: removed optional dummy crtc mode_fixup function. > drm/fsl-dcu: removed optional dummy crtc mode_fixup function. > drm/bochs: removed optional dummy crtc mode_fixup function. > drm/ast: removed optional dummy crtc mode_fixup function.Pulled remaining ones into drm-misc, will send off in a pull request to Dave in a few days if it all checks out. -Daniel> > drivers/gpu/drm/ast/ast_mode.c | 8 -------- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 --------- > drivers/gpu/drm/bochs/bochs_kms.c | 8 -------- > drivers/gpu/drm/cirrus/cirrus_mode.c | 13 ------------- > drivers/gpu/drm/drm_crtc_helper.c | 9 ++++++--- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 -------- > drivers/gpu/drm/gma500/cdv_intel_display.c | 13 ++++++------- > drivers/gpu/drm/gma500/gma_display.c | 7 ------- > drivers/gpu/drm/gma500/gma_display.h | 3 --- > drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 -- > drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 - > drivers/gpu/drm/gma500/psb_intel_display.c | 1 - > drivers/gpu/drm/mgag200/mgag200_mode.c | 13 ------------- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 8 -------- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 -------- > drivers/gpu/drm/nouveau/dispnv04/crtc.c | 8 -------- > drivers/gpu/drm/omapdrm/omap_crtc.c | 8 -------- > drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 9 --------- > drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 -------- > drivers/gpu/drm/sti/sti_crtc.c | 9 --------- > drivers/gpu/drm/udl/udl_modeset.c | 9 --------- > drivers/gpu/drm/virtio/virtgpu_display.c | 8 -------- > 22 files changed, 12 insertions(+), 158 deletions(-) > > -- > 2.5.0 >-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Patrik Jakobsson
2016-Mar-07 14:31 UTC
[PATCH 05/16] drm/gma: removed optional dummy crtc mode_fixup function.
On Tue, Feb 16, 2016 at 3:17 PM, Carlos Palminha <CARLOS.PALMINHA at synopsys.com> wrote:> This patch set nukes all the dummy crtc mode_fixup implementations. > (made on top of Daniel topic/drm-misc branch) > > Signed-off-by: Carlos Palminha <palminha at synopsys.com>You should try to avoid mixing code style fixes with functional changes but in case of gma500 it's hard to resist. No need to change this. This might already have been merged but if not: Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson at gmail.com>> --- > drivers/gpu/drm/gma500/cdv_intel_display.c | 13 ++++++------- > drivers/gpu/drm/gma500/gma_display.c | 7 ------- > drivers/gpu/drm/gma500/gma_display.h | 3 --- > drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 -- > drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 - > drivers/gpu/drm/gma500/psb_intel_display.c | 1 - > 6 files changed, 6 insertions(+), 21 deletions(-) > > diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c > index 6126546..17db4b4 100644 > --- a/drivers/gpu/drm/gma500/cdv_intel_display.c > +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c > @@ -116,7 +116,7 @@ static const struct gma_limit_t cdv_intel_limits[] = { > .p1 = {.min = 1, .max = 10}, > .p2 = {.dot_limit = 225000, .p2_slow = 10, .p2_fast = 10}, > .find_pll = cdv_intel_find_dp_pll, > - } > + } > }; > > #define _wait_for(COND, MS, W) ({ \ > @@ -245,7 +245,7 @@ cdv_dpll_set_clock_cdv(struct drm_device *dev, struct drm_crtc *crtc, > /* We don't know what the other fields of these regs are, so > * leave them in place. > */ > - /* > + /* > * The BIT 14:13 of 0x8010/0x8030 is used to select the ref clk > * for the pipe A/B. Display spec 1.06 has wrong definition. > * Correct definition is like below: > @@ -256,7 +256,7 @@ cdv_dpll_set_clock_cdv(struct drm_device *dev, struct drm_crtc *crtc, > * > * if DPLLA sets 01 and DPLLB sets 02, both use clk from DPLLA > * > - */ > + */ > ret = cdv_sb_read(dev, ref_sfr, &ref_value); > if (ret) > return ret; > @@ -646,7 +646,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, > * for DP/eDP. When using SSC clock, the ref clk is 100MHz.Otherwise > * it will be 27MHz. From the VBIOS code it seems that the pipe A choose > * 27MHz for DP/eDP while the Pipe B chooses the 100MHz. > - */ > + */ > if (pipe == 0) > refclk = 27000; > else > @@ -659,7 +659,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, > } > > drm_mode_debug_printmodeline(adjusted_mode); > - > + > limit = gma_crtc->clock_funcs->limit(crtc, refclk); > > ok = limit->find_pll(limit, crtc, adjusted_mode->clock, refclk, > @@ -721,7 +721,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, > pipeconf |= PIPE_6BPC; > } else > pipeconf |= PIPE_8BPC; > - > + > /* Set up the display plane register */ > dspcntr = DISPPLANE_GAMMA_ENABLE; > > @@ -974,7 +974,6 @@ struct drm_display_mode *cdv_intel_crtc_mode_get(struct drm_device *dev, > > const struct drm_crtc_helper_funcs cdv_intel_helper_funcs = { > .dpms = gma_crtc_dpms, > - .mode_fixup = gma_crtc_mode_fixup, > .mode_set = cdv_intel_crtc_mode_set, > .mode_set_base = gma_pipe_set_base, > .prepare = gma_crtc_prepare, > diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c > index ff17af4..d6a5c77 100644 > --- a/drivers/gpu/drm/gma500/gma_display.c > +++ b/drivers/gpu/drm/gma500/gma_display.c > @@ -485,13 +485,6 @@ bool gma_encoder_mode_fixup(struct drm_encoder *encoder, > return true; > } > > -bool gma_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode) > -{ > - return true; > -} > - > void gma_crtc_prepare(struct drm_crtc *crtc) > { > const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; > diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h > index ed569d8..fc64241 100644 > --- a/drivers/gpu/drm/gma500/gma_display.h > +++ b/drivers/gpu/drm/gma500/gma_display.h > @@ -75,9 +75,6 @@ extern void gma_crtc_load_lut(struct drm_crtc *crtc); > extern void gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, > u16 *blue, u32 start, u32 size); > extern void gma_crtc_dpms(struct drm_crtc *crtc, int mode); > -extern bool gma_crtc_mode_fixup(struct drm_crtc *crtc, > - const struct drm_display_mode *mode, > - struct drm_display_mode *adjusted_mode); > extern void gma_crtc_prepare(struct drm_crtc *crtc); > extern void gma_crtc_commit(struct drm_crtc *crtc); > extern void gma_crtc_disable(struct drm_crtc *crtc); > diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c > index acd3834..92e3f93e 100644 > --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c > +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c > @@ -1026,10 +1026,8 @@ mrst_crtc_mode_set_exit: > > const struct drm_crtc_helper_funcs mdfld_helper_funcs = { > .dpms = mdfld_crtc_dpms, > - .mode_fixup = gma_crtc_mode_fixup, > .mode_set = mdfld_crtc_mode_set, > .mode_set_base = mdfld__intel_pipe_set_base, > .prepare = gma_crtc_prepare, > .commit = gma_crtc_commit, > }; > - > diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c > index 1048f0c..da9fd34 100644 > --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c > +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c > @@ -657,7 +657,6 @@ pipe_set_base_exit: > > const struct drm_crtc_helper_funcs oaktrail_helper_funcs = { > .dpms = oaktrail_crtc_dpms, > - .mode_fixup = gma_crtc_mode_fixup, > .mode_set = oaktrail_crtc_mode_set, > .mode_set_base = oaktrail_pipe_set_base, > .prepare = gma_crtc_prepare, > diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c > index dcdbc37..398015b 100644 > --- a/drivers/gpu/drm/gma500/psb_intel_display.c > +++ b/drivers/gpu/drm/gma500/psb_intel_display.c > @@ -430,7 +430,6 @@ struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev, > > const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { > .dpms = gma_crtc_dpms, > - .mode_fixup = gma_crtc_mode_fixup, > .mode_set = psb_intel_crtc_mode_set, > .mode_set_base = gma_pipe_set_base, > .prepare = gma_crtc_prepare, > -- > 2.5.0 >
Apparently Analagous Threads
- [PATCH 00/16] drm crtc cleanup: nuke optional dummy crtc mode_fixup function.
- [PATCH 00/16] drm crtc cleanup: nuke optional dummy crtc mode_fixup function.
- [PATCH] drm: remove NULL pointer check for clk_disable_unprepare
- [PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()
- [PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init()