drm/i915/hdmi: fetch infoframe status in get_config v3
Subsystems (2)
PATCH 1/2 drm/i915/hdmi: fetch infoframe status in get_config v3
This is useful for checking things later.
v2:
- fix hsw infoframe enabled check (Ander)
v3:
- set infoframe status in compute_config too (Ville)
--- drivers/gpu/drm/i915/intel_hdmi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_hdmi.c +3 -0
@@ -982,6 +982,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, pipe_config->has_hdmi_sink = intel_hdmi->has_hdmi_sink; +if (pipe_config->has_hdmi_sink) + pipe_config->has_infoframe = true; +if (intel_hdmi->color_range_auto) {/* See CEA-861-E - 5.1 Default Encoding Parameters */ if (pipe_config->has_hdmi_sink &&
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: calculate pfit changes in set_config v3
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
v3:
- fixup pfit disable shortcut, only apply to gen4 for now (Jesse)
--- drivers/gpu/drm/i915/intel_display.c | 73 ++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +62 -11
@@ -2861,17 +2861,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;
@@ -11266,6 +11257,62 @@ 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 if (IS_GEN4 (dev)) { +/* +* We may be able to get away with this on more chips, but +* we need more testing here. +*/ +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; + }else { +bool new_enabled, old_enabled; + + new_enabled = !!(new_config->gmch_pfit.control &PFIT_ENABLE ); + old_enabled = !!(cur_config->gmch_pfit.control &PFIT_ENABLE ); + +if (new_enabled != old_enabled) + ret = true; + } + +return ret; +} +static int intel_crtc_set_config (struct drm_mode_set *set) {struct drm_device *dev;
@@ -11334,6 +11381,10 @@ static int intel_crtc_set_config(struct drm_mode_set *set)if (to_intel_crtc (set->crtc)->new_config->has_infoframe ||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; }/* set_mode will free it in the mode_changed case */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in
-------------------------------------Summary-------------------------------------
Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate
BYT: pass/total=247/348->277/348
PNV: pass/total=326/328->323/328
ILK: pass/total=329/330->330/330
IVB: pass/total=544/546->533/546
SNB: pass/total=380/380->379/380
HSW: pass/total=582/587->585/587
BDW: pass/total=435/435->433/435
-------------------------------------Detailed-------------------------------------test_platform: test_suite, test_case, result_with_drm_intel_nightly(count, machine_id...)...->result_with_patch_applied(count, machine_id)...
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-basic, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-capture-blt, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-capture-bsd, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-capture-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-debugfs-entry, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_error-state-sysfs-entry, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_ban-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_ban-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-blt, BLACKLIST(1, M31)DMESG_WARN(11, M31M36M29)PASS(13, M31M36M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-bsd, BLACKLIST(1, M31)DMESG_WARN(9, M36M29M31)PASS(15, M31M29M38M36) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-blt, BLACKLIST(1, M31)DMESG_WARN(11, M31M36M29)PASS(13, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-bsd, BLACKLIST(1, M31)DMESG_WARN(12, M31M36M29)PASS(12, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-reverse-blt, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-reverse-bsd, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-fork-reverse-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_close-pending-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_params, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_params-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-count-blt, BLACKLIST(1, M31)DMESG_WARN(16, M31M36M29)PASS(8, M29M38M36) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-count-bsd, BLACKLIST(1, M31)DMESG_WARN(14, M31M36M29)PASS(10, M36M38M29) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-count-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-count-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-stats-blt, BLACKLIST(1, M31)DMESG_WARN(8, M36M29M31)PASS(16, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-stats-bsd, BLACKLIST(1, M31)DMESG_WARN(9, M36M29M31)PASS(15, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-stats-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_reset-stats-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_gem_reset_stats_unrelated-ctx-render, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
BYT: Intel_gpu_tools, igt_drv_hangman_ring-stop-sysfs-entry, BLACKLIST(1, M31)PASS(24, M31M36M29M38) -> PASS(1, M36)
PNV: Intel_gpu_tools, igt_drv_hangman_error-state-basic, PASS(10, M25M23) -> DMESG_WARN(1, M23)PASS(3, M23)
PNV: Intel_gpu_tools, igt_gem_concurrent_blit_gpu-bcs-early-read, PASS(7, M25M23) -> DMESG_WARN(1, M23)PASS(3, M23)
PNV: Intel_gpu_tools, igt_gem_linear_blits_normal, NSPT(15, M23M7)PASS(1, M25) -> NSPT(4, M23)
PNV: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, DMESG_WARN(1, M25)TIMEOUT(15, M7M25M24M23)PASS(3, M24) -> DMESG_WARN(3, M23)TIMEOUT(1, M23)
ILK: Intel_gpu_tools, igt_kms_flip_flip-vs-modeset-interruptible, DMESG_WARN(2, M26)PASS(26, M37M26M6) -> PASS(4, M6)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-covered-pipe-A-plane-1, TIMEOUT(1, M34)PASS(27, M21M4M34) -> PASS(4, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-covered-pipe-B-plane-2, PASS(4, M34) -> DMESG_WARN(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-covered-pipe-C-plane-1, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-covered-pipe-C-plane-2, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-A-plane-1, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-A-plane-2, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-B-plane-1, PASS(4, M34) -> DMESG_WARN(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-B-plane-2, PASS(4, M34) -> DMESG_WARN(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-C-plane-1, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_plane_plane-position-hole-pipe-C-plane-2, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_rotation_crc_primary-rotation, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_rotation_crc_sprite-rotation, PASS(4, M34) -> TIMEOUT(1, M34)PASS(3, M34)
IVB: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(15, M34M21M4)PASS(1, M34) -> TIMEOUT(1, M34)PASS(3, M34)
SNB: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(6, M35M22)PASS(1, M35) -> TIMEOUT(1, M22)PASS(3, M22)
HSW: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, PASS(1, M40) -> TIMEOUT(1, M19)PASS(3, M19)
HSW: Intel_gpu_tools, igt_pm_rpm_legacy-planes, TIMEOUT(1, M40) -> TIMEOUT(3, M19)PASS(1, M19)
HSW: Intel_gpu_tools, igt_pm_rpm_legacy-planes-dpms, TIMEOUT(1, M40) -> TIMEOUT(3, M19)PASS(1, M19)
HSW: Intel_gpu_tools, igt_pm_rpm_universal-planes, TIMEOUT(1, M40) -> TIMEOUT(2, M19)PASS(1, M19)
HSW: Intel_gpu_tools, igt_pm_rpm_universal-planes-dpms, TIMEOUT(1, M40) -> PASS(1, M19)
BDW: Intel_gpu_tools, igt_kms_setmode_invalid-clone-single-crtc, TIMEOUT(15, M28M42M30)PASS(1, M42) -> TIMEOUT(1, M28)PASS(3, M28)
BDW: Intel_gpu_tools, igt_gem_reset_stats_ban-bsd, PASS(31, M42M30M28) -> DMESG_WARN(1, M28)PASS(3, M28)
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3
In reply to Jesse BarnesQuoted 7 lines · Jesse Barnes
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
v3:
- fixup pfit disable shortcut, only apply to gen4 for now (Jesse)
I see that the patch does what it claims it does, so you can use the following r-b tag. However, I want to point out that all the documentation I came across, including for PCH platforms, state that the proper modeset order is to enable pfit before the pipe is enabled and to disable it after disabling the pipe. So I assume you know better than the docs.
Quoted 94 lines
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 73 ++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_display.c +58
-11@@ -2861,17 +2861,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;@@ -11266,6 +11257,62 @@ 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 if (IS_GEN4 (dev)) { +/* +* We may be able to get away with this on more chips, but +* we need more testing here. +*/ +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; + }else { +bool new_enabled, old_enabled; + + new_enabled = !!(new_config->gmch_pfit.control &PFIT_ENABLE ); + old_enabled = !!(cur_config->gmch_pfit.control &PFIT_ENABLE ); + +if (new_enabled != old_enabled) + ret = true; + } + +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 11390
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4
-0@@ -11334,6 +11381,10 @@ static int intel_crtc_set_config(struct drm_mode_set *set)if (to_intel_crtc (set->crtc)->new_config->has_infoframe ||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; }/* set_mode will free it in the mode_changed case */
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3
In reply to Jesse BarnesQuoted 8 lines · On Tue, 11 Nov 2014 12:30:47 -0800 Jesse Barnes <[email protected]>…
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
v3:
- fixup pfit disable shortcut, only apply to gen4 for now (Jesse)
Daniel pointed out offline that in the !fastboot case, this will fail to do the pipe size update if we ever try to skip the mode set when changing the pfit state.
To address that we'll need to handle the pfit changes more generally anyway, which gets tricky when we're trying to discard the BIOS state.
Ander, if you want to tackle this as part of your multi-pipe stuff, feel free, otherwise I'll get to it after the holidays.
Thanks,
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3
Quoted 16 lines · Jesse Barnes
Quoted 8 lines · On Tue, 11 Nov 2014 12:30:47 -0800 Jesse Barnes <[email protected]>…
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
v3:
- fixup pfit disable shortcut, only apply to gen4 for now (Jesse)Daniel pointed out offline that in the !fastboot case, this will fail to do the pipe size update if we ever try to skip the mode set when changing the pfit state.
Quoted 5 lines
To address that we'll need to handle the pfit changes more generally anyway, which gets tricky when we're trying to discard the BIOS state.
Ander, if you want to tackle this as part of your multi-pipe stuff, feel free, otherwise I'll get to it after the holidays.
Quick addition with two more smaller things we've discussed a bit too:
- We need a dedicated testcase for this special pfit path. Currently all igts disable the pipe again before applying changes, so won't exercise this. We need new testcase which does direct mode changes (i.e. native -> scaled, scaled->native and scaled->scaled) to make sure this works well. With atomc we could even make sure it happens in just 1 vblank, but current interfaces don't allow a pageflip completion event for setCrtc, so that part has to wait.
- I think the overall decision logic for modeset-or-not should switch over to comparing the entire hw state (as stored in intel_crtc_config). That way we can drop the fastboot hack which copies the adjusted_mode from the pipe config to crtc->mode since we only compare the resulting adjusted mode. This should also be more robust in handling corner cases like the hdmi infoframes logic that we had to take out again.
Anyway just these two to summarize our offline discussion. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3
Quoted 40 lines · On Tue, 9 Dec 2014 22:16:33 +0100 Daniel Vetter <[email protected]> wrote:
Quoted 16 lines · Jesse Barnes
Quoted 8 lines · On Tue, 11 Nov 2014 12:30:47 -0800 Jesse Barnes <[email protected]>…
This should allow us to avoid mode sets for some panel fitter config changes.
v2:
- fixup pfit comment (Ander)
v3:
- fixup pfit disable shortcut, only apply to gen4 for now (Jesse)Daniel pointed out offline that in the !fastboot case, this will fail to do the pipe size update if we ever try to skip the mode set when changing the pfit state.
Quoted 5 lines
To address that we'll need to handle the pfit changes more generally anyway, which gets tricky when we're trying to discard the BIOS state.
Ander, if you want to tackle this as part of your multi-pipe stuff, feel free, otherwise I'll get to it after the holidays.
Quick addition with two more smaller things we've discussed a bit too:
- We need a dedicated testcase for this special pfit path. Currently all igts disable the pipe again before applying changes, so won't exercise this. We need new testcase which does direct mode changes (i.e. native -> scaled,scaled->nativeandscaled->scaled) to make sure this works well. With atomc we could even make sure it happens in just 1 vblank, but current interfaces don't allow a pageflip completion event for setCrtc, so that part has to wait.- I think the overall decision logic for modeset-or-not should switch over to comparing the entire hw state (as stored in
intel_crtc_config). That way we can drop the fastboot hack which copies theadjusted_modefrom the pipe config tocrtc->modesince we only compare the resulting adjusted mode. This should also be more robust in handling corner cases like the hdmi infoframes logic that we had to take out again.
Quoted 1 line
Anyway just these two to summarize our offline discussion.
Yeah thanks... more tests as usual are needed. We just need a way in igt to see whether a full mode set happened, then we can check against our assumptions that one should or shouldn't happen for a given config change.
And yeah the logic needs to be shuffled around a lot more. I meant to grab more stuff from compute_mode_changes; right now it's just a set of special cases, and not very complete. If we add a new pipe config compare function, we can just special case the fast paths like you mentioned, and add a custom pfit path as well (somewhere in between a simple flip and a full mode set, at least for some platforms).
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3
Quoted 6 lines · Jesse Barnes
And yeah the logic needs to be shuffled around a lot more. I meant to grab more stuff from
compute_mode_changes; right now it's just a set of special cases, and not very complete. If we add a new pipe config compare function, we can just special case the fast paths like you mentioned, and add a custom pfit path as well (somewhere in between a simple flip and a full mode set, at least for some platforms).
My idea was to repurpose the existing pipe config compare func: With a new mode enum we only need a few changes I think:
- only print the loud mismatch message when mode == checker
- add two more modes for modeset checks: full_modeset and fixup_needed. Then we could ignore some pfit mismatches for the full_modeset mode and only report them for fixup_needed, i.e.
if (mode != full_modeset) /* need to catch both checker and fixup_needed */ {
/* pfit checks */
}Or maybe we just have to duplicate the entire function, but that would be awful. Plain memcmp won't work since some of the values stored in there (e.g. id of the requested mode) must be ignored. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Jesse Barnes
This is useful for checking things later.
v2:
- fix hsw infoframe enabled check (Ander)
v3:
- set infoframe status incompute_configtoo (Ville)Signed-off-by Jesse Barnes <[email protected]>
Squashed into the original patch, thanks.
-Daniel
Quoted 25 lines
--- drivers/gpu/drm/i915/intel_hdmi.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_hdmi.c +3
-0@@ -982,6 +982,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, pipe_config->has_hdmi_sink = intel_hdmi->has_hdmi_sink; +if (pipe_config->has_hdmi_sink) + pipe_config->has_infoframe = true; +if (intel_hdmi->color_range_auto) {/* See CEA-861-E - 5.1 Default Encoding Parameters */ if (pipe_config->has_hdmi_sink &&Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx