Skip to contentSkip to conversation

Enable bigjoiner support, second approach.

PATCH In review Maarten Lankhorst 4 participants 60 messages Oct 4, 2019 – Oct 14, 2019 Page 2 of 2

Subsystems (4)
lore
Share & tools
lore
author maintainer
#54 lore raw

PATCH 23/24 drm/i915: Add debugfs dumping for bigjoiner, v2.

In reply to Maarten Lankhorst

It's useful to know what the actual clipped state is, rather than the unclipped crtc properties.

This is useful when a plane is spread across 2 crtc's, where the slave crtc has no own plane properties but derives its clipped values from the master crtc.

Changes since v1:
- Report planar slaves as such, now that we have the plane_state switch.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 49 +++++++++++++++--------------
 1 file changed, 26 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +26 -23
index 7ce3ae1ec586..2a7fefdda96f 100644
@@ -2657,6 +2657,17 @@ static void plane_rotation(char *buf, size_t bufsize, unsigned int rotation)
 		 rotation);
 }
 
+static const char *plane_visibility(struct intel_plane_state *plane_state)
+{
+	if (plane_state->uapi.visible)
+		return "visible";
+
+	if (plane_state->planar_slave)
+		return "planar-slave";
+
+	return "hidden";
+}
+
 static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
 {
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
@@ -2664,42 +2675,29 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
 	struct intel_plane *intel_plane;
 
 	for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
-		struct drm_plane_state *state;
+		struct intel_plane_state *state;
 		struct drm_plane *plane = &intel_plane->base;
 		struct drm_format_name_buf format_name;
 		char rot_str[48];
 
-		if (!plane->state) {
-			seq_puts(m, "plane->state is NULL!\n");
-			continue;
-		}
-
-		state = plane->state;
+		state = to_intel_plane_state(plane->state);
 
-		if (state->fb) {
-			drm_get_format_name(state->fb->format->format,
+		if (state->hw.fb) {
+			drm_get_format_name(state->hw.fb->format->format,
 					    &format_name);
 		} else {
 			sprintf(format_name.str, "N/A");
 		}
 
-		plane_rotation(rot_str, sizeof(rot_str), state->rotation);
+		plane_rotation(rot_str, sizeof(rot_str), state->hw.rotation);
 
-		seq_printf(m, "\t--Plane id %d: type=%s, crtc_pos=%4dx%4d, crtc_size=%4dx%4d, src_pos=%d.%04ux%d.%04u, src_size=%d.%04ux%d.%04u, format=%s, rotation=%s\n",
+		seq_printf(m, "\t--Plane id %d: type=%s, %s, clipped crtc="DRM_RECT_FMT", clipped src="DRM_RECT_FP_FMT", format=%s, rotation=%s\n",
 			   plane->base.id,
 			   plane_type(intel_plane->base.type),
-			   state->crtc_x, state->crtc_y,
-			   state->crtc_w, state->crtc_h,
-			   (state->src_x >> 16),
-			   ((state->src_x & 0xffff) * 15625) >> 10,
-			   (state->src_y >> 16),
-			   ((state->src_y & 0xffff) * 15625) >> 10,
-			   (state->src_w >> 16),
-			   ((state->src_w & 0xffff) * 15625) >> 10,
-			   (state->src_h >> 16),
-			   ((state->src_h & 0xffff) * 15625) >> 10,
-			   format_name.str,
-			   rot_str);
+			   plane_visibility(state),
+			   DRM_RECT_ARG(&state->uapi.dst),
+			   DRM_RECT_FP_ARG(&state->uapi.src),
+			   format_name.str, rot_str);
 	}
 }
 
@@ -2755,6 +2753,11 @@ static int i915_display_info(struct seq_file *m, void *unused)
 			   yesno(pipe_config->hw.active),
 			   pipe_config->pipe_src_w, pipe_config->pipe_src_h,
 			   yesno(pipe_config->dither), pipe_config->pipe_bpp);
+		if (pipe_config->bigjoiner)
+			seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
+				   pipe_config->bigjoiner_linked_crtc->base.base.id,
+				   pipe_config->bigjoiner_linked_crtc->base.name,
+				   pipe_config->bigjoiner_slave ? "slave" : "master");
 
 		if (pipe_config->hw.active) {
 			struct intel_plane *cursor =
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#55 lore raw

PATCH 24/24 semi-hax: drm/i915: Always verify ddb allocation

In reply to Maarten Lankhorst

And only verify cursor allocation when cursor plane is active.

---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +3 -2
index 46e3e8296251..34c4a558a56b 100644
@@ -13369,7 +13369,7 @@ static void verify_wm_state(struct intel_crtc *crtc,
 	 * allocation. In that case since the ddb allocation will be updated
 	 * once the plane becomes visible, we can skip this check
 	 */
-	if (1) {
+	if (CURCNTR(pipe) & MCURSOR_MODE) {
 		struct skl_plane_wm *hw_plane_wm, *sw_plane_wm;
 
 		hw_plane_wm = &hw->wm.planes[PLANE_CURSOR];
@@ -13665,10 +13665,11 @@ intel_modeset_verify_crtc(struct intel_crtc *crtc,
 			  struct intel_crtc_state *old_crtc_state,
 			  struct intel_crtc_state *new_crtc_state)
 {
+	verify_wm_state(crtc, new_crtc_state);
+
 	if (!needs_modeset(new_crtc_state) && !new_crtc_state->update_pipe)
 		return;
 
-	verify_wm_state(crtc, new_crtc_state);
 	verify_connector_state(state, crtc);
 	verify_crtc_state(crtc, old_crtc_state, new_crtc_state);
 	verify_shared_dpll_state(crtc, old_crtc_state, new_crtc_state);
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#56 lore raw

PATCH 1/1 semi-hax: drm/i915: Always verify ddb allocation

And only verify cursor allocation when cursor plane is active.

---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +3 -2
index 46e3e8296251..6bdff08cf9c9 100644
@@ -13369,7 +13369,7 @@ static void verify_wm_state(struct intel_crtc *crtc,
 	 * allocation. In that case since the ddb allocation will be updated
 	 * once the plane becomes visible, we can skip this check
 	 */
-	if (1) {
+	if (I915_READ(CURCNTR(pipe)) & MCURSOR_MODE) {
 		struct skl_plane_wm *hw_plane_wm, *sw_plane_wm;
 
 		hw_plane_wm = &hw->wm.planes[PLANE_CURSOR];
@@ -13665,10 +13665,11 @@ intel_modeset_verify_crtc(struct intel_crtc *crtc,
 			  struct intel_crtc_state *old_crtc_state,
 			  struct intel_crtc_state *new_crtc_state)
 {
+	verify_wm_state(crtc, new_crtc_state);
+
 	if (!needs_modeset(new_crtc_state) && !new_crtc_state->update_pipe)
 		return;
 
-	verify_wm_state(crtc, new_crtc_state);
 	verify_connector_state(state, crtc);
 	verify_crtc_state(crtc, old_crtc_state, new_crtc_state);
 	verify_shared_dpll_state(crtc, old_crtc_state, new_crtc_state);
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#57 lore raw

✗ Fi.CI.BUILD: failure for Enable bigjoiner support, second approach.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: Enable bigjoiner support, second approach.
URL : https://patchwork.freedesktop.org/series/67590/
State : failure

== Summary ==

CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool

  CHK     include/generated/compile.h
  AR      drivers/gpu/drm/i915/built-in.a
  CC [M]  drivers/gpu/drm/i915/display/intel_display.o
drivers/gpu/drm/i915/display/intel_display.c: In function ‘verify_wm_state’:
drivers/gpu/drm/i915/display/intel_display.c:13372:20: error: invalid operands to binary & (have ‘i915_reg_t {aka const struct <anonymous>}’ and ‘int’)
  if (CURCNTR(pipe) & MCURSOR_MODE) {
                    ^

scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/i915/display/intel_display.o' failed make[4]: *** [drivers/gpu/drm/i915/display/intel_display.o] Error 1 scripts/Makefile.build:509: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:509: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:509: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1670: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#58 lore raw

✗ Fi.CI.BUILD: failure for Enable bigjoiner support, second approach. (rev2)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: Enable bigjoiner support, second approach. (rev2)
URL : https://patchwork.freedesktop.org/series/67590/
State : failure

== Summary ==

Applying: HAX to make DSC work on the icelake test system
Applying: drm/i915: Fix for_each_intel_plane_mask definition
Applying: drm/i915: Introduce and use intel_atomic_crtc_state_for_each_plane_state.
Applying: drm/i915: Remove cursor use of properties for coordinates
Applying: drm/i915: Use intel_plane_state in prepare and cleanup plane_fb Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_display.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_display.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0005 drm/i915: Use intel_plane_state in prepare and cleanup plane_fb When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#59 lore raw

✗ Fi.CI.BUILD: failure for Enable bigjoiner support, second approach. (rev3)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: Enable bigjoiner support, second approach. (rev3)
URL : https://patchwork.freedesktop.org/series/67590/
State : failure

== Summary ==

Applying: HAX to make DSC work on the icelake test system
Applying: drm/i915: Fix for_each_intel_plane_mask definition
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_display.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.h
No changes -- Patch already applied.
Applying: drm/i915: Introduce and use intel_atomic_crtc_state_for_each_plane_state. Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_display.h
M drivers/gpu/drm/i915/intel_pm.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_pm.c
No changes -- Patch already applied.
Applying: drm/i915: Remove cursor use of properties for coordinates Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_display.c
M drivers/gpu/drm/i915/intel_pm.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.c
No changes -- Patch already applied.
Applying: drm/i915: Use intel_plane_state in prepare and cleanup plane_fb Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_display.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_display.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0005 drm/i915: Use intel_plane_state in prepare and cleanup plane_fb When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx