All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
@ 2019-09-05 13:50 Ville Syrjala
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Ville Syrjala @ 2019-09-05 13:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: Leho Kraav

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The officially validated plane width limit is 4k on skl+, however
we already had people using 5k displays before we started to enforce
the limit. Also it seems Windows allows 5k resolutions as well
(though not sure if they do it with one plane or two).

According to hw folks 5k should work with the possible
exception of the following features:
- Ytile (already limited to 4k)
- FP16 (already limited to 4k)
- render compression (already limited to 4k)
- KVMR sprite and cursor (don't care)
- horizontal panning (need to verify this)
- pipe and plane scaling (need to verify this)

So apart from last two items on that list we are already
fine. We should really verify what happens with those last
two items but I don't have a 5k display on hand atm so it'll
have to wait.

In the meantime let's just bump the limit back up to 5k since
several users have already been using it without apparent issues.
At least we'll be no worse off than we were prior to lowering
the limits.

Cc: Leho Kraav <leho@kraav.com>
Cc: Sean Paul <sean@poorly.run>
Cc: José Roberto de Souza <jose.souza@intel.com>
Fixes: 372b9ffb5799 ("drm/i915: Fix skl+ max plane width")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111501
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 06cf2171474d..4e63342ea597 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3282,7 +3282,20 @@ static int skl_max_plane_width(const struct drm_framebuffer *fb,
 	switch (fb->modifier) {
 	case DRM_FORMAT_MOD_LINEAR:
 	case I915_FORMAT_MOD_X_TILED:
-		return 4096;
+		/*
+		 * Validated limit is 4k, but has 5k should
+		 * work apart from the following features:
+		 * - Ytile (already limited to 4k)
+		 * - FP16 (already limited to 4k)
+		 * - render compression (already limited to 4k)
+		 * - KVMR sprite and cursor (don't care)
+		 * - horizontal panning (TODO verify this)
+		 * - pipe and plane scaling (TODO verify this)
+		 */
+		if (cpp == 8)
+			return 4096;
+		else
+			return 5120;
 	case I915_FORMAT_MOD_Y_TILED_CCS:
 	case I915_FORMAT_MOD_Yf_TILED_CCS:
 		/* FIXME AUX plane? */
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
@ 2019-09-05 13:50 ` Ville Syrjala
  2019-09-18 14:08   ` Maarten Lankhorst
                     ` (2 more replies)
  2019-09-05 15:35 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 3 replies; 17+ messages in thread
From: Ville Syrjala @ 2019-09-05 13:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: Leho Kraav

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
planes' max resolution. This has the nasty implication that modes on the
connectors' mode list may not be usable when the user asks for a
fullscreen plane. Seeing as that is the most common use case it seems
prudent to filter out modes that don't allow for fullscreen planes to
be enabled.

Let's do that in the connetor .mode_valid() hook so that normally
such modes are kept hidden but the user is still able to forcibly
specify such a mode if they know they don't need fullscreen planes.

This is in line with ealier policies regarding certain clock limits.
The idea is to prevent the casual user from encountering a mode that
would fail under typical conditions, but allow the expert user to
force things if they so wish.

Maybe in the future we should consider automagically using two
planes when one can't cover the entire screen? Wouldn't be a
great match for the current uapi with explicit planes though,
but I guess no worse than using two pipes (which we apparently
have to in the future anyway). Either that or we'd have to
teach userspace to do it for us.

Cc: Leho Kraav <leho@kraav.com>
Cc: Sean Paul <sean@poorly.run>
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_display.h |  4 +++
 drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
 drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
 5 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 4e63342ea597..99466a29bf36 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -15846,6 +15846,7 @@ intel_mode_valid(struct drm_device *dev,
 			   DRM_MODE_FLAG_CLKDIV2))
 		return MODE_BAD;
 
+	/* Transcoder timing limits */
 	if (INTEL_GEN(dev_priv) >= 9 ||
 	    IS_BROADWELL(dev_priv) || IS_HASWELL(dev_priv)) {
 		hdisplay_max = 8192; /* FDI max 4096 handled elsewhere */
@@ -15879,6 +15880,36 @@ intel_mode_valid(struct drm_device *dev,
 	return MODE_OK;
 }
 
+enum drm_mode_status
+intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
+				const struct drm_display_mode *mode)
+{
+	int plane_width_max, plane_height_max;
+
+	/*
+	 * intel_mode_valid() should be
+	 * sufficient on older platforms.
+	 */
+	if (INTEL_GEN(dev_priv) < 9)
+		return MODE_OK;
+
+	/*
+	 * Most people will probably want a fullscreen
+	 * plane so let's not advertize modes that are
+	 * too big for that.
+	 */
+	plane_width_max = 5120;
+	plane_height_max = 4096;
+
+	if (mode->hdisplay > plane_width_max)
+		return MODE_H_ILLEGAL;
+
+	if (mode->vdisplay > plane_height_max)
+		return MODE_V_ILLEGAL;
+
+	return MODE_OK;
+}
+
 static const struct drm_mode_config_funcs intel_mode_funcs = {
 	.fb_create = intel_user_framebuffer_create,
 	.get_format_info = intel_get_format_info,
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 33fd523c4622..ecabb827eb87 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -32,6 +32,7 @@ enum link_m_n_set;
 struct dpll;
 struct drm_connector;
 struct drm_device;
+struct drm_display_mode;
 struct drm_encoder;
 struct drm_file;
 struct drm_framebuffer;
@@ -447,6 +448,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
 u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
 			      u32 pixel_format, u64 modifier);
 bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
+enum drm_mode_status
+intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
+				const struct drm_display_mode *mode);
 enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
 
 void intel_plane_destroy(struct drm_plane *plane);
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d09133a958e1..ccaf9f00b747 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
 	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
 		return MODE_H_ILLEGAL;
 
-	return MODE_OK;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
index 5fec02aceaed..a2a937109a5a 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi.c
@@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
 enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
 					  struct drm_display_mode *mode)
 {
+	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_connector *intel_connector = to_intel_connector(connector);
 	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
 	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
@@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
 			return MODE_CLOCK_HIGH;
 	}
 
-	return MODE_OK;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index c500fc9154c8..dbc686515dce 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
 			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
 						       true, force_dvi);
 	}
+	if (status != MODE_OK)
+		return status;
 
-	return status;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
@ 2019-09-05 15:35 ` Patchwork
  2019-09-05 19:38 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-09-05 15:35 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
URL   : https://patchwork.freedesktop.org/series/66286/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6838 -> Patchwork_14289
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/

Known issues
------------

  Here are the changes found in Patchwork_14289 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_reloc@basic-gtt-cpu:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-cpu.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-cpu.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][3] -> [FAIL][4] ([fdo#111407])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Possible fixes ####

  * igt@gem_mmap_gtt@basic:
    - fi-glk-dsi:         [INCOMPLETE][5] ([fdo#103359] / [k.org#198133]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-glk-dsi/igt@gem_mmap_gtt@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-glk-dsi/igt@gem_mmap_gtt@basic.html

  * igt@kms_busy@basic-flip-c:
    - fi-skl-6770hq:      [SKIP][7] ([fdo#109271] / [fdo#109278]) -> [PASS][8] +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html

  * igt@kms_chamelium@dp-edid-read:
    - fi-kbl-7500u:       [WARN][9] ([fdo#109483]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      [SKIP][11] ([fdo#109271]) -> [PASS][12] +23 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [FAIL][13] ([fdo#103167]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@vgem_basic@debugfs:
    - fi-icl-u3:          [DMESG-WARN][15] ([fdo#107724]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/fi-icl-u3/igt@vgem_basic@debugfs.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/fi-icl-u3/igt@vgem_basic@debugfs.html

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (53 -> 46)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (8): fi-ilk-m540 fi-tgl-u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6838 -> Patchwork_14289

  CI-20190529: 20190529
  CI_DRM_6838: 8e907b7591b620dba402c7ada493a31ca0320c99 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5171: 1911564805fe454919e8a5846534a0c1ef376a33 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14289: c4b6215b4511f0918f8fba8cb574ee36aeca0965 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

c4b6215b4511 drm/i915: Don't advertise modes that exceed the max plane size
286688beda04 drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
  2019-09-05 15:35 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Patchwork
@ 2019-09-05 19:38 ` Patchwork
  2019-09-18 14:09 ` [PATCH 1/2] " Maarten Lankhorst
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-09-05 19:38 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
URL   : https://patchwork.freedesktop.org/series/66286/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6838_full -> Patchwork_14289_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_14289_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@in-order-bsd:
    - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#111325]) +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb5/igt@gem_exec_schedule@in-order-bsd.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb1/igt@gem_exec_schedule@in-order-bsd.html

  * igt@gem_exec_schedule@preempt-queue-chain-bsd2:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#109276]) +6 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb4/igt@gem_exec_schedule@preempt-queue-chain-bsd2.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb5/igt@gem_exec_schedule@preempt-queue-chain-bsd2.html

  * igt@gem_exec_suspend@basic-s4-devices:
    - shard-hsw:          [PASS][5] -> [FAIL][6] ([fdo#111550])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw7/igt@gem_exec_suspend@basic-s4-devices.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw2/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          [PASS][7] -> [SKIP][8] ([fdo#109271])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-kbl6/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-kbl2/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_pm_rpm@pm-tiling:
    - shard-hsw:          [PASS][9] -> [FAIL][10] ([fdo#111548]) +4 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw4/igt@i915_pm_rpm@pm-tiling.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw2/igt@i915_pm_rpm@pm-tiling.html

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
    - shard-kbl:          [PASS][11] -> [INCOMPLETE][12] ([fdo#103665]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-kbl7/igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-kbl4/igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-skl:          [PASS][13] -> [FAIL][14] ([fdo#105363])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl10/igt@kms_flip@flip-vs-expired-vblank.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl1/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-snb:          [PASS][15] -> [INCOMPLETE][16] ([fdo#105411])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-snb1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-snb1/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][17] -> [FAIL][18] ([fdo#103167]) +4 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-hsw:          [PASS][19] -> [FAIL][20] ([fdo#103375]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-skl:          [PASS][21] -> [FAIL][22] ([fdo#103166])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl9/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [PASS][23] -> [FAIL][24] ([fdo#103166])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441]) +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb4/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_rotation_crc@exhaust-fences:
    - shard-iclb:         [PASS][27] -> [INCOMPLETE][28] ([fdo#107713] / [fdo#110026])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb4/igt@kms_rotation_crc@exhaust-fences.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb7/igt@kms_rotation_crc@exhaust-fences.html

  * igt@kms_setmode@basic:
    - shard-hsw:          [PASS][29] -> [FAIL][30] ([fdo#99912])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw7/igt@kms_setmode@basic.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw6/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-apl:          [PASS][31] -> [DMESG-WARN][32] ([fdo#108566]) +3 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-apl8/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-apl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][33] ([fdo#110841]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb1/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb6/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_reloc@basic-gtt-active:
    - shard-skl:          [DMESG-WARN][35] ([fdo#106107]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl5/igt@gem_exec_reloc@basic-gtt-active.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl2/igt@gem_exec_reloc@basic-gtt-active.html

  * igt@gem_exec_schedule@independent-bsd2:
    - shard-iclb:         [SKIP][37] ([fdo#109276]) -> [PASS][38] +11 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb7/igt@gem_exec_schedule@independent-bsd2.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb1/igt@gem_exec_schedule@independent-bsd2.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [SKIP][39] ([fdo#111325]) -> [PASS][40] +4 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb7/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@gem_request_retire@retire-vma-not-inactive:
    - shard-apl:          [INCOMPLETE][41] ([fdo#103927]) -> [PASS][42] +3 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-apl6/igt@gem_request_retire@retire-vma-not-inactive.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-apl4/igt@gem_request_retire@retire-vma-not-inactive.html

  * igt@gem_softpin@noreloc-s3:
    - shard-skl:          [INCOMPLETE][43] ([fdo#104108] / [fdo#107773]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl1/igt@gem_softpin@noreloc-s3.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl2/igt@gem_softpin@noreloc-s3.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [SKIP][45] ([fdo#109271]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-snb4/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-snb4/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_pm_rpm@system-suspend:
    - shard-hsw:          [FAIL][47] ([fdo#111548]) -> [PASS][48] +4 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw2/igt@i915_pm_rpm@system-suspend.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw1/igt@i915_pm_rpm@system-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [FAIL][49] ([fdo#105363]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl5/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl2/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite:
    - shard-iclb:         [FAIL][51] ([fdo#103167]) -> [PASS][52] +4 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-apl:          [DMESG-WARN][53] ([fdo#108566]) -> [PASS][54] +2 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-apl5/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-apl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-kbl:          [INCOMPLETE][55] ([fdo#103665]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-kbl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-kbl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
    - shard-hsw:          [FAIL][57] ([fdo#103375]) -> [PASS][58] +6 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          [FAIL][59] ([fdo#108145]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html

  * igt@kms_plane_cursor@pipe-c-viewport-size-256:
    - shard-iclb:         [INCOMPLETE][61] ([fdo#107713]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb1/igt@kms_plane_cursor@pipe-c-viewport-size-256.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb8/igt@kms_plane_cursor@pipe-c-viewport-size-256.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [SKIP][63] ([fdo#109441]) -> [PASS][64] +1 similar issue
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb5/igt@kms_psr@psr2_cursor_blt.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][65] ([fdo#99912]) -> [PASS][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-apl8/igt@kms_setmode@basic.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-apl5/igt@kms_setmode@basic.html

  * igt@perf@blocking:
    - shard-skl:          [FAIL][67] ([fdo#110728]) -> [PASS][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-skl7/igt@perf@blocking.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-skl3/igt@perf@blocking.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vcs1-nonpriv:
    - shard-iclb:         [FAIL][69] ([fdo#111329]) -> [SKIP][70] ([fdo#109276])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb2/igt@gem_ctx_isolation@vcs1-nonpriv.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb6/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * igt@gem_mocs_settings@mocs-isolation-bsd2:
    - shard-iclb:         [SKIP][71] ([fdo#109276]) -> [FAIL][72] ([fdo#111330])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-iclb7/igt@gem_mocs_settings@mocs-isolation-bsd2.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-iclb2/igt@gem_mocs_settings@mocs-isolation-bsd2.html

  * igt@i915_pm_rpm@modeset-lpsp:
    - shard-hsw:          [FAIL][73] ([fdo#111548]) -> [SKIP][74] ([fdo#109271])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw2/igt@i915_pm_rpm@modeset-lpsp.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw4/igt@i915_pm_rpm@modeset-lpsp.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - shard-hsw:          [SKIP][75] ([fdo#109271]) -> [FAIL][76] ([fdo#111548])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-hsw5/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-hsw2/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-apl:          [TIMEOUT][77] ([fdo#111546]) -> [INCOMPLETE][78] ([fdo#103927])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6838/shard-apl3/igt@perf_pmu@cpu-hotplug.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/shard-apl6/igt@perf_pmu@cpu-hotplug.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110026]: https://bugs.freedesktop.org/show_bug.cgi?id=110026
  [fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111546]: https://bugs.freedesktop.org/show_bug.cgi?id=111546
  [fdo#111548]: https://bugs.freedesktop.org/show_bug.cgi?id=111548
  [fdo#111550]: https://bugs.freedesktop.org/show_bug.cgi?id=111550
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6838 -> Patchwork_14289

  CI-20190529: 20190529
  CI_DRM_6838: 8e907b7591b620dba402c7ada493a31ca0320c99 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5171: 1911564805fe454919e8a5846534a0c1ef376a33 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14289: c4b6215b4511f0918f8fba8cb574ee36aeca0965 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14289/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
@ 2019-09-18 14:08   ` Maarten Lankhorst
  2019-09-18 14:28   ` Manasi Navare
  2019-09-18 15:07   ` [PATCH v2 " Ville Syrjala
  2 siblings, 0 replies; 17+ messages in thread
From: Maarten Lankhorst @ 2019-09-18 14:08 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx; +Cc: Leho Kraav

Op 05-09-2019 om 15:50 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> planes' max resolution. This has the nasty implication that modes on the
> connectors' mode list may not be usable when the user asks for a
> fullscreen plane. Seeing as that is the most common use case it seems
> prudent to filter out modes that don't allow for fullscreen planes to
> be enabled.
>
> Let's do that in the connetor .mode_valid() hook so that normally
> such modes are kept hidden but the user is still able to forcibly
> specify such a mode if they know they don't need fullscreen planes.
>
> This is in line with ealier policies regarding certain clock limits.
> The idea is to prevent the casual user from encountering a mode that
> would fail under typical conditions, but allow the expert user to
> force things if they so wish.
>
> Maybe in the future we should consider automagically using two
> planes when one can't cover the entire screen? Wouldn't be a
> great match for the current uapi with explicit planes though,
> but I guess no worse than using two pipes (which we apparently
> have to in the future anyway). Either that or we'd have to
> teach userspace to do it for us.
>
> Cc: Leho Kraav <leho@kraav.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
>  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
>  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
>  5 files changed, 41 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 4e63342ea597..99466a29bf36 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15846,6 +15846,7 @@ intel_mode_valid(struct drm_device *dev,
>  			   DRM_MODE_FLAG_CLKDIV2))
>  		return MODE_BAD;
>  
> +	/* Transcoder timing limits */
>  	if (INTEL_GEN(dev_priv) >= 9 ||
>  	    IS_BROADWELL(dev_priv) || IS_HASWELL(dev_priv)) {
>  		hdisplay_max = 8192; /* FDI max 4096 handled elsewhere */
> @@ -15879,6 +15880,36 @@ intel_mode_valid(struct drm_device *dev,
>  	return MODE_OK;
>  }
>  
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode)
> +{
> +	int plane_width_max, plane_height_max;
> +
> +	/*
> +	 * intel_mode_valid() should be
> +	 * sufficient on older platforms.
> +	 */
> +	if (INTEL_GEN(dev_priv) < 9)
> +		return MODE_OK;
> +
> +	/*
> +	 * Most people will probably want a fullscreen
> +	 * plane so let's not advertize modes that are
> +	 * too big for that.
> +	 */
> +	plane_width_max = 5120;
> +	plane_height_max = 4096;
> +
> +	if (mode->hdisplay > plane_width_max)
> +		return MODE_H_ILLEGAL;
> +
> +	if (mode->vdisplay > plane_height_max)
> +		return MODE_V_ILLEGAL;
> +
> +	return MODE_OK;
> +}
> +
>  static const struct drm_mode_config_funcs intel_mode_funcs = {
>  	.fb_create = intel_user_framebuffer_create,
>  	.get_format_info = intel_get_format_info,
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 33fd523c4622..ecabb827eb87 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -32,6 +32,7 @@ enum link_m_n_set;
>  struct dpll;
>  struct drm_connector;
>  struct drm_device;
> +struct drm_display_mode;
>  struct drm_encoder;
>  struct drm_file;
>  struct drm_framebuffer;
> @@ -447,6 +448,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
>  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
>  			      u32 pixel_format, u64 modifier);
>  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode);
>  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  
>  void intel_plane_destroy(struct drm_plane *plane);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d09133a958e1..ccaf9f00b747 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
>  		return MODE_H_ILLEGAL;
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> index 5fec02aceaed..a2a937109a5a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
>  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  					  struct drm_display_mode *mode)
>  {
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
>  	struct intel_connector *intel_connector = to_intel_connector(connector);
>  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  			return MODE_CLOCK_HIGH;
>  	}
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index c500fc9154c8..dbc686515dce 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
>  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
>  						       true, force_dvi);
>  	}
> +	if (status != MODE_OK)
> +		return status;
>  
> -	return status;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-09-05 19:38 ` ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-18 14:09 ` Maarten Lankhorst
  2019-09-18 15:27 ` Sean Paul
  2019-09-18 16:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled (rev2) Patchwork
  5 siblings, 0 replies; 17+ messages in thread
From: Maarten Lankhorst @ 2019-09-18 14:09 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx; +Cc: Leho Kraav

Op 05-09-2019 om 15:50 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The officially validated plane width limit is 4k on skl+, however
> we already had people using 5k displays before we started to enforce
> the limit. Also it seems Windows allows 5k resolutions as well
> (though not sure if they do it with one plane or two).
>
> According to hw folks 5k should work with the possible
> exception of the following features:
> - Ytile (already limited to 4k)
> - FP16 (already limited to 4k)
> - render compression (already limited to 4k)
> - KVMR sprite and cursor (don't care)
> - horizontal panning (need to verify this)
> - pipe and plane scaling (need to verify this)
>
> So apart from last two items on that list we are already
> fine. We should really verify what happens with those last
> two items but I don't have a 5k display on hand atm so it'll
> have to wait.
>
> In the meantime let's just bump the limit back up to 5k since
> several users have already been using it without apparent issues.
> At least we'll be no worse off than we were prior to lowering
> the limits.
>
> Cc: Leho Kraav <leho@kraav.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Fixes: 372b9ffb5799 ("drm/i915: Fix skl+ max plane width")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111501
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 06cf2171474d..4e63342ea597 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3282,7 +3282,20 @@ static int skl_max_plane_width(const struct drm_framebuffer *fb,
>  	switch (fb->modifier) {
>  	case DRM_FORMAT_MOD_LINEAR:
>  	case I915_FORMAT_MOD_X_TILED:
> -		return 4096;
> +		/*
> +		 * Validated limit is 4k, but has 5k should
> +		 * work apart from the following features:
> +		 * - Ytile (already limited to 4k)
> +		 * - FP16 (already limited to 4k)
> +		 * - render compression (already limited to 4k)
> +		 * - KVMR sprite and cursor (don't care)
> +		 * - horizontal panning (TODO verify this)
> +		 * - pipe and plane scaling (TODO verify this)
> +		 */
> +		if (cpp == 8)
> +			return 4096;
> +		else
> +			return 5120;
>  	case I915_FORMAT_MOD_Y_TILED_CCS:
>  	case I915_FORMAT_MOD_Yf_TILED_CCS:
>  		/* FIXME AUX plane? */

Also r-b, forgot to add it in patch 2. :)

Patch 2 wil need some tweaking for bigjoiner, but should be ok otherwise.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
  2019-09-18 14:08   ` Maarten Lankhorst
@ 2019-09-18 14:28   ` Manasi Navare
  2019-09-18 14:59     ` Ville Syrjälä
  2019-09-18 15:07   ` [PATCH v2 " Ville Syrjala
  2 siblings, 1 reply; 17+ messages in thread
From: Manasi Navare @ 2019-09-18 14:28 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Leho Kraav, intel-gfx

On Thu, Sep 05, 2019 at 04:50:44PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> planes' max resolution. This has the nasty implication that modes on the
> connectors' mode list may not be usable when the user asks for a
> fullscreen plane. Seeing as that is the most common use case it seems
> prudent to filter out modes that don't allow for fullscreen planes to
> be enabled.
> 
> Let's do that in the connetor .mode_valid() hook so that normally
> such modes are kept hidden but the user is still able to forcibly
> specify such a mode if they know they don't need fullscreen planes.
> 
> This is in line with ealier policies regarding certain clock limits.
> The idea is to prevent the casual user from encountering a mode that
> would fail under typical conditions, but allow the expert user to
> force things if they so wish.
> 
> Maybe in the future we should consider automagically using two
> planes when one can't cover the entire screen? Wouldn't be a
> great match for the current uapi with explicit planes though,
> but I guess no worse than using two pipes (which we apparently
> have to in the future anyway). Either that or we'd have to
> teach userspace to do it for us.
> 
> Cc: Leho Kraav <leho@kraav.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
>  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
>  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
>  5 files changed, 41 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 4e63342ea597..99466a29bf36 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15846,6 +15846,7 @@ intel_mode_valid(struct drm_device *dev,
>  			   DRM_MODE_FLAG_CLKDIV2))
>  		return MODE_BAD;
>  
> +	/* Transcoder timing limits */
>  	if (INTEL_GEN(dev_priv) >= 9 ||
>  	    IS_BROADWELL(dev_priv) || IS_HASWELL(dev_priv)) {
>  		hdisplay_max = 8192; /* FDI max 4096 handled elsewhere */
> @@ -15879,6 +15880,36 @@ intel_mode_valid(struct drm_device *dev,
>  	return MODE_OK;
>  }
>  
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode)
> +{
> +	int plane_width_max, plane_height_max;
> +
> +	/*
> +	 * intel_mode_valid() should be
> +	 * sufficient on older platforms.
> +	 */
> +	if (INTEL_GEN(dev_priv) < 9)
> +		return MODE_OK;
> +
> +	/*
> +	 * Most people will probably want a fullscreen
> +	 * plane so let's not advertize modes that are
> +	 * too big for that.
> +	 */
> +	plane_width_max = 5120;
> +	plane_height_max = 4096;

For ICL+, shouldnt tthe plane_height_max be 4320?

Manasi

> +
> +	if (mode->hdisplay > plane_width_max)
> +		return MODE_H_ILLEGAL;
> +
> +	if (mode->vdisplay > plane_height_max)
> +		return MODE_V_ILLEGAL;
> +
> +	return MODE_OK;
> +}
> +
>  static const struct drm_mode_config_funcs intel_mode_funcs = {
>  	.fb_create = intel_user_framebuffer_create,
>  	.get_format_info = intel_get_format_info,
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 33fd523c4622..ecabb827eb87 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -32,6 +32,7 @@ enum link_m_n_set;
>  struct dpll;
>  struct drm_connector;
>  struct drm_device;
> +struct drm_display_mode;
>  struct drm_encoder;
>  struct drm_file;
>  struct drm_framebuffer;
> @@ -447,6 +448,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
>  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
>  			      u32 pixel_format, u64 modifier);
>  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode);
>  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  
>  void intel_plane_destroy(struct drm_plane *plane);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d09133a958e1..ccaf9f00b747 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
>  		return MODE_H_ILLEGAL;
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> index 5fec02aceaed..a2a937109a5a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
>  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  					  struct drm_display_mode *mode)
>  {
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
>  	struct intel_connector *intel_connector = to_intel_connector(connector);
>  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  			return MODE_CLOCK_HIGH;
>  	}
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index c500fc9154c8..dbc686515dce 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
>  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
>  						       true, force_dvi);
>  	}
> +	if (status != MODE_OK)
> +		return status;
>  
> -	return status;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 14:28   ` Manasi Navare
@ 2019-09-18 14:59     ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-09-18 14:59 UTC (permalink / raw)
  To: Manasi Navare; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 07:28:29AM -0700, Manasi Navare wrote:
> On Thu, Sep 05, 2019 at 04:50:44PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> > planes' max resolution. This has the nasty implication that modes on the
> > connectors' mode list may not be usable when the user asks for a
> > fullscreen plane. Seeing as that is the most common use case it seems
> > prudent to filter out modes that don't allow for fullscreen planes to
> > be enabled.
> > 
> > Let's do that in the connetor .mode_valid() hook so that normally
> > such modes are kept hidden but the user is still able to forcibly
> > specify such a mode if they know they don't need fullscreen planes.
> > 
> > This is in line with ealier policies regarding certain clock limits.
> > The idea is to prevent the casual user from encountering a mode that
> > would fail under typical conditions, but allow the expert user to
> > force things if they so wish.
> > 
> > Maybe in the future we should consider automagically using two
> > planes when one can't cover the entire screen? Wouldn't be a
> > great match for the current uapi with explicit planes though,
> > but I guess no worse than using two pipes (which we apparently
> > have to in the future anyway). Either that or we'd have to
> > teach userspace to do it for us.
> > 
> > Cc: Leho Kraav <leho@kraav.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++++++++
> >  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
> >  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
> >  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
> >  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
> >  5 files changed, 41 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 4e63342ea597..99466a29bf36 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -15846,6 +15846,7 @@ intel_mode_valid(struct drm_device *dev,
> >  			   DRM_MODE_FLAG_CLKDIV2))
> >  		return MODE_BAD;
> >  
> > +	/* Transcoder timing limits */
> >  	if (INTEL_GEN(dev_priv) >= 9 ||
> >  	    IS_BROADWELL(dev_priv) || IS_HASWELL(dev_priv)) {
> >  		hdisplay_max = 8192; /* FDI max 4096 handled elsewhere */
> > @@ -15879,6 +15880,36 @@ intel_mode_valid(struct drm_device *dev,
> >  	return MODE_OK;
> >  }
> >  
> > +enum drm_mode_status
> > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > +				const struct drm_display_mode *mode)
> > +{
> > +	int plane_width_max, plane_height_max;
> > +
> > +	/*
> > +	 * intel_mode_valid() should be
> > +	 * sufficient on older platforms.
> > +	 */
> > +	if (INTEL_GEN(dev_priv) < 9)
> > +		return MODE_OK;
> > +
> > +	/*
> > +	 * Most people will probably want a fullscreen
> > +	 * plane so let's not advertize modes that are
> > +	 * too big for that.
> > +	 */
> > +	plane_width_max = 5120;
> > +	plane_height_max = 4096;
> 
> For ICL+, shouldnt tthe plane_height_max be 4320?

It should indeed. I wish I could come up with a nice way to not
duplicate this information here. But in order to use the
skl_plane_{width,height}() etc. we'd still need to hardcode the
cpp/modifier information here, so it's not exactly nice either.

Anywas, I'll toss out a v2.

> 
> Manasi
> 
> > +
> > +	if (mode->hdisplay > plane_width_max)
> > +		return MODE_H_ILLEGAL;
> > +
> > +	if (mode->vdisplay > plane_height_max)
> > +		return MODE_V_ILLEGAL;
> > +
> > +	return MODE_OK;
> > +}
> > +
> >  static const struct drm_mode_config_funcs intel_mode_funcs = {
> >  	.fb_create = intel_user_framebuffer_create,
> >  	.get_format_info = intel_get_format_info,
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> > index 33fd523c4622..ecabb827eb87 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display.h
> > @@ -32,6 +32,7 @@ enum link_m_n_set;
> >  struct dpll;
> >  struct drm_connector;
> >  struct drm_device;
> > +struct drm_display_mode;
> >  struct drm_encoder;
> >  struct drm_file;
> >  struct drm_framebuffer;
> > @@ -447,6 +448,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
> >  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
> >  			      u32 pixel_format, u64 modifier);
> >  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> > +enum drm_mode_status
> > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > +				const struct drm_display_mode *mode);
> >  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
> >  
> >  void intel_plane_destroy(struct drm_plane *plane);
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index d09133a958e1..ccaf9f00b747 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
> >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> >  		return MODE_H_ILLEGAL;
> >  
> > -	return MODE_OK;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> > index 5fec02aceaed..a2a937109a5a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> > @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
> >  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> >  					  struct drm_display_mode *mode)
> >  {
> > +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> >  	struct intel_connector *intel_connector = to_intel_connector(connector);
> >  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> >  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> > @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> >  			return MODE_CLOCK_HIGH;
> >  	}
> >  
> > -	return MODE_OK;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > index c500fc9154c8..dbc686515dce 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> >  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
> >  						       true, force_dvi);
> >  	}
> > +	if (status != MODE_OK)
> > +		return status;
> >  
> > -	return status;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > -- 
> > 2.21.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
  2019-09-18 14:08   ` Maarten Lankhorst
  2019-09-18 14:28   ` Manasi Navare
@ 2019-09-18 15:07   ` Ville Syrjala
  2019-09-18 15:24     ` Sean Paul
  2019-09-19  8:52     ` Maarten Lankhorst
  2 siblings, 2 replies; 17+ messages in thread
From: Ville Syrjala @ 2019-09-18 15:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Leho Kraav

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
planes' max resolution. This has the nasty implication that modes on the
connectors' mode list may not be usable when the user asks for a
fullscreen plane. Seeing as that is the most common use case it seems
prudent to filter out modes that don't allow for fullscreen planes to
be enabled.

Let's do that in the connetor .mode_valid() hook so that normally
such modes are kept hidden but the user is still able to forcibly
specify such a mode if they know they don't need fullscreen planes.

This is in line with ealier policies regarding certain clock limits.
The idea is to prevent the casual user from encountering a mode that
would fail under typical conditions, but allow the expert user to
force things if they so wish.

Maybe in the future we should consider automagically using two
planes when one can't cover the entire screen? Wouldn't be a
great match for the current uapi with explicit planes though,
but I guess no worse than using two pipes (which we apparently
have to in the future anyway). Either that or we'd have to
teach userspace to do it for us.

v2: Fix icl+ max plane heigth (Manasi)

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Leho Kraav <leho@kraav.com>
Cc: Sean Paul <sean@poorly.run>
Cc: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 36 ++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_display.h |  4 +++
 drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
 drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
 5 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f5e65e052d91..0147e4ae3622 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -15753,6 +15753,7 @@ intel_mode_valid(struct drm_device *dev,
 			   DRM_MODE_FLAG_CLKDIV2))
 		return MODE_BAD;
 
+	/* Transcoder timing limits */
 	if (INTEL_GEN(dev_priv) >= 11) {
 		hdisplay_max = 16384;
 		vdisplay_max = 8192;
@@ -15791,6 +15792,41 @@ intel_mode_valid(struct drm_device *dev,
 	return MODE_OK;
 }
 
+enum drm_mode_status
+intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
+				const struct drm_display_mode *mode)
+{
+	int plane_width_max, plane_height_max;
+
+	/*
+	 * intel_mode_valid() should be
+	 * sufficient on older platforms.
+	 */
+	if (INTEL_GEN(dev_priv) < 9)
+		return MODE_OK;
+
+	/*
+	 * Most people will probably want a fullscreen
+	 * plane so let's not advertize modes that are
+	 * too big for that.
+	 */
+	if (INTEL_GEN(dev_priv) >= 11) {
+		plane_width_max = 5120;
+		plane_height_max = 4320;
+	} else {
+		plane_width_max = 5120;
+		plane_height_max = 4096;
+	}
+
+	if (mode->hdisplay > plane_width_max)
+		return MODE_H_ILLEGAL;
+
+	if (mode->vdisplay > plane_height_max)
+		return MODE_V_ILLEGAL;
+
+	return MODE_OK;
+}
+
 static const struct drm_mode_config_funcs intel_mode_funcs = {
 	.fb_create = intel_user_framebuffer_create,
 	.get_format_info = intel_get_format_info,
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 66330fcb10d4..b1ae0e59c715 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -32,6 +32,7 @@ enum link_m_n_set;
 struct dpll;
 struct drm_connector;
 struct drm_device;
+struct drm_display_mode;
 struct drm_encoder;
 struct drm_file;
 struct drm_format_info;
@@ -448,6 +449,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
 u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
 			      u32 pixel_format, u64 modifier);
 bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
+enum drm_mode_status
+intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
+				const struct drm_display_mode *mode);
 enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
 
 void intel_plane_destroy(struct drm_plane *plane);
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d09133a958e1..ccaf9f00b747 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
 	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
 		return MODE_H_ILLEGAL;
 
-	return MODE_OK;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
index 5fec02aceaed..a2a937109a5a 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi.c
@@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
 enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
 					  struct drm_display_mode *mode)
 {
+	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_connector *intel_connector = to_intel_connector(connector);
 	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
 	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
@@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
 			return MODE_CLOCK_HIGH;
 	}
 
-	return MODE_OK;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index c500fc9154c8..dbc686515dce 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
 			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
 						       true, force_dvi);
 	}
+	if (status != MODE_OK)
+		return status;
 
-	return status;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 15:07   ` [PATCH v2 " Ville Syrjala
@ 2019-09-18 15:24     ` Sean Paul
  2019-09-18 16:02       ` Ville Syrjälä
  2019-09-19  8:52     ` Maarten Lankhorst
  1 sibling, 1 reply; 17+ messages in thread
From: Sean Paul @ 2019-09-18 15:24 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 06:07:07PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> planes' max resolution. This has the nasty implication that modes on the
> connectors' mode list may not be usable when the user asks for a
> fullscreen plane. Seeing as that is the most common use case it seems
> prudent to filter out modes that don't allow for fullscreen planes to
> be enabled.
> 
> Let's do that in the connetor .mode_valid() hook so that normally
> such modes are kept hidden but the user is still able to forcibly
> specify such a mode if they know they don't need fullscreen planes.
> 
> This is in line with ealier policies regarding certain clock limits.
> The idea is to prevent the casual user from encountering a mode that
> would fail under typical conditions, but allow the expert user to
> force things if they so wish.

Isn't this exactly what atomic_check is for? Why not just add a debug message in
get_max_plane_size to leave a breadcrumb?

Sean

> 
> Maybe in the future we should consider automagically using two
> planes when one can't cover the entire screen? Wouldn't be a
> great match for the current uapi with explicit planes though,
> but I guess no worse than using two pipes (which we apparently
> have to in the future anyway). Either that or we'd have to
> teach userspace to do it for us.
> 
> v2: Fix icl+ max plane heigth (Manasi)
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Leho Kraav <leho@kraav.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 36 ++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
>  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
>  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
>  5 files changed, 46 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index f5e65e052d91..0147e4ae3622 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15753,6 +15753,7 @@ intel_mode_valid(struct drm_device *dev,
>  			   DRM_MODE_FLAG_CLKDIV2))
>  		return MODE_BAD;
>  
> +	/* Transcoder timing limits */
>  	if (INTEL_GEN(dev_priv) >= 11) {
>  		hdisplay_max = 16384;
>  		vdisplay_max = 8192;
> @@ -15791,6 +15792,41 @@ intel_mode_valid(struct drm_device *dev,
>  	return MODE_OK;
>  }
>  
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode)
> +{
> +	int plane_width_max, plane_height_max;
> +
> +	/*
> +	 * intel_mode_valid() should be
> +	 * sufficient on older platforms.
> +	 */
> +	if (INTEL_GEN(dev_priv) < 9)
> +		return MODE_OK;
> +
> +	/*
> +	 * Most people will probably want a fullscreen
> +	 * plane so let's not advertize modes that are
> +	 * too big for that.
> +	 */
> +	if (INTEL_GEN(dev_priv) >= 11) {
> +		plane_width_max = 5120;
> +		plane_height_max = 4320;
> +	} else {
> +		plane_width_max = 5120;
> +		plane_height_max = 4096;
> +	}
> +
> +	if (mode->hdisplay > plane_width_max)
> +		return MODE_H_ILLEGAL;
> +
> +	if (mode->vdisplay > plane_height_max)
> +		return MODE_V_ILLEGAL;
> +
> +	return MODE_OK;
> +}
> +
>  static const struct drm_mode_config_funcs intel_mode_funcs = {
>  	.fb_create = intel_user_framebuffer_create,
>  	.get_format_info = intel_get_format_info,
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 66330fcb10d4..b1ae0e59c715 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -32,6 +32,7 @@ enum link_m_n_set;
>  struct dpll;
>  struct drm_connector;
>  struct drm_device;
> +struct drm_display_mode;
>  struct drm_encoder;
>  struct drm_file;
>  struct drm_format_info;
> @@ -448,6 +449,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
>  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
>  			      u32 pixel_format, u64 modifier);
>  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> +enum drm_mode_status
> +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> +				const struct drm_display_mode *mode);
>  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  
>  void intel_plane_destroy(struct drm_plane *plane);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d09133a958e1..ccaf9f00b747 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
>  		return MODE_H_ILLEGAL;
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> index 5fec02aceaed..a2a937109a5a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
>  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  					  struct drm_display_mode *mode)
>  {
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
>  	struct intel_connector *intel_connector = to_intel_connector(connector);
>  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
>  			return MODE_CLOCK_HIGH;
>  	}
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index c500fc9154c8..dbc686515dce 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
>  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
>  						       true, force_dvi);
>  	}
> +	if (status != MODE_OK)
> +		return status;
>  
> -	return status;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> -- 
> 2.21.0
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
                   ` (3 preceding siblings ...)
  2019-09-18 14:09 ` [PATCH 1/2] " Maarten Lankhorst
@ 2019-09-18 15:27 ` Sean Paul
  2019-09-18 16:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled (rev2) Patchwork
  5 siblings, 0 replies; 17+ messages in thread
From: Sean Paul @ 2019-09-18 15:27 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Leho Kraav, intel-gfx

On Thu, Sep 05, 2019 at 04:50:43PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The officially validated plane width limit is 4k on skl+, however
> we already had people using 5k displays before we started to enforce
> the limit. Also it seems Windows allows 5k resolutions as well
> (though not sure if they do it with one plane or two).
> 
> According to hw folks 5k should work with the possible
> exception of the following features:
> - Ytile (already limited to 4k)
> - FP16 (already limited to 4k)
> - render compression (already limited to 4k)
> - KVMR sprite and cursor (don't care)
> - horizontal panning (need to verify this)
> - pipe and plane scaling (need to verify this)
> 
> So apart from last two items on that list we are already
> fine. We should really verify what happens with those last
> two items but I don't have a 5k display on hand atm so it'll
> have to wait.
> 
> In the meantime let's just bump the limit back up to 5k since
> several users have already been using it without apparent issues.
> At least we'll be no worse off than we were prior to lowering
> the limits.
> 
> Cc: Leho Kraav <leho@kraav.com>
> Cc: Sean Paul <sean@poorly.run>

Great, thank you!

Reviewed-by: Sean Paul <sean@poorly.run>

> Cc: José Roberto de Souza <jose.souza@intel.com>
> Fixes: 372b9ffb5799 ("drm/i915: Fix skl+ max plane width")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111501
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 06cf2171474d..4e63342ea597 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3282,7 +3282,20 @@ static int skl_max_plane_width(const struct drm_framebuffer *fb,
>  	switch (fb->modifier) {
>  	case DRM_FORMAT_MOD_LINEAR:
>  	case I915_FORMAT_MOD_X_TILED:
> -		return 4096;
> +		/*
> +		 * Validated limit is 4k, but has 5k should
> +		 * work apart from the following features:
> +		 * - Ytile (already limited to 4k)
> +		 * - FP16 (already limited to 4k)
> +		 * - render compression (already limited to 4k)
> +		 * - KVMR sprite and cursor (don't care)
> +		 * - horizontal panning (TODO verify this)
> +		 * - pipe and plane scaling (TODO verify this)
> +		 */
> +		if (cpp == 8)
> +			return 4096;
> +		else
> +			return 5120;
>  	case I915_FORMAT_MOD_Y_TILED_CCS:
>  	case I915_FORMAT_MOD_Yf_TILED_CCS:
>  		/* FIXME AUX plane? */
> -- 
> 2.21.0
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 15:24     ` Sean Paul
@ 2019-09-18 16:02       ` Ville Syrjälä
  2019-09-18 16:27         ` Manasi Navare
  2019-09-18 20:21         ` Sean Paul
  0 siblings, 2 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-09-18 16:02 UTC (permalink / raw)
  To: Sean Paul; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 11:24:09AM -0400, Sean Paul wrote:
> On Wed, Sep 18, 2019 at 06:07:07PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> > planes' max resolution. This has the nasty implication that modes on the
> > connectors' mode list may not be usable when the user asks for a
> > fullscreen plane. Seeing as that is the most common use case it seems
> > prudent to filter out modes that don't allow for fullscreen planes to
> > be enabled.
> > 
> > Let's do that in the connetor .mode_valid() hook so that normally
> > such modes are kept hidden but the user is still able to forcibly
> > specify such a mode if they know they don't need fullscreen planes.
> > 
> > This is in line with ealier policies regarding certain clock limits.
> > The idea is to prevent the casual user from encountering a mode that
> > would fail under typical conditions, but allow the expert user to
> > force things if they so wish.
> 
> Isn't this exactly what atomic_check is for? Why not just add a debug message in
> get_max_plane_size to leave a breadcrumb?

There's already a debug message. Won't really help when the screen fails
to light up automagically on account of the preferred mode being too
big.

> 
> Sean
> 
> > 
> > Maybe in the future we should consider automagically using two
> > planes when one can't cover the entire screen? Wouldn't be a
> > great match for the current uapi with explicit planes though,
> > but I guess no worse than using two pipes (which we apparently
> > have to in the future anyway). Either that or we'd have to
> > teach userspace to do it for us.
> > 
> > v2: Fix icl+ max plane heigth (Manasi)
> > 
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Cc: Leho Kraav <leho@kraav.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 36 ++++++++++++++++++++
> >  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
> >  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
> >  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
> >  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
> >  5 files changed, 46 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index f5e65e052d91..0147e4ae3622 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -15753,6 +15753,7 @@ intel_mode_valid(struct drm_device *dev,
> >  			   DRM_MODE_FLAG_CLKDIV2))
> >  		return MODE_BAD;
> >  
> > +	/* Transcoder timing limits */
> >  	if (INTEL_GEN(dev_priv) >= 11) {
> >  		hdisplay_max = 16384;
> >  		vdisplay_max = 8192;
> > @@ -15791,6 +15792,41 @@ intel_mode_valid(struct drm_device *dev,
> >  	return MODE_OK;
> >  }
> >  
> > +enum drm_mode_status
> > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > +				const struct drm_display_mode *mode)
> > +{
> > +	int plane_width_max, plane_height_max;
> > +
> > +	/*
> > +	 * intel_mode_valid() should be
> > +	 * sufficient on older platforms.
> > +	 */
> > +	if (INTEL_GEN(dev_priv) < 9)
> > +		return MODE_OK;
> > +
> > +	/*
> > +	 * Most people will probably want a fullscreen
> > +	 * plane so let's not advertize modes that are
> > +	 * too big for that.
> > +	 */
> > +	if (INTEL_GEN(dev_priv) >= 11) {
> > +		plane_width_max = 5120;
> > +		plane_height_max = 4320;
> > +	} else {
> > +		plane_width_max = 5120;
> > +		plane_height_max = 4096;
> > +	}
> > +
> > +	if (mode->hdisplay > plane_width_max)
> > +		return MODE_H_ILLEGAL;
> > +
> > +	if (mode->vdisplay > plane_height_max)
> > +		return MODE_V_ILLEGAL;
> > +
> > +	return MODE_OK;
> > +}
> > +
> >  static const struct drm_mode_config_funcs intel_mode_funcs = {
> >  	.fb_create = intel_user_framebuffer_create,
> >  	.get_format_info = intel_get_format_info,
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> > index 66330fcb10d4..b1ae0e59c715 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display.h
> > @@ -32,6 +32,7 @@ enum link_m_n_set;
> >  struct dpll;
> >  struct drm_connector;
> >  struct drm_device;
> > +struct drm_display_mode;
> >  struct drm_encoder;
> >  struct drm_file;
> >  struct drm_format_info;
> > @@ -448,6 +449,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
> >  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
> >  			      u32 pixel_format, u64 modifier);
> >  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> > +enum drm_mode_status
> > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > +				const struct drm_display_mode *mode);
> >  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
> >  
> >  void intel_plane_destroy(struct drm_plane *plane);
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index d09133a958e1..ccaf9f00b747 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
> >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> >  		return MODE_H_ILLEGAL;
> >  
> > -	return MODE_OK;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> > index 5fec02aceaed..a2a937109a5a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> > @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
> >  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> >  					  struct drm_display_mode *mode)
> >  {
> > +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> >  	struct intel_connector *intel_connector = to_intel_connector(connector);
> >  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> >  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> > @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> >  			return MODE_CLOCK_HIGH;
> >  	}
> >  
> > -	return MODE_OK;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > index c500fc9154c8..dbc686515dce 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> >  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
> >  						       true, force_dvi);
> >  	}
> > +	if (status != MODE_OK)
> > +		return status;
> >  
> > -	return status;
> > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> >  }
> >  
> >  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > -- 
> > 2.21.0
> > 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 16:02       ` Ville Syrjälä
@ 2019-09-18 16:27         ` Manasi Navare
  2019-09-18 20:21         ` Sean Paul
  1 sibling, 0 replies; 17+ messages in thread
From: Manasi Navare @ 2019-09-18 16:27 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 07:02:18PM +0300, Ville Syrjälä wrote:
> On Wed, Sep 18, 2019 at 11:24:09AM -0400, Sean Paul wrote:
> > On Wed, Sep 18, 2019 at 06:07:07PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> > > planes' max resolution. This has the nasty implication that modes on the
> > > connectors' mode list may not be usable when the user asks for a
> > > fullscreen plane. Seeing as that is the most common use case it seems
> > > prudent to filter out modes that don't allow for fullscreen planes to
> > > be enabled.
> > > 
> > > Let's do that in the connetor .mode_valid() hook so that normally
> > > such modes are kept hidden but the user is still able to forcibly
> > > specify such a mode if they know they don't need fullscreen planes.
> > > 
> > > This is in line with ealier policies regarding certain clock limits.
> > > The idea is to prevent the casual user from encountering a mode that
> > > would fail under typical conditions, but allow the expert user to
> > > force things if they so wish.
> > 
> > Isn't this exactly what atomic_check is for? Why not just add a debug message in
> > get_max_plane_size to leave a breadcrumb?
> 
> There's already a debug message. Won't really help when the screen fails
> to light up automagically on account of the preferred mode being too
> big.
> 
> > 
> > Sean
> > 
> > > 
> > > Maybe in the future we should consider automagically using two
> > > planes when one can't cover the entire screen? Wouldn't be a
> > > great match for the current uapi with explicit planes though,
> > > but I guess no worse than using two pipes (which we apparently
> > > have to in the future anyway). Either that or we'd have to
> > > teach userspace to do it for us.
> > > 
> > > v2: Fix icl+ max plane heigth (Manasi)

Thanks for this fix, with this

Reviewed-by:  Manasi Navare <manasi.d.navare@intel.com>

Manasi

> > > 
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Cc: Leho Kraav <leho@kraav.com>
> > > Cc: Sean Paul <sean@poorly.run>
> > > Cc: José Roberto de Souza <jose.souza@intel.com>
> > > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_display.c | 36 ++++++++++++++++++++
> > >  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
> > >  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
> > >  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
> > >  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
> > >  5 files changed, 46 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index f5e65e052d91..0147e4ae3622 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -15753,6 +15753,7 @@ intel_mode_valid(struct drm_device *dev,
> > >  			   DRM_MODE_FLAG_CLKDIV2))
> > >  		return MODE_BAD;
> > >  
> > > +	/* Transcoder timing limits */
> > >  	if (INTEL_GEN(dev_priv) >= 11) {
> > >  		hdisplay_max = 16384;
> > >  		vdisplay_max = 8192;
> > > @@ -15791,6 +15792,41 @@ intel_mode_valid(struct drm_device *dev,
> > >  	return MODE_OK;
> > >  }
> > >  
> > > +enum drm_mode_status
> > > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > > +				const struct drm_display_mode *mode)
> > > +{
> > > +	int plane_width_max, plane_height_max;
> > > +
> > > +	/*
> > > +	 * intel_mode_valid() should be
> > > +	 * sufficient on older platforms.
> > > +	 */
> > > +	if (INTEL_GEN(dev_priv) < 9)
> > > +		return MODE_OK;
> > > +
> > > +	/*
> > > +	 * Most people will probably want a fullscreen
> > > +	 * plane so let's not advertize modes that are
> > > +	 * too big for that.
> > > +	 */
> > > +	if (INTEL_GEN(dev_priv) >= 11) {
> > > +		plane_width_max = 5120;
> > > +		plane_height_max = 4320;
> > > +	} else {
> > > +		plane_width_max = 5120;
> > > +		plane_height_max = 4096;
> > > +	}
> > > +
> > > +	if (mode->hdisplay > plane_width_max)
> > > +		return MODE_H_ILLEGAL;
> > > +
> > > +	if (mode->vdisplay > plane_height_max)
> > > +		return MODE_V_ILLEGAL;
> > > +
> > > +	return MODE_OK;
> > > +}
> > > +
> > >  static const struct drm_mode_config_funcs intel_mode_funcs = {
> > >  	.fb_create = intel_user_framebuffer_create,
> > >  	.get_format_info = intel_get_format_info,
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> > > index 66330fcb10d4..b1ae0e59c715 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.h
> > > @@ -32,6 +32,7 @@ enum link_m_n_set;
> > >  struct dpll;
> > >  struct drm_connector;
> > >  struct drm_device;
> > > +struct drm_display_mode;
> > >  struct drm_encoder;
> > >  struct drm_file;
> > >  struct drm_format_info;
> > > @@ -448,6 +449,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
> > >  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
> > >  			      u32 pixel_format, u64 modifier);
> > >  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> > > +enum drm_mode_status
> > > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > > +				const struct drm_display_mode *mode);
> > >  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
> > >  
> > >  void intel_plane_destroy(struct drm_plane *plane);
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index d09133a958e1..ccaf9f00b747 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
> > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > >  		return MODE_H_ILLEGAL;
> > >  
> > > -	return MODE_OK;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> > > index 5fec02aceaed..a2a937109a5a 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> > > @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
> > >  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> > >  					  struct drm_display_mode *mode)
> > >  {
> > > +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> > >  	struct intel_connector *intel_connector = to_intel_connector(connector);
> > >  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> > >  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> > > @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> > >  			return MODE_CLOCK_HIGH;
> > >  	}
> > >  
> > > -	return MODE_OK;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > index c500fc9154c8..dbc686515dce 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> > >  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
> > >  						       true, force_dvi);
> > >  	}
> > > +	if (status != MODE_OK)
> > > +		return status;
> > >  
> > > -	return status;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > -- 
> > > 2.21.0
> > > 
> > 
> > -- 
> > Sean Paul, Software Engineer, Google / Chromium OS
> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled (rev2)
  2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
                   ` (4 preceding siblings ...)
  2019-09-18 15:27 ` Sean Paul
@ 2019-09-18 16:33 ` Patchwork
  5 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-09-18 16:33 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled (rev2)
URL   : https://patchwork.freedesktop.org/series/66286/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6915 -> Patchwork_14446
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/

Known issues
------------

  Here are the changes found in Patchwork_14446 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_reloc@basic-gtt-cpu:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-cpu.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-cpu.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-guc:         [PASS][3] -> [INCOMPLETE][4] ([fdo#106070] / [fdo#111700])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html

  
#### Possible fixes ####

  * igt@gem_ctx_create@basic-files:
    - fi-bxt-dsi:         [INCOMPLETE][5] ([fdo#103927]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_mmap_gtt@basic-write-no-prefault:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u3/igt@gem_mmap_gtt@basic-write-no-prefault.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-icl-u3/igt@gem_mmap_gtt@basic-write-no-prefault.html

  * igt@i915_module_load@reload-with-fault-injection:
    - {fi-icl-u4}:        [DMESG-WARN][9] ([fdo#105602] / [fdo#106107] / [fdo#106350]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u4/igt@i915_module_load@reload-with-fault-injection.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-icl-u4/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][11] ([fdo#111096]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_psr@sprite_plane_onoff:
    - {fi-icl-u4}:        [DMESG-WARN][13] ([fdo#105602]) -> [PASS][14] +40 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u4/igt@kms_psr@sprite_plane_onoff.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/fi-icl-u4/igt@kms_psr@sprite_plane_onoff.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111155]: https://bugs.freedesktop.org/show_bug.cgi?id=111155
  [fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600
  [fdo#111700]: https://bugs.freedesktop.org/show_bug.cgi?id=111700


Participating hosts (56 -> 47)
------------------------------

  Missing    (9): fi-ilk-m540 fi-cml-h fi-skl-gvtdvm fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6915 -> Patchwork_14446

  CI-20190529: 20190529
  CI_DRM_6915: c72f7d5ea4386172247558b74c1f8012b35800b7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5190: 0e9510b83502af3e230870df2d66d4f68918d3a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14446: 23ba45a72b660153e72b02f2775578f0bc10f3aa @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

23ba45a72b66 drm/i915: Don't advertise modes that exceed the max plane size
03edb7dbcdc4 drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14446/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 16:02       ` Ville Syrjälä
  2019-09-18 16:27         ` Manasi Navare
@ 2019-09-18 20:21         ` Sean Paul
  2019-09-19 13:10           ` Ville Syrjälä
  1 sibling, 1 reply; 17+ messages in thread
From: Sean Paul @ 2019-09-18 20:21 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 07:02:18PM +0300, Ville Syrjälä wrote:
> On Wed, Sep 18, 2019 at 11:24:09AM -0400, Sean Paul wrote:
> > On Wed, Sep 18, 2019 at 06:07:07PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> > > planes' max resolution. This has the nasty implication that modes on the
> > > connectors' mode list may not be usable when the user asks for a
> > > fullscreen plane. Seeing as that is the most common use case it seems
> > > prudent to filter out modes that don't allow for fullscreen planes to
> > > be enabled.
> > > 
> > > Let's do that in the connetor .mode_valid() hook so that normally
> > > such modes are kept hidden but the user is still able to forcibly
> > > specify such a mode if they know they don't need fullscreen planes.
> > > 
> > > This is in line with ealier policies regarding certain clock limits.
> > > The idea is to prevent the casual user from encountering a mode that
> > > would fail under typical conditions, but allow the expert user to
> > > force things if they so wish.
> > 
> > Isn't this exactly what atomic_check is for? Why not just add a debug message in
> > get_max_plane_size to leave a breadcrumb?
> 
> There's already a debug message. Won't really help when the screen fails
> to light up automagically on account of the preferred mode being too
> big.

That's not the kernel's fault, why are we working around it at this level? There
are lots of reasons beyond max plane size that can cause a modeset to fail. If
userspace doesn't already have the smarts to fallback to a lower resolution on
modeset failure, we should fix it or just ¯\_(ツ)_/¯

Sean

> 
> > 
> > Sean
> > 
> > > 
> > > Maybe in the future we should consider automagically using two
> > > planes when one can't cover the entire screen? Wouldn't be a
> > > great match for the current uapi with explicit planes though,
> > > but I guess no worse than using two pipes (which we apparently
> > > have to in the future anyway). Either that or we'd have to
> > > teach userspace to do it for us.
> > > 
> > > v2: Fix icl+ max plane heigth (Manasi)
> > > 
> > > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > > Cc: Leho Kraav <leho@kraav.com>
> > > Cc: Sean Paul <sean@poorly.run>
> > > Cc: José Roberto de Souza <jose.souza@intel.com>
> > > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_display.c | 36 ++++++++++++++++++++
> > >  drivers/gpu/drm/i915/display/intel_display.h |  4 +++
> > >  drivers/gpu/drm/i915/display/intel_dp.c      |  2 +-
> > >  drivers/gpu/drm/i915/display/intel_dsi.c     |  3 +-
> > >  drivers/gpu/drm/i915/display/intel_hdmi.c    |  4 ++-
> > >  5 files changed, 46 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index f5e65e052d91..0147e4ae3622 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -15753,6 +15753,7 @@ intel_mode_valid(struct drm_device *dev,
> > >  			   DRM_MODE_FLAG_CLKDIV2))
> > >  		return MODE_BAD;
> > >  
> > > +	/* Transcoder timing limits */
> > >  	if (INTEL_GEN(dev_priv) >= 11) {
> > >  		hdisplay_max = 16384;
> > >  		vdisplay_max = 8192;
> > > @@ -15791,6 +15792,41 @@ intel_mode_valid(struct drm_device *dev,
> > >  	return MODE_OK;
> > >  }
> > >  
> > > +enum drm_mode_status
> > > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > > +				const struct drm_display_mode *mode)
> > > +{
> > > +	int plane_width_max, plane_height_max;
> > > +
> > > +	/*
> > > +	 * intel_mode_valid() should be
> > > +	 * sufficient on older platforms.
> > > +	 */
> > > +	if (INTEL_GEN(dev_priv) < 9)
> > > +		return MODE_OK;
> > > +
> > > +	/*
> > > +	 * Most people will probably want a fullscreen
> > > +	 * plane so let's not advertize modes that are
> > > +	 * too big for that.
> > > +	 */
> > > +	if (INTEL_GEN(dev_priv) >= 11) {
> > > +		plane_width_max = 5120;
> > > +		plane_height_max = 4320;
> > > +	} else {
> > > +		plane_width_max = 5120;
> > > +		plane_height_max = 4096;
> > > +	}
> > > +
> > > +	if (mode->hdisplay > plane_width_max)
> > > +		return MODE_H_ILLEGAL;
> > > +
> > > +	if (mode->vdisplay > plane_height_max)
> > > +		return MODE_V_ILLEGAL;
> > > +
> > > +	return MODE_OK;
> > > +}
> > > +
> > >  static const struct drm_mode_config_funcs intel_mode_funcs = {
> > >  	.fb_create = intel_user_framebuffer_create,
> > >  	.get_format_info = intel_get_format_info,
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> > > index 66330fcb10d4..b1ae0e59c715 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.h
> > > @@ -32,6 +32,7 @@ enum link_m_n_set;
> > >  struct dpll;
> > >  struct drm_connector;
> > >  struct drm_device;
> > > +struct drm_display_mode;
> > >  struct drm_encoder;
> > >  struct drm_file;
> > >  struct drm_format_info;
> > > @@ -448,6 +449,9 @@ void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
> > >  u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
> > >  			      u32 pixel_format, u64 modifier);
> > >  bool intel_plane_can_remap(const struct intel_plane_state *plane_state);
> > > +enum drm_mode_status
> > > +intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
> > > +				const struct drm_display_mode *mode);
> > >  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
> > >  
> > >  void intel_plane_destroy(struct drm_plane *plane);
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index d09133a958e1..ccaf9f00b747 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -562,7 +562,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
> > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > >  		return MODE_H_ILLEGAL;
> > >  
> > > -	return MODE_OK;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  u32 intel_dp_pack_aux(const u8 *src, int src_bytes)
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> > > index 5fec02aceaed..a2a937109a5a 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> > > @@ -55,6 +55,7 @@ int intel_dsi_get_modes(struct drm_connector *connector)
> > >  enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> > >  					  struct drm_display_mode *mode)
> > >  {
> > > +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> > >  	struct intel_connector *intel_connector = to_intel_connector(connector);
> > >  	const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> > >  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> > > @@ -73,7 +74,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
> > >  			return MODE_CLOCK_HIGH;
> > >  	}
> > >  
> > > -	return MODE_OK;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
> > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > index c500fc9154c8..dbc686515dce 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > > @@ -2188,8 +2188,10 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
> > >  			status = hdmi_port_clock_valid(hdmi, clock * 5 / 4,
> > >  						       true, force_dvi);
> > >  	}
> > > +	if (status != MODE_OK)
> > > +		return status;
> > >  
> > > -	return status;
> > > +	return intel_mode_valid_max_plane_size(dev_priv, mode);
> > >  }
> > >  
> > >  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > -- 
> > > 2.21.0
> > > 
> > 
> > -- 
> > Sean Paul, Software Engineer, Google / Chromium OS
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 15:07   ` [PATCH v2 " Ville Syrjala
  2019-09-18 15:24     ` Sean Paul
@ 2019-09-19  8:52     ` Maarten Lankhorst
  1 sibling, 0 replies; 17+ messages in thread
From: Maarten Lankhorst @ 2019-09-19  8:52 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx; +Cc: Leho Kraav

Op 18-09-2019 om 17:07 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> planes' max resolution. This has the nasty implication that modes on the
> connectors' mode list may not be usable when the user asks for a
> fullscreen plane. Seeing as that is the most common use case it seems
> prudent to filter out modes that don't allow for fullscreen planes to
> be enabled.
>
> Let's do that in the connetor .mode_valid() hook so that normally
> such modes are kept hidden but the user is still able to forcibly
> specify such a mode if they know they don't need fullscreen planes.
>
> This is in line with ealier policies regarding certain clock limits.
> The idea is to prevent the casual user from encountering a mode that
> would fail under typical conditions, but allow the expert user to
> force things if they so wish.
>
> Maybe in the future we should consider automagically using two
> planes when one can't cover the entire screen? Wouldn't be a
> great match for the current uapi with explicit planes though,
> but I guess no worse than using two pipes (which we apparently
> have to in the future anyway). Either that or we'd have to
> teach userspace to do it for us.

In theory this is what bigjoiner is doing, except the planes are on a different pipe.

Will be fun with SDR vs HDR planes though..

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/2] drm/i915: Don't advertise modes that exceed the max plane size
  2019-09-18 20:21         ` Sean Paul
@ 2019-09-19 13:10           ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-09-19 13:10 UTC (permalink / raw)
  To: Sean Paul; +Cc: Leho Kraav, intel-gfx

On Wed, Sep 18, 2019 at 04:21:06PM -0400, Sean Paul wrote:
> On Wed, Sep 18, 2019 at 07:02:18PM +0300, Ville Syrjälä wrote:
> > On Wed, Sep 18, 2019 at 11:24:09AM -0400, Sean Paul wrote:
> > > On Wed, Sep 18, 2019 at 06:07:07PM +0300, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
> > > > planes' max resolution. This has the nasty implication that modes on the
> > > > connectors' mode list may not be usable when the user asks for a
> > > > fullscreen plane. Seeing as that is the most common use case it seems
> > > > prudent to filter out modes that don't allow for fullscreen planes to
> > > > be enabled.
> > > > 
> > > > Let's do that in the connetor .mode_valid() hook so that normally
> > > > such modes are kept hidden but the user is still able to forcibly
> > > > specify such a mode if they know they don't need fullscreen planes.
> > > > 
> > > > This is in line with ealier policies regarding certain clock limits.
> > > > The idea is to prevent the casual user from encountering a mode that
> > > > would fail under typical conditions, but allow the expert user to
> > > > force things if they so wish.
> > > 
> > > Isn't this exactly what atomic_check is for? Why not just add a debug message in
> > > get_max_plane_size to leave a breadcrumb?
> > 
> > There's already a debug message. Won't really help when the screen fails
> > to light up automagically on account of the preferred mode being too
> > big.
> 
> That's not the kernel's fault, why are we working around it at this level? There
> are lots of reasons beyond max plane size that can cause a modeset to fail. If
> userspace doesn't already have the smarts to fallback to a lower resolution on
> modeset failure, we should fix it or just ¯\_(ツ)_/¯

Sure, userspace (and fb_helper) should be smarter about this.
Unfortunately I don't have a time machine to deploy such a backport
so this is the best I can do for current userspace.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-09-19 13:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 13:50 [PATCH 1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Ville Syrjala
2019-09-05 13:50 ` [PATCH 2/2] drm/i915: Don't advertise modes that exceed the max plane size Ville Syrjala
2019-09-18 14:08   ` Maarten Lankhorst
2019-09-18 14:28   ` Manasi Navare
2019-09-18 14:59     ` Ville Syrjälä
2019-09-18 15:07   ` [PATCH v2 " Ville Syrjala
2019-09-18 15:24     ` Sean Paul
2019-09-18 16:02       ` Ville Syrjälä
2019-09-18 16:27         ` Manasi Navare
2019-09-18 20:21         ` Sean Paul
2019-09-19 13:10           ` Ville Syrjälä
2019-09-19  8:52     ` Maarten Lankhorst
2019-09-05 15:35 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Patchwork
2019-09-05 19:38 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-18 14:09 ` [PATCH 1/2] " Maarten Lankhorst
2019-09-18 15:27 ` Sean Paul
2019-09-18 16:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled (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.