Skip to contentSkip to conversation

drm/fb-helper: Move modesetting code to drm_client

PATCH Superseded Noralf Trønnes 3 participants 23 messages Apr 20, 2019 – Apr 24, 2019

Subsystems (3)

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v3 cover drm/fb-helper: Move modesetting code to drm_client

This moves the modesetting code from drm_fb_helper to drm_client so it can be shared by all internal clients.

Changes this time:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

Noralf.

Noralf Trønnes (11):
drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: Avoid race with DRM userspace drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc->{x,y,desired_mode} drm/fb-helper: Remove drm_fb_helper_crtc drm/fb-helper: Prepare to move out commit code drm/fb-helper: Move out commit code
drm/fb-helper: Remove drm_fb_helper_connector drm/fb-helper: Prepare to move out modeset config code drm/fb-helper: Move out modeset config code drm/client: Hack: Add bootsplash example

 Documentation/gpu/drm-client.rst     |    3 +
 Documentation/gpu/todo.rst           |   10 +
 drivers/gpu/drm/Kconfig              |    5 +
 drivers/gpu/drm/Makefile             |    3 +-
 drivers/gpu/drm/drm_atomic.c         |  168 ++++
 drivers/gpu/drm/drm_atomic_helper.c  |  164 ---
 drivers/gpu/drm/drm_auth.c           |   20 +
 drivers/gpu/drm/drm_bootsplash.c     |  362 +++++++
 drivers/gpu/drm/drm_client.c         |   17 +-
 drivers/gpu/drm/drm_client_modeset.c | 1085 ++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h  |    5 +
 drivers/gpu/drm/drm_drv.c            |    4 +
 drivers/gpu/drm/drm_fb_helper.c      | 1381 +++-----------------------
 drivers/gpu/drm/drm_internal.h       |    2 +
 include/drm/drm_atomic_helper.h      |    4 -
 include/drm/drm_client.h             |   49 +
 include/drm/drm_fb_helper.h          |  102 +-
 17 files changed, 1864 insertions(+), 1520 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_bootsplash.c
 create mode 100644 drivers/gpu/drm/drm_client_modeset.c
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH v3 1/11 drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko.

While at it, fix two checkpatch complaints:
- WARNING: Block comments use a trailing */ on a separate line
- CHECK: Alignment should match open parenthesis

---
 drivers/gpu/drm/drm_atomic.c        | 168 ++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_atomic_helper.c | 164 ---------------------------
 drivers/gpu/drm/drm_crtc_internal.h |   5 +
 include/drm/drm_atomic_helper.h     |   4 -
 4 files changed, 173 insertions(+), 168 deletions(-)
drivers/gpu/drm/drm_atomic.c +168 -0
index 5eb40130fafb..c3a9ffbf2310 100644
@@ -1130,6 +1130,174 @@ int drm_atomic_nonblocking_commit(struct drm_atomic_state *state)
 }
 EXPORT_SYMBOL(drm_atomic_nonblocking_commit);
 
+/* just used from drm-client and atomic-helper: */
+int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
+				      struct drm_plane_state *plane_state)
+{
+	int ret;
+
+	ret = drm_atomic_set_crtc_for_plane(plane_state, NULL);
+	if (ret != 0)
+		return ret;
+
+	drm_atomic_set_fb_for_plane(plane_state, NULL);
+	plane_state->crtc_x = 0;
+	plane_state->crtc_y = 0;
+	plane_state->crtc_w = 0;
+	plane_state->crtc_h = 0;
+	plane_state->src_x = 0;
+	plane_state->src_y = 0;
+	plane_state->src_w = 0;
+	plane_state->src_h = 0;
+
+	return 0;
+}
+EXPORT_SYMBOL(__drm_atomic_helper_disable_plane);
+
+static int update_output_state(struct drm_atomic_state *state,
+			       struct drm_mode_set *set)
+{
+	struct drm_device *dev = set->crtc->dev;
+	struct drm_crtc *crtc;
+	struct drm_crtc_state *new_crtc_state;
+	struct drm_connector *connector;
+	struct drm_connector_state *new_conn_state;
+	int ret, i;
+
+	ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
+			       state->acquire_ctx);
+	if (ret)
+		return ret;
+
+	/* First disable all connectors on the target crtc. */
+	ret = drm_atomic_add_affected_connectors(state, set->crtc);
+	if (ret)
+		return ret;
+
+	for_each_new_connector_in_state(state, connector, new_conn_state, i) {
+		if (new_conn_state->crtc == set->crtc) {
+			ret = drm_atomic_set_crtc_for_connector(new_conn_state,
+								NULL);
+			if (ret)
+				return ret;
+
+			/* Make sure legacy setCrtc always re-trains */
+			new_conn_state->link_status = DRM_LINK_STATUS_GOOD;
+		}
+	}
+
+	/* Then set all connectors from set->connectors on the target crtc */
+	for (i = 0; i < set->num_connectors; i++) {
+		new_conn_state = drm_atomic_get_connector_state(state,
+								set->connectors[i]);
+		if (IS_ERR(new_conn_state))
+			return PTR_ERR(new_conn_state);
+
+		ret = drm_atomic_set_crtc_for_connector(new_conn_state,
+							set->crtc);
+		if (ret)
+			return ret;
+	}
+
+	for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
+		/*
+		 * Don't update ->enable for the CRTC in the set_config request,
+		 * since a mismatch would indicate a bug in the upper layers.
+		 * The actual modeset code later on will catch any
+		 * inconsistencies here.
+		 */
+		if (crtc == set->crtc)
+			continue;
+
+		if (!new_crtc_state->connector_mask) {
+			ret = drm_atomic_set_mode_prop_for_crtc(new_crtc_state,
+								NULL);
+			if (ret < 0)
+				return ret;
+
+			new_crtc_state->active = false;
+		}
+	}
+
+	return 0;
+}
+
+/* just used from drm-client and atomic-helper: */
+int __drm_atomic_helper_set_config(struct drm_mode_set *set,
+				   struct drm_atomic_state *state)
+{
+	struct drm_crtc_state *crtc_state;
+	struct drm_plane_state *primary_state;
+	struct drm_crtc *crtc = set->crtc;
+	int hdisplay, vdisplay;
+	int ret;
+
+	crtc_state = drm_atomic_get_crtc_state(state, crtc);
+	if (IS_ERR(crtc_state))
+		return PTR_ERR(crtc_state);
+
+	primary_state = drm_atomic_get_plane_state(state, crtc->primary);
+	if (IS_ERR(primary_state))
+		return PTR_ERR(primary_state);
+
+	if (!set->mode) {
+		WARN_ON(set->fb);
+		WARN_ON(set->num_connectors);
+
+		ret = drm_atomic_set_mode_for_crtc(crtc_state, NULL);
+		if (ret != 0)
+			return ret;
+
+		crtc_state->active = false;
+
+		ret = drm_atomic_set_crtc_for_plane(primary_state, NULL);
+		if (ret != 0)
+			return ret;
+
+		drm_atomic_set_fb_for_plane(primary_state, NULL);
+
+		goto commit;
+	}
+
+	WARN_ON(!set->fb);
+	WARN_ON(!set->num_connectors);
+
+	ret = drm_atomic_set_mode_for_crtc(crtc_state, set->mode);
+	if (ret != 0)
+		return ret;
+
+	crtc_state->active = true;
+
+	ret = drm_atomic_set_crtc_for_plane(primary_state, crtc);
+	if (ret != 0)
+		return ret;
+
+	drm_mode_get_hv_timing(set->mode, &hdisplay, &vdisplay);
+
+	drm_atomic_set_fb_for_plane(primary_state, set->fb);
+	primary_state->crtc_x = 0;
+	primary_state->crtc_y = 0;
+	primary_state->crtc_w = hdisplay;
+	primary_state->crtc_h = vdisplay;
+	primary_state->src_x = set->x << 16;
+	primary_state->src_y = set->y << 16;
+	if (drm_rotation_90_or_270(primary_state->rotation)) {
+		primary_state->src_w = vdisplay << 16;
+		primary_state->src_h = hdisplay << 16;
+	} else {
+		primary_state->src_w = hdisplay << 16;
+		primary_state->src_h = vdisplay << 16;
+	}
+
+commit:
+	ret = update_output_state(state, set);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+EXPORT_SYMBOL(__drm_atomic_helper_set_config);
+
 void drm_atomic_print_state(const struct drm_atomic_state *state)
 {
 	struct drm_printer p = drm_info_printer(state->dev->dev);
drivers/gpu/drm/drm_atomic_helper.c +0 -164

176 lines not on this page · raw message

drivers/gpu/drm/drm_crtc_internal.h +5 -0
index 216f2a9ee3d4..22a63a544ec7 100644
@@ -207,6 +207,11 @@ struct drm_minor;
 int drm_atomic_debugfs_init(struct drm_minor *minor);
 #endif
 
+int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
+				      struct drm_plane_state *plane_state);
+int __drm_atomic_helper_set_config(struct drm_mode_set *set,
+				   struct drm_atomic_state *state);
+
 void drm_atomic_print_state(const struct drm_atomic_state *state);
 
 /* drm_atomic_uapi.c */
include/drm/drm_atomic_helper.h +0 -4
index 58214be3bf3d..bf4e07141d81 100644
@@ -117,12 +117,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane,
 				   struct drm_modeset_acquire_ctx *ctx);
 int drm_atomic_helper_disable_plane(struct drm_plane *plane,
 				    struct drm_modeset_acquire_ctx *ctx);
-int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
-		struct drm_plane_state *plane_state);
 int drm_atomic_helper_set_config(struct drm_mode_set *set,
 				 struct drm_modeset_acquire_ctx *ctx);
-int __drm_atomic_helper_set_config(struct drm_mode_set *set,
-		struct drm_atomic_state *state);
 
 int drm_atomic_helper_disable_all(struct drm_device *dev,
 				  struct drm_modeset_acquire_ctx *ctx);
Signature · 6 lines
2.20.1

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

PATCH v3 2/11 drm/fb-helper: Avoid race with DRM userspace

In reply to Noralf Trønnes

drm_fb_helper_is_bound() is used to check if DRM userspace is in control. This is done by looking at the fb on the primary plane. By the time fb-helper gets around to committing, it's possible that the facts have changed.

Avoid this race by holding the drm_device->master_mutex lock while committing. When DRM userspace does its first open, it will now wait until fb-helper is done. The helper will stay away if there's a master.

Locking rule: Always take the fb-helper lock first.

v2:
- Remove drm_fb_helper_is_bound() (Daniel Vetter)
- No need to check fb_helper->dev->master in drm_fb_helper_single_fb_probe(), restore_fbdev_mode() has the check.

---
 drivers/gpu/drm/drm_auth.c      | 20 ++++++++
 drivers/gpu/drm/drm_fb_helper.c | 90 ++++++++++++++++-----------------
 drivers/gpu/drm/drm_internal.h  |  2 +
 3 files changed, 67 insertions(+), 45 deletions(-)
drivers/gpu/drm/drm_auth.c +20 -0
index 1669c42c40ed..db199807b7dc 100644
@@ -368,3 +368,23 @@ void drm_master_put(struct drm_master **master)
 	*master = NULL;
 }
 EXPORT_SYMBOL(drm_master_put);
+
+/* Used by drm_client and drm_fb_helper */
+bool drm_master_internal_acquire(struct drm_device *dev)
+{
+	mutex_lock(&dev->master_mutex);
+	if (dev->master) {
+		mutex_unlock(&dev->master_mutex);
+		return false;
+	}
+
+	return true;
+}
+EXPORT_SYMBOL(drm_master_internal_acquire);
+
+/* Used by drm_client and drm_fb_helper */
+void drm_master_internal_release(struct drm_device *dev)
+{
+	mutex_unlock(&dev->master_mutex);
+}
+EXPORT_SYMBOL(drm_master_internal_release);
drivers/gpu/drm/drm_fb_helper.c +45 -45

210 lines not on this page · raw message

drivers/gpu/drm/drm_internal.h +2 -0
index d9a483a5fce0..3ee97c9998a2 100644
@@ -91,6 +91,8 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
 			 struct drm_file *file_priv);
 int drm_master_open(struct drm_file *file_priv);
 void drm_master_release(struct drm_file *file_priv);
+bool drm_master_internal_acquire(struct drm_device *dev);
+void drm_master_internal_release(struct drm_device *dev);
 
 /* drm_sysfs.c */
 extern struct class *drm_class;
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH v3 3/11 drm/fb-helper: No need to cache rotation and sw_rotations

In reply to Noralf Trønnes

Getting rotation info is cheap so we can do it on demand.

This is done in preparation for the removal of struct drm_fb_helper_crtc.

---
 drivers/gpu/drm/drm_fb_helper.c | 131 ++++++++++++++++----------------
 include/drm/drm_fb_helper.h     |   8 --
 2 files changed, 65 insertions(+), 74 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +65 -66
index 578428461391..1c70ecb84738 100644
@@ -388,6 +388,49 @@ int drm_fb_helper_debug_leave(struct fb_info *info)
 }
 EXPORT_SYMBOL(drm_fb_helper_debug_leave);
 
+/* Check if the plane can hw rotate to match panel orientation */
+static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset,
+					 unsigned int *rotation)
+{
+	struct drm_connector *connector = modeset->connectors[0];
+	struct drm_plane *plane = modeset->crtc->primary;
+	u64 valid_mask = 0;
+	unsigned int i;
+
+	if (!modeset->num_connectors)
+		return false;
+
+	switch (connector->display_info.panel_orientation) {
+	case DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP:
+		*rotation = DRM_MODE_ROTATE_180;
+		break;
+	case DRM_MODE_PANEL_ORIENTATION_LEFT_UP:
+		*rotation = DRM_MODE_ROTATE_90;
+		break;
+	case DRM_MODE_PANEL_ORIENTATION_RIGHT_UP:
+		*rotation = DRM_MODE_ROTATE_270;
+		break;
+	default:
+		*rotation = DRM_MODE_ROTATE_0;
+	}
+
+	/*
+	 * TODO: support 90 / 270 degree hardware rotation,
+	 * depending on the hardware this may require the framebuffer
+	 * to be in a specific tiling format.
+	 */
+	if (*rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property)
+		return false;
+
+	for (i = 0; i < plane->rotation_property->num_values; i++)
+		valid_mask |= (1ULL << plane->rotation_property->values[i]);
+
+	if (!(*rotation & valid_mask))
+		return false;
+
+	return true;
+}
+
 static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool active)
 {
 	struct drm_device *dev = fb_helper->dev;
@@ -428,10 +471,13 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ
 	for (i = 0; i < fb_helper->crtc_count; i++) {
 		struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
 		struct drm_plane *primary = mode_set->crtc->primary;
+		unsigned int rotation;
 
-		/* Cannot fail as we've already gotten the plane state above */
-		plane_state = drm_atomic_get_new_plane_state(state, primary);
-		plane_state->rotation = fb_helper->crtc_info[i].rotation;
+		if (drm_fb_helper_panel_rotation(mode_set, &rotation)) {
+			/* Cannot fail as we've already gotten the plane state above */
+			plane_state = drm_atomic_get_new_plane_state(state, primary);
+			plane_state->rotation = rotation;
+		}
 
 		ret = __drm_atomic_helper_set_config(mode_set, state);
 		if (ret != 0)
@@ -871,7 +917,6 @@ int drm_fb_helper_init(struct drm_device *dev,
 		if (!fb_helper->crtc_info[i].mode_set.connectors)
 			goto out_free;
 		fb_helper->crtc_info[i].mode_set.num_connectors = 0;
-		fb_helper->crtc_info[i].rotation = DRM_MODE_ROTATE_0;
 	}
 
 	i = 0;
@@ -2500,62 +2545,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
 	return best_score;
 }
 
-/*
- * This function checks if rotation is necessary because of panel orientation
- * and if it is, if it is supported.
- * If rotation is necessary and supported, it gets set in fb_crtc.rotation.
- * If rotation is necessary but not supported, a DRM_MODE_ROTATE_* flag gets
- * or-ed into fb_helper->sw_rotations. In drm_setup_crtcs_fb() we check if only
- * one bit is set and then we set fb_info.fbcon_rotate_hint to make fbcon do
- * the unsupported rotation.
- */
-static void drm_setup_crtc_rotation(struct drm_fb_helper *fb_helper,
-				    struct drm_fb_helper_crtc *fb_crtc,
-				    struct drm_connector *connector)
-{
-	struct drm_plane *plane = fb_crtc->mode_set.crtc->primary;
-	uint64_t valid_mask = 0;
-	int i, rotation;
-
-	fb_crtc->rotation = DRM_MODE_ROTATE_0;
-
-	switch (connector->display_info.panel_orientation) {
-	case DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP:
-		rotation = DRM_MODE_ROTATE_180;
-		break;
-	case DRM_MODE_PANEL_ORIENTATION_LEFT_UP:
-		rotation = DRM_MODE_ROTATE_90;
-		break;
-	case DRM_MODE_PANEL_ORIENTATION_RIGHT_UP:
-		rotation = DRM_MODE_ROTATE_270;
-		break;
-	default:
-		rotation = DRM_MODE_ROTATE_0;
-	}
-
-	/*
-	 * TODO: support 90 / 270 degree hardware rotation,
-	 * depending on the hardware this may require the framebuffer
-	 * to be in a specific tiling format.
-	 */
-	if (rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property) {
-		fb_helper->sw_rotations |= rotation;
-		return;
-	}
-
-	for (i = 0; i < plane->rotation_property->num_values; i++)
-		valid_mask |= (1ULL << plane->rotation_property->values[i]);
-
-	if (!(rotation & valid_mask)) {
-		fb_helper->sw_rotations |= rotation;
-		return;
-	}
-
-	fb_crtc->rotation = rotation;
-	/* Rotating in hardware, fbcon should not rotate */
-	fb_helper->sw_rotations |= DRM_MODE_ROTATE_0;
-}
-
 static struct drm_fb_helper_crtc *
 drm_fb_helper_crtc(struct drm_fb_helper *fb_helper, struct drm_crtc *crtc)
 {
@@ -2801,7 +2790,6 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 		drm_fb_helper_modeset_release(fb_helper,
 					      &fb_helper->crtc_info[i].mode_set);
 
-	fb_helper->sw_rotations = 0;
 	drm_fb_helper_for_each_connector(fb_helper, i) {
 		struct drm_display_mode *mode = modes[i];
 		struct drm_fb_helper_crtc *fb_crtc = crtcs[i];
@@ -2821,7 +2809,6 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 			modeset->mode = drm_mode_duplicate(dev,
 							   fb_crtc->desired_mode);
 			drm_connector_get(connector);
-			drm_setup_crtc_rotation(fb_helper, fb_crtc, connector);
 			modeset->connectors[modeset->num_connectors++] = connector;
 			modeset->x = offset->x;
 			modeset->y = offset->y;
@@ -2844,11 +2831,23 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 static void drm_setup_crtcs_fb(struct drm_fb_helper *fb_helper)
 {
 	struct fb_info *info = fb_helper->fbdev;
+	unsigned int rotation, sw_rotations = 0;
 	int i;
 
-	for (i = 0; i < fb_helper->crtc_count; i++)
-		if (fb_helper->crtc_info[i].mode_set.num_connectors)
-			fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb;
+	for (i = 0; i < fb_helper->crtc_count; i++) {
+		struct drm_mode_set *modeset = &fb_helper->crtc_info[i].mode_set;
+
+		if (!modeset->num_connectors)
+			continue;
+
+		modeset->fb = fb_helper->fb;
+
+		if (drm_fb_helper_panel_rotation(modeset, &rotation))
+			/* Rotating in hardware, fbcon should not rotate */
+			sw_rotations |= DRM_MODE_ROTATE_0;
+		else
+			sw_rotations |= rotation;
+	}
 
 	mutex_lock(&fb_helper->dev->mode_config.mutex);
 	drm_fb_helper_for_each_connector(fb_helper, i) {
@@ -2864,7 +2863,7 @@ static void drm_setup_crtcs_fb(struct drm_fb_helper *fb_helper)
 	}
 	mutex_unlock(&fb_helper->dev->mode_config.mutex);
 
-	switch (fb_helper->sw_rotations) {
+	switch (sw_rotations) {
 	case DRM_MODE_ROTATE_0:
 		info->fbcon_rotate_hint = FB_ROTATE_UR;
 		break;
include/drm/drm_fb_helper.h +0 -8
index 40af2866c26a..b0a14aef2e39 100644
@@ -51,7 +51,6 @@ struct drm_fb_helper_crtc {
 	struct drm_mode_set mode_set;
 	struct drm_display_mode *desired_mode;
 	int x, y;
-	int rotation;
 };
 
 /**
@@ -151,13 +150,6 @@ struct drm_fb_helper {
 	struct drm_fb_helper_crtc *crtc_info;
 	int connector_count;
 	int connector_info_alloc_count;
-	/**
-	 * @sw_rotations:
-	 * Bitmask of all rotations requested for panel-orientation which
-	 * could not be handled in hardware. If only one bit is set
-	 * fbdev->fbcon_rotate_hint gets set to the requested rotation.
-	 */
-	int sw_rotations;
 	/**
 	 * @connector_info:
 	 *
Signature · 6 lines
2.20.1

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

PATCH v3 4/11 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}

In reply to Noralf Trønnes

The values are already present in the modeset.

This is done in preparation for the removal of struct drm_fb_helper_crtc.

---
 drivers/gpu/drm/drm_fb_helper.c | 12 ++++--------
 include/drm/drm_fb_helper.h     |  2 --
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +4 -8
index 1c70ecb84738..61f0b01e394e 100644
@@ -2021,16 +2021,16 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 		 */
 		bool lastv = true, lasth = true;
 
-		desired_mode = fb_helper->crtc_info[i].desired_mode;
 		mode_set = &fb_helper->crtc_info[i].mode_set;
+		desired_mode = mode_set->mode;
 
 		if (!desired_mode)
 			continue;
 
 		crtc_count++;
 
-		x = fb_helper->crtc_info[i].x;
-		y = fb_helper->crtc_info[i].y;
+		x = mode_set->x;
+		y = mode_set->y;
 
 		sizes.surface_width  = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width);
 		sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height);
@@ -2803,11 +2803,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 			DRM_DEBUG_KMS("desired mode %s set on crtc %d (%d,%d)\n",
 				      mode->name, fb_crtc->mode_set.crtc->base.id, offset->x, offset->y);
 
-			fb_crtc->desired_mode = mode;
-			fb_crtc->x = offset->x;
-			fb_crtc->y = offset->y;
-			modeset->mode = drm_mode_duplicate(dev,
-							   fb_crtc->desired_mode);
+			modeset->mode = drm_mode_duplicate(dev, mode);
 			drm_connector_get(connector);
 			modeset->connectors[modeset->num_connectors++] = connector;
 			modeset->x = offset->x;
include/drm/drm_fb_helper.h +0 -2
index b0a14aef2e39..2af1c6d3e147 100644
@@ -49,8 +49,6 @@ struct drm_fb_offset {
 
 struct drm_fb_helper_crtc {
 	struct drm_mode_set mode_set;
-	struct drm_display_mode *desired_mode;
-	int x, y;
 };
 
 /**
Signature · 6 lines
2.20.1

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

PATCH v3 5/11 drm/fb-helper: Remove drm_fb_helper_crtc

In reply to Noralf Trønnes

It now only contains the modeset so use that directly instead and attach a modeset array to drm_client_dev. drm_fb_helper will use this array. Code will later be moved to drm_client, so add code there in a new file drm_client_modeset.c with MIT license to match drm_fb_helper.c.

The modeset connector array size is hardcoded for the cloned case to avoid having to pass in a value from the driver. A value of 8 is chosen to err on the safe side. This means that the max connector argument for drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore, a todo entry for this is added.

In pan_display_atomic() restore_fbdev_mode_force() is used instead of restore_fbdev_mode_atomic() because that one will later become internal to drm_client_modeset.

Locking order:
1. drm_fb_helper->lock
2. drm_master_internal_acquire
3. drm_client_dev->modeset_mutex

v3:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

v2:
- Add modesets array to drm_client (Daniel Vetter)
- Use a new file for the modeset code (Daniel Vetter)
- File has to be MIT licensed (Emmanuel Vadot)
- Add copyrights from drm_fb_helper.c

---
 Documentation/gpu/drm-client.rst     |   3 +
 Documentation/gpu/todo.rst           |   7 +
 drivers/gpu/drm/Makefile             |   2 +-
 drivers/gpu/drm/drm_client.c         |  10 +-
 drivers/gpu/drm/drm_client_modeset.c | 104 +++++++++
 drivers/gpu/drm/drm_fb_helper.c      | 301 +++++++++++----------------
 include/drm/drm_client.h             |  30 +++
 include/drm/drm_fb_helper.h          |   8 -
 8 files changed, 278 insertions(+), 187 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_client_modeset.c
Documentation/gpu/drm-client.rst +3 -0
index 7e672063e7eb..58b5a1d1219d 100644
@@ -10,3 +10,6 @@ Kernel clients
 
 .. kernel-doc:: drivers/gpu/drm/drm_client.c
    :export:
+
+.. kernel-doc:: drivers/gpu/drm/drm_client_modeset.c
+   :export:
Documentation/gpu/todo.rst +7 -0
index 1528ad2d598b..8fa08b5feab7 100644
@@ -300,6 +300,13 @@ it to use drm_mode_hsync() instead.
 
 Contact: Sean Paul
 
+drm_fb_helper cleanup tasks
+---------------------------
+
+- The max connector argument for drm_fb_helper_init() and
+  drm_fb_helper_fbdev_setup() isn't used anymore and can be removed.
+
+
 Core refactorings
 =================
 
drivers/gpu/drm/Makefile +1 -1
index 3d0c75cd687c..228ac9e3b645 100644
@@ -19,7 +19,7 @@ drm-y       :=	drm_auth.o drm_bufs.o drm_cache.o \
 		drm_plane.o drm_color_mgmt.o drm_print.o \
 		drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \
 		drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
-		drm_atomic_uapi.o
+		drm_client_modeset.o drm_atomic_uapi.o
 
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
 drm-$(CONFIG_DRM_VM) += drm_vm.o
drivers/gpu/drm/drm_client.c +8 -2
index f20d1dda3961..3dd08c6b264d 100644
@@ -27,7 +27,6 @@
  * DOC: overview
  *
  * This library provides support for clients running in the kernel like fbdev and bootsplash.
- * Currently it's only partially implemented, just enough to support fbdev.
  *
  * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported.
  */
@@ -92,14 +91,20 @@ int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
 	client->name = name;
 	client->funcs = funcs;
 
-	ret = drm_client_open(client);
+	ret = drm_client_modeset_create(client);
 	if (ret)
 		goto err_put_module;
 
+	ret = drm_client_open(client);
+	if (ret)
+		goto err_free;
+
 	drm_dev_get(dev);
 
 	return 0;
 
+err_free:
+	drm_client_modeset_free(client);
 err_put_module:
 	if (funcs)
 		module_put(funcs->owner);
@@ -148,6 +153,7 @@ void drm_client_release(struct drm_client_dev *client)
 
 	DRM_DEV_DEBUG_KMS(dev->dev, "%s\n", client->name);
 
+	drm_client_modeset_free(client);
 	drm_client_close(client);
 	drm_dev_put(dev);
 	if (client->funcs)
drivers/gpu/drm/drm_client_modeset.c new file +104 -0

104 lines not on this page · raw message

drivers/gpu/drm/drm_fb_helper.c +125 -176

715 lines not on this page · raw message

include/drm/drm_client.h +30 -0
index 268b2cf0052a..87be9aeb1fe0 100644
@@ -3,8 +3,12 @@
 #ifndef _DRM_CLIENT_H_
 #define _DRM_CLIENT_H_
 
+#include <linux/lockdep.h>
+#include <linux/mutex.h>
 #include <linux/types.h>
 
+#include <drm/drm_crtc.h>
+
 struct drm_client_dev;
 struct drm_device;
 struct drm_file;
@@ -13,6 +17,8 @@ struct drm_gem_object;
 struct drm_minor;
 struct module;
 
+#define DRM_CLIENT_MAX_CLONED_CONNECTORS	8
+
 /**
  * struct drm_client_funcs - DRM client callbacks
  */
@@ -85,6 +91,16 @@ struct drm_client_dev {
 	 * @file: DRM file
 	 */
 	struct drm_file *file;
+
+	/**
+	 * @modeset_mutex: Protects @modesets.
+	 */
+	struct mutex modeset_mutex;
+
+	/**
+	 * @modesets: CRTC configurations
+	 */
+	struct drm_mode_set *modesets;
 };
 
 int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
@@ -135,6 +151,20 @@ struct drm_client_buffer *
 drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format);
 void drm_client_framebuffer_delete(struct drm_client_buffer *buffer);
 
+int drm_client_modeset_create(struct drm_client_dev *client);
+void drm_client_modeset_free(struct drm_client_dev *client);
+void drm_client_modeset_release(struct drm_client_dev *client);
+struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc);
+
+/**
+ * drm_client_for_each_modeset() - Iterate over client modesets
+ * @modeset: &drm_mode_set loop cursor
+ * @client: DRM client
+ */
+#define drm_client_for_each_modeset(modeset, client) \
+	for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
+	     modeset = (client)->modesets; modeset->crtc; modeset++)
+
 int drm_client_debugfs_init(struct drm_minor *minor);
 
 #endif
include/drm/drm_fb_helper.h +0 -8
index 2af1c6d3e147..6b334f4d8a22 100644
@@ -47,10 +47,6 @@ struct drm_fb_offset {
 	int x, y;
 };
 
-struct drm_fb_helper_crtc {
-	struct drm_mode_set mode_set;
-};
-
 /**
  * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size
  * @fb_width: fbdev width
@@ -109,8 +105,6 @@ struct drm_fb_helper_connector {
  * struct drm_fb_helper - main structure to emulate fbdev on top of KMS
  * @fb: Scanout framebuffer object
  * @dev: DRM device
- * @crtc_count: number of possible CRTCs
- * @crtc_info: per-CRTC helper state (mode, x/y offset, etc)
  * @connector_count: number of connected connectors
  * @connector_info_alloc_count: size of connector_info
  * @funcs: driver callbacks for fb helper
@@ -144,8 +138,6 @@ struct drm_fb_helper {
 
 	struct drm_framebuffer *fb;
 	struct drm_device *dev;
-	int crtc_count;
-	struct drm_fb_helper_crtc *crtc_info;
 	int connector_count;
 	int connector_info_alloc_count;
 	/**
Signature · 6 lines
2.20.1

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

PATCH v3 6/11 drm/fb-helper: Prepare to move out commit code

In reply to Noralf Trønnes

This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review.

---
 drivers/gpu/drm/drm_fb_helper.c | 122 +++++++++++++++++++++-----------
 1 file changed, 81 insertions(+), 41 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +81 -41
index 041ca7461b81..c6ab50810906 100644
@@ -388,9 +388,20 @@ int drm_fb_helper_debug_leave(struct fb_info *info)
 }
 EXPORT_SYMBOL(drm_fb_helper_debug_leave);
 
-/* Check if the plane can hw rotate to match panel orientation */
-static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset,
-					 unsigned int *rotation)
+/**
+ * drm_client_panel_rotation() - Check panel orientation
+ * @modeset: DRM modeset
+ * @rotation: Returned rotation value
+ *
+ * This function checks if the primary plane in @modeset can hw rotate to match
+ * the panel orientation on its connector.
+ *
+ * Note: Currently only 0 and 180 degrees are supported.
+ *
+ * Return:
+ * True if the plane can do the rotation, false otherwise.
+ */
+bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
 {
 	struct drm_connector *connector = modeset->connectors[0];
 	struct drm_plane *plane = modeset->crtc->primary;
@@ -431,10 +442,9 @@ static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset,
 	return true;
 }
 
-static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool active)
+static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active)
 {
-	struct drm_client_dev *client = &fb_helper->client;
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	struct drm_plane_state *plane_state;
 	struct drm_plane *plane;
 	struct drm_atomic_state *state;
@@ -474,7 +484,7 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ
 		struct drm_plane *primary = mode_set->crtc->primary;
 		unsigned int rotation;
 
-		if (drm_fb_helper_panel_rotation(mode_set, &rotation)) {
+		if (drm_client_panel_rotation(mode_set, &rotation)) {
 			/* Cannot fail as we've already gotten the plane state above */
 			plane_state = drm_atomic_get_new_plane_state(state, primary);
 			plane_state->rotation = rotation;
@@ -516,15 +526,14 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ
 	goto retry;
 }
 
-static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)
+static int drm_client_modeset_commit_legacy(struct drm_client_dev *client)
 {
-	struct drm_client_dev *client = &fb_helper->client;
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	struct drm_mode_set *mode_set;
 	struct drm_plane *plane;
 	int ret = 0;
 
-	drm_modeset_lock_all(fb_helper->dev);
+	drm_modeset_lock_all(dev);
 	drm_for_each_plane(plane, dev) {
 		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
 			drm_plane_force_disable(plane);
@@ -553,35 +562,53 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper)
 			goto out;
 	}
 out:
-	drm_modeset_unlock_all(fb_helper->dev);
+	drm_modeset_unlock_all(dev);
 
 	return ret;
 }
 
-static int restore_fbdev_mode_force(struct drm_fb_helper *fb_helper)
+/**
+ * drm_client_modeset_commit_force() - Force commit CRTC configuration
+ * @client: DRM client
+ *
+ * Commit modeset configuration to crtcs without checking if there is a DRM master.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_commit_force(struct drm_client_dev *client)
 {
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	int ret;
 
-	mutex_lock(&fb_helper->client.modeset_mutex);
+	mutex_lock(&client->modeset_mutex);
 	if (drm_drv_uses_atomic_modeset(dev))
-		ret = restore_fbdev_mode_atomic(fb_helper, true);
+		ret = drm_client_modeset_commit_atomic(client, true);
 	else
-		ret = restore_fbdev_mode_legacy(fb_helper);
-	mutex_unlock(&fb_helper->client.modeset_mutex);
+		ret = drm_client_modeset_commit_legacy(client);
+	mutex_unlock(&client->modeset_mutex);
 
 	return ret;
 }
 
-static int restore_fbdev_mode(struct drm_fb_helper *fb_helper)
+/**
+ * drm_client_modeset_commit() - Commit CRTC configuration
+ * @client: DRM client
+ *
+ * Commit modeset configuration to crtcs.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_commit(struct drm_client_dev *client)
 {
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	int ret;
 
 	if (!drm_master_internal_acquire(dev))
 		return -EBUSY;
 
-	ret = restore_fbdev_mode_force(fb_helper);
+	ret = drm_client_modeset_commit_force(client);
 
 	drm_master_internal_release(dev);
 
@@ -611,7 +638,7 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
 		return 0;
 
 	mutex_lock(&fb_helper->lock);
-	ret = restore_fbdev_mode(fb_helper);
+	ret = drm_client_modeset_commit(&fb_helper->client);
 
 	do_delayed = fb_helper->delayed_hotplug;
 	if (do_delayed)
@@ -645,7 +672,7 @@ static bool drm_fb_helper_force_kernel_mode(void)
 			continue;
 
 		mutex_lock(&helper->lock);
-		ret = restore_fbdev_mode_force(helper);
+		ret = drm_client_modeset_commit_force(&helper->client);
 		if (ret)
 			error = true;
 		mutex_unlock(&helper->lock);
@@ -677,10 +704,9 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = {
 static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { };
 #endif
 
-static void dpms_legacy(struct drm_fb_helper *fb_helper, int dpms_mode)
+static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dpms_mode)
 {
-	struct drm_client_dev *client = &fb_helper->client;
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	struct drm_connector *connector;
 	struct drm_mode_set *modeset;
 	int j;
@@ -700,28 +726,42 @@ static void dpms_legacy(struct drm_fb_helper *fb_helper, int dpms_mode)
 	drm_modeset_unlock_all(dev);
 }
 
-static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
+/**
+ * drm_client_modeset_dpms() - Set DPMS mode
+ * @client: DRM client
+ * @mode: DPMS mode
+ *
+ * Note: For atomic drivers @mode is reduced to on/off.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_dpms(struct drm_client_dev *client, int mode)
 {
-	struct drm_fb_helper *fb_helper = info->par;
-	struct drm_client_dev *client = &fb_helper->client;
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
+	int ret = 0;
 
-	/*
-	 * For each CRTC in this fb, turn the connectors on/off.
-	 */
-	mutex_lock(&fb_helper->lock);
 	if (!drm_master_internal_acquire(dev))
-		goto unlock;
+		return -EBUSY;
 
 	mutex_lock(&client->modeset_mutex);
 	if (drm_drv_uses_atomic_modeset(dev))
-		restore_fbdev_mode_atomic(fb_helper, dpms_mode == DRM_MODE_DPMS_ON);
+		ret = drm_client_modeset_commit_atomic(client, mode == DRM_MODE_DPMS_ON);
 	else
-		dpms_legacy(fb_helper, dpms_mode);
+		drm_client_modeset_dpms_legacy(client, mode);
 	mutex_unlock(&client->modeset_mutex);
 
 	drm_master_internal_release(dev);
-unlock:
+
+	return ret;
+}
+
+static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
+{
+	struct drm_fb_helper *fb_helper = info->par;
+
+	mutex_lock(&fb_helper->lock);
+	drm_client_modeset_dpms(&fb_helper->client, dpms_mode);
 	mutex_unlock(&fb_helper->lock);
 }
 
@@ -1795,7 +1835,7 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
 
 	pan_set(fb_helper, var->xoffset, var->yoffset);
 
-	ret = restore_fbdev_mode_force(fb_helper);
+	ret = drm_client_modeset_commit_force(&fb_helper->client);
 	if (!ret) {
 		info->var.xoffset = var->xoffset;
 		info->var.yoffset = var->yoffset;
@@ -2021,7 +2061,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 
 		/* First time: disable all crtc's.. */
 		if (!fb_helper->deferred_setup)
-			restore_fbdev_mode(fb_helper);
+			drm_client_modeset_commit(client);
 		return -EAGAIN;
 	}
 
@@ -2794,7 +2834,7 @@ static void drm_setup_crtcs_fb(struct drm_fb_helper *fb_helper)
 
 		modeset->fb = fb_helper->fb;
 
-		if (drm_fb_helper_panel_rotation(modeset, &rotation))
+		if (drm_client_panel_rotation(modeset, &rotation))
 			/* Rotating in hardware, fbcon should not rotate */
 			sw_rotations |= DRM_MODE_ROTATE_0;
 		else
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

PATCH v3 7/11 drm/fb-helper: Move out commit code

In reply to Noralf Trønnes

Move the modeset commit code to drm_client_modeset. No changes except exporting API.

v2: Move to drm_client_modeset.c instead of drm_client.c

---
 drivers/gpu/drm/drm_client_modeset.c | 287 +++++++++++++++++++++++++++
 drivers/gpu/drm/drm_fb_helper.c      | 282 --------------------------
 include/drm/drm_client.h             |   4 +
 3 files changed, 291 insertions(+), 282 deletions(-)
drivers/gpu/drm/drm_client_modeset.c +287 -0
index 66770ed3299e..b2aedec65637 100644
@@ -11,9 +11,14 @@
 #include <linux/mutex.h>
 #include <linux/slab.h>
 
+#include <drm/drm_atomic.h>
 #include <drm/drm_client.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+
+#include "drm_crtc_internal.h"
+#include "drm_internal.h"
 
 int drm_client_modeset_create(struct drm_client_dev *client)
 {
@@ -102,3 +107,285 @@ struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, stru
 }
 /* TODO: Remove export when modeset code has been moved over */
 EXPORT_SYMBOL(drm_client_find_modeset);
+
+/**
+ * drm_client_panel_rotation() - Check panel orientation
+ * @modeset: DRM modeset
+ * @rotation: Returned rotation value
+ *
+ * This function checks if the primary plane in @modeset can hw rotate to match
+ * the panel orientation on its connector.
+ *
+ * Note: Currently only 0 and 180 degrees are supported.
+ *
+ * Return:
+ * True if the plane can do the rotation, false otherwise.
+ */
+bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
+{
+	struct drm_connector *connector = modeset->connectors[0];
+	struct drm_plane *plane = modeset->crtc->primary;
+	u64 valid_mask = 0;
+	unsigned int i;
+
+	if (!modeset->num_connectors)
+		return false;
+
+	switch (connector->display_info.panel_orientation) {
+	case DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP:
+		*rotation = DRM_MODE_ROTATE_180;
+		break;
+	case DRM_MODE_PANEL_ORIENTATION_LEFT_UP:
+		*rotation = DRM_MODE_ROTATE_90;
+		break;
+	case DRM_MODE_PANEL_ORIENTATION_RIGHT_UP:
+		*rotation = DRM_MODE_ROTATE_270;
+		break;
+	default:
+		*rotation = DRM_MODE_ROTATE_0;
+	}
+
+	/*
+	 * TODO: support 90 / 270 degree hardware rotation,
+	 * depending on the hardware this may require the framebuffer
+	 * to be in a specific tiling format.
+	 */
+	if (*rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property)
+		return false;
+
+	for (i = 0; i < plane->rotation_property->num_values; i++)
+		valid_mask |= (1ULL << plane->rotation_property->values[i]);
+
+	if (!(*rotation & valid_mask))
+		return false;
+
+	return true;
+}
+
+static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active)
+{
+	struct drm_device *dev = client->dev;
+	struct drm_plane_state *plane_state;
+	struct drm_plane *plane;
+	struct drm_atomic_state *state;
+	struct drm_modeset_acquire_ctx ctx;
+	struct drm_mode_set *mode_set;
+	int ret;
+
+	drm_modeset_acquire_init(&ctx, 0);
+
+	state = drm_atomic_state_alloc(dev);
+	if (!state) {
+		ret = -ENOMEM;
+		goto out_ctx;
+	}
+
+	state->acquire_ctx = &ctx;
+retry:
+	drm_for_each_plane(plane, dev) {
+		plane_state = drm_atomic_get_plane_state(state, plane);
+		if (IS_ERR(plane_state)) {
+			ret = PTR_ERR(plane_state);
+			goto out_state;
+		}
+
+		plane_state->rotation = DRM_MODE_ROTATE_0;
+
+		/* disable non-primary: */
+		if (plane->type == DRM_PLANE_TYPE_PRIMARY)
+			continue;
+
+		ret = __drm_atomic_helper_disable_plane(plane, plane_state);
+		if (ret != 0)
+			goto out_state;
+	}
+
+	drm_client_for_each_modeset(mode_set, client) {
+		struct drm_plane *primary = mode_set->crtc->primary;
+		unsigned int rotation;
+
+		if (drm_client_panel_rotation(mode_set, &rotation)) {
+			/* Cannot fail as we've already gotten the plane state above */
+			plane_state = drm_atomic_get_new_plane_state(state, primary);
+			plane_state->rotation = rotation;
+		}
+
+		ret = __drm_atomic_helper_set_config(mode_set, state);
+		if (ret != 0)
+			goto out_state;
+
+		/*
+		 * __drm_atomic_helper_set_config() sets active when a
+		 * mode is set, unconditionally clear it if we force DPMS off
+		 */
+		if (!active) {
+			struct drm_crtc *crtc = mode_set->crtc;
+			struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
+
+			crtc_state->active = false;
+		}
+	}
+
+	ret = drm_atomic_commit(state);
+
+out_state:
+	if (ret == -EDEADLK)
+		goto backoff;
+
+	drm_atomic_state_put(state);
+out_ctx:
+	drm_modeset_drop_locks(&ctx);
+	drm_modeset_acquire_fini(&ctx);
+
+	return ret;
+
+backoff:
+	drm_atomic_state_clear(state);
+	drm_modeset_backoff(&ctx);
+
+	goto retry;
+}
+
+static int drm_client_modeset_commit_legacy(struct drm_client_dev *client)
+{
+	struct drm_device *dev = client->dev;
+	struct drm_mode_set *mode_set;
+	struct drm_plane *plane;
+	int ret = 0;
+
+	drm_modeset_lock_all(dev);
+	drm_for_each_plane(plane, dev) {
+		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+			drm_plane_force_disable(plane);
+
+		if (plane->rotation_property)
+			drm_mode_plane_set_obj_prop(plane,
+						    plane->rotation_property,
+						    DRM_MODE_ROTATE_0);
+	}
+
+	drm_client_for_each_modeset(mode_set, client) {
+		struct drm_crtc *crtc = mode_set->crtc;
+
+		if (crtc->funcs->cursor_set2) {
+			ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0);
+			if (ret)
+				goto out;
+		} else if (crtc->funcs->cursor_set) {
+			ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0);
+			if (ret)
+				goto out;
+		}
+
+		ret = drm_mode_set_config_internal(mode_set);
+		if (ret)
+			goto out;
+	}
+out:
+	drm_modeset_unlock_all(dev);
+
+	return ret;
+}
+
+/**
+ * drm_client_modeset_commit_force() - Force commit CRTC configuration
+ * @client: DRM client
+ *
+ * Commit modeset configuration to crtcs without checking if there is a DRM master.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_commit_force(struct drm_client_dev *client)
+{
+	struct drm_device *dev = client->dev;
+	int ret;
+
+	mutex_lock(&client->modeset_mutex);
+	if (drm_drv_uses_atomic_modeset(dev))
+		ret = drm_client_modeset_commit_atomic(client, true);
+	else
+		ret = drm_client_modeset_commit_legacy(client);
+	mutex_unlock(&client->modeset_mutex);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_client_modeset_commit_force);
+
+/**
+ * drm_client_modeset_commit() - Commit CRTC configuration
+ * @client: DRM client
+ *
+ * Commit modeset configuration to crtcs.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_commit(struct drm_client_dev *client)
+{
+	struct drm_device *dev = client->dev;
+	int ret;
+
+	if (!drm_master_internal_acquire(dev))
+		return -EBUSY;
+
+	ret = drm_client_modeset_commit_force(client);
+
+	drm_master_internal_release(dev);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_client_modeset_commit);
+
+static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dpms_mode)
+{
+	struct drm_device *dev = client->dev;
+	struct drm_connector *connector;
+	struct drm_mode_set *modeset;
+	int j;
+
+	drm_modeset_lock_all(dev);
+	drm_client_for_each_modeset(modeset, client) {
+		if (!modeset->crtc->enabled)
+			continue;
+
+		for (j = 0; j < modeset->num_connectors; j++) {
+			connector = modeset->connectors[j];
+			connector->funcs->dpms(connector, dpms_mode);
+			drm_object_property_set_value(&connector->base,
+				dev->mode_config.dpms_property, dpms_mode);
+		}
+	}
+	drm_modeset_unlock_all(dev);
+}
+
+/**
+ * drm_client_modeset_dpms() - Set DPMS mode
+ * @client: DRM client
+ * @mode: DPMS mode
+ *
+ * Note: For atomic drivers @mode is reduced to on/off.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_dpms(struct drm_client_dev *client, int mode)
+{
+	struct drm_device *dev = client->dev;
+	int ret = 0;
+
+	if (!drm_master_internal_acquire(dev))
+		return -EBUSY;
+
+	mutex_lock(&client->modeset_mutex);
+	if (drm_drv_uses_atomic_modeset(dev))
+		ret = drm_client_modeset_commit_atomic(client, mode == DRM_MODE_DPMS_ON);
+	else
+		drm_client_modeset_dpms_legacy(client, mode);
+	mutex_unlock(&client->modeset_mutex);
+
+	drm_master_internal_release(dev);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_client_modeset_dpms);
drivers/gpu/drm/drm_fb_helper.c +0 -282

301 lines not on this page · raw message

include/drm/drm_client.h +4 -0
index 87be9aeb1fe0..6cf48419f77f 100644
@@ -155,6 +155,10 @@ int drm_client_modeset_create(struct drm_client_dev *client);
 void drm_client_modeset_free(struct drm_client_dev *client);
 void drm_client_modeset_release(struct drm_client_dev *client);
 struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc);
+bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation);
+int drm_client_modeset_commit_force(struct drm_client_dev *client);
+int drm_client_modeset_commit(struct drm_client_dev *client);
+int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
 
 /**
  * drm_client_for_each_modeset() - Iterate over client modesets
Signature · 6 lines
2.20.1

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

PATCH v3 8/11 drm/fb-helper: Remove drm_fb_helper_connector

In reply to Noralf Trønnes

All drivers add all their connectors so there's no need to keep around an array of available connectors.

Rename functions which signature is changed since they will be moved to drm_client in a later patch.

---
 Documentation/gpu/todo.rst      |   3 +
 drivers/gpu/drm/drm_fb_helper.c | 498 ++++++++++----------------------
 include/drm/drm_client.h        |  15 +
 include/drm/drm_fb_helper.h     |  80 ++---
 4 files changed, 192 insertions(+), 404 deletions(-)
Documentation/gpu/todo.rst +3 -0
index 8fa08b5feab7..f6cdd1c26788 100644
@@ -306,6 +306,9 @@ drm_fb_helper cleanup tasks
 - The max connector argument for drm_fb_helper_init() and
   drm_fb_helper_fbdev_setup() isn't used anymore and can be removed.
 
+- The helper doesn't keep an array of connectors anymore so these can be
+  removed: drm_fb_helper_single_add_all_connectors(),
+  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
 
 Core refactorings
 =================
drivers/gpu/drm/drm_fb_helper.c +153 -345

844 lines not on this page · raw message

include/drm/drm_client.h +15 -0
index 6cf48419f77f..8d94880bbe25 100644
@@ -7,6 +7,7 @@
 #include <linux/mutex.h>
 #include <linux/types.h>
 
+#include <drm/drm_connector.h>
 #include <drm/drm_crtc.h>
 
 struct drm_client_dev;
@@ -169,6 +170,20 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
 	for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
 	     modeset = (client)->modesets; modeset->crtc; modeset++)
 
+/**
+ * drm_client_for_each_connector_iter - connector_list iterator macro
+ * @connector: &struct drm_connector pointer used as cursor
+ * @iter: &struct drm_connector_list_iter
+ *
+ * This iterates the connectors that are useable for internal clients (excludes
+ * writeback connectors).
+ *
+ * For more info see drm_for_each_connector_iter().
+ */
+#define drm_client_for_each_connector_iter(connector, iter) \
+	drm_for_each_connector_iter(connector, iter) \
+		if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
+
 int drm_client_debugfs_init(struct drm_minor *minor);
 
 #endif
include/drm/drm_fb_helper.h +21 -59

122 lines not on this page · raw message

Signature · 6 lines
2.20.1

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

PATCH v3 9/11 drm/fb-helper: Prepare to move out modeset config code

In reply to Noralf Trønnes

This prepares the modeset code so it can be moved out as-is in the next patch.

v3: Remove stray newline

---
 drivers/gpu/drm/drm_fb_helper.c | 62 +++++++++++++++++++++++----------
 include/drm/drm_fb_helper.h     |  4 ---
 2 files changed, 44 insertions(+), 22 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +44 -18
index 3a57210c9ec9..68391f0d88b7 100644
@@ -43,6 +43,10 @@
 
 #include "drm_internal.h"
 
+struct drm_client_offset {
+	int x, y;
+};
+
 static bool drm_fbdev_emulation = true;
 module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
 MODULE_PARM_DESC(fbdev_emulation,
@@ -1794,7 +1798,7 @@ static bool drm_client_target_cloned(struct drm_device *dev,
 				     struct drm_connector **connectors,
 				     unsigned int connector_count,
 				     struct drm_display_mode **modes,
-				     struct drm_fb_offset *offsets,
+				     struct drm_client_offset *offsets,
 				     bool *enabled, int width, int height)
 {
 	int count, i, j;
@@ -1873,7 +1877,7 @@ static bool drm_client_target_cloned(struct drm_device *dev,
 static int drm_client_get_tile_offsets(struct drm_connector **connectors,
 				       unsigned int connector_count,
 				       struct drm_display_mode **modes,
-				       struct drm_fb_offset *offsets,
+				       struct drm_client_offset *offsets,
 				       int idx,
 				       int h_idx, int v_idx)
 {
@@ -1906,7 +1910,7 @@ static int drm_client_get_tile_offsets(struct drm_connector **connectors,
 static bool drm_client_target_preferred(struct drm_connector **connectors,
 					unsigned int connector_count,
 					struct drm_display_mode **modes,
-					struct drm_fb_offset *offsets,
+					struct drm_client_offset *offsets,
 					bool *enabled, int width, int height)
 {
 	const u64 mask = BIT_ULL(connector_count) - 1;
@@ -2070,7 +2074,7 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
 				       unsigned int connector_count,
 				       struct drm_crtc **crtcs,
 				       struct drm_display_mode **modes,
-				       struct drm_fb_offset *offsets,
+				       struct drm_client_offset *offsets,
 				       bool *enabled, int width, int height)
 {
 	unsigned int count = min_t(unsigned int, connector_count, BITS_PER_LONG);
@@ -2239,30 +2243,47 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
 	return ret;
 }
 
-static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
-			    u32 width, u32 height)
+/**
+ * drm_client_modeset_probe() - Probe for displays
+ * @client: DRM client
+ * @width: Maximum display mode width (optional)
+ * @height: Maximum display mode height (optional)
+ *
+ * This function sets up display pipelines for enabled connectors and stores the
+ * config in the client's modeset array.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height)
 {
 	struct drm_connector *connector, **connectors = NULL;
-	struct drm_client_dev *client = &fb_helper->client;
 	struct drm_connector_list_iter conn_iter;
-	struct drm_device *dev = fb_helper->dev;
+	struct drm_device *dev = client->dev;
 	unsigned int total_modes_count = 0;
+	struct drm_client_offset *offsets;
 	unsigned int connector_count = 0;
 	struct drm_display_mode **modes;
-	struct drm_fb_offset *offsets;
 	struct drm_crtc **crtcs;
+	int i, ret = 0;
 	bool *enabled;
-	int i;
 
 	DRM_DEBUG_KMS("\n");
 
+	if (!width)
+		width = dev->mode_config.max_width;
+	if (!height)
+		height = dev->mode_config.max_height;
+
 	drm_connector_list_iter_begin(dev, &conn_iter);
 	drm_client_for_each_connector_iter(connector, &conn_iter) {
 		struct drm_connector **tmp;
 
 		tmp = krealloc(connectors, (connector_count + 1) * sizeof(*connectors), GFP_KERNEL);
-		if (!tmp)
+		if (!tmp) {
+			ret = -ENOMEM;
 			goto free_connectors;
+		}
 
 		connectors = tmp;
 		drm_connector_get(connector);
@@ -2271,7 +2292,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 	drm_connector_list_iter_end(&conn_iter);
 
 	if (!connector_count)
-		return;
+		return 0;
 
 	crtcs = kcalloc(connector_count, sizeof(*crtcs), GFP_KERNEL);
 	modes = kcalloc(connector_count, sizeof(*modes), GFP_KERNEL);
@@ -2279,12 +2300,13 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 	enabled = kcalloc(connector_count, sizeof(bool), GFP_KERNEL);
 	if (!crtcs || !modes || !enabled || !offsets) {
 		DRM_ERROR("Memory allocation failed\n");
+		ret = -ENOMEM;
 		goto out;
 	}
 
 	mutex_lock(&client->modeset_mutex);
 
-	mutex_lock(&fb_helper->dev->mode_config.mutex);
+	mutex_lock(&dev->mode_config.mutex);
 	for (i = 0; i < connector_count; i++)
 		total_modes_count += connectors[i]->funcs->fill_modes(connectors[i], width, height);
 	if (!total_modes_count)
@@ -2309,14 +2331,14 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 		drm_client_pick_crtcs(client, connectors, connector_count,
 				      crtcs, modes, 0, width, height);
 	}
-	mutex_unlock(&fb_helper->dev->mode_config.mutex);
+	mutex_unlock(&dev->mode_config.mutex);
 
 	drm_client_modeset_release(client);
 
 	for (i = 0; i < connector_count; i++) {
 		struct drm_display_mode *mode = modes[i];
 		struct drm_crtc *crtc = crtcs[i];
-		struct drm_fb_offset *offset = &offsets[i];
+		struct drm_client_offset *offset = &offsets[i];
 
 		if (mode && crtc) {
 			struct drm_mode_set *modeset = drm_client_find_modeset(client, crtc);
@@ -2326,8 +2348,10 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 				      mode->name, crtc->base.id, offset->x, offset->y);
 
 			if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||
-					 (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1)))
+					 (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {
+				ret = -EINVAL;
 				break;
+			}
 
 			modeset->mode = drm_mode_duplicate(dev, mode);
 			drm_connector_get(connector);
@@ -2347,6 +2371,8 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
 	for (i = 0; i < connector_count; i++)
 		drm_connector_put(connectors[i]);
 	kfree(connectors);
+
+	return ret;
 }
 
 /*
@@ -2428,7 +2454,7 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper,
 	width = dev->mode_config.max_width;
 	height = dev->mode_config.max_height;
 
-	drm_setup_crtcs(fb_helper, width, height);
+	drm_client_modeset_probe(&fb_helper->client, width, height);
 	ret = drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
 	if (ret < 0) {
 		if (ret == -EAGAIN) {
@@ -2576,7 +2602,7 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
 
 	DRM_DEBUG_KMS("\n");
 
-	drm_setup_crtcs(fb_helper, fb_helper->fb->width, fb_helper->fb->height);
+	drm_client_modeset_probe(&fb_helper->client, fb_helper->fb->width, fb_helper->fb->height);
 	drm_setup_crtcs_fb(fb_helper);
 	mutex_unlock(&fb_helper->lock);
 
include/drm/drm_fb_helper.h +0 -4
index e14d52ef9638..c8a8ae2a678a 100644
@@ -43,10 +43,6 @@ enum mode_set_atomic {
 	ENTER_ATOMIC_MODE_SET,
 };
 
-struct drm_fb_offset {
-	int x, y;
-};
-
 /**
  * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size
  * @fb_width: fbdev width
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

PATCH v3 10/11 drm/fb-helper: Move out modeset config code

In reply to Noralf Trønnes

No functional changes, just moving code as-is and fixing includes.

---
 drivers/gpu/drm/drm_client_modeset.c | 706 ++++++++++++++++++++++++++-
 drivers/gpu/drm/drm_fb_helper.c      | 691 --------------------------
 include/drm/drm_client.h             |   5 +-
 3 files changed, 701 insertions(+), 701 deletions(-)
drivers/gpu/drm/drm_client_modeset.c +700 -6
index b2aedec65637..0dc46bdbca18 100644
@@ -13,13 +13,22 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_client.h>
+#include <drm/drm_connector.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_device.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_encoder.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
 #include "drm_internal.h"
 
+#define DRM_CLIENT_MAX_CLONED_CONNECTORS	8
+
+struct drm_client_offset {
+	int x, y;
+};
+
 int drm_client_modeset_create(struct drm_client_dev *client)
 {
 	struct drm_device *dev = client->dev;
@@ -58,7 +67,7 @@ int drm_client_modeset_create(struct drm_client_dev *client)
 	return -ENOMEM;
 }
 
-void drm_client_modeset_release(struct drm_client_dev *client)
+static void drm_client_modeset_release(struct drm_client_dev *client)
 {
 	struct drm_mode_set *modeset;
 	unsigned int i;
@@ -75,8 +84,6 @@ void drm_client_modeset_release(struct drm_client_dev *client)
 		modeset->num_connectors = 0;
 	}
 }
-/* TODO: Remove export when modeset code has been moved over */
-EXPORT_SYMBOL(drm_client_modeset_release);
 
 void drm_client_modeset_free(struct drm_client_dev *client)
 {
@@ -95,7 +102,8 @@ void drm_client_modeset_free(struct drm_client_dev *client)
 	kfree(client->modesets);
 }
 
-struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc)
+static struct drm_mode_set *
+drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc)
 {
 	struct drm_mode_set *modeset;
 
@@ -105,8 +113,694 @@ struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, stru
 
 	return NULL;
 }
-/* TODO: Remove export when modeset code has been moved over */
-EXPORT_SYMBOL(drm_client_find_modeset);
+
+static struct drm_display_mode *
+drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height)
+{
+	struct drm_display_mode *mode;
+
+	list_for_each_entry(mode, &connector->modes, head) {
+		if (mode->hdisplay > width ||
+		    mode->vdisplay > height)
+			continue;
+		if (mode->type & DRM_MODE_TYPE_PREFERRED)
+			return mode;
+	}
+	return NULL;
+}
+
+static struct drm_display_mode *
+drm_connector_pick_cmdline_mode(struct drm_connector *connector)
+{
+	struct drm_cmdline_mode *cmdline_mode;
+	struct drm_display_mode *mode;
+	bool prefer_non_interlace;
+
+	cmdline_mode = &connector->cmdline_mode;
+	if (cmdline_mode->specified == false)
+		return NULL;
+
+	/* attempt to find a matching mode in the list of modes
+	 *  we have gotten so far, if not add a CVT mode that conforms
+	 */
+	if (cmdline_mode->rb || cmdline_mode->margins)
+		goto create_mode;
+
+	prefer_non_interlace = !cmdline_mode->interlace;
+again:
+	list_for_each_entry(mode, &connector->modes, head) {
+		/* check width/height */
+		if (mode->hdisplay != cmdline_mode->xres ||
+		    mode->vdisplay != cmdline_mode->yres)
+			continue;
+
+		if (cmdline_mode->refresh_specified) {
+			if (mode->vrefresh != cmdline_mode->refresh)
+				continue;
+		}
+
+		if (cmdline_mode->interlace) {
+			if (!(mode->flags & DRM_MODE_FLAG_INTERLACE))
+				continue;
+		} else if (prefer_non_interlace) {
+			if (mode->flags & DRM_MODE_FLAG_INTERLACE)
+				continue;
+		}
+		return mode;
+	}
+
+	if (prefer_non_interlace) {
+		prefer_non_interlace = false;
+		goto again;
+	}
+
+create_mode:
+	mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode);
+	list_add(&mode->head, &connector->modes);
+
+	return mode;
+}
+
+static bool drm_connector_enabled(struct drm_connector *connector, bool strict)
+{
+	bool enable;
+
+	if (connector->display_info.non_desktop)
+		return false;
+
+	if (strict)
+		enable = connector->status == connector_status_connected;
+	else
+		enable = connector->status != connector_status_disconnected;
+
+	return enable;
+}
+
+static void drm_client_connectors_enabled(struct drm_connector **connectors,
+					  unsigned int connector_count,
+					  bool *enabled)
+{
+	bool any_enabled = false;
+	struct drm_connector *connector;
+	int i = 0;
+
+	for (i = 0; i < connector_count; i++) {
+		connector = connectors[i];
+		enabled[i] = drm_connector_enabled(connector, true);
+		DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
+			      connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no");
+
+		any_enabled |= enabled[i];
+	}
+
+	if (any_enabled)
+		return;
+
+	for (i = 0; i < connector_count; i++)
+		enabled[i] = drm_connector_enabled(connectors[i], false);
+}
+
+static bool drm_client_target_cloned(struct drm_device *dev,
+				     struct drm_connector **connectors,
+				     unsigned int connector_count,
+				     struct drm_display_mode **modes,
+				     struct drm_client_offset *offsets,
+				     bool *enabled, int width, int height)
+{
+	int count, i, j;
+	bool can_clone = false;
+	struct drm_display_mode *dmt_mode, *mode;
+
+	/* only contemplate cloning in the single crtc case */
+	if (dev->mode_config.num_crtc > 1)
+		return false;
+
+	count = 0;
+	for (i = 0; i < connector_count; i++) {
+		if (enabled[i])
+			count++;
+	}
+
+	/* only contemplate cloning if more than one connector is enabled */
+	if (count <= 1)
+		return false;
+
+	/* check the command line or if nothing common pick 1024x768 */
+	can_clone = true;
+	for (i = 0; i < connector_count; i++) {
+		if (!enabled[i])
+			continue;
+		modes[i] = drm_connector_pick_cmdline_mode(connectors[i]);
+		if (!modes[i]) {
+			can_clone = false;
+			break;
+		}
+		for (j = 0; j < i; j++) {
+			if (!enabled[j])
+				continue;
+			if (!drm_mode_match(modes[j], modes[i],
+					    DRM_MODE_MATCH_TIMINGS |
+					    DRM_MODE_MATCH_CLOCK |
+					    DRM_MODE_MATCH_FLAGS |
+					    DRM_MODE_MATCH_3D_FLAGS))
+				can_clone = false;
+		}
+	}
+
+	if (can_clone) {
+		DRM_DEBUG_KMS("can clone using command line\n");
+		return true;
+	}
+
+	/* try and find a 1024x768 mode on each connector */
+	can_clone = true;
+	dmt_mode = drm_mode_find_dmt(dev, 1024, 768, 60, false);
+
+	for (i = 0; i < connector_count; i++) {
+		if (!enabled[i])
+			continue;
+
+		list_for_each_entry(mode, &connectors[i]->modes, head) {
+			if (drm_mode_match(mode, dmt_mode,
+					   DRM_MODE_MATCH_TIMINGS |
+					   DRM_MODE_MATCH_CLOCK |
+					   DRM_MODE_MATCH_FLAGS |
+					   DRM_MODE_MATCH_3D_FLAGS))
+				modes[i] = mode;
+		}
+		if (!modes[i])
+			can_clone = false;
+	}
+
+	if (can_clone) {
+		DRM_DEBUG_KMS("can clone using 1024x768\n");
+		return true;
+	}
+	DRM_INFO("kms: can't enable cloning when we probably wanted to.\n");
+	return false;
+}
+
+static int drm_client_get_tile_offsets(struct drm_connector **connectors,
+				       unsigned int connector_count,
+				       struct drm_display_mode **modes,
+				       struct drm_client_offset *offsets,
+				       int idx,
+				       int h_idx, int v_idx)
+{
+	struct drm_connector *connector;
+	int i;
+	int hoffset = 0, voffset = 0;
+
+	for (i = 0; i < connector_count; i++) {
+		connector = connectors[i];
+		if (!connector->has_tile)
+			continue;
+
+		if (!modes[i] && (h_idx || v_idx)) {
+			DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i,
+				      connector->base.id);
+			continue;
+		}
+		if (connector->tile_h_loc < h_idx)
+			hoffset += modes[i]->hdisplay;
+
+		if (connector->tile_v_loc < v_idx)
+			voffset += modes[i]->vdisplay;
+	}
+	offsets[idx].x = hoffset;
+	offsets[idx].y = voffset;
+	DRM_DEBUG_KMS("returned %d %d for %d %d\n", hoffset, voffset, h_idx, v_idx);
+	return 0;
+}
+
+static bool drm_client_target_preferred(struct drm_connector **connectors,
+					unsigned int connector_count,
+					struct drm_display_mode **modes,
+					struct drm_client_offset *offsets,
+					bool *enabled, int width, int height)
+{
+	const u64 mask = BIT_ULL(connector_count) - 1;
+	struct drm_connector *connector;
+	u64 conn_configured = 0;
+	int tile_pass = 0;
+	int i;
+
+retry:
+	for (i = 0; i < connector_count; i++) {
+		connector = connectors[i];
+
+		if (conn_configured & BIT_ULL(i))
+			continue;
+
+		if (enabled[i] == false) {
+			conn_configured |= BIT_ULL(i);
+			continue;
+		}
+
+		/* first pass over all the untiled connectors */
+		if (tile_pass == 0 && connector->has_tile)
+			continue;
+
+		if (tile_pass == 1) {
+			if (connector->tile_h_loc != 0 ||
+			    connector->tile_v_loc != 0)
+				continue;
+
+		} else {
+			if (connector->tile_h_loc != tile_pass - 1 &&
+			    connector->tile_v_loc != tile_pass - 1)
+			/* if this tile_pass doesn't cover any of the tiles - keep going */
+				continue;
+
+			/*
+			 * find the tile offsets for this pass - need to find
+			 * all tiles left and above
+			 */
+			drm_client_get_tile_offsets(connectors, connector_count, modes, offsets, i,
+						    connector->tile_h_loc, connector->tile_v_loc);
+		}
+		DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
+			      connector->base.id);
+
+		/* got for command line mode first */
+		modes[i] = drm_connector_pick_cmdline_mode(connector);
+		if (!modes[i]) {
+			DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n",
+				      connector->base.id, connector->tile_group ? connector->tile_group->id : 0);
+			modes[i] = drm_connector_has_preferred_mode(connector, width, height);
+		}
+		/* No preferred modes, pick one off the list */
+		if (!modes[i] && !list_empty(&connector->modes)) {
+			list_for_each_entry(modes[i], &connector->modes, head)
+				break;
+		}
+		DRM_DEBUG_KMS("found mode %s\n", modes[i] ? modes[i]->name :
+			  "none");
+		conn_configured |= BIT_ULL(i);
+	}
+
+	if ((conn_configured & mask) != mask) {
+		tile_pass++;
+		goto retry;
+	}
+	return true;
+}
+
+static bool connector_has_possible_crtc(struct drm_connector *connector,
+					struct drm_crtc *crtc)
+{
+	struct drm_encoder *encoder;
+	int i;
+
+	drm_connector_for_each_possible_encoder(connector, encoder, i) {
+		if (encoder->possible_crtcs & drm_crtc_mask(crtc))
+			return true;
+	}
+
+	return false;
+}
+
+static int drm_client_pick_crtcs(struct drm_client_dev *client,
+				 struct drm_connector **connectors,
+				 unsigned int connector_count,
+				 struct drm_crtc **best_crtcs,
+				 struct drm_display_mode **modes,
+				 int n, int width, int height)
+{
+	struct drm_device *dev = client->dev;
+	struct drm_connector *connector;
+	int my_score, best_score, score;
+	struct drm_crtc **crtcs, *crtc;
+	struct drm_mode_set *modeset;
+	int o;
+
+	if (n == connector_count)
+		return 0;
+
+	connector = connectors[n];
+
+	best_crtcs[n] = NULL;
+	best_score = drm_client_pick_crtcs(client, connectors, connector_count,
+					   best_crtcs, modes, n + 1, width, height);
+	if (modes[n] == NULL)
+		return best_score;
+
+	crtcs = kcalloc(connector_count, sizeof(*crtcs), GFP_KERNEL);
+	if (!crtcs)
+		return best_score;
+
+	my_score = 1;
+	if (connector->status == connector_status_connected)
+		my_score++;
+	if (connector->cmdline_mode.specified)
+		my_score++;
+	if (drm_connector_has_preferred_mode(connector, width, height))
+		my_score++;
+
+	/*
+	 * select a crtc for this connector and then attempt to configure
+	 * remaining connectors
+	 */
+	drm_client_for_each_modeset(modeset, client) {
+		crtc = modeset->crtc;
+
+		if (!connector_has_possible_crtc(connector, crtc))
+			continue;
+
+		for (o = 0; o < n; o++)
+			if (best_crtcs[o] == crtc)
+				break;
+
+		if (o < n) {
+			/* ignore cloning unless only a single crtc */
+			if (dev->mode_config.num_crtc > 1)
+				continue;
+
+			if (!drm_mode_equal(modes[o], modes[n]))
+				continue;
+		}
+
+		crtcs[n] = crtc;
+		memcpy(crtcs, best_crtcs, n * sizeof(*crtcs));
+		score = my_score + drm_client_pick_crtcs(client, connectors, connector_count,
+							 crtcs, modes, n + 1, width, height);
+		if (score > best_score) {
+			best_score = score;
+			memcpy(best_crtcs, crtcs, connector_count * sizeof(*crtcs));
+		}
+	}
+
+	kfree(crtcs);
+	return best_score;
+}
+
+/* Try to read the BIOS display configuration and use it for the initial config */
+static bool drm_client_firmware_config(struct drm_client_dev *client,
+				       struct drm_connector **connectors,
+				       unsigned int connector_count,
+				       struct drm_crtc **crtcs,
+				       struct drm_display_mode **modes,
+				       struct drm_client_offset *offsets,
+				       bool *enabled, int width, int height)
+{
+	unsigned int count = min_t(unsigned int, connector_count, BITS_PER_LONG);
+	unsigned long conn_configured, conn_seq;
+	struct drm_device *dev = client->dev;
+	int i, j;
+	bool *save_enabled;
+	bool fallback = true, ret = true;
+	int num_connectors_enabled = 0;
+	int num_connectors_detected = 0;
+	struct drm_modeset_acquire_ctx ctx;
+
+	save_enabled = kcalloc(count, sizeof(bool), GFP_KERNEL);
+	if (!save_enabled)
+		return false;
+
+	drm_modeset_acquire_init(&ctx, 0);
+
+	while (drm_modeset_lock_all_ctx(dev, &ctx) != 0)
+		drm_modeset_backoff(&ctx);
+
+	memcpy(save_enabled, enabled, count);
+	conn_seq = GENMASK(count - 1, 0);
+	conn_configured = 0;
+retry:
+	for (i = 0; i < count; i++) {
+		struct drm_connector *connector;
+		struct drm_encoder *encoder;
+		struct drm_crtc *new_crtc;
+
+		connector = connectors[i];
+
+		if (conn_configured & BIT(i))
+			continue;
+
+		/* First pass, only consider tiled connectors */
+		if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
+			continue;
+
+		if (connector->status == connector_status_connected)
+			num_connectors_detected++;
+
+		if (!enabled[i]) {
+			DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
+				      connector->name);
+			conn_configured |= BIT(i);
+			continue;
+		}
+
+		if (connector->force == DRM_FORCE_OFF) {
+			DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n",
+				      connector->name);
+			enabled[i] = false;
+			continue;
+		}
+
+		encoder = connector->state->best_encoder;
+		if (!encoder || WARN_ON(!connector->state->crtc)) {
+			if (connector->force > DRM_FORCE_OFF)
+				goto bail;
+
+			DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
+				      connector->name);
+			enabled[i] = false;
+			conn_configured |= BIT(i);
+			continue;
+		}
+
+		num_connectors_enabled++;
+
+		new_crtc = connector->state->crtc;
+
+		/*
+		 * Make sure we're not trying to drive multiple connectors
+		 * with a single CRTC, since our cloning support may not
+		 * match the BIOS.
+		 */
+		for (j = 0; j < count; j++) {
+			if (crtcs[j] == new_crtc) {
+				DRM_DEBUG_KMS("fallback: cloned configuration\n");
+				goto bail;
+			}
+		}
+
+		DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
+			      connector->name);
+
+		/* go for command line mode first */
+		modes[i] = drm_connector_pick_cmdline_mode(connector);
+
+		/* try for preferred next */
+		if (!modes[i]) {
+			DRM_DEBUG_KMS("looking for preferred mode on connector %s %d\n",
+				      connector->name, connector->has_tile);
+			modes[i] = drm_connector_has_preferred_mode(connector, width, height);
+		}
+
+		/* No preferred mode marked by the EDID? Are there any modes? */
+		if (!modes[i] && !list_empty(&connector->modes)) {
+			DRM_DEBUG_KMS("using first mode listed on connector %s\n",
+				      connector->name);
+			modes[i] = list_first_entry(&connector->modes,
+						    struct drm_display_mode,
+						    head);
+		}
+
+		/* last resort: use current mode */
+		if (!modes[i]) {
+			/*
+			 * IMPORTANT: We want to use the adjusted mode (i.e.
+			 * after the panel fitter upscaling) as the initial
+			 * config, not the input mode, which is what crtc->mode
+			 * usually contains. But since our current
+			 * code puts a mode derived from the post-pfit timings
+			 * into crtc->mode this works out correctly.
+			 *
+			 * This is crtc->mode and not crtc->state->mode for the
+			 * fastboot check to work correctly.
+			 */
+			DRM_DEBUG_KMS("looking for current mode on connector %s\n",
+				      connector->name);
+			modes[i] = &connector->state->crtc->mode;
+		}
+		crtcs[i] = new_crtc;
+
+		DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n",
+			      connector->name,
+			      connector->state->crtc->base.id,
+			      connector->state->crtc->name,
+			      modes[i]->hdisplay, modes[i]->vdisplay,
+			      modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" : "");
+
+		fallback = false;
+		conn_configured |= BIT(i);
+	}
+
+	if (conn_configured != conn_seq) { /* repeat until no more are found */
+		conn_seq = conn_configured;
+		goto retry;
+	}
+
+	/*
+	 * If the BIOS didn't enable everything it could, fall back to have the
+	 * same user experiencing of lighting up as much as possible like the
+	 * fbdev helper library.
+	 */
+	if (num_connectors_enabled != num_connectors_detected &&
+	    num_connectors_enabled < dev->mode_config.num_crtc) {
+		DRM_DEBUG_KMS("fallback: Not all outputs enabled\n");
+		DRM_DEBUG_KMS("Enabled: %i, detected: %i\n", num_connectors_enabled,
+			      num_connectors_detected);
+		fallback = true;
+	}
+
+	if (fallback) {
+bail:
+		DRM_DEBUG_KMS("Not using firmware configuration\n");
+		memcpy(enabled, save_enabled, count);
+		ret = false;
+	}
+
+	drm_modeset_drop_locks(&ctx);
+	drm_modeset_acquire_fini(&ctx);
+
+	kfree(save_enabled);
+	return ret;
+}
+
+/**
+ * drm_client_modeset_probe() - Probe for displays
+ * @client: DRM client
+ * @width: Maximum display mode width (optional)
+ * @height: Maximum display mode height (optional)
+ *
+ * This function sets up display pipelines for enabled connectors and stores the
+ * config in the client's modeset array.
+ *
+ * Returns:
+ * Zero on success or negative error code on failure.
+ */
+int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height)
+{
+	struct drm_connector *connector, **connectors = NULL;
+	struct drm_connector_list_iter conn_iter;
+	struct drm_device *dev = client->dev;
+	unsigned int total_modes_count = 0;
+	struct drm_client_offset *offsets;
+	unsigned int connector_count = 0;
+	struct drm_display_mode **modes;
+	struct drm_crtc **crtcs;
+	int i, ret = 0;
+	bool *enabled;
+
+	DRM_DEBUG_KMS("\n");
+
+	if (!width)
+		width = dev->mode_config.max_width;
+	if (!height)
+		height = dev->mode_config.max_height;
+
+	drm_connector_list_iter_begin(dev, &conn_iter);
+	drm_client_for_each_connector_iter(connector, &conn_iter) {
+		struct drm_connector **tmp;
+
+		tmp = krealloc(connectors, (connector_count + 1) * sizeof(*connectors), GFP_KERNEL);
+		if (!tmp) {
+			ret = -ENOMEM;
+			goto free_connectors;
+		}
+
+		connectors = tmp;
+		drm_connector_get(connector);
+		connectors[connector_count++] = connector;
+	}
+	drm_connector_list_iter_end(&conn_iter);
+
+	if (!connector_count)
+		return 0;
+
+	crtcs = kcalloc(connector_count, sizeof(*crtcs), GFP_KERNEL);
+	modes = kcalloc(connector_count, sizeof(*modes), GFP_KERNEL);
+	offsets = kcalloc(connector_count, sizeof(*offsets), GFP_KERNEL);
+	enabled = kcalloc(connector_count, sizeof(bool), GFP_KERNEL);
+	if (!crtcs || !modes || !enabled || !offsets) {
+		DRM_ERROR("Memory allocation failed\n");
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	mutex_lock(&client->modeset_mutex);
+
+	mutex_lock(&dev->mode_config.mutex);
+	for (i = 0; i < connector_count; i++)
+		total_modes_count += connectors[i]->funcs->fill_modes(connectors[i], width, height);
+	if (!total_modes_count)
+		DRM_DEBUG_KMS("No connectors reported connected with modes\n");
+	drm_client_connectors_enabled(connectors, connector_count, enabled);
+
+	if (!drm_client_firmware_config(client, connectors, connector_count, crtcs,
+					modes, offsets, enabled, width, height)) {
+		memset(modes, 0, connector_count * sizeof(*modes));
+		memset(crtcs, 0, connector_count * sizeof(*crtcs));
+		memset(offsets, 0, connector_count * sizeof(*offsets));
+
+		if (!drm_client_target_cloned(dev, connectors, connector_count, modes,
+					      offsets, enabled, width, height) &&
+		    !drm_client_target_preferred(connectors, connector_count, modes,
+						 offsets, enabled, width, height))
+			DRM_ERROR("Unable to find initial modes\n");
+
+		DRM_DEBUG_KMS("picking CRTCs for %dx%d config\n",
+			      width, height);
+
+		drm_client_pick_crtcs(client, connectors, connector_count,
+				      crtcs, modes, 0, width, height);
+	}
+	mutex_unlock(&dev->mode_config.mutex);
+
+	drm_client_modeset_release(client);
+
+	for (i = 0; i < connector_count; i++) {
+		struct drm_display_mode *mode = modes[i];
+		struct drm_crtc *crtc = crtcs[i];
+		struct drm_client_offset *offset = &offsets[i];
+
+		if (mode && crtc) {
+			struct drm_mode_set *modeset = drm_client_find_modeset(client, crtc);
+			struct drm_connector *connector = connectors[i];
+
+			DRM_DEBUG_KMS("desired mode %s set on crtc %d (%d,%d)\n",
+				      mode->name, crtc->base.id, offset->x, offset->y);
+
+			if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||
+					 (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {
+				ret = -EINVAL;
+				break;
+			}
+
+			modeset->mode = drm_mode_duplicate(dev, mode);
+			drm_connector_get(connector);
+			modeset->connectors[modeset->num_connectors++] = connector;
+			modeset->x = offset->x;
+			modeset->y = offset->y;
+		}
+	}
+
+	mutex_unlock(&client->modeset_mutex);
+out:
+	kfree(crtcs);
+	kfree(modes);
+	kfree(offsets);
+	kfree(enabled);
+free_connectors:
+	for (i = 0; i < connector_count; i++)
+		drm_connector_put(connectors[i]);
+	kfree(connectors);
+
+	return ret;
+}
+EXPORT_SYMBOL(drm_client_modeset_probe);
 
 /**
  * drm_client_panel_rotation() - Check panel orientation
drivers/gpu/drm/drm_fb_helper.c +0 -691

703 lines not on this page · raw message

include/drm/drm_client.h +1 -4
index 8d94880bbe25..f2d5ed745733 100644
@@ -18,8 +18,6 @@ struct drm_gem_object;
 struct drm_minor;
 struct module;
 
-#define DRM_CLIENT_MAX_CLONED_CONNECTORS	8
-
 /**
  * struct drm_client_funcs - DRM client callbacks
  */
@@ -154,8 +152,7 @@ void drm_client_framebuffer_delete(struct drm_client_buffer *buffer);
 
 int drm_client_modeset_create(struct drm_client_dev *client);
 void drm_client_modeset_free(struct drm_client_dev *client);
-void drm_client_modeset_release(struct drm_client_dev *client);
-struct drm_mode_set *drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc);
+int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);
 bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation);
 int drm_client_modeset_commit_force(struct drm_client_dev *client);
 int drm_client_modeset_commit(struct drm_client_dev *client);
Signature · 6 lines
2.20.1

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

PATCH v3 11/11 drm/client: Hack: Add bootsplash example

In reply to Noralf Trønnes

An example to showcase the client API.

TODO:
A bootsplash client needs a way to tell drm_fb_helper to stay away, otherwise it will chime in on setup and hotplug.
Most DRM drivers register fbdev before calling drm_dev_register() (the generic emulation is an exception). This have to be reversed for bootsplash to fend off fbdev.

---
 drivers/gpu/drm/Kconfig          |   5 +
 drivers/gpu/drm/Makefile         |   1 +
 drivers/gpu/drm/drm_bootsplash.c | 362 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_client.c     |   7 +
 drivers/gpu/drm/drm_drv.c        |   4 +
 include/drm/drm_client.h         |   3 +
 6 files changed, 382 insertions(+)
 create mode 100644 drivers/gpu/drm/drm_bootsplash.c
drivers/gpu/drm/Kconfig +5 -0
index 39d5f7562f1c..23678a2f36be 100644
@@ -65,6 +65,11 @@ config DRM_DEBUG_SELFTEST
 
 	  If in doubt, say "N".
 
+config DRM_CLIENT_BOOTSPLASH
+	bool "DRM Bootsplash"
+	help
+	  DRM Bootsplash
+
 config DRM_KMS_HELPER
 	tristate
 	depends on DRM
drivers/gpu/drm/Makefile +1 -0
index 228ac9e3b645..be25caee734a 100644
@@ -32,6 +32,7 @@ drm-$(CONFIG_OF) += drm_of.o
 drm-$(CONFIG_AGP) += drm_agpsupport.o
 drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o
 drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
+drm-$(CONFIG_DRM_CLIENT_BOOTSPLASH) += drm_bootsplash.o
 
 drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_dsc.o drm_probe_helper.o \
 		drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o \
drivers/gpu/drm/drm_bootsplash.c new file +362 -0

362 lines not on this page · raw message

drivers/gpu/drm/drm_client.c +7 -0
index 3dd08c6b264d..f8b554b0a6b1 100644
@@ -161,6 +161,13 @@ void drm_client_release(struct drm_client_dev *client)
 }
 EXPORT_SYMBOL(drm_client_release);
 
+void drm_client_dev_register(struct drm_device *dev)
+{
+#if CONFIG_DRM_CLIENT_BOOTSPLASH
+	drm_bootsplash_client_register(dev);
+#endif
+}
+
 void drm_client_dev_unregister(struct drm_device *dev)
 {
 	struct drm_client_dev *client, *tmp;
drivers/gpu/drm/drm_drv.c +4 -0
index 50d849d1bc6e..fbbb5f998baf 100644
@@ -1018,6 +1018,10 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
 	drm_minor_unregister(dev, DRM_MINOR_RENDER);
 out_unlock:
 	mutex_unlock(&drm_global_mutex);
+
+	if (!ret)
+		drm_client_dev_register(dev);
+
 	return ret;
 }
 EXPORT_SYMBOL(drm_dev_register);
include/drm/drm_client.h +3 -0
index f2d5ed745733..e9eb770093fb 100644
@@ -107,6 +107,7 @@ int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
 void drm_client_release(struct drm_client_dev *client);
 void drm_client_register(struct drm_client_dev *client);
 
+void drm_client_dev_register(struct drm_device *dev);
 void drm_client_dev_unregister(struct drm_device *dev);
 void drm_client_dev_hotplug(struct drm_device *dev);
 void drm_client_dev_restore(struct drm_device *dev);
@@ -183,4 +184,6 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
 
 int drm_client_debugfs_init(struct drm_minor *minor);
 
+void drm_bootsplash_client_register(struct drm_device *dev);
+
 #endif
Signature · 6 lines
2.20.1

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

✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev3)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev3)
URL : https://patchwork.freedesktop.org/series/58597/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
caf4eff8b046 drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
3f7a665802ce drm/fb-helper: Avoid race with DRM userspace
b301bc13788f drm/fb-helper: No need to cache rotation and sw_rotations
531a1b30d7b8 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
2658ed72b240 drm/fb-helper: Remove drm_fb_helper_crtc
-:127: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#127: 
new file mode 100644

-:204: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #204: FILE: drivers/gpu/drm/drm_client_modeset.c:73:
+}
+/* TODO: Remove export when modeset code has been moved over */

-:234: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #234: FILE: drivers/gpu/drm/drm_client_modeset.c:103:
+}
+/* TODO: Remove export when modeset code has been moved over */

-:928: WARNING:LONG_LINE: line over 100 characters #928: FILE: drivers/gpu/drm/drm_fb_helper.c:2755:
+ if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||

-:929: WARNING:LONG_LINE: line over 100 characters #929: FILE: drivers/gpu/drm/drm_fb_helper.c:2756:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1)))

-:1063: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'modeset' - possible side-effects? #1063: FILE: include/drm/drm_client.h:164:
+#define drm_client_for_each_modeset(modeset, client) \
+ for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
+ modeset = (client)->modesets; modeset->crtc; modeset++)

-:1063: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'client' - possible side-effects? #1063: FILE: include/drm/drm_client.h:164:
+#define drm_client_for_each_modeset(modeset, client) \
+ for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
+ modeset = (client)->modesets; modeset->crtc; modeset++)

total: 0 errors, 3 warnings, 4 checks, 962 lines checked c06c68c07e73 drm/fb-helper: Prepare to move out commit code 6281457e241a drm/fb-helper: Move out commit code -:152: WARNING:LONG_LINE: line over 100 characters #152: FILE: drivers/gpu/drm/drm_client_modeset.c:223:
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);

-:285: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #285: FILE: drivers/gpu/drm/drm_client_modeset.c:356:
+ drm_object_property_set_value(&connector->base,
+ dev->mode_config.dpms_property, dpms_mode);

total: 0 errors, 1 warnings, 1 checks, 610 lines checked 6df8bfed31b4 drm/fb-helper: Remove drm_fb_helper_connector -:588: WARNING:LONG_LINE: line over 100 characters #588: FILE: drivers/gpu/drm/drm_fb_helper.c:1959:
+ connector->base.id, connector->tile_group ? connector->tile_group->id : 0);

-:945: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #945: FILE: include/drm/drm_client.h:183:
+#define drm_client_for_each_connector_iter(connector, iter) \
+ drm_for_each_connector_iter(connector, iter) \
+ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)

-:945: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'connector' - possible side-effects? #945: FILE: include/drm/drm_client.h:183:
+#define drm_client_for_each_connector_iter(connector, iter) \
+ drm_for_each_connector_iter(connector, iter) \
+ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)

total: 1 errors, 1 warnings, 1 checks, 1006 lines checked 6b040d9eea72 drm/fb-helper: Prepare to move out modeset config code -:169: WARNING:LONG_LINE: line over 100 characters
#169: FILE: drivers/gpu/drm/drm_fb_helper.c:2351:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {

total: 0 errors, 1 warnings, 0 checks, 179 lines checked afd7a5c0d93a drm/fb-helper: Move out modeset config code -:99: CHECK:BOOL_COMPARISON: Using comparison to false is error prone #99: FILE: drivers/gpu/drm/drm_client_modeset.c:140:
+ if (cmdline_mode->specified == false)

-:170: WARNING:LONG_LINE: line over 100 characters #170: FILE: drivers/gpu/drm/drm_client_modeset.c:211:
+ connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no");

-:314: CHECK:BOOL_COMPARISON: Using comparison to false is error prone #314: FILE: drivers/gpu/drm/drm_client_modeset.c:355:
+ if (enabled[i] == false) {

-:348: WARNING:LONG_LINE: line over 100 characters #348: FILE: drivers/gpu/drm/drm_client_modeset.c:389:
+ connector->base.id, connector->tile_group ? connector->tile_group->id : 0);

-:404: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!modes[n]" #404: FILE: drivers/gpu/drm/drm_client_modeset.c:445:
+ if (modes[n] == NULL)

-:735: WARNING:LONG_LINE: line over 100 characters #735: FILE: drivers/gpu/drm/drm_client_modeset.c:776:
+ if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||

-:736: WARNING:LONG_LINE: line over 100 characters #736: FILE: drivers/gpu/drm/drm_client_modeset.c:777:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {

-:1494: WARNING:LONG_LINE: line over 100 characters
#1494: FILE: include/drm/drm_client.h:155:
+int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);

total: 0 errors, 5 warnings, 3 checks, 1463 lines checked
f3bc7c2597ba drm/client: Hack: Add bootsplash example
-:28: WARNING:CONFIG_DESCRIPTION: please write a paragraph that describes the config symbol fully #28: FILE: drivers/gpu/drm/Kconfig:68:
+config DRM_CLIENT_BOOTSPLASH

-:49: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #49:
new file mode 100644

-:54: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #54: FILE: drivers/gpu/drm/drm_bootsplash.c:1:
+/* DRM internal client example */

-:80: CHECK:UNCOMMENTED_DEFINITION: struct mutex definition without comment #80: FILE: drivers/gpu/drm/drm_bootsplash.c:27:
+ struct mutex lock;

-:120: WARNING:LONG_LINE: line over 100 characters #120: FILE: drivers/gpu/drm/drm_bootsplash.c:67:
+ splash->buffers[i] = drm_client_framebuffer_create(&splash->client, width, height, DRM_FORMAT_XRGB8888);

-:270: WARNING:LONG_LINE: line over 100 characters
#270: FILE: drivers/gpu/drm/drm_bootsplash.c:217:
+static int drm_bootsplash_draw(struct drm_bootsplash *splash, unsigned int sequence, unsigned int buffer_num)

total: 0 errors, 5 warnings, 1 checks, 416 lines checked

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

#13 lore raw

✗ Fi.CI.SPARSE: warning for drm/fb-helper: Move modesetting code to drm_client (rev3)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev3)
URL : https://patchwork.freedesktop.org/series/58597/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
Okay!

Commit: drm/fb-helper: Avoid race with DRM userspace Okay!

Commit: drm/fb-helper: No need to cache rotation and sw_rotations Okay!

Commit: drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} -O:drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void)

Commit: drm/fb-helper: Remove drm_fb_helper_crtc -O:drivers/gpu/drm/drm_fb_helper.c:2052:43: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2052:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2015:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2015:43: warning: expression using sizeof(void) -./include/linux/slab.h:666:13: error: not a function <noident> +./include/linux/slab.h:666:13: error: undefined identifier '__builtin_mul_overflow' +./include/linux/slab.h:666:13: warning: call with no type!

Commit: drm/fb-helper: Prepare to move out commit code
+drivers/gpu/drm/drm_fb_helper.c:404:6: warning: symbol 'drm_client_panel_rotation' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:579:5: warning: symbol 'drm_client_modeset_commit_force' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:603:5: warning: symbol 'drm_client_modeset_commit' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:739:5: warning: symbol 'drm_client_modeset_dpms' was not declared. Should it be static?

Commit: drm/fb-helper: Move out commit code
+drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:3223:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static? -drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:404:6: warning: symbol 'drm_client_panel_rotation' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:579:5: warning: symbol 'drm_client_modeset_commit_force' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:603:5: warning: symbol 'drm_client_modeset_commit' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:739:5: warning: symbol 'drm_client_modeset_dpms' was not declared. Should it be static?

Commit: drm/fb-helper: Remove drm_fb_helper_connector -O:drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2076:30: warning: expression using sizeof(void) -./include/linux/slab.h:666:13: error: not a function <noident>

Commit: drm/fb-helper: Prepare to move out modeset config code -O:drivers/gpu/drm/drm_fb_helper.c:2076:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2080:30: warning: expression using sizeof(void)

Commit: drm/fb-helper: Move out modeset config code +drivers/gpu/drm/drm_client_modeset.c:506:30: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2080:30: warning: expression using sizeof(void) +./include/linux/slab.h:666:13: error: not a function <noident> -./include/linux/slab.h:666:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/slab.h:666:13: warning: call with no type!

Commit: drm/client: Hack: Add bootsplash example
+
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+drivers/gpu/drm/drm_client.c:166:5: warning: "CONFIG_DRM_CLIENT_BOOTSPLASH" is not defined, evaluates to 0 [-Wundef] +drivers/gpu/drm/drm_client.c:166:5: warning: undefined preprocessor identifier 'CONFIG_DRM_CLIENT_BOOTSPLASH' +drivers/gpu/drm/drm_client.c: In function ‘drm_client_dev_register’:
+Error in reading or end of file.
+ #if CONFIG_DRM_CLIENT_BOOTSPLASH

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

#14 lore raw

✓ Fi.CI.BAT: success for drm/fb-helper: Move modesetting code to drm_client (rev3)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev3)
URL : https://patchwork.freedesktop.org/series/58597/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5963 -> Patchwork_12850
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58597/revisions/3/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#103191]

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Possible fixes ####

* igt@gem_exec_basic@gtt-default:
- fi-skl-6770hq: DMESG-WARN [fdo#105541] -> PASS

[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (46 -> 41)
------------------------------

Missing (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus

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

* Linux: CI_DRM_5963 -> Patchwork_12850

CI_DRM_5963: 1653c8da31bcdf8ec465b273e5b713e03a6c1d12 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4959: 504367d33b787de2ba8e007a5b620cfd6f0b3074 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12850: f3bc7c2597baf42b6ecbeb0bf598aef6e388ebca @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

f3bc7c2597ba drm/client: Hack: Add bootsplash example afd7a5c0d93a drm/fb-helper: Move out modeset config code 6b040d9eea72 drm/fb-helper: Prepare to move out modeset config code 6df8bfed31b4 drm/fb-helper: Remove drm_fb_helper_connector 6281457e241a drm/fb-helper: Move out commit code
c06c68c07e73 drm/fb-helper: Prepare to move out commit code 2658ed72b240 drm/fb-helper: Remove drm_fb_helper_crtc 531a1b30d7b8 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} b301bc13788f drm/fb-helper: No need to cache rotation and sw_rotations 3f7a665802ce drm/fb-helper: Avoid race with DRM userspace caf4eff8b046 drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12850/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#15 lore raw

✗ Fi.CI.IGT: failure for drm/fb-helper: Move modesetting code to drm_client (rev3)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev3)
URL : https://patchwork.freedesktop.org/series/58597/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5963_full -> Patchwork_12850_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12850_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12850_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12850_full:

### IGT changes ###

#### Possible regressions ####

* igt@kms_fbcon_fbt@psr:
- shard-skl: PASS -> FAIL

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: PASS -> FAIL +1
- shard-skl: NOTRUN -> FAIL

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@audio@hdmi-integrity}:
- shard-glk: FAIL -> TIMEOUT

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_capture@capture-bsd2:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +83

* igt@gem_workarounds@suspend-resume:
- shard-apl: PASS -> DMESG-WARN [fdo#108566] +3

* igt@i915_pm_rpm@modeset-stress-extra-wait:
- shard-skl: PASS -> INCOMPLETE [fdo#107807]

* igt@kms_busy@extended-modeset-hang-oldfb-render-f:
- shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +13

* igt@kms_busy@extended-pageflip-hang-newfb-render-d:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_busy@extended-pageflip-hang-oldfb-render-a:
- shard-snb: PASS -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-blt:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +149

* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-glk: PASS -> FAIL [fdo#103167]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
- shard-iclb: PASS -> FAIL [fdo#103167] +8

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-plflip-blt:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +14

* igt@kms_lease@cursor_implicit_plane:
- shard-skl: NOTRUN -> FAIL [fdo#110278]

* igt@kms_lease@page_flip_implicit_plane:
- shard-skl: NOTRUN -> FAIL [fdo#110281]

* igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
- shard-skl: NOTRUN -> FAIL [fdo#108145] +2
- shard-kbl: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +8

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: PASS -> SKIP [fdo#109642] +1

* igt@kms_psr@psr2_sprite_plane_onoff:
- shard-iclb: PASS -> SKIP [fdo#109441]

* igt@kms_rmfb@rmfb-ioctl:
- shard-snb: PASS -> SKIP [fdo#109271]

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> FAIL [fdo#109016]

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]

#### Possible fixes ####

* igt@gem_ctx_isolation@vecs0-s3:
- shard-kbl: DMESG-WARN [fdo#108566] -> PASS

* igt@i915_pm_rpm@debugfs-forcewake-user:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS

* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +7

* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-xtiled:
- shard-skl: FAIL [fdo#103184] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-indfb-fliptrack:
- shard-skl: FAIL [fdo#108040] -> PASS

* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +3

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-skl: FAIL [fdo#103167] -> PASS +1

* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: FAIL [fdo#108145] -> PASS +1

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: FAIL [fdo#103166] -> PASS

* igt@kms_plane_scaling@pipe-c-scaler-with-rotation:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_psr@psr2_dpms:
- shard-iclb: SKIP [fdo#109441] -> PASS

#### Warnings ####

* igt@i915_pm_rpm@i2c:
- shard-iclb: DMESG-FAIL [fdo#110271] -> FAIL [fdo#104097]

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

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110271]: https://bugs.freedesktop.org/show_bug.cgi?id=110271
[fdo#110278]: https://bugs.freedesktop.org/show_bug.cgi?id=110278
[fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

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

Missing (1): shard-hsw

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

* Linux: CI_DRM_5963 -> Patchwork_12850

CI_DRM_5963: 1653c8da31bcdf8ec465b273e5b713e03a6c1d12 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4959: 504367d33b787de2ba8e007a5b620cfd6f0b3074 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12850: f3bc7c2597baf42b6ecbeb0bf598aef6e388ebca @ 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_12850/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#16 lore raw
In reply to Noralf Trønnes

Den 20.04.2019 12.45, skrev Noralf Trønnes:

Quoted 8 lines

This moves the modesetting code from drm_fb_helper to drm_client so it can be shared by all internal clients.

Changes this time:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

I got Fi.CI.IGT failures on this one:

* igt@kms_fbcon_fbt@psr:
- shard-skl: PASS -> FAIL

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: PASS -> FAIL +1
- shard-skl: NOTRUN -> FAIL

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12850/
https://patchwork.freedesktop.org/series/58597/

The previous version of this series reported success:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12720/
But AFAICT those fbcon tests didn't succeed when I look at the details.

I'd appreciate if someone with Intel CI knowledge could have a look at this.

Noralf.

Quoted 27 lines

Noralf.

Noralf Trønnes (11):
drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: Avoid race with DRM userspace drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc->{x,y,desired_mode} drm/fb-helper: Remove drm_fb_helper_crtc drm/fb-helper: Prepare to move out commit code drm/fb-helper: Move out commit code
drm/fb-helper: Remove drm_fb_helper_connector drm/fb-helper: Prepare to move out modeset config code drm/fb-helper: Move out modeset config code drm/client: Hack: Add bootsplash example

 Documentation/gpu/drm-client.rst     |    3 +
 Documentation/gpu/todo.rst           |   10 +
 drivers/gpu/drm/Kconfig              |    5 +
 drivers/gpu/drm/Makefile             |    3 +-
 drivers/gpu/drm/drm_atomic.c         |  168 ++++
 drivers/gpu/drm/drm_atomic_helper.c  |  164 ---
 drivers/gpu/drm/drm_auth.c           |   20 +
 drivers/gpu/drm/drm_bootsplash.c     |  362 +++++++
 drivers/gpu/drm/drm_client.c         |   17 +-
 drivers/gpu/drm/drm_client_modeset.c | 1085 ++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h  |    5 +
 drivers/gpu/drm/drm_drv.c            |    4 +
Quoted 9 lines
 drivers/gpu/drm/drm_fb_helper.c      | 1381 +++-----------------------
 drivers/gpu/drm/drm_internal.h       |    2 +
 include/drm/drm_atomic_helper.h      |    4 -
 include/drm/drm_client.h             |   49 +
 include/drm/drm_fb_helper.h          |  102 +-
 17 files changed, 1864 insertions(+), 1520 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_bootsplash.c
 create mode 100644 drivers/gpu/drm/drm_client_modeset.c

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

#17 lore raw
Quoted 21 lines · Noralf Trønnes

Den 20.04.2019 12.45, skrev Noralf Trønnes:

Quoted 8 lines

This moves the modesetting code from drm_fb_helper to drm_client so it can be shared by all internal clients.

Changes this time:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

I got Fi.CI.IGT failures on this one:

* igt@kms_fbcon_fbt@psr:
- shard-skl: PASS -> FAIL

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: PASS -> FAIL +1
- shard-skl: NOTRUN -> FAIL

Quoted 8 lines

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12850/
https://patchwork.freedesktop.org/series/58597/

The previous version of this series reported success:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12720/
But AFAICT those fbcon tests didn't succeed when I look at the details.

I'd appreciate if someone with Intel CI knowledge could have a look at this.

The issue is real, but I honestly can't tell if this is due to your patches or not. There was a regression last week and we reworked some filters that may not apply anymore to the base that was selected to test your patches.

I queued a re-run! We should have the results in the next 6-12 hours.

Sorry for the delay!
Martin

Quoted 39 lines

Noralf.

Quoted 27 lines

Noralf.

Noralf Trønnes (11):
drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: Avoid race with DRM userspace drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc->{x,y,desired_mode} drm/fb-helper: Remove drm_fb_helper_crtc drm/fb-helper: Prepare to move out commit code drm/fb-helper: Move out commit code
drm/fb-helper: Remove drm_fb_helper_connector drm/fb-helper: Prepare to move out modeset config code drm/fb-helper: Move out modeset config code drm/client: Hack: Add bootsplash example

 Documentation/gpu/drm-client.rst     |    3 +
 Documentation/gpu/todo.rst           |   10 +
 drivers/gpu/drm/Kconfig              |    5 +
 drivers/gpu/drm/Makefile             |    3 +-
 drivers/gpu/drm/drm_atomic.c         |  168 ++++
 drivers/gpu/drm/drm_atomic_helper.c  |  164 ---
 drivers/gpu/drm/drm_auth.c           |   20 +
 drivers/gpu/drm/drm_bootsplash.c     |  362 +++++++
 drivers/gpu/drm/drm_client.c         |   17 +-
 drivers/gpu/drm/drm_client_modeset.c | 1085 ++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h  |    5 +
 drivers/gpu/drm/drm_drv.c            |    4 +
Quoted 9 lines
 drivers/gpu/drm/drm_fb_helper.c      | 1381 +++-----------------------
 drivers/gpu/drm/drm_internal.h       |    2 +
 include/drm/drm_atomic_helper.h      |    4 -
 include/drm/drm_client.h             |   49 +
 include/drm/drm_fb_helper.h          |  102 +-
 17 files changed, 1864 insertions(+), 1520 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_bootsplash.c
 create mode 100644 drivers/gpu/drm/drm_client_modeset.c
Quoted 5 lines

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

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

#18 lore raw

Den 23.04.2019 13.04, skrev Martin Peres:

Quoted 29 lines · Noralf Trønnes
Quoted 28 lines

Den 20.04.2019 12.45, skrev Noralf Trønnes:

Quoted 8 lines

This moves the modesetting code from drm_fb_helper to drm_client so it can be shared by all internal clients.

Changes this time:
- Use full drm_client_init/release for the modesets (Daniel Vetter)
- drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
- Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)

I got Fi.CI.IGT failures on this one:

* igt@kms_fbcon_fbt@psr:
- shard-skl: PASS -> FAIL

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: PASS -> FAIL +1
- shard-skl: NOTRUN -> FAIL

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12850/
https://patchwork.freedesktop.org/series/58597/

The previous version of this series reported success:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12720/
But AFAICT those fbcon tests didn't succeed when I look at the details.

Quoted 9 lines
Quoted 1 line

I'd appreciate if someone with Intel CI knowledge could have a look at this.

The issue is real, but I honestly can't tell if this is due to your patches or not. There was a regression last week and we reworked some filters that may not apply anymore to the base that was selected to test your patches.

I queued a re-run! We should have the results in the next 6-12 hours.

igt@kms_fbcon_fbt@psr doesn't regress anymore, but @psr-suspend still does:

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: [PASS][1] -> [FAIL][2] +1 similar issue
[1]:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb5/igt@[email protected]
[2]:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb2/igt@[email protected]
- shard-skl: [PASS][3] -> [FAIL][4] +1 similar issue
[3]:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl4/igt@[email protected]
[4]:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl4/igt@[email protected]

I think I'll split up the series and feed it to the CI piece by piece so I can find the offending patch.

Thanks for taking a look.

Noralf.

Quoted 47 lines

Sorry for the delay!
Martin

Quoted 44 lines

Noralf.

Quoted 27 lines

Noralf.

Noralf Trønnes (11):
drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: Avoid race with DRM userspace drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc->{x,y,desired_mode} drm/fb-helper: Remove drm_fb_helper_crtc drm/fb-helper: Prepare to move out commit code drm/fb-helper: Move out commit code
drm/fb-helper: Remove drm_fb_helper_connector drm/fb-helper: Prepare to move out modeset config code drm/fb-helper: Move out modeset config code drm/client: Hack: Add bootsplash example

 Documentation/gpu/drm-client.rst     |    3 +
 Documentation/gpu/todo.rst           |   10 +
 drivers/gpu/drm/Kconfig              |    5 +
 drivers/gpu/drm/Makefile             |    3 +-
 drivers/gpu/drm/drm_atomic.c         |  168 ++++
 drivers/gpu/drm/drm_atomic_helper.c  |  164 ---
 drivers/gpu/drm/drm_auth.c           |   20 +
 drivers/gpu/drm/drm_bootsplash.c     |  362 +++++++
 drivers/gpu/drm/drm_client.c         |   17 +-
 drivers/gpu/drm/drm_client_modeset.c | 1085 ++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h  |    5 +
 drivers/gpu/drm/drm_drv.c            |    4 +
Quoted 9 lines
 drivers/gpu/drm/drm_fb_helper.c      | 1381 +++-----------------------
 drivers/gpu/drm/drm_internal.h       |    2 +
 include/drm/drm_atomic_helper.h      |    4 -
 include/drm/drm_client.h             |   49 +
 include/drm/drm_fb_helper.h          |  102 +-
 17 files changed, 1864 insertions(+), 1520 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_bootsplash.c
 create mode 100644 drivers/gpu/drm/drm_client_modeset.c

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

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

#19 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev4)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev4)
URL : https://patchwork.freedesktop.org/series/58597/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
4a9806c7e6fe drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
0ba328ef9996 drm/fb-helper: Avoid race with DRM userspace
faf3b22de68a drm/fb-helper: No need to cache rotation and sw_rotations
433f6bb5a950 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
6877829f5db8 drm/fb-helper: Remove drm_fb_helper_crtc
-:127: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#127: 
new file mode 100644

-:204: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #204: FILE: drivers/gpu/drm/drm_client_modeset.c:73:
+}
+/* TODO: Remove export when modeset code has been moved over */

-:234: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #234: FILE: drivers/gpu/drm/drm_client_modeset.c:103:
+}
+/* TODO: Remove export when modeset code has been moved over */

-:928: WARNING:LONG_LINE: line over 100 characters #928: FILE: drivers/gpu/drm/drm_fb_helper.c:2755:
+ if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||

-:929: WARNING:LONG_LINE: line over 100 characters #929: FILE: drivers/gpu/drm/drm_fb_helper.c:2756:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1)))

-:1063: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'modeset' - possible side-effects? #1063: FILE: include/drm/drm_client.h:164:
+#define drm_client_for_each_modeset(modeset, client) \
+ for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
+ modeset = (client)->modesets; modeset->crtc; modeset++)

-:1063: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'client' - possible side-effects? #1063: FILE: include/drm/drm_client.h:164:
+#define drm_client_for_each_modeset(modeset, client) \
+ for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
+ modeset = (client)->modesets; modeset->crtc; modeset++)

total: 0 errors, 3 warnings, 4 checks, 962 lines checked fc2de5684c87 drm/fb-helper: Prepare to move out commit code e7bc8d3f4204 drm/fb-helper: Move out commit code -:152: WARNING:LONG_LINE: line over 100 characters #152: FILE: drivers/gpu/drm/drm_client_modeset.c:223:
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);

-:285: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #285: FILE: drivers/gpu/drm/drm_client_modeset.c:356:
+ drm_object_property_set_value(&connector->base,
+ dev->mode_config.dpms_property, dpms_mode);

total: 0 errors, 1 warnings, 1 checks, 610 lines checked f4c1616a9e77 drm/fb-helper: Remove drm_fb_helper_connector -:588: WARNING:LONG_LINE: line over 100 characters #588: FILE: drivers/gpu/drm/drm_fb_helper.c:1959:
+ connector->base.id, connector->tile_group ? connector->tile_group->id : 0);

-:945: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #945: FILE: include/drm/drm_client.h:183:
+#define drm_client_for_each_connector_iter(connector, iter) \
+ drm_for_each_connector_iter(connector, iter) \
+ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)

-:945: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'connector' - possible side-effects? #945: FILE: include/drm/drm_client.h:183:
+#define drm_client_for_each_connector_iter(connector, iter) \
+ drm_for_each_connector_iter(connector, iter) \
+ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)

total: 1 errors, 1 warnings, 1 checks, 1006 lines checked d349e5c6cae5 drm/fb-helper: Prepare to move out modeset config code -:169: WARNING:LONG_LINE: line over 100 characters
#169: FILE: drivers/gpu/drm/drm_fb_helper.c:2351:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {

total: 0 errors, 1 warnings, 0 checks, 179 lines checked eaf53f44dd76 drm/fb-helper: Move out modeset config code -:99: CHECK:BOOL_COMPARISON: Using comparison to false is error prone #99: FILE: drivers/gpu/drm/drm_client_modeset.c:140:
+ if (cmdline_mode->specified == false)

-:170: WARNING:LONG_LINE: line over 100 characters #170: FILE: drivers/gpu/drm/drm_client_modeset.c:211:
+ connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no");

-:314: CHECK:BOOL_COMPARISON: Using comparison to false is error prone #314: FILE: drivers/gpu/drm/drm_client_modeset.c:355:
+ if (enabled[i] == false) {

-:348: WARNING:LONG_LINE: line over 100 characters #348: FILE: drivers/gpu/drm/drm_client_modeset.c:389:
+ connector->base.id, connector->tile_group ? connector->tile_group->id : 0);

-:404: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!modes[n]" #404: FILE: drivers/gpu/drm/drm_client_modeset.c:445:
+ if (modes[n] == NULL)

-:735: WARNING:LONG_LINE: line over 100 characters #735: FILE: drivers/gpu/drm/drm_client_modeset.c:776:
+ if (WARN_ON_ONCE(modeset->num_connectors == DRM_CLIENT_MAX_CLONED_CONNECTORS ||

-:736: WARNING:LONG_LINE: line over 100 characters #736: FILE: drivers/gpu/drm/drm_client_modeset.c:777:
+ (dev->mode_config.num_crtc > 1 && modeset->num_connectors == 1))) {

-:1494: WARNING:LONG_LINE: line over 100 characters
#1494: FILE: include/drm/drm_client.h:155:
+int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);

total: 0 errors, 5 warnings, 3 checks, 1463 lines checked
9bbead190cb6 drm/client: Hack: Add bootsplash example
-:28: WARNING:CONFIG_DESCRIPTION: please write a paragraph that describes the config symbol fully #28: FILE: drivers/gpu/drm/Kconfig:68:
+config DRM_CLIENT_BOOTSPLASH

-:49: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #49:
new file mode 100644

-:54: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #54: FILE: drivers/gpu/drm/drm_bootsplash.c:1:
+/* DRM internal client example */

-:80: CHECK:UNCOMMENTED_DEFINITION: struct mutex definition without comment #80: FILE: drivers/gpu/drm/drm_bootsplash.c:27:
+ struct mutex lock;

-:120: WARNING:LONG_LINE: line over 100 characters #120: FILE: drivers/gpu/drm/drm_bootsplash.c:67:
+ splash->buffers[i] = drm_client_framebuffer_create(&splash->client, width, height, DRM_FORMAT_XRGB8888);

-:270: WARNING:LONG_LINE: line over 100 characters
#270: FILE: drivers/gpu/drm/drm_bootsplash.c:217:
+static int drm_bootsplash_draw(struct drm_bootsplash *splash, unsigned int sequence, unsigned int buffer_num)

total: 0 errors, 5 warnings, 1 checks, 416 lines checked

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

#20 lore raw

✗ Fi.CI.SPARSE: warning for drm/fb-helper: Move modesetting code to drm_client (rev4)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev4)
URL : https://patchwork.freedesktop.org/series/58597/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
Okay!

Commit: drm/fb-helper: Avoid race with DRM userspace Okay!

Commit: drm/fb-helper: No need to cache rotation and sw_rotations Okay!

Commit: drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} -O:drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2035:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2036:40: warning: expression using sizeof(void)

Commit: drm/fb-helper: Remove drm_fb_helper_crtc -O:drivers/gpu/drm/drm_fb_helper.c:2052:43: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2052:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2015:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2015:43: warning: expression using sizeof(void) -./include/linux/slab.h:666:13: error: not a function <noident> +./include/linux/slab.h:666:13: error: undefined identifier '__builtin_mul_overflow' +./include/linux/slab.h:666:13: warning: call with no type!

Commit: drm/fb-helper: Prepare to move out commit code
+drivers/gpu/drm/drm_fb_helper.c:404:6: warning: symbol 'drm_client_panel_rotation' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:579:5: warning: symbol 'drm_client_modeset_commit_force' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:603:5: warning: symbol 'drm_client_modeset_commit' was not declared. Should it be static? +drivers/gpu/drm/drm_fb_helper.c:739:5: warning: symbol 'drm_client_modeset_dpms' was not declared. Should it be static?

Commit: drm/fb-helper: Move out commit code
+drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:3223:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static? -drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1756:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1757:40: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1771:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1773:43: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:404:6: warning: symbol 'drm_client_panel_rotation' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:579:5: warning: symbol 'drm_client_modeset_commit_force' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:603:5: warning: symbol 'drm_client_modeset_commit' was not declared. Should it be static? -O:drivers/gpu/drm/drm_fb_helper.c:739:5: warning: symbol 'drm_client_modeset_dpms' was not declared. Should it be static?

Commit: drm/fb-helper: Remove drm_fb_helper_connector -O:drivers/gpu/drm/drm_fb_helper.c:2277:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2076:30: warning: expression using sizeof(void) -./include/linux/slab.h:666:13: error: not a function <noident>

Commit: drm/fb-helper: Prepare to move out modeset config code -O:drivers/gpu/drm/drm_fb_helper.c:2076:30: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2080:30: warning: expression using sizeof(void)

Commit: drm/fb-helper: Move out modeset config code +drivers/gpu/drm/drm_client_modeset.c:506:30: warning: expression using sizeof(void) -O:drivers/gpu/drm/drm_fb_helper.c:2080:30: warning: expression using sizeof(void) +./include/linux/slab.h:666:13: error: not a function <noident> -./include/linux/slab.h:666:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/slab.h:666:13: warning: call with no type!

Commit: drm/client: Hack: Add bootsplash example
+
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+drivers/gpu/drm/drm_client.c:166:5: warning: "CONFIG_DRM_CLIENT_BOOTSPLASH" is not defined, evaluates to 0 [-Wundef] +drivers/gpu/drm/drm_client.c:166:5: warning: undefined preprocessor identifier 'CONFIG_DRM_CLIENT_BOOTSPLASH' +drivers/gpu/drm/drm_client.c: In function ‘drm_client_dev_register’:
+Error in reading or end of file.
+ #if CONFIG_DRM_CLIENT_BOOTSPLASH

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

#21 lore raw

✓ Fi.CI.BAT: success for drm/fb-helper: Move modesetting code to drm_client (rev4)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev4)
URL : https://patchwork.freedesktop.org/series/58597/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5971 -> Patchwork_12854
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58597/revisions/4/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-blb-e6850/igt@[email protected]

* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: [PASS][3] -> [INCOMPLETE][4] ([fdo#108602] / [fdo#108744])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html

* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: [PASS][5] -> [FAIL][6] ([fdo#103167])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/fi-byt-clapper/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-byt-clapper/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: [PASS][7] -> [FAIL][8] ([fdo#103191])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/fi-byt-clapper/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-byt-clapper/igt@[email protected]

* igt@runner@aborted:
- fi-skl-iommu: NOTRUN -> [FAIL][9] ([fdo#104108] / [fdo#108602])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-skl-iommu/igt@[email protected]

#### Possible fixes ####

* igt@kms_flip@basic-flip-vs-wf_vblank:
- fi-bwr-2160: [FAIL][10] ([fdo#100368]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html

[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744

Participating hosts (50 -> 42)
------------------------------

Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-skl-6260u fi-ctg-p8600 fi-bdw-samus fi-skl-6600u

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

* Linux: CI_DRM_5971 -> Patchwork_12854

CI_DRM_5971: e91b848a66e8672c48ea65d082b260f13f2c86b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4959: 504367d33b787de2ba8e007a5b620cfd6f0b3074 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12854: 9bbead190cb62245d4b2290a3bc905a1505f7429 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

9bbead190cb6 drm/client: Hack: Add bootsplash example eaf53f44dd76 drm/fb-helper: Move out modeset config code d349e5c6cae5 drm/fb-helper: Prepare to move out modeset config code f4c1616a9e77 drm/fb-helper: Remove drm_fb_helper_connector e7bc8d3f4204 drm/fb-helper: Move out commit code
fc2de5684c87 drm/fb-helper: Prepare to move out commit code 6877829f5db8 drm/fb-helper: Remove drm_fb_helper_crtc 433f6bb5a950 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} faf3b22de68a drm/fb-helper: No need to cache rotation and sw_rotations 0ba328ef9996 drm/fb-helper: Avoid race with DRM userspace 4a9806c7e6fe drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#22 lore raw

✗ Fi.CI.IGT: failure for drm/fb-helper: Move modesetting code to drm_client (rev4)

In reply to Noralf Trønnes
== Series Details ==

== Series Details ==

Series: drm/fb-helper: Move modesetting code to drm_client (rev4)
URL : https://patchwork.freedesktop.org/series/58597/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5971_full -> Patchwork_12854_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12854_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12854_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12854_full:

### IGT changes ###

#### Possible regressions ####

* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: [PASS][1] -> [FAIL][2] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb2/igt@[email protected]
- shard-skl: [PASS][3] -> [FAIL][4] +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl4/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_tiled_swapping@non-threaded:
- shard-glk: [PASS][5] -> [DMESG-WARN][6] ([fdo#108686])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-glk5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-glk4/igt@[email protected]

* igt@i915_pm_rpm@modeset-stress-extra-wait:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([fdo#107807])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl8/igt@[email protected]

* igt@kms_busy@extended-modeset-hang-oldfb-render-f:
- shard-skl: NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#109278]) +14 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl4/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: [PASS][10] -> [FAIL][11] ([fdo#106509] / [fdo#107409])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-glk2/igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-glk6/igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic.html

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [PASS][12] -> [FAIL][13] ([fdo#105363])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-glk6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-glk1/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [PASS][14] -> [FAIL][15] ([fdo#105363])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl7/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-indfb-fliptrack:
- shard-skl: [PASS][16] -> [FAIL][17] ([fdo#103167]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl2/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-glk: [PASS][18] -> [FAIL][19] ([fdo#103167])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-glk3/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-glk3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [PASS][20] -> [DMESG-WARN][21] ([fdo#108566]) +4 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-apl7/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-apl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
- shard-iclb: [PASS][22] -> [FAIL][23] ([fdo#103167]) +7 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html

* igt@kms_lease@atomic_implicit_crtc:
- shard-skl: NOTRUN -> [FAIL][24] ([fdo#110279])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl5/igt@kms_lease@atomic_implicit_crtc.html

* igt@kms_lease@setcrtc_implicit_plane:
- shard-skl: NOTRUN -> [FAIL][25] ([fdo#110281])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl1/igt@kms_lease@setcrtc_implicit_plane.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [PASS][26] -> [DMESG-WARN][27] ([fdo#108566])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-kbl4/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-kbl5/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-skl: [PASS][28] -> [INCOMPLETE][29] ([fdo#104108])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl6/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl3/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][30] -> [FAIL][31] ([fdo#108145])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl2/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
- shard-skl: NOTRUN -> [FAIL][32] ([fdo#108145]) +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl7/igt@[email protected]

* igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
- shard-glk: [PASS][33] -> [SKIP][34] ([fdo#109271] / [fdo#109278]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-glk9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-glk5/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109642]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb7/igt@[email protected]

* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: [PASS][37] -> [INCOMPLETE][38] ([fdo#103665])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-kbl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-kbl2/igt@[email protected]

* igt@kms_rotation_crc@sprite-rotation-180:
- shard-apl: [PASS][39] -> [INCOMPLETE][40] ([fdo#103927])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-apl7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-apl6/igt@[email protected]

* igt@kms_setmode@basic:
- shard-kbl: [PASS][41] -> [FAIL][42] ([fdo#99912])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-kbl4/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-kbl5/igt@[email protected]

* igt@perf_pmu@busy-accuracy-50-vcs1:
- shard-skl: NOTRUN -> [SKIP][43] ([fdo#109271]) +142 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl6/igt@[email protected]

#### Possible fixes ####

* igt@gem_eio@in-flight-suspend:
- shard-apl: [DMESG-WARN][44] ([fdo#108566]) -> [PASS][45] +4 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-apl7/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-apl7/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: [FAIL][46] ([fdo#108686]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb1/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb5/igt@[email protected]

* igt@i915_pm_rpm@gem-evict-pwrite:
- shard-skl: [INCOMPLETE][48] ([fdo#107807]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl9/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl5/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-xtiled:
- shard-skl: [FAIL][50] ([fdo#103184]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl9/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl7/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-skl: [INCOMPLETE][52] ([fdo#107773] / [fdo#109507]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-skl10/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-skl9/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
- shard-iclb: [FAIL][54] ([fdo#103167]) -> [PASS][55] +2 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb4/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb8/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-rte:
- shard-iclb: [FAIL][56] ([fdo#103167] / [fdo#110378]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb1/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb3/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][58] ([fdo#103166]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb4/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb7/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [SKIP][60] ([fdo#109441]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5971/shard-iclb8/igt@kms_psr@psr2_cursor_plane_move.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12854/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html

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

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[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#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#107409]: https://bugs.freedesktop.org/show_bug.cgi?id=107409
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110279]: https://bugs.freedesktop.org/show_bug.cgi?id=110279
[fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281
[fdo#110378]: https://bugs.freedesktop.org/show_bug.cgi?id=110378
[fdo#110499]: https://bugs.freedesktop.org/show_bug.cgi?id=110499
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

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

Missing (1): shard-hsw

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

* Linux: CI_DRM_5971 -> Patchwork_12854

CI_DRM_5971: e91b848a66e8672c48ea65d082b260f13f2c86b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4959: 504367d33b787de2ba8e007a5b620cfd6f0b3074 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12854: 9bbead190cb62245d4b2290a3bc905a1505f7429 @ 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_12854/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx