* [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
@ 2018-03-13 9:28 Maarten Lankhorst
2018-03-13 9:40 ` Chris Wilson
` (5 more replies)
0 siblings, 6 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 9:28 UTC (permalink / raw)
To: intel-gfx
Cc: Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Chris Wilson, Jim Bride, Joonas Lahtinen, stable
On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
that if we request the normal mode, we automatically get the downclocked
mode.
This can be seen during boot:
[drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
[drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
...
[drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
[drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
[drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
[drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config [i915]] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:intel_dump_pipe_config [i915]] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
Testcase: kms_panel_fitting.atomic-fastset
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.14+
---
drivers/gpu/drm/i915/intel_dp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9a4a51e79fa1..0bd3cc1c82b4 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
m1->vdisplay == m2->vdisplay &&
m1->vsync_start == m2->vsync_start &&
m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
+ m1->vtotal == m2->vtotal &&
+ m1->clock == m2->clock);
return bres;
}
--
2.16.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
@ 2018-03-13 9:40 ` Chris Wilson
2018-03-13 9:52 ` Chris Wilson
` (4 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Chris Wilson @ 2018-03-13 9:40 UTC (permalink / raw)
To: Maarten Lankhorst, intel-gfx
Cc: Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Jim Bride, Joonas Lahtinen, stable
Quoting Maarten Lankhorst (2018-03-13 09:28:55)
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
@ 2018-03-13 9:40 ` Chris Wilson
0 siblings, 0 replies; 21+ messages in thread
From: Chris Wilson @ 2018-03-13 9:40 UTC (permalink / raw)
To: intel-gfx
Cc: Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Jim Bride, Joonas Lahtinen, stable
Quoting Maarten Lankhorst (2018-03-13 09:28:55)
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
@ 2018-03-13 9:52 ` Chris Wilson
2018-03-13 9:52 ` Chris Wilson
` (4 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Chris Wilson @ 2018-03-13 9:52 UTC (permalink / raw)
To: Maarten Lankhorst, intel-gfx
Cc: Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Jim Bride, Joonas Lahtinen, stable
Quoting Maarten Lankhorst (2018-03-13 09:28:55)
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..0bd3cc1c82b4 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> m1->vdisplay == m2->vdisplay &&
> m1->vsync_start == m2->vsync_start &&
> m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> + m1->vtotal == m2->vtotal &&
> + m1->clock == m2->clock);
Should it be exact on clock or just closer to alt-clock than
preferred-clock?
-Chris
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
@ 2018-03-13 9:52 ` Chris Wilson
0 siblings, 0 replies; 21+ messages in thread
From: Chris Wilson @ 2018-03-13 9:52 UTC (permalink / raw)
To: intel-gfx
Cc: Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Jim Bride, Joonas Lahtinen, stable
Quoting Maarten Lankhorst (2018-03-13 09:28:55)
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..0bd3cc1c82b4 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> m1->vdisplay == m2->vdisplay &&
> m1->vsync_start == m2->vsync_start &&
> m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> + m1->vtotal == m2->vtotal &&
> + m1->clock == m2->clock);
Should it be exact on clock or just closer to alt-clock than
preferred-clock?
-Chris
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:40 ` Chris Wilson
@ 2018-03-13 9:56 ` Maarten Lankhorst
-1 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 9:56 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Cc: David Weinehall, Rodrigo Vivi, Paulo Zanoni, Jani Nikula,
Jim Bride, Joonas Lahtinen, stable
Op 13-03-18 om 10:40 schreef Chris Wilson:
> Quoting Maarten Lankhorst (2018-03-13 09:28:55)
>> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
>> that if we request the normal mode, we automatically get the downclocked
>> mode.
>>
>> This can be seen during boot:
>> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
>> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>> ...
>> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
>> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
>> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
>> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
>> [drm:intel_dump_pipe_config [i915]] requested mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:intel_dump_pipe_config [i915]] adjusted mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> ?
Yes, also
References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
Since that's how I found out..
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
@ 2018-03-13 9:56 ` Maarten Lankhorst
0 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 9:56 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Paulo Zanoni, Jani Nikula, stable, Rodrigo Vivi
Op 13-03-18 om 10:40 schreef Chris Wilson:
> Quoting Maarten Lankhorst (2018-03-13 09:28:55)
>> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
>> that if we request the normal mode, we automatically get the downclocked
>> mode.
>>
>> This can be seen during boot:
>> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
>> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>> ...
>> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
>> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
>> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
>> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
>> [drm:intel_dump_pipe_config [i915]] requested mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:intel_dump_pipe_config [i915]] adjusted mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> ?
Yes, also
References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
Since that's how I found out..
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
2018-03-13 9:40 ` Chris Wilson
2018-03-13 9:52 ` Chris Wilson
@ 2018-03-13 10:04 ` Patchwork
2018-03-13 11:03 ` ✓ Fi.CI.IGT: " Patchwork
` (2 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2018-03-13 10:04 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/dp: Fix intel_edp_compare_alt_mode.
URL : https://patchwork.freedesktop.org/series/39841/
State : success
== Summary ==
Series 39841v1 drm/i915/dp: Fix intel_edp_compare_alt_mode.
https://patchwork.freedesktop.org/api/1.0/series/39841/revisions/1/mbox/
---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test prime_vgem:
Subgroup basic-fence-flip:
pass -> FAIL (fi-ilk-650) fdo#104008
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:432s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:384s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:535s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:300s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:511s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:510s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:510s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:494s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:414s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:584s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:424s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:316s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:536s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:402s
fi-ilk-650 total:288 pass:227 dwarn:0 dfail:0 fail:1 skip:60 time:421s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:473s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:431s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:477s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:472s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:518s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:644s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:447s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:522s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:542s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:506s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:492s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:431s
fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:399s
Blacklisted hosts:
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:28 time:522s
fi-glk-j5005 failed to collect. IGT log at Patchwork_8323/fi-glk-j5005/run0.log
da600bbe24412edd1c46591fd21ef81518e49c5d drm-tip: 2018y-03m-12d-22h-06m-53s UTC integration manifest
032d430871a1 drm/i915/dp: Fix intel_edp_compare_alt_mode.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8323/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
` (2 preceding siblings ...)
2018-03-13 10:04 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-03-13 11:03 ` Patchwork
2018-03-13 13:11 ` Ville Syrjälä
2018-03-13 15:26 ` ✗ Fi.CI.BAT: warning for drm/i915/dp: Fix intel_edp_compare_alt_mode. (rev2) Patchwork
5 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2018-03-13 11:03 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/dp: Fix intel_edp_compare_alt_mode.
URL : https://patchwork.freedesktop.org/series/39841/
State : success
== Summary ==
---- Known issues:
Test gem_eio:
Subgroup in-flight:
pass -> INCOMPLETE (shard-apl) fdo#105341
Test kms_atomic_transition:
Subgroup 1x-modeset-transitions-nonblocking-fencing:
fail -> PASS (shard-apl) fdo#103207
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-legacy:
pass -> FAIL (shard-hsw) fdo#102670
Test kms_flip:
Subgroup 2x-plain-flip-fb-recreate:
pass -> FAIL (shard-hsw) fdo#100368
fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#103207 https://bugs.freedesktop.org/show_bug.cgi?id=103207
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
shard-apl total:3310 pass:1752 dwarn:1 dfail:0 fail:7 skip:1547 time:12424s
shard-hsw total:3473 pass:1775 dwarn:1 dfail:0 fail:4 skip:1692 time:11915s
shard-snb total:3473 pass:1364 dwarn:1 dfail:0 fail:3 skip:2105 time:7131s
Blacklisted hosts:
shard-kbl total:3393 pass:1916 dwarn:1 dfail:0 fail:9 skip:1466 time:9652s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8323/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
@ 2018-03-13 13:11 ` Ville Syrjälä
2018-03-13 9:52 ` Chris Wilson
` (4 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 13:11 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: intel-gfx, Paulo Zanoni, Jani Nikula, stable, Rodrigo Vivi
On Tue, Mar 13, 2018 at 10:28:55AM +0100, Maarten Lankhorst wrote:
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..0bd3cc1c82b4 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> m1->vdisplay == m2->vdisplay &&
> m1->vsync_start == m2->vsync_start &&
> m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> + m1->vtotal == m2->vtotal &&
> + m1->clock == m2->clock);
Isn't the entire point here to ignore differences in the clock? Hmm.
Maybe not.
Probably what we really want to do is check whether the requested
refresh rate is closer to the fixed mode or the alt mode.
> return bres;
> }
>
> --
> 2.16.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrj�l�
Intel OTC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
@ 2018-03-13 13:11 ` Ville Syrjälä
0 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 13:11 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: intel-gfx, Paulo Zanoni, Jani Nikula, stable, Rodrigo Vivi
On Tue, Mar 13, 2018 at 10:28:55AM +0100, Maarten Lankhorst wrote:
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..0bd3cc1c82b4 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> m1->vdisplay == m2->vdisplay &&
> m1->vsync_start == m2->vsync_start &&
> m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> + m1->vtotal == m2->vtotal &&
> + m1->clock == m2->clock);
Isn't the entire point here to ignore differences in the clock? Hmm.
Maybe not.
Probably what we really want to do is check whether the requested
refresh rate is closer to the fixed mode or the alt mode.
> return bres;
> }
>
> --
> 2.16.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH] drm/i915/dp: Fix alt mode handling.
2018-03-13 13:11 ` Ville Syrjälä
@ 2018-03-13 13:52 ` Maarten Lankhorst
-1 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 13:52 UTC (permalink / raw)
To: intel-gfx
Cc: Ville Syrjälä,
Maarten Lankhorst, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Chris Wilson, Jim Bride, Joonas Lahtinen, stable
On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
that if we request the normal mode, we automatically get the downclocked
mode.
This can be seen during boot:
[drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
[drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
...
[drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
[drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
[drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
[drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config [i915]] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:intel_dump_pipe_config [i915]] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
Add a intel_edp_choose_mode helper that picks the mode.
If there is no alt mode, it always picks the default mode.
If the alt mode is identical to the default mode, it picks the mode
based on what mode is closest to the request clock.
If the alt mode differs, it only picks the alt mode on exact match.
Testcase: kms_panel_fitting.atomic-fastset
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.14+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
---
drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9a4a51e79fa1..075981842a7f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
return bpp;
}
-static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
- struct drm_display_mode *m2)
+static const struct drm_display_mode *
+intel_edp_choose_mode(const struct drm_display_mode *req,
+ const struct drm_display_mode *def,
+ const struct drm_display_mode *alt)
{
- bool bres = false;
+ if (!alt)
+ return def;
- if (m1 && m2)
- bres = (m1->hdisplay == m2->hdisplay &&
- m1->hsync_start == m2->hsync_start &&
- m1->hsync_end == m2->hsync_end &&
- m1->htotal == m2->htotal &&
- m1->vdisplay == m2->vdisplay &&
- m1->vsync_start == m2->vsync_start &&
- m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
- return bres;
+ if (drm_mode_equal_no_clocks(def, alt)) {
+ int clock;
+
+ if (!drm_mode_equal_no_clocks(req, def))
+ return def;
+
+ clock = def->clock / 2 + alt->clock / 2;
+
+ return req->clock > clock ? def : alt;
+ } else
+ return drm_mode_equal_no_clocks(req, alt) ? alt : def;
}
bool
@@ -1734,12 +1738,11 @@ intel_dp_compute_config(struct intel_encoder *encoder,
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
- struct drm_display_mode *panel_mode =
- intel_connector->panel.alt_fixed_mode;
- struct drm_display_mode *req_mode = &pipe_config->base.mode;
+ const struct drm_display_mode *panel_mode;
- if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
- panel_mode = intel_connector->panel.fixed_mode;
+ panel_mode = intel_edp_choose_mode(&pipe_config->base.mode,
+ intel_connector->panel.fixed_mode,
+ intel_connector->panel.alt_fixed_mode);
drm_mode_debug_printmodeline(panel_mode);
--
2.16.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH] drm/i915/dp: Fix alt mode handling.
@ 2018-03-13 13:52 ` Maarten Lankhorst
0 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 13:52 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni, Jani Nikula, stable, Rodrigo Vivi
On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
that if we request the normal mode, we automatically get the downclocked
mode.
This can be seen during boot:
[drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
[drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
...
[drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
[drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
[drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
[drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
[drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config [i915]] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
[drm:intel_dump_pipe_config [i915]] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
Add a intel_edp_choose_mode helper that picks the mode.
If there is no alt mode, it always picks the default mode.
If the alt mode is identical to the default mode, it picks the mode
based on what mode is closest to the request clock.
If the alt mode differs, it only picks the alt mode on exact match.
Testcase: kms_panel_fitting.atomic-fastset
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.14+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
---
drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9a4a51e79fa1..075981842a7f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
return bpp;
}
-static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
- struct drm_display_mode *m2)
+static const struct drm_display_mode *
+intel_edp_choose_mode(const struct drm_display_mode *req,
+ const struct drm_display_mode *def,
+ const struct drm_display_mode *alt)
{
- bool bres = false;
+ if (!alt)
+ return def;
- if (m1 && m2)
- bres = (m1->hdisplay == m2->hdisplay &&
- m1->hsync_start == m2->hsync_start &&
- m1->hsync_end == m2->hsync_end &&
- m1->htotal == m2->htotal &&
- m1->vdisplay == m2->vdisplay &&
- m1->vsync_start == m2->vsync_start &&
- m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
- return bres;
+ if (drm_mode_equal_no_clocks(def, alt)) {
+ int clock;
+
+ if (!drm_mode_equal_no_clocks(req, def))
+ return def;
+
+ clock = def->clock / 2 + alt->clock / 2;
+
+ return req->clock > clock ? def : alt;
+ } else
+ return drm_mode_equal_no_clocks(req, alt) ? alt : def;
}
bool
@@ -1734,12 +1738,11 @@ intel_dp_compute_config(struct intel_encoder *encoder,
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
- struct drm_display_mode *panel_mode =
- intel_connector->panel.alt_fixed_mode;
- struct drm_display_mode *req_mode = &pipe_config->base.mode;
+ const struct drm_display_mode *panel_mode;
- if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
- panel_mode = intel_connector->panel.fixed_mode;
+ panel_mode = intel_edp_choose_mode(&pipe_config->base.mode,
+ intel_connector->panel.fixed_mode,
+ intel_connector->panel.alt_fixed_mode);
drm_mode_debug_printmodeline(panel_mode);
--
2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
2018-03-13 13:52 ` Maarten Lankhorst
@ 2018-03-13 14:27 ` Ville Syrjälä
-1 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 14:27 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: intel-gfx, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Chris Wilson, Jim Bride, Joonas Lahtinen, stable
On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Add a intel_edp_choose_mode helper that picks the mode.
>
> If there is no alt mode, it always picks the default mode.
> If the alt mode is identical to the default mode, it picks the mode
> based on what mode is closest to the request clock.
> If the alt mode differs, it only picks the alt mode on exact match.
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
> ---
> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
> 1 file changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..075981842a7f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> return bpp;
> }
>
> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> - struct drm_display_mode *m2)
> +static const struct drm_display_mode *
> +intel_edp_choose_mode(const struct drm_display_mode *req,
> + const struct drm_display_mode *def,
> + const struct drm_display_mode *alt)
> {
> - bool bres = false;
> + if (!alt)
> + return def;
>
> - if (m1 && m2)
> - bres = (m1->hdisplay == m2->hdisplay &&
> - m1->hsync_start == m2->hsync_start &&
> - m1->hsync_end == m2->hsync_end &&
> - m1->htotal == m2->htotal &&
> - m1->vdisplay == m2->vdisplay &&
> - m1->vsync_start == m2->vsync_start &&
> - m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> - return bres;
> + if (drm_mode_equal_no_clocks(def, alt)) {
> + int clock;
> +
> + if (!drm_mode_equal_no_clocks(req, def))
> + return def;
> +
> + clock = def->clock / 2 + alt->clock / 2;
> +
> + return req->clock > clock ? def : alt;
> + } else
> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
Seems a bit convoluted to me.
return user_mode->vrefresh > alt_mode->vrefresh ?
fixed_mode : alt_mode;
maybe?
Though we don't seem to try very hard to make vrefresh accurate so not
100% this is going to work perfectly.
I guess we could go with the "pick the closest" vrefresh approach
instead. I'm thinking we should actually be rejecting the user mode
entirely if it isn't closeto either refresh rate.
> }
>
> bool
> @@ -1734,12 +1738,11 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
>
> if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> - struct drm_display_mode *panel_mode =
> - intel_connector->panel.alt_fixed_mode;
> - struct drm_display_mode *req_mode = &pipe_config->base.mode;
> + const struct drm_display_mode *panel_mode;
>
> - if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
> - panel_mode = intel_connector->panel.fixed_mode;
> + panel_mode = intel_edp_choose_mode(&pipe_config->base.mode,
> + intel_connector->panel.fixed_mode,
> + intel_connector->panel.alt_fixed_mode);
>
> drm_mode_debug_printmodeline(panel_mode);
>
> --
> 2.16.2
--
Ville Syrj�l�
Intel OTC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
@ 2018-03-13 14:27 ` Ville Syrjälä
0 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 14:27 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: Paulo Zanoni, Jani Nikula, intel-gfx, stable, Rodrigo Vivi
On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> that if we request the normal mode, we automatically get the downclocked
> mode.
>
> This can be seen during boot:
> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> ...
> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> [drm:intel_dump_pipe_config [i915]] requested mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>
> Add a intel_edp_choose_mode helper that picks the mode.
>
> If there is no alt mode, it always picks the default mode.
> If the alt mode is identical to the default mode, it picks the mode
> based on what mode is closest to the request clock.
> If the alt mode differs, it only picks the alt mode on exact match.
>
> Testcase: kms_panel_fitting.atomic-fastset
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v4.14+
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
> ---
> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
> 1 file changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9a4a51e79fa1..075981842a7f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> return bpp;
> }
>
> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> - struct drm_display_mode *m2)
> +static const struct drm_display_mode *
> +intel_edp_choose_mode(const struct drm_display_mode *req,
> + const struct drm_display_mode *def,
> + const struct drm_display_mode *alt)
> {
> - bool bres = false;
> + if (!alt)
> + return def;
>
> - if (m1 && m2)
> - bres = (m1->hdisplay == m2->hdisplay &&
> - m1->hsync_start == m2->hsync_start &&
> - m1->hsync_end == m2->hsync_end &&
> - m1->htotal == m2->htotal &&
> - m1->vdisplay == m2->vdisplay &&
> - m1->vsync_start == m2->vsync_start &&
> - m1->vsync_end == m2->vsync_end &&
> - m1->vtotal == m2->vtotal);
> - return bres;
> + if (drm_mode_equal_no_clocks(def, alt)) {
> + int clock;
> +
> + if (!drm_mode_equal_no_clocks(req, def))
> + return def;
> +
> + clock = def->clock / 2 + alt->clock / 2;
> +
> + return req->clock > clock ? def : alt;
> + } else
> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
Seems a bit convoluted to me.
return user_mode->vrefresh > alt_mode->vrefresh ?
fixed_mode : alt_mode;
maybe?
Though we don't seem to try very hard to make vrefresh accurate so not
100% this is going to work perfectly.
I guess we could go with the "pick the closest" vrefresh approach
instead. I'm thinking we should actually be rejecting the user mode
entirely if it isn't closeto either refresh rate.
> }
>
> bool
> @@ -1734,12 +1738,11 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
>
> if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> - struct drm_display_mode *panel_mode =
> - intel_connector->panel.alt_fixed_mode;
> - struct drm_display_mode *req_mode = &pipe_config->base.mode;
> + const struct drm_display_mode *panel_mode;
>
> - if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
> - panel_mode = intel_connector->panel.fixed_mode;
> + panel_mode = intel_edp_choose_mode(&pipe_config->base.mode,
> + intel_connector->panel.fixed_mode,
> + intel_connector->panel.alt_fixed_mode);
>
> drm_mode_debug_printmodeline(panel_mode);
>
> --
> 2.16.2
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
2018-03-13 14:27 ` Ville Syrjälä
@ 2018-03-13 14:37 ` Maarten Lankhorst
-1 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 14:37 UTC (permalink / raw)
To: Ville Syrjälä
Cc: intel-gfx, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Chris Wilson, Jim Bride, Joonas Lahtinen, stable
Op 13-03-18 om 15:27 schreef Ville Syrjälä:
> On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
>> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
>> that if we request the normal mode, we automatically get the downclocked
>> mode.
>>
>> This can be seen during boot:
>> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
>> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>> ...
>> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
>> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
>> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
>> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
>> [drm:intel_dump_pipe_config [i915]] requested mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:intel_dump_pipe_config [i915]] adjusted mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>>
>> Add a intel_edp_choose_mode helper that picks the mode.
>>
>> If there is no alt mode, it always picks the default mode.
>> If the alt mode is identical to the default mode, it picks the mode
>> based on what mode is closest to the request clock.
>> If the alt mode differs, it only picks the alt mode on exact match.
>>
>> Testcase: kms_panel_fitting.atomic-fastset
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
>> Cc: David Weinehall <david.weinehall@linux.intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: <stable@vger.kernel.org> # v4.14+
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
>> ---
>> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
>> 1 file changed, 21 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 9a4a51e79fa1..075981842a7f 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
>> return bpp;
>> }
>>
>> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
>> - struct drm_display_mode *m2)
>> +static const struct drm_display_mode *
>> +intel_edp_choose_mode(const struct drm_display_mode *req,
>> + const struct drm_display_mode *def,
>> + const struct drm_display_mode *alt)
>> {
>> - bool bres = false;
>> + if (!alt)
>> + return def;
>>
>> - if (m1 && m2)
>> - bres = (m1->hdisplay == m2->hdisplay &&
>> - m1->hsync_start == m2->hsync_start &&
>> - m1->hsync_end == m2->hsync_end &&
>> - m1->htotal == m2->htotal &&
>> - m1->vdisplay == m2->vdisplay &&
>> - m1->vsync_start == m2->vsync_start &&
>> - m1->vsync_end == m2->vsync_end &&
>> - m1->vtotal == m2->vtotal);
>> - return bres;
>> + if (drm_mode_equal_no_clocks(def, alt)) {
>> + int clock;
>> +
>> + if (!drm_mode_equal_no_clocks(req, def))
>> + return def;
>> +
>> + clock = def->clock / 2 + alt->clock / 2;
>> +
>> + return req->clock > clock ? def : alt;
>> + } else
>> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
> Seems a bit convoluted to me.
>
> return user_mode->vrefresh > alt_mode->vrefresh ?
> fixed_mode : alt_mode;
>
> maybe?
>
> Though we don't seem to try very hard to make vrefresh accurate so not
> 100% this is going to work perfectly.
>
> I guess we could go with the "pick the closest" vrefresh approach
> instead. I'm thinking we should actually be rejecting the user mode
> entirely if it isn't closeto either refresh rate.
There's no guarantee vrefresh is set to something sane, afaik. I don't think we can use it.
If it was always set, then maybe. But I think nothing prevents it from being garbage.
~Maarten
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
@ 2018-03-13 14:37 ` Maarten Lankhorst
0 siblings, 0 replies; 21+ messages in thread
From: Maarten Lankhorst @ 2018-03-13 14:37 UTC (permalink / raw)
To: Ville Syrjälä
Cc: Paulo Zanoni, Jani Nikula, intel-gfx, stable, Rodrigo Vivi
Op 13-03-18 om 15:27 schreef Ville Syrjälä:
> On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
>> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
>> that if we request the normal mode, we automatically get the downclocked
>> mode.
>>
>> This can be seen during boot:
>> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
>> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>> ...
>> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
>> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
>> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
>> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
>> [drm:intel_dump_pipe_config [i915]] requested mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:intel_dump_pipe_config [i915]] adjusted mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>>
>> Add a intel_edp_choose_mode helper that picks the mode.
>>
>> If there is no alt mode, it always picks the default mode.
>> If the alt mode is identical to the default mode, it picks the mode
>> based on what mode is closest to the request clock.
>> If the alt mode differs, it only picks the alt mode on exact match.
>>
>> Testcase: kms_panel_fitting.atomic-fastset
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
>> Cc: David Weinehall <david.weinehall@linux.intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: <stable@vger.kernel.org> # v4.14+
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
>> ---
>> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
>> 1 file changed, 21 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 9a4a51e79fa1..075981842a7f 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
>> return bpp;
>> }
>>
>> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
>> - struct drm_display_mode *m2)
>> +static const struct drm_display_mode *
>> +intel_edp_choose_mode(const struct drm_display_mode *req,
>> + const struct drm_display_mode *def,
>> + const struct drm_display_mode *alt)
>> {
>> - bool bres = false;
>> + if (!alt)
>> + return def;
>>
>> - if (m1 && m2)
>> - bres = (m1->hdisplay == m2->hdisplay &&
>> - m1->hsync_start == m2->hsync_start &&
>> - m1->hsync_end == m2->hsync_end &&
>> - m1->htotal == m2->htotal &&
>> - m1->vdisplay == m2->vdisplay &&
>> - m1->vsync_start == m2->vsync_start &&
>> - m1->vsync_end == m2->vsync_end &&
>> - m1->vtotal == m2->vtotal);
>> - return bres;
>> + if (drm_mode_equal_no_clocks(def, alt)) {
>> + int clock;
>> +
>> + if (!drm_mode_equal_no_clocks(req, def))
>> + return def;
>> +
>> + clock = def->clock / 2 + alt->clock / 2;
>> +
>> + return req->clock > clock ? def : alt;
>> + } else
>> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
> Seems a bit convoluted to me.
>
> return user_mode->vrefresh > alt_mode->vrefresh ?
> fixed_mode : alt_mode;
>
> maybe?
>
> Though we don't seem to try very hard to make vrefresh accurate so not
> 100% this is going to work perfectly.
>
> I guess we could go with the "pick the closest" vrefresh approach
> instead. I'm thinking we should actually be rejecting the user mode
> entirely if it isn't closeto either refresh rate.
There's no guarantee vrefresh is set to something sane, afaik. I don't think we can use it.
If it was always set, then maybe. But I think nothing prevents it from being garbage.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
2018-03-13 14:37 ` Maarten Lankhorst
@ 2018-03-13 15:09 ` Ville Syrjälä
-1 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 15:09 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: intel-gfx, David Weinehall, Rodrigo Vivi, Paulo Zanoni,
Jani Nikula, Chris Wilson, Jim Bride, Joonas Lahtinen, stable
On Tue, Mar 13, 2018 at 03:37:05PM +0100, Maarten Lankhorst wrote:
> Op 13-03-18 om 15:27 schreef Ville Syrj�l�:
> > On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
> >> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> >> that if we request the normal mode, we automatically get the downclocked
> >> mode.
> >>
> >> This can be seen during boot:
> >> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> >> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> >> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> >> ...
> >> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> >> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> >> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> >> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> >> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> >> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> >> [drm:intel_dump_pipe_config [i915]] requested mode:
> >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> >> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> >>
> >> Add a intel_edp_choose_mode helper that picks the mode.
> >>
> >> If there is no alt mode, it always picks the default mode.
> >> If the alt mode is identical to the default mode, it picks the mode
> >> based on what mode is closest to the request clock.
> >> If the alt mode differs, it only picks the alt mode on exact match.
> >>
> >> Testcase: kms_panel_fitting.atomic-fastset
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> >> Cc: David Weinehall <david.weinehall@linux.intel.com>
> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> Cc: Jani Nikula <jani.nikula@intel.com>
> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >> Cc: Jim Bride <jim.bride@linux.intel.com>
> >> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >> Cc: <stable@vger.kernel.org> # v4.14+
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> >> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
> >> ---
> >> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
> >> 1 file changed, 21 insertions(+), 18 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> >> index 9a4a51e79fa1..075981842a7f 100644
> >> --- a/drivers/gpu/drm/i915/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/intel_dp.c
> >> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> >> return bpp;
> >> }
> >>
> >> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> >> - struct drm_display_mode *m2)
> >> +static const struct drm_display_mode *
> >> +intel_edp_choose_mode(const struct drm_display_mode *req,
> >> + const struct drm_display_mode *def,
> >> + const struct drm_display_mode *alt)
> >> {
> >> - bool bres = false;
> >> + if (!alt)
> >> + return def;
> >>
> >> - if (m1 && m2)
> >> - bres = (m1->hdisplay == m2->hdisplay &&
> >> - m1->hsync_start == m2->hsync_start &&
> >> - m1->hsync_end == m2->hsync_end &&
> >> - m1->htotal == m2->htotal &&
> >> - m1->vdisplay == m2->vdisplay &&
> >> - m1->vsync_start == m2->vsync_start &&
> >> - m1->vsync_end == m2->vsync_end &&
> >> - m1->vtotal == m2->vtotal);
> >> - return bres;
> >> + if (drm_mode_equal_no_clocks(def, alt)) {
> >> + int clock;
> >> +
> >> + if (!drm_mode_equal_no_clocks(req, def))
> >> + return def;
> >> +
> >> + clock = def->clock / 2 + alt->clock / 2;
> >> +
> >> + return req->clock > clock ? def : alt;
> >> + } else
> >> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
> > Seems a bit convoluted to me.
> >
> > return user_mode->vrefresh > alt_mode->vrefresh ?
> > fixed_mode : alt_mode;
> >
> > maybe?
> >
> > Though we don't seem to try very hard to make vrefresh accurate so not
> > 100% this is going to work perfectly.
> >
> > I guess we could go with the "pick the closest" vrefresh approach
> > instead. I'm thinking we should actually be rejecting the user mode
> > entirely if it isn't closeto either refresh rate.
> There's no guarantee vrefresh is set to something sane, afaik. I don't think we can use it.
> If it was always set, then maybe. But I think nothing prevents it from being garbage.
Yeah. I just sent a patch that might fix that.
--
Ville Syrj�l�
Intel OTC
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] drm/i915/dp: Fix alt mode handling.
@ 2018-03-13 15:09 ` Ville Syrjälä
0 siblings, 0 replies; 21+ messages in thread
From: Ville Syrjälä @ 2018-03-13 15:09 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: Paulo Zanoni, Jani Nikula, intel-gfx, stable, Rodrigo Vivi
On Tue, Mar 13, 2018 at 03:37:05PM +0100, Maarten Lankhorst wrote:
> Op 13-03-18 om 15:27 schreef Ville Syrjälä:
> > On Tue, Mar 13, 2018 at 02:52:35PM +0100, Maarten Lankhorst wrote:
> >> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
> >> that if we request the normal mode, we automatically get the downclocked
> >> mode.
> >>
> >> This can be seen during boot:
> >> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
> >> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> >> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> >> ...
> >> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
> >> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
> >> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
> >> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> >> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
> >> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
> >> [drm:intel_dump_pipe_config [i915]] requested mode:
> >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
> >> [drm:intel_dump_pipe_config [i915]] adjusted mode:
> >> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
> >>
> >> Add a intel_edp_choose_mode helper that picks the mode.
> >>
> >> If there is no alt mode, it always picks the default mode.
> >> If the alt mode is identical to the default mode, it picks the mode
> >> based on what mode is closest to the request clock.
> >> If the alt mode differs, it only picks the alt mode on exact match.
> >>
> >> Testcase: kms_panel_fitting.atomic-fastset
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
> >> Cc: David Weinehall <david.weinehall@linux.intel.com>
> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> Cc: Jani Nikula <jani.nikula@intel.com>
> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >> Cc: Jim Bride <jim.bride@linux.intel.com>
> >> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >> Cc: <stable@vger.kernel.org> # v4.14+
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
> >> References: https://bugs.freedesktop.org/show_bug.cgi?id=105456
> >> ---
> >> drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++------------------
> >> 1 file changed, 21 insertions(+), 18 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> >> index 9a4a51e79fa1..075981842a7f 100644
> >> --- a/drivers/gpu/drm/i915/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/intel_dp.c
> >> @@ -1671,21 +1671,25 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> >> return bpp;
> >> }
> >>
> >> -static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
> >> - struct drm_display_mode *m2)
> >> +static const struct drm_display_mode *
> >> +intel_edp_choose_mode(const struct drm_display_mode *req,
> >> + const struct drm_display_mode *def,
> >> + const struct drm_display_mode *alt)
> >> {
> >> - bool bres = false;
> >> + if (!alt)
> >> + return def;
> >>
> >> - if (m1 && m2)
> >> - bres = (m1->hdisplay == m2->hdisplay &&
> >> - m1->hsync_start == m2->hsync_start &&
> >> - m1->hsync_end == m2->hsync_end &&
> >> - m1->htotal == m2->htotal &&
> >> - m1->vdisplay == m2->vdisplay &&
> >> - m1->vsync_start == m2->vsync_start &&
> >> - m1->vsync_end == m2->vsync_end &&
> >> - m1->vtotal == m2->vtotal);
> >> - return bres;
> >> + if (drm_mode_equal_no_clocks(def, alt)) {
> >> + int clock;
> >> +
> >> + if (!drm_mode_equal_no_clocks(req, def))
> >> + return def;
> >> +
> >> + clock = def->clock / 2 + alt->clock / 2;
> >> +
> >> + return req->clock > clock ? def : alt;
> >> + } else
> >> + return drm_mode_equal_no_clocks(req, alt) ? alt : def;
> > Seems a bit convoluted to me.
> >
> > return user_mode->vrefresh > alt_mode->vrefresh ?
> > fixed_mode : alt_mode;
> >
> > maybe?
> >
> > Though we don't seem to try very hard to make vrefresh accurate so not
> > 100% this is going to work perfectly.
> >
> > I guess we could go with the "pick the closest" vrefresh approach
> > instead. I'm thinking we should actually be rejecting the user mode
> > entirely if it isn't closeto either refresh rate.
> There's no guarantee vrefresh is set to something sane, afaik. I don't think we can use it.
> If it was always set, then maybe. But I think nothing prevents it from being garbage.
Yeah. I just sent a patch that might fix that.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915/dp: Fix intel_edp_compare_alt_mode. (rev2)
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
` (4 preceding siblings ...)
2018-03-13 13:11 ` Ville Syrjälä
@ 2018-03-13 15:26 ` Patchwork
5 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2018-03-13 15:26 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/dp: Fix intel_edp_compare_alt_mode. (rev2)
URL : https://patchwork.freedesktop.org/series/39841/
State : warning
== Summary ==
Series 39841v2 drm/i915/dp: Fix intel_edp_compare_alt_mode.
https://patchwork.freedesktop.org/api/1.0/series/39841/revisions/2/mbox/
---- Possible new issues:
Test kms_busy:
Subgroup basic-flip-a:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-b:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-c:
skip -> PASS (fi-ivb-3770)
Test kms_chamelium:
Subgroup common-hpd-after-suspend:
pass -> DMESG-WARN (fi-skl-6700k2)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-busy-flip-before-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-varying-size:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-varying-size:
skip -> PASS (fi-ivb-3770)
Test kms_force_connector_basic:
Subgroup prune-stale-modes:
pass -> SKIP (fi-ivb-3770)
Test kms_frontbuffer_tracking:
Subgroup basic:
skip -> PASS (fi-ivb-3770)
---- Known issues:
Test kms_chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#103841
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test prime_vgem:
Subgroup basic-fence-flip:
pass -> FAIL (fi-ilk-650) fdo#104008 +1
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:435s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:441s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:383s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:531s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:298s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:506s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:508s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:506s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:497s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:410s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:590s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:575s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:426s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:314s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:531s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:402s
fi-ilk-650 total:288 pass:227 dwarn:0 dfail:0 fail:1 skip:60 time:427s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:472s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:427s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:476s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:467s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:515s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:636s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:442s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:517s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:541s
fi-skl-6700k2 total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:508s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:487s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:424s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:441s
fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:400s
Blacklisted hosts:
fi-cfl-u total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:513s
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:28 time:495s
874b86a759851707e26286c22062f6ccc526e46f drm-tip: 2018y-03m-13d-12h-36m-17s UTC integration manifest
e893cd0677da drm/i915/dp: Fix alt mode handling.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8327/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode.
2018-03-13 13:11 ` Ville Syrjälä
(?)
(?)
@ 2018-04-12 23:18 ` Clint Taylor
-1 siblings, 0 replies; 21+ messages in thread
From: Clint Taylor @ 2018-04-12 23:18 UTC (permalink / raw)
To: Ville Syrjälä, Maarten Lankhorst
Cc: Jani Nikula, intel-gfx, Paulo Zanoni, stable, Rodrigo Vivi
On 03/13/2018 06:11 AM, Ville Syrjälä wrote:
> On Tue, Mar 13, 2018 at 10:28:55AM +0100, Maarten Lankhorst wrote:
>> On fi-cnl-y3 we have 2 modes that differ only by crtc_clock. This means
>> that if we request the normal mode, we automatically get the downclocked
>> mode.
>>
>> This can be seen during boot:
>> [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:101:eDP-1] probed modes :
>> [drm:drm_mode_debug_printmodeline] Modeline 102:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:drm_mode_debug_printmodeline] Modeline 103:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>> ...
>> [drm:intel_dump_pipe_config [i915]] [CRTC:51:pipe A][modeset]
>> [drm:intel_dump_pipe_config [i915]] output_types: EDP (0x100)
>> [drm:intel_dump_pipe_config [i915]] cpu_transcoder: EDP, pipe bpp: 24, dithering: 0
>> [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] dp m2_n2: lanes: 4; gmch_m: 4970250, gmch_n: 8388608, link_m: 828375, link_n: 1048576, tu: 64
>> [drm:intel_dump_pipe_config [i915]] audio: 0, infoframes: 0
>> [drm:intel_dump_pipe_config [i915]] requested mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 60 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x48 0xa
>> [drm:intel_dump_pipe_config [i915]] adjusted mode:
>> [drm:drm_mode_debug_printmodeline] Modeline 0:"3840x2160" 48 426600 3840 3888 3920 4000 2160 2163 2168 2222 0x40 0xa
>>
>> Testcase: kms_panel_fitting.atomic-fastset
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
>> Cc: David Weinehall <david.weinehall@linux.intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: <stable@vger.kernel.org> # v4.14+
>> ---
>> drivers/gpu/drm/i915/intel_dp.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 9a4a51e79fa1..0bd3cc1c82b4 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -1684,7 +1684,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
>> m1->vdisplay == m2->vdisplay &&
>> m1->vsync_start == m2->vsync_start &&
>> m1->vsync_end == m2->vsync_end &&
>> - m1->vtotal == m2->vtotal);
>> + m1->vtotal == m2->vtotal &&
>> + m1->clock == m2->clock);
> Isn't the entire point here to ignore differences in the clock? Hmm.
> Maybe not.
For DRRS we want to ignore the slower clock. However this function is
just for PSR testing when the eDP fixed mode blanking interval is
shorter then the single frame setup time minimum.
>
> Probably what we really want to do is check whether the requested
> refresh rate is closer to the fixed mode or the alt mode.
Since this feature appears to be for testing only the Alt mode should
only be used if specifically requested. If not eDP fixed mode should be
used.
Maarten, Sorry about submitting this patch again. I didn't do 5 minutes
of research to see if someone already submitted a fix.
-Clint
>
>> return bres;
>> }
>>
>> --
>> 2.16.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2018-04-12 23:09 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 9:28 [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Maarten Lankhorst
2018-03-13 9:40 ` Chris Wilson
2018-03-13 9:40 ` Chris Wilson
2018-03-13 9:56 ` Maarten Lankhorst
2018-03-13 9:56 ` Maarten Lankhorst
2018-03-13 9:52 ` Chris Wilson
2018-03-13 9:52 ` Chris Wilson
2018-03-13 10:04 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-03-13 11:03 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-13 13:11 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2018-03-13 13:11 ` Ville Syrjälä
2018-03-13 13:52 ` [PATCH] drm/i915/dp: Fix alt mode handling Maarten Lankhorst
2018-03-13 13:52 ` Maarten Lankhorst
2018-03-13 14:27 ` Ville Syrjälä
2018-03-13 14:27 ` Ville Syrjälä
2018-03-13 14:37 ` Maarten Lankhorst
2018-03-13 14:37 ` Maarten Lankhorst
2018-03-13 15:09 ` Ville Syrjälä
2018-03-13 15:09 ` Ville Syrjälä
2018-04-12 23:18 ` [Intel-gfx] [PATCH] drm/i915/dp: Fix intel_edp_compare_alt_mode Clint Taylor
2018-03-13 15:26 ` ✗ Fi.CI.BAT: warning for drm/i915/dp: Fix intel_edp_compare_alt_mode. (rev2) Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.