drm/i915: factor out compute_config from __intel_set_mode v2
Subsystems (2)
PATCH 1/6 drm/i915: factor out compute_config from __intel_set_mode v2
This allows us to calculate the full pipe config before we do any mode setting work.
v2:
- clarify comments about global vs. per-crtc mode set (Ander)
- clean up unnecessary pipe_config = NULL setting (Ander)
--- drivers/gpu/drm/i915/intel_display.c | 96 +++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/intel_display.c +68 -28
@@ -10910,45 +10910,61 @@ static void update_scanline_offset(struct intel_crtc *crtc) crtc->scanline_offset =1 ; } +static int intel_modeset_compute_config (struct drm_crtc *crtc, +struct drm_display_mode *mode, +struct drm_framebuffer *fb, +unsigned *modeset_pipes, +unsigned *prepare_pipes, +unsigned *disable_pipes) +{ +struct intel_crtc_config *pipe_config =NULL ; +int ret =0 ; + +intel_modeset_affected_pipes (crtc, modeset_pipes, + prepare_pipes, disable_pipes); + +if (!modeset_pipes) + goto out; + +/* +* Note this needs changes when we start tracking multiple modes +* and crtcs. At that point we'll need to compute the whole config +* (i.e. one pipe_config for each crtc) rather than just the one +* for this crtc. +*/ + pipe_config =intel_modeset_pipe_config (crtc, fb, mode); +if (IS_ERR (pipe_config)) { + ret =PTR_ERR (pipe_config); + goto out; + } +intel_dump_pipe_config (to_intel_crtc (crtc), pipe_config, +"[modeset]" ); +to_intel_crtc (crtc)->new_config = pipe_config; + +out: +return ret; +} +static int __intel_set_mode (struct drm_crtc *crtc,struct drm_display_mode *mode, -int x,int y,struct drm_framebuffer *fb) +int x,int y,struct drm_framebuffer *fb, +unsigned disable_pipes, +unsigned prepare_pipes, +unsigned modeset_pipes) {struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private;struct drm_display_mode *saved_mode;struct intel_crtc_config *pipe_config =NULL ;struct intel_crtc *intel_crtc; -unsigned disable_pipes, prepare_pipes, modeset_pipes;int ret =0 ; saved_mode =kmalloc (sizeof (*saved_mode),GFP_KERNEL );if (!saved_mode)return -ENOMEM ; -intel_modeset_affected_pipes (crtc, &modeset_pipes, - &prepare_pipes, &disable_pipes); - *saved_mode = crtc->mode; -/* Hack: Because we don't (yet) support global modeset on multiple -* crtcs, we don't keep track of the new mode for more than one crtc. -* Hence simply check whether any bit is set in modeset_pipes in all the -* pieces of code that are not yet converted to deal with mutliple crtcs -* changing their mode at the same time. */ -if (modeset_pipes) { - pipe_config =intel_modeset_pipe_config (crtc, fb, mode); -if (IS_ERR (pipe_config)) { - ret =PTR_ERR (pipe_config); - pipe_config =NULL ; - - goto out; - } -intel_dump_pipe_config (to_intel_crtc (crtc), pipe_config, -"[modeset]" ); -to_intel_crtc (crtc)->new_config = pipe_config; - } -/* * See if the config requires any additional preparation, e.g. * to adjust global state with pipes off. We need to do this
@@ -10973,6 +10989,10 @@ static int __intel_set_mode(struct drm_crtc *crtc,/* crtc->mode is already used by the ->mode_set callbacks, hence we need * to set it here already despite that we pass it down the callchain. +* +* Note we'll need to fix this up when we start tracking multiple +* pipes; here we assume a single modeset_pipe and only track the +* single crtc and mode. */ if (modeset_pipes) { crtc->mode = *mode;
@@ -11042,19 +11062,22 @@ done:if (ret && crtc->enabled) crtc->mode = *saved_mode; -out:kfree (pipe_config);kfree (saved_mode);return ret; } -static int intel_set_mode (struct drm_crtc *crtc, -struct drm_display_mode *mode, -int x,int y,struct drm_framebuffer *fb) +static int intel_set_mode_pipes (struct drm_crtc *crtc, +struct drm_display_mode *mode, +int x,int y,struct drm_framebuffer *fb, +unsigned modeset_pipes, +unsigned prepare_pipes, +unsigned disable_pipes) {int ret; - ret =__intel_set_mode (crtc, mode, x, y, fb); + ret =__intel_set_mode (crtc, mode, x, y, fb, modeset_pipes, + prepare_pipes, disable_pipes);if (ret ==0 )intel_modeset_check_state (crtc->dev);
@@ -11062,6 +11085,23 @@ static int intel_set_mode(struct drm_crtc *crtc,return ret; } +static int intel_set_mode (struct drm_crtc *crtc, +struct drm_display_mode *mode, +int x,int y,struct drm_framebuffer *fb) +{ +unsigned modeset_pipes, prepare_pipes, disable_pipes; +int ret; + + ret =intel_modeset_compute_config (crtc, mode, fb, + &modeset_pipes, &prepare_pipes, + &disable_pipes); +if (ret) +return ret; + +return intel_set_mode_pipes (crtc, mode, x, y, fb, modeset_pipes, + prepare_pipes, disable_pipes); +} +void intel_crtc_restore_mode (struct drm_crtc *crtc) {intel_set_mode (crtc, &crtc->mode, crtc->x, crtc->y, crtc->primary->fb);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 drm/i915: use compute_config in set_config v2
This will allow us to consult more info before deciding whether to flip or do a full mode set.
v2:
- don't use uninitialized or incorrect pipe masks in set_config failure path (Ander)
--- drivers/gpu/drm/i915/intel_display.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +26 -4
@@ -11430,6 +11430,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)struct drm_device *dev;struct drm_mode_set save_set;struct intel_set_config *config; +unsigned modeset_pipes, prepare_pipes, disable_pipes;int ret;BUG_ON (!set);
@@ -11475,9 +11476,17 @@ static int intel_crtc_set_config(struct drm_mode_set *set)if (ret) goto fail; + ret =intel_modeset_compute_config (set->crtc, set->mode, set->fb, + &modeset_pipes, &prepare_pipes, + &disable_pipes); +if (ret) + goto fail; +if (config->mode_changed) { - ret =intel_set_mode (set->crtc, set->mode, - set->x, set->y, set->fb); + ret =intel_set_mode_pipes (set->crtc, set->mode, + set->x, set->y, set->fb, + modeset_pipes, prepare_pipes, + disable_pipes); }else if (config->fb_changed) {struct intel_crtc *intel_crtc =to_intel_crtc (set->crtc);
@@ -13412,14 +13421,27 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,for_each_pipe (dev_priv, pipe) {struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; +unsigned modeset_pipes, prepare_pipes, disable_pipes; +int ret; + + ret =intel_modeset_compute_config (crtc, &crtc->mode, + crtc->primary->fb, + &modeset_pipes, + &prepare_pipes, + &disable_pipes); +if (ret) { +DRM_DEBUG_KMS ("prepare failed\n" ); + goto out; + }__intel_set_mode (crtc, &crtc->mode, crtc->x, crtc->y, - crtc->primary->fb); + crtc->primary->fb, modeset_pipes, + prepare_pipes, disable_pipes); } }else {intel_modeset_update_staged_output_state (dev); } - +out:intel_modeset_check_state (dev); }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/6 drm/i915/hdmi: fetch infoframe status in get_config v2
In reply to Jesse BarnesThis is useful for checking things later.
v2:
- fix hsw infoframe enabled check (Ander)
--- drivers/gpu/drm/i915/intel_drv.h | 4 +++ drivers/gpu/drm/i915/intel_hdmi.c | 62 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+)
drivers/gpu/drm/i915/intel_drv.h +4 -0
@@ -290,6 +290,9 @@ struct intel_crtc_config {* between pch encoders and cpu encoders. */ bool has_pch_encoder; +/* Are we sending infoframes on the attached port */ +bool has_infoframe; +/* CPU Transcoder for the pipe. Currently this can only differ from the * pipe on Haswell (where we have a special eDP transcoder). */ enum transcoder cpu_transcoder;
@@ -541,6 +544,7 @@ struct intel_hdmi {void (*set_infoframes)(struct drm_encoder *encoder,bool enable,struct drm_display_mode *adjusted_mode); +bool (*infoframe_enabled)(struct drm_encoder *encoder); };struct intel_dp_mst_encoder ;
drivers/gpu/drm/i915/intel_hdmi.c +62 -0
116 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/6 drm/i915: check for audio and infoframe changes across mode sets
In reply to Jesse BarnesIf these change (e.g. after a modeset following a fastboot), we need to do a full mode set.
--- drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/i915/intel_display.c +10 -0
@@ -11482,6 +11482,16 @@ static int intel_crtc_set_config(struct drm_mode_set *set)if (ret) goto fail; +if (to_intel_crtc (set->crtc)->new_config->has_audio != +to_intel_crtc (set->crtc)->config.has_audio) + config->mode_changed = true; + +/* Force mode sets for any infoframe stuff */ +if (to_intel_crtc (set->crtc)->new_config->has_infoframe || +to_intel_crtc (set->crtc)->config.has_infoframe) + config->mode_changed = true; + +if (config->mode_changed) { ret = intel_set_mode_pipes(set->crtc, set->mode, set->x, set->y, set->fb,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/6 drm/i915: update pipe size at set_config time
In reply to Jesse BarnesThis only affects the fastboot path as-is. In that case, we simply need to make sure that we update the pipe size at the first mode set. Rather than putting it off until we decide to flip (if indeed we do end up flipping), update the pipe size as appropriate a bit earlier in the set_config call.
This sets us up for better pipe tracking in later patches.
--- drivers/gpu/drm/i915/intel_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
@@ -2902,8 +2902,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,return ret; } -intel_update_pipe_size (intel_crtc); - dev_priv->display.update_primary_plane (crtc, fb, x, y);if (intel_crtc->active)
@@ -11491,6 +11489,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set) to_intel_crtc(set->crtc)->config.has_infoframe) config->mode_changed = true; +intel_update_pipe_size (to_intel_crtc (set->crtc));if (config->mode_changed) { ret = intel_set_mode_pipes(set->crtc, set->mode,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/6 drm/i915: calculate pfit changes in set_config v2
In reply to Jesse BarnesThis should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
--- drivers/gpu/drm/i915/intel_display.c | 61 +++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +50 -11
@@ -2831,17 +2831,8 @@ static void intel_update_pipe_size(struct intel_crtc *crtc)return ;/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -* -* To fix this properly, we need to hoist the checks up into -* compute_mode_changes (or above), check the actual pfit state and -* whether the platform allows pfit disable with pipe active, and only -* then update the pipesrc and pfit state, even on the flip path. +* See intel_pfit_changed for info on when we're allowed to +* do this w/o a pipe shutdown. */ adjusted_mode = &crtc->config.adjusted_mode;
@@ -11423,6 +11414,50 @@ static void disable_crtc_nofb(struct intel_crtc *crtc) crtc->new_config =NULL ; } +/* Do we need a mode set due to pfit changes? */ +static bool intel_pfit_changed (struct drm_device *dev, +struct intel_crtc_config *new_config, +struct intel_crtc_config *cur_config) +{ +bool ret = false; + +if (HAS_DDI (dev) ||HAS_PCH_SPLIT (dev)) { +/* +* On PCH platforms we can disable pfit w/o a pipe shutdown, +* otherwise we'll need a mode set. +*/ +if (new_config->pch_pfit.enabled && + cur_config->pch_pfit.enabled) + ret = false; +else if (new_config->pch_pfit.enabled && + !cur_config->pch_pfit.enabled) + ret = true; +else if (!new_config->pch_pfit.enabled && + cur_config->pch_pfit.enabled) + ret = false; +else if (!new_config->pch_pfit.enabled && + !cur_config->pch_pfit.enabled) + ret = false; + }else { +bool new_enabled, old_enabled; + + new_enabled = !!(new_config->gmch_pfit.control &PFIT_ENABLE ); + old_enabled = !!(cur_config->gmch_pfit.control &PFIT_ENABLE ); + +/* 9xx only needs a shutdown to disable pfit */ +if (new_enabled && old_enabled) + ret = false; +else if (new_enabled && !old_enabled) + ret = false; +else if (!new_enabled && old_enabled) + ret = true; +else if (!new_enabled && !old_enabled) + ret = false; + } + +return ret; +} +static int intel_crtc_set_config (struct drm_mode_set *set) {struct drm_device *dev;
@@ -11489,6 +11524,10 @@ static int intel_crtc_set_config(struct drm_mode_set *set) to_intel_crtc(set->crtc)->config.has_infoframe) config->mode_changed = true; +if (intel_pfit_changed (dev,to_intel_crtc (set->crtc)->new_config, + &to_intel_crtc (set->crtc)->config)) + config->mode_changed = true; +intel_update_pipe_size (to_intel_crtc (set->crtc));if (config->mode_changed) {
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/6] drm/i915: calculate pfit changes in set_config v2
For the series,
Quoted 88 lines · Jesse Barnes
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 61 +++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_display.c +46
-11@@ -2831,17 +2831,8 @@ static void intel_update_pipe_size(struct intel_crtc *crtc)return ;/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -* -* To fix this properly, we need to hoist the checks up into -* compute_mode_changes (or above), check the actual pfit state and -* whether the platform allows pfit disable with pipe active, and only -* then update the pipesrc and pfit state, even on the flip path. +* See intel_pfit_changed for info on when we're allowed to +* do this w/o a pipe shutdown. */ adjusted_mode = &crtc->config.adjusted_mode;@@ -11423,6 +11414,50 @@ static void disable_crtc_nofb(struct intel_crtc *crtc) crtc->new_config =NULL ; } +/* Do we need a mode set due to pfit changes? */ +static bool intel_pfit_changed (struct drm_device *dev, +struct intel_crtc_config *new_config, +struct intel_crtc_config *cur_config) +{ +bool ret = false; + +if (HAS_DDI (dev) ||HAS_PCH_SPLIT (dev)) { +/* +* On PCH platforms we can disable pfit w/o a pipe shutdown, +* otherwise we'll need a mode set. +*/ +if (new_config->pch_pfit.enabled && + cur_config->pch_pfit.enabled) + ret = false; +else if (new_config->pch_pfit.enabled && + !cur_config->pch_pfit.enabled) + ret = true; +else if (!new_config->pch_pfit.enabled && + cur_config->pch_pfit.enabled) + ret = false; +else if (!new_config->pch_pfit.enabled && + !cur_config->pch_pfit.enabled) + ret = false; + }else { +bool new_enabled, old_enabled; + + new_enabled = !!(new_config->gmch_pfit.control &PFIT_ENABLE ); + old_enabled = !!(cur_config->gmch_pfit.control &PFIT_ENABLE ); + +/* 9xx only needs a shutdown to disable pfit */ +if (new_enabled && old_enabled) + ret = false; +else if (new_enabled && !old_enabled) + ret = false; +else if (!new_enabled && old_enabled) + ret = true; +else if (!new_enabled && !old_enabled) + ret = false; + } + +return ret; +} +static int intel_crtc_set_config (struct drm_mode_set *set) {struct drm_device *dev;
drivers/gpu/drm/i915/intel_display.c static int intel_crtc_set_config(struct drm_mode_set *set) · line 11533
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4
-0@@ -11489,6 +11524,10 @@ static int intel_crtc_set_config(struct drm_mode_set *set) to_intel_crtc(set->crtc)->config.has_infoframe) config->mode_changed = true; +if (intel_pfit_changed (dev,to_intel_crtc (set->crtc)->new_config, + &to_intel_crtc (set->crtc)->config)) + config->mode_changed = true; +intel_update_pipe_size (to_intel_crtc (set->crtc));if (config->mode_changed) {
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks for the review, Ander.
Daniel, in case you're tempted to merge this, don't just yet. Shaung's test bot found an issue with the refactoring patch I'm still tracking down. I'll post a v3 with the fix in reply to this...
Thanks,
Jesse
Quoted 181 lines · On Thu, 30 Oct 2014 11:53:59 -0700 Jesse Barnes <[email protected]>…
This allows us to calculate the full pipe config before we do any mode setting work.
v2:
- clarify comments about global vs. per-crtc mode set (Ander)
- clean up unnecessarypipe_config= NULL setting (Ander)Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 96+++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 28 deletions(-)
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_display.cindex 6e5bc3c..f9a0963 100644drivers/gpu/drm/i915/intel_display.c +18
-0@@ -10910,45 +10910,61 @@ static void update_scanline_offset(struct intel_crtc *crtc) crtc->scanline_offset = 1; } +static int intel_modeset_compute_config (struct drm_crtc *crtc, +struct drm_display_mode *mode, +struct drm_framebuffer *fb, +unsigned *modeset_pipes, +unsigned *prepare_pipes, +unsigned *disable_pipes) +{ +struct intel_crtc_config *pipe_config =NULL ; +int ret =0 ; + +intel_modeset_affected_pipes (crtc, modeset_pipes, + prepare_pipes, disable_pipes); + +if (!modeset_pipes) + goto out; + +/* +* Note this needs changes when we start tracking multiple modes
drivers/gpu/drm/i915/intel_display.c +1
-0+* and crtcs. At that point we'll need to compute the whole config
drivers/gpu/drm/i915/intel_display.c +1
-0+* (i.e. one pipe_config for each crtc) rather than just the one
drivers/gpu/drm/i915/intel_display.c +19
-6+* for this crtc. +*/ + pipe_config =intel_modeset_pipe_config (crtc, fb, mode); +if (IS_ERR (pipe_config)) { + ret =PTR_ERR (pipe_config); + goto out; + } +intel_dump_pipe_config (to_intel_crtc (crtc), pipe_config, +"[modeset]" ); +to_intel_crtc (crtc)->new_config = pipe_config; + +out: +return ret; +} +static int __intel_set_mode (struct drm_crtc *crtc,struct drm_display_mode *mode, -int x,int y,struct drm_framebuffer *fb) +int x,int y,struct drm_framebuffer *fb, +unsigned disable_pipes, +unsigned prepare_pipes, +unsigned modeset_pipes) {struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private;struct drm_display_mode *saved_mode;struct intel_crtc_config *pipe_config =NULL ;struct intel_crtc *intel_crtc; -unsigned disable_pipes, prepare_pipes, modeset_pipes;int ret =0 ; saved_mode =kmalloc (sizeof (*saved_mode),GFP_KERNEL );if (!saved_mode)return -ENOMEM ; -intel_modeset_affected_pipes (crtc, &modeset_pipes, - &prepare_pipes, &disable_pipes); - *saved_mode = crtc->mode; -/* Hack: Because we don't (yet) support global modeset on multiple
drivers/gpu/drm/i915/intel_display.c +0
-1-* crtcs, we don't keep track of the new mode for more than one crtc.
drivers/gpu/drm/i915/intel_display.c +0
-1-* Hence simply check whether any bit is set in
modeset_pipesin all thedrivers/gpu/drm/i915/intel_display.c +0
-1-* pieces of code that are not yet converted to deal with mutliple crtcs
drivers/gpu/drm/i915/intel_display.c +0
-3-* changing their mode at the same time. */ -if (modeset_pipes) { - pipe_config = intel_modeset_pipe_config(crtc, fb,mode);
drivers/gpu/drm/i915/intel_display.c +0
-7-if (IS_ERR (pipe_config)) { - ret =PTR_ERR (pipe_config); - pipe_config =NULL ; - - goto out; - } - intel_dump_pipe_config(to_intel_crtc(crtc),
pipe_config,drivers/gpu/drm/i915/intel_display.c +0
-4- "[modeset]"); -to_intel_crtc (crtc)->new_config = pipe_config; - } -/* * See if the config requires any additional preparation, e.g.
drivers/gpu/drm/i915/intel_display.c +0
-0* to adjust global state with pipes off. We need to do this @@ -10973,6 +10989,10 @@ static int __intel_set_mode(struct drm_crtc *crtc,/* crtc->mode is already used by the ->mode_set callbacks, hence we need
* to set it here already despite that we pass it down the
callchain.drivers/gpu/drm/i915/intel_display.c +2
-0+* +* Note we'll need to fix this up when we start tracking multiple
drivers/gpu/drm/i915/intel_display.c +1
-0+* pipes; here we assume a single modeset_pipe and only track the
drivers/gpu/drm/i915/intel_display.c +9
-5+* single crtc and mode. */ if (modeset_pipes) { crtc->mode = *mode;@@ -11042,19 +11062,22 @@ done:if (ret && crtc->enabled) crtc->mode = *saved_mode; -out:kfree (pipe_config);kfree (saved_mode);return ret; } -static int intel_set_mode (struct drm_crtc *crtc, -struct drm_display_mode *mode, - int x, int y, struct drm_framebuffer *fb) +static int intel_set_mode_pipes (struct drm_crtc *crtc, +struct drm_display_mode *mode, +int x,int y,struct drm_framebuffer *fb, +unsigned modeset_pipes, +unsigned prepare_pipes, +unsigned disable_pipes) {int ret; - ret =__intel_set_mode (crtc, mode, x, y, fb); + ret =__intel_set_mode (crtc, mode, x, y, fb, modeset_pipes, + prepare_pipes, disable_pipes);if (ret ==0 )drivers/gpu/drm/i915/intel_display.c +17
-0intel_modeset_check_state (crtc->dev);@@ -11062,6 +11085,23 @@ static int intel_set_mode(struct drm_crtc *crtc, return ret; } +static int intel_set_mode (struct drm_crtc *crtc, +struct drm_display_mode *mode, +int x,int y,struct drm_framebuffer *fb) +{ +unsigned modeset_pipes, prepare_pipes, disable_pipes; +int ret; + + ret =intel_modeset_compute_config (crtc, mode, fb, + &modeset_pipes, &prepare_pipes, + &disable_pipes); +if (ret) +return ret; + +return intel_set_mode_pipes (crtc, mode, x, y, fb, modeset_pipes, + prepare_pipes, disable_pipes); +} +void intel_crtc_restore_mode (struct drm_crtc *crtc)
Quoted 3 lines
{
intel_set_mode(crtc,&crtc->mode,crtc->x,crtc->y,crtc->primary->fb);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx