All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data"
@ 2018-02-23 19:25 Ville Syrjala
  2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Using a flexible array for the blob data was a mistake by me. It
forces all users of the blob data to cast blob->data to something
else. void* is clearly superior so let's go back to the original
scheme.

Not a clean revert as the code has moved.

This reverts commit d63f5e6bf6f2a1573ea39c9937cdf5ab0b3a4b77.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_property.c | 1 +
 include/drm/drm_property.h     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index bae50e6b819d..0f6620fea3de 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -550,6 +550,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
 	/* This must be explicitly initialised, so we can safely call list_del
 	 * on it in the removal handler, even if it isn't in a file list. */
 	INIT_LIST_HEAD(&blob->head_file);
+	blob->data = (void *)blob + sizeof(*blob);
 	blob->length = length;
 	blob->dev = dev;
 
diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
index 8a522b4bed40..265fd1f2e112 100644
--- a/include/drm/drm_property.h
+++ b/include/drm/drm_property.h
@@ -209,7 +209,7 @@ struct drm_property_blob {
 	struct list_head head_global;
 	struct list_head head_file;
 	size_t length;
-	unsigned char data[];
+	void *data;
 };
 
 struct drm_prop_enum_list {
-- 
2.13.6

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

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

* [PATCH 2/6] drm: Remove now pointelss blob->data casts
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
@ 2018-02-23 19:25 ` Ville Syrjala
  2018-03-01  8:57   ` Sharma, Shashank
  2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Now that blob->data is void* again we don't need the casts anymore.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic.c        | 3 +--
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 drivers/gpu/drm/drm_edid.c          | 3 +--
 drivers/gpu/drm/drm_fb_helper.c     | 2 +-
 drivers/gpu/drm/drm_plane.c         | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 46733d534587..8945357212ba 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -391,8 +391,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 	if (blob) {
 		if (blob->length != sizeof(struct drm_mode_modeinfo) ||
 		    drm_mode_convert_umode(state->crtc->dev, &state->mode,
-		                           (const struct drm_mode_modeinfo *)
-		                            blob->data))
+					   blob->data))
 			return -EINVAL;
 
 		state->mode_blob = drm_property_blob_get(blob);
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ae3cbfe9e01c..6211a1b20405 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3816,7 +3816,7 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
 	}
 
 	/* Prepare GAMMA_LUT with the legacy values. */
-	blob_data = (struct drm_color_lut *) blob->data;
+	blob_data = blob->data;
 	for (i = 0; i < size; i++) {
 		blob_data[i].red = red[i];
 		blob_data[i].green = green[i];
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 788fee4b4bf9..134069f36482 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1575,8 +1575,7 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
 	struct edid *override = NULL;
 
 	if (connector->override_edid)
-		override = drm_edid_duplicate((const struct edid *)
-					      connector->edid_blob_ptr->data);
+		override = drm_edid_duplicate(connector->edid_blob_ptr->data);
 
 	if (!override)
 		override = drm_load_edid_firmware(connector);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 035784ddd133..0646b108030b 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1351,7 +1351,7 @@ static struct drm_property_blob *setcmap_new_gamma_lut(struct drm_crtc *crtc,
 	if (IS_ERR(gamma_lut))
 		return gamma_lut;
 
-	lut = (struct drm_color_lut *)gamma_lut->data;
+	lut = gamma_lut->data;
 	if (cmap->start || cmap->len != size) {
 		u16 *r = crtc->gamma_store;
 		u16 *g = r + crtc->gamma_size;
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 09de6ecb3968..9851616cf0f3 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -104,7 +104,7 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 	if (IS_ERR(blob))
 		return -1;
 
-	blob_data = (struct drm_format_modifier_blob *)blob->data;
+	blob_data = blob->data;
 	blob_data->version = FORMAT_BLOB_CURRENT;
 	blob_data->count_formats = plane->format_count;
 	blob_data->formats_offset = sizeof(struct drm_format_modifier_blob);
-- 
2.13.6

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

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

* [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
  2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
@ 2018-02-23 19:25 ` Ville Syrjala
  2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
                     ` (2 more replies)
  2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
                   ` (9 subsequent siblings)
  11 siblings, 3 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

While we want to potentially support multiple different gamma/degamma
LUT sizes we can (and should) at least check that the blob length
is a multiple of the LUT entry size.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 8945357212ba..933edec0299d 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
 					 struct drm_property_blob **blob,
 					 uint64_t blob_id,
 					 ssize_t expected_size,
+					 ssize_t expected_size_mod,
 					 bool *replaced)
 {
 	struct drm_property_blob *new_blob = NULL;
@@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
 		if (new_blob == NULL)
 			return -EINVAL;
 
-		if (expected_size > 0 && expected_size != new_blob->length) {
+		if (expected_size > 0 &&
+		    new_blob->length != expected_size) {
+			drm_property_blob_put(new_blob);
+			return -EINVAL;
+		}
+		if (expected_size_mod > 0 &&
+		    new_blob->length % expected_size_mod != 0) {
 			drm_property_blob_put(new_blob);
 			return -EINVAL;
 		}
@@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->degamma_lut,
 					val,
-					-1,
+					-1, sizeof(struct drm_color_lut),
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
@@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->ctm,
 					val,
-					sizeof(struct drm_color_ctm),
+					sizeof(struct drm_color_ctm), -1,
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
@@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->gamma_lut,
 					val,
-					-1,
+					-1, sizeof(struct drm_color_lut),
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
-- 
2.13.6

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

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

* [PATCH 4/6] drm: Introduce drm_color_lut_size()
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
  2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
  2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
@ 2018-02-23 19:25 ` Ville Syrjala
  2018-03-06  7:54   ` Daniel Vetter
  2018-03-15 15:23   ` [PATCH v2 " Ville Syrjala
  2018-02-23 19:25 ` [PATCH 5/6] drm/i915: Remove the blob->data casts Ville Syrjala
                   ` (8 subsequent siblings)
  11 siblings, 2 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Provide a small helper to convert the blob length in bytes
to the number of LUT entries.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 include/drm/drm_color_mgmt.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
index 03a59cbce621..7ddf4457f3c1 100644
--- a/include/drm/drm_color_mgmt.h
+++ b/include/drm/drm_color_mgmt.h
@@ -37,4 +37,9 @@ void drm_crtc_enable_color_mgmt(struct drm_crtc *crtc,
 int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 				 int gamma_size);
 
+static inline int drm_color_lut_size(const struct drm_property_blob *blob)
+{
+	return blob->length / sizeof(struct drm_color_lut);
+}
+
 #endif
-- 
2.13.6

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

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

* [PATCH 5/6] drm/i915: Remove the blob->data casts
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
@ 2018-02-23 19:25 ` Ville Syrjala
  2018-03-15 17:13   ` [PATCH v2 " Ville Syrjala
  2018-02-23 19:25 ` [PATCH 6/6] drm/i915: Use drm_color_lut_size() Ville Syrjala
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Now that blob->data is void* again we don't need to cast it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_color.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index a383d993b844..e8ede69754a9 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -144,8 +144,7 @@ static void i9xx_load_csc_matrix(struct drm_crtc_state *crtc_state)
 		i9xx_load_ycbcr_conversion_matrix(intel_crtc);
 		return;
 	} else if (crtc_state->ctm) {
-		struct drm_color_ctm *ctm =
-			(struct drm_color_ctm *)crtc_state->ctm->data;
+		struct drm_color_ctm *ctm = crtc_state->ctm->data;
 		uint64_t input[9] = { 0, };
 
 		if (intel_crtc_state->limited_color_range) {
@@ -254,8 +253,7 @@ static void cherryview_load_csc_matrix(struct drm_crtc_state *state)
 	uint32_t mode;
 
 	if (state->ctm) {
-		struct drm_color_ctm *ctm =
-			(struct drm_color_ctm *) state->ctm->data;
+		struct drm_color_ctm *ctm = state->ctm->data;
 		uint16_t coeffs[9] = { 0, };
 		int i;
 
@@ -322,7 +320,7 @@ static void i9xx_load_luts_internal(struct drm_crtc *crtc,
 	}
 
 	if (blob) {
-		struct drm_color_lut *lut = (struct drm_color_lut *) blob->data;
+		struct drm_color_lut *lut = blob->data;
 		for (i = 0; i < 256; i++) {
 			uint32_t word =
 				(drm_color_lut_extract(lut[i].red, 8) << 16) |
@@ -392,8 +390,7 @@ static void bdw_load_degamma_lut(struct drm_crtc_state *state)
 		   PAL_PREC_SPLIT_MODE | PAL_PREC_AUTO_INCREMENT);
 
 	if (state->degamma_lut) {
-		struct drm_color_lut *lut =
-			(struct drm_color_lut *) state->degamma_lut->data;
+		struct drm_color_lut *lut = state->degamma_lut->data;
 
 		for (i = 0; i < lut_size; i++) {
 			uint32_t word =
@@ -427,8 +424,7 @@ static void bdw_load_gamma_lut(struct drm_crtc_state *state, u32 offset)
 		   offset);
 
 	if (state->gamma_lut) {
-		struct drm_color_lut *lut =
-			(struct drm_color_lut *) state->gamma_lut->data;
+		struct drm_color_lut *lut = state->gamma_lut->data;
 
 		for (i = 0; i < lut_size; i++) {
 			uint32_t word =
@@ -560,7 +556,7 @@ static void cherryview_load_luts(struct drm_crtc_state *state)
 	}
 
 	if (state->degamma_lut) {
-		lut = (struct drm_color_lut *) state->degamma_lut->data;
+		lut = state->degamma_lut->data;
 		lut_size = INTEL_INFO(dev_priv)->color.degamma_lut_size;
 		for (i = 0; i < lut_size; i++) {
 			/* Write LUT in U0.14 format. */
@@ -575,7 +571,7 @@ static void cherryview_load_luts(struct drm_crtc_state *state)
 	}
 
 	if (state->gamma_lut) {
-		lut = (struct drm_color_lut *) state->gamma_lut->data;
+		lut = state->gamma_lut->data;
 		lut_size = INTEL_INFO(dev_priv)->color.gamma_lut_size;
 		for (i = 0; i < lut_size; i++) {
 			/* Write LUT in U0.10 format. */
-- 
2.13.6

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

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

* [PATCH 6/6] drm/i915: Use drm_color_lut_size()
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (3 preceding siblings ...)
  2018-02-23 19:25 ` [PATCH 5/6] drm/i915: Remove the blob->data casts Ville Syrjala
@ 2018-02-23 19:25 ` Ville Syrjala
  2018-02-23 19:55 ` ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" Patchwork
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-02-23 19:25 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Avoid all the sizeof(drm_color_lut) business by using
drm_color_lut_size() to convert the blob length into
number of LUT entries.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_color.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index e8ede69754a9..029c2c931fab 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -39,7 +39,7 @@
 #define CTM_COEFF_NEGATIVE(coeff)	(((coeff) & CTM_COEFF_SIGN) != 0)
 #define CTM_COEFF_ABS(coeff)		((coeff) & (CTM_COEFF_SIGN - 1))
 
-#define LEGACY_LUT_LENGTH		(sizeof(struct drm_color_lut) * 256)
+#define LEGACY_LUT_LENGTH		256
 
 /* Post offset values for RGB->YCBCR conversion */
 #define POSTOFF_RGB_TO_YUV_HI 0x800
@@ -79,7 +79,7 @@ static bool crtc_state_is_legacy_gamma(struct drm_crtc_state *state)
 	return !state->degamma_lut &&
 		!state->ctm &&
 		state->gamma_lut &&
-		state->gamma_lut->length == LEGACY_LUT_LENGTH;
+		drm_color_lut_size(state->gamma_lut) == LEGACY_LUT_LENGTH;
 }
 
 /*
@@ -611,19 +611,17 @@ int intel_color_check(struct drm_crtc *crtc,
 	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
 	size_t gamma_length, degamma_length;
 
-	degamma_length = INTEL_INFO(dev_priv)->color.degamma_lut_size *
-		sizeof(struct drm_color_lut);
-	gamma_length = INTEL_INFO(dev_priv)->color.gamma_lut_size *
-		sizeof(struct drm_color_lut);
+	degamma_length = INTEL_INFO(dev_priv)->color.degamma_lut_size;
+	gamma_length = INTEL_INFO(dev_priv)->color.gamma_lut_size;
 
 	/*
 	 * We allow both degamma & gamma luts at the right size or
 	 * NULL.
 	 */
 	if ((!crtc_state->degamma_lut ||
-	     crtc_state->degamma_lut->length == degamma_length) &&
+	     drm_color_lut_size(crtc_state->degamma_lut) == degamma_length) &&
 	    (!crtc_state->gamma_lut ||
-	     crtc_state->gamma_lut->length == gamma_length))
+	     drm_color_lut_size(crtc_state->gamma_lut) == gamma_length))
 		return 0;
 
 	/*
-- 
2.13.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (4 preceding siblings ...)
  2018-02-23 19:25 ` [PATCH 6/6] drm/i915: Use drm_color_lut_size() Ville Syrjala
@ 2018-02-23 19:55 ` Patchwork
  2018-02-23 20:38 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-02-23 19:55 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
URL   : https://patchwork.freedesktop.org/series/38886/
State : success

== Summary ==

Series 38886v1 series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
https://patchwork.freedesktop.org/api/1.0/series/38886/revisions/1/mbox/

Test kms_chamelium:
        Subgroup dp-edid-read:
                fail       -> PASS       (fi-kbl-7500u) fdo#102505
Test kms_force_connector_basic:
        Subgroup force-connector-state:
                skip       -> PASS       (fi-snb-2520m)
        Subgroup force-edid:
                skip       -> PASS       (fi-snb-2520m)
        Subgroup force-load-detect:
                skip       -> PASS       (fi-snb-2520m)
        Subgroup prune-stale-modes:
                skip       -> PASS       (fi-snb-2520m)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:413s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:374s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:492s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:283s
fi-bxt-dsi       total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:26 
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:480s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:464s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:458s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:395s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:556s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:585s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:421s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:280s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:511s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:386s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:410s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:453s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:411s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:450s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:490s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:450s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:494s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:589s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:425s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:504s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:521s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:486s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:467s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:408s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:429s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:388s

316ba650abe6c1e8ac2f812ff21eee5771546ba1 drm-tip: 2018y-02m-23d-16h-41m-52s UTC integration manifest
3d63de51ea1c drm/i915: Use drm_color_lut_size()
c6dfc36578ff drm/i915: Remove the blob->data casts
94f4747acf8b drm: Introduce drm_color_lut_size()
94c2358600da drm: Verify gamma/degamma LUT size
01ecd2176c1f drm: Remove now pointelss blob->data casts
fc76a0f5d1c0 Revert "drm: Use a flexible array member for blob property data"

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (5 preceding siblings ...)
  2018-02-23 19:55 ` ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" Patchwork
@ 2018-02-23 20:38 ` Patchwork
  2018-03-01  8:49 ` [PATCH 1/6] " Sharma, Shashank
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-02-23 20:38 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
URL   : https://patchwork.freedesktop.org/series/38886/
State : success

== Summary ==

Test kms_plane:
        Subgroup plane-position-hole-dpms-pipe-b-planes:
                fail       -> PASS       (shard-apl)
Test kms_vblank:
        Subgroup pipe-a-accuracy-idle:
                pass       -> FAIL       (shard-hsw) fdo#102583
Test kms_chv_cursor_fail:
        Subgroup pipe-a-64x64-top-edge:
                fail       -> PASS       (shard-apl)
Test drv_suspend:
        Subgroup fence-restore-tiled2untiled:
                skip       -> PASS       (shard-hsw)
Test perf:
        Subgroup oa-exponents:
                pass       -> INCOMPLETE (shard-apl) fdo#102254

fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-apl        total:3372 pass:1778 dwarn:1   dfail:0   fail:12  skip:1580 time:11945s
shard-hsw        total:3465 pass:1767 dwarn:1   dfail:0   fail:3   skip:1693 time:11808s
shard-snb        total:3465 pass:1358 dwarn:1   dfail:0   fail:2   skip:2104 time:6669s
Blacklisted hosts:
shard-kbl        total:3368 pass:1890 dwarn:9   dfail:0   fail:14  skip:1452 time:8873s

== Logs ==

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

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

* Re: [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data"
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (6 preceding siblings ...)
  2018-02-23 20:38 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-03-01  8:49 ` Sharma, Shashank
  2018-03-15 15:45 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3) Patchwork
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Sharma, Shashank @ 2018-03-01  8:49 UTC (permalink / raw)
  To: dri-devel, Ville Syrjälä

Regards

Shashank


On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Using a flexible array for the blob data was a mistake by me. It
> forces all users of the blob data to cast blob->data to something
> else. void* is clearly superior so let's go back to the original
> scheme.
>
> Not a clean revert as the code has moved.
>
> This reverts commit d63f5e6bf6f2a1573ea39c9937cdf5ab0b3a4b77.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/drm_property.c | 1 +
>   include/drm/drm_property.h     | 2 +-
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
> index bae50e6b819d..0f6620fea3de 100644
> --- a/drivers/gpu/drm/drm_property.c
> +++ b/drivers/gpu/drm/drm_property.c
> @@ -550,6 +550,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
>   	/* This must be explicitly initialised, so we can safely call list_del
>   	 * on it in the removal handler, even if it isn't in a file list. */
>   	INIT_LIST_HEAD(&blob->head_file);
> +	blob->data = (void *)blob + sizeof(*blob);
>   	blob->length = length;
>   	blob->dev = dev;
>   
> diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
> index 8a522b4bed40..265fd1f2e112 100644
> --- a/include/drm/drm_property.h
> +++ b/include/drm/drm_property.h
> @@ -209,7 +209,7 @@ struct drm_property_blob {
>   	struct list_head head_global;
>   	struct list_head head_file;
>   	size_t length;
> -	unsigned char data[];
> +	void *data;
>   };
>   
>   struct drm_prop_enum_list {
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>

Regards
Shashank
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/6] drm: Remove now pointelss blob->data casts
  2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
@ 2018-03-01  8:57   ` Sharma, Shashank
  0 siblings, 0 replies; 25+ messages in thread
From: Sharma, Shashank @ 2018-03-01  8:57 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx

Regards

Shashank


On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Now that blob->data is void* again we don't need the casts anymore.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/drm_atomic.c        | 3 +--
>   drivers/gpu/drm/drm_atomic_helper.c | 2 +-
>   drivers/gpu/drm/drm_edid.c          | 3 +--
>   drivers/gpu/drm/drm_fb_helper.c     | 2 +-
>   drivers/gpu/drm/drm_plane.c         | 2 +-
>   5 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 46733d534587..8945357212ba 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -391,8 +391,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
>   	if (blob) {
>   		if (blob->length != sizeof(struct drm_mode_modeinfo) ||
>   		    drm_mode_convert_umode(state->crtc->dev, &state->mode,
> -		                           (const struct drm_mode_modeinfo *)
> -		                            blob->data))
> +					   blob->data))
>   			return -EINVAL;
>   
>   		state->mode_blob = drm_property_blob_get(blob);
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index ae3cbfe9e01c..6211a1b20405 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3816,7 +3816,7 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
>   	}
>   
>   	/* Prepare GAMMA_LUT with the legacy values. */
> -	blob_data = (struct drm_color_lut *) blob->data;
> +	blob_data = blob->data;
>   	for (i = 0; i < size; i++) {
>   		blob_data[i].red = red[i];
>   		blob_data[i].green = green[i];
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 788fee4b4bf9..134069f36482 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1575,8 +1575,7 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
>   	struct edid *override = NULL;
>   
>   	if (connector->override_edid)
> -		override = drm_edid_duplicate((const struct edid *)
> -					      connector->edid_blob_ptr->data);
> +		override = drm_edid_duplicate(connector->edid_blob_ptr->data);
>   
>   	if (!override)
>   		override = drm_load_edid_firmware(connector);
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 035784ddd133..0646b108030b 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1351,7 +1351,7 @@ static struct drm_property_blob *setcmap_new_gamma_lut(struct drm_crtc *crtc,
>   	if (IS_ERR(gamma_lut))
>   		return gamma_lut;
>   
> -	lut = (struct drm_color_lut *)gamma_lut->data;
> +	lut = gamma_lut->data;
>   	if (cmap->start || cmap->len != size) {
>   		u16 *r = crtc->gamma_store;
>   		u16 *g = r + crtc->gamma_size;
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 09de6ecb3968..9851616cf0f3 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -104,7 +104,7 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>   	if (IS_ERR(blob))
>   		return -1;
>   
> -	blob_data = (struct drm_format_modifier_blob *)blob->data;
> +	blob_data = blob->data;
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
>   	blob_data->version = FORMAT_BLOB_CURRENT;
>   	blob_data->count_formats = plane->format_count;
>   	blob_data->formats_offset = sizeof(struct drm_format_modifier_blob);

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

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

* Re: [Intel-gfx] [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
@ 2018-03-01 13:13   ` Sharma, Shashank
  2018-03-01 13:24     ` Ville Syrjälä
  2018-03-06  7:56   ` Daniel Vetter
  2018-03-15 15:22   ` [PATCH v2 " Ville Syrjala
  2 siblings, 1 reply; 25+ messages in thread
From: Sharma, Shashank @ 2018-03-01 13:13 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx

Regards

Shashank


On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> While we want to potentially support multiple different gamma/degamma
> LUT sizes we can (and should) at least check that the blob length
> is a multiple of the LUT entry size.
I dint understand the exact idea behind doing this, how is this going to 
benefit ? May be a bit more description ?
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
>   1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 8945357212ba..933edec0299d 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>   					 struct drm_property_blob **blob,
>   					 uint64_t blob_id,
>   					 ssize_t expected_size,
> +					 ssize_t expected_size_mod,
>   					 bool *replaced)
>   {
>   	struct drm_property_blob *new_blob = NULL;
> @@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>   		if (new_blob == NULL)
>   			return -EINVAL;
>   
> -		if (expected_size > 0 && expected_size != new_blob->length) {
> +		if (expected_size > 0 &&
> +		    new_blob->length != expected_size) {
> +			drm_property_blob_put(new_blob);
> +			return -EINVAL;
> +		}
One line needed here, matching the previous if() pattern
> +		if (expected_size_mod > 0 &&
> +		    new_blob->length % expected_size_mod != 0) {
>   			drm_property_blob_put(new_blob);
>   			return -EINVAL;
>   		}
> @@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>   		ret = drm_atomic_replace_property_blob_from_id(dev,
>   					&state->degamma_lut,
>   					val,
> -					-1,
> +					-1, sizeof(struct drm_color_lut),
>   					&replaced);
>   		state->color_mgmt_changed |= replaced;
>   		return ret;
> @@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>   		ret = drm_atomic_replace_property_blob_from_id(dev,
>   					&state->ctm,
>   					val,
> -					sizeof(struct drm_color_ctm),
> +					sizeof(struct drm_color_ctm), -1,
>   					&replaced);
>   		state->color_mgmt_changed |= replaced;
>   		return ret;
> @@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>   		ret = drm_atomic_replace_property_blob_from_id(dev,
>   					&state->gamma_lut,
>   					val,
> -					-1,
> +					-1, sizeof(struct drm_color_lut),
>   					&replaced);
>   		state->color_mgmt_changed |= replaced;
>   		return ret;

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
@ 2018-03-01 13:24     ` Ville Syrjälä
  2018-03-01 14:28       ` Sharma, Shashank
  0 siblings, 1 reply; 25+ messages in thread
From: Ville Syrjälä @ 2018-03-01 13:24 UTC (permalink / raw)
  To: Sharma, Shashank; +Cc: intel-gfx, dri-devel

On Thu, Mar 01, 2018 at 06:43:21PM +0530, Sharma, Shashank wrote:
> Regards
> 
> Shashank
> 
> 
> On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > While we want to potentially support multiple different gamma/degamma
> > LUT sizes we can (and should) at least check that the blob length
> > is a multiple of the LUT entry size.
> I dint understand the exact idea behind doing this, how is this going to 
> benefit ? May be a bit more description ?

The benefit is rejecting garbage fed in from userspace.

> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >   drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
> >   1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 8945357212ba..933edec0299d 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> >   					 struct drm_property_blob **blob,
> >   					 uint64_t blob_id,
> >   					 ssize_t expected_size,
> > +					 ssize_t expected_size_mod,
> >   					 bool *replaced)
> >   {
> >   	struct drm_property_blob *new_blob = NULL;
> > @@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> >   		if (new_blob == NULL)
> >   			return -EINVAL;
> >   
> > -		if (expected_size > 0 && expected_size != new_blob->length) {
> > +		if (expected_size > 0 &&
> > +		    new_blob->length != expected_size) {
> > +			drm_property_blob_put(new_blob);
> > +			return -EINVAL;
> > +		}
> One line needed here, matching the previous if() pattern

What line? Don't understand.

> > +		if (expected_size_mod > 0 &&
> > +		    new_blob->length % expected_size_mod != 0) {
> >   			drm_property_blob_put(new_blob);
> >   			return -EINVAL;
> >   		}
> > @@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >   		ret = drm_atomic_replace_property_blob_from_id(dev,
> >   					&state->degamma_lut,
> >   					val,
> > -					-1,
> > +					-1, sizeof(struct drm_color_lut),
> >   					&replaced);
> >   		state->color_mgmt_changed |= replaced;
> >   		return ret;
> > @@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >   		ret = drm_atomic_replace_property_blob_from_id(dev,
> >   					&state->ctm,
> >   					val,
> > -					sizeof(struct drm_color_ctm),
> > +					sizeof(struct drm_color_ctm), -1,
> >   					&replaced);
> >   		state->color_mgmt_changed |= replaced;
> >   		return ret;
> > @@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >   		ret = drm_atomic_replace_property_blob_from_id(dev,
> >   					&state->gamma_lut,
> >   					val,
> > -					-1,
> > +					-1, sizeof(struct drm_color_lut),
> >   					&replaced);
> >   		state->color_mgmt_changed |= replaced;
> >   		return ret;

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

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

* Re: [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-03-01 13:24     ` Ville Syrjälä
@ 2018-03-01 14:28       ` Sharma, Shashank
  2018-03-01 14:35         ` [Intel-gfx] " Ville Syrjälä
  0 siblings, 1 reply; 25+ messages in thread
From: Sharma, Shashank @ 2018-03-01 14:28 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel

Regards

Shashank


On 3/1/2018 6:54 PM, Ville Syrjälä wrote:
> On Thu, Mar 01, 2018 at 06:43:21PM +0530, Sharma, Shashank wrote:
>> Regards
>>
>> Shashank
>>
>>
>> On 2/24/2018 12:55 AM, Ville Syrjala wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> While we want to potentially support multiple different gamma/degamma
>>> LUT sizes we can (and should) at least check that the blob length
>>> is a multiple of the LUT entry size.
>> I dint understand the exact idea behind doing this, how is this going to
>> benefit ? May be a bit more description ?
> The benefit is rejecting garbage fed in from userspace.
>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> ---
>>>    drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
>>>    1 file changed, 11 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
>>> index 8945357212ba..933edec0299d 100644
>>> --- a/drivers/gpu/drm/drm_atomic.c
>>> +++ b/drivers/gpu/drm/drm_atomic.c
>>> @@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>>>    					 struct drm_property_blob **blob,
>>>    					 uint64_t blob_id,
>>>    					 ssize_t expected_size,
>>> +					 ssize_t expected_size_mod,
>>>    					 bool *replaced)
>>>    {
>>>    	struct drm_property_blob *new_blob = NULL;
>>> @@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>>>    		if (new_blob == NULL)
>>>    			return -EINVAL;
>>>    
>>> -		if (expected_size > 0 && expected_size != new_blob->length) {
>>> +		if (expected_size > 0 &&
>>> +		    new_blob->length != expected_size) {
>>> +			drm_property_blob_put(new_blob);
>>> +			return -EINVAL;
>>> +		}
>> One line needed here, matching the previous if() pattern
> What line? Don't understand.
I mean, I can see a blank line before previous if() condition, so lets 
keep the same pattern for this if() too

- Shashank
>>> +		if (expected_size_mod > 0 &&
>>> +		    new_blob->length % expected_size_mod != 0) {
>>>    			drm_property_blob_put(new_blob);
>>>    			return -EINVAL;
>>>    		}
>>> @@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
>>>    					&state->degamma_lut,
>>>    					val,
>>> -					-1,
>>> +					-1, sizeof(struct drm_color_lut),
>>>    					&replaced);
>>>    		state->color_mgmt_changed |= replaced;
>>>    		return ret;
>>> @@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
>>>    					&state->ctm,
>>>    					val,
>>> -					sizeof(struct drm_color_ctm),
>>> +					sizeof(struct drm_color_ctm), -1,
>>>    					&replaced);
>>>    		state->color_mgmt_changed |= replaced;
>>>    		return ret;
>>> @@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
>>>    					&state->gamma_lut,
>>>    					val,
>>> -					-1,
>>> +					-1, sizeof(struct drm_color_lut),
>>>    					&replaced);
>>>    		state->color_mgmt_changed |= replaced;
>>>    		return ret;

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

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

* Re: [Intel-gfx] [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-03-01 14:28       ` Sharma, Shashank
@ 2018-03-01 14:35         ` Ville Syrjälä
  0 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjälä @ 2018-03-01 14:35 UTC (permalink / raw)
  To: Sharma, Shashank; +Cc: intel-gfx, dri-devel

On Thu, Mar 01, 2018 at 07:58:07PM +0530, Sharma, Shashank wrote:
> Regards
> 
> Shashank
> 
> 
> On 3/1/2018 6:54 PM, Ville Syrjälä wrote:
> > On Thu, Mar 01, 2018 at 06:43:21PM +0530, Sharma, Shashank wrote:
> >> Regards
> >>
> >> Shashank
> >>
> >>
> >> On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> >>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>>
> >>> While we want to potentially support multiple different gamma/degamma
> >>> LUT sizes we can (and should) at least check that the blob length
> >>> is a multiple of the LUT entry size.
> >> I dint understand the exact idea behind doing this, how is this going to
> >> benefit ? May be a bit more description ?
> > The benefit is rejecting garbage fed in from userspace.
> >
> >>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>> ---
> >>>    drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
> >>>    1 file changed, 11 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> >>> index 8945357212ba..933edec0299d 100644
> >>> --- a/drivers/gpu/drm/drm_atomic.c
> >>> +++ b/drivers/gpu/drm/drm_atomic.c
> >>> @@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> >>>    					 struct drm_property_blob **blob,
> >>>    					 uint64_t blob_id,
> >>>    					 ssize_t expected_size,
> >>> +					 ssize_t expected_size_mod,
> >>>    					 bool *replaced)
> >>>    {
> >>>    	struct drm_property_blob *new_blob = NULL;
> >>> @@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> >>>    		if (new_blob == NULL)
> >>>    			return -EINVAL;
> >>>    
> >>> -		if (expected_size > 0 && expected_size != new_blob->length) {
> >>> +		if (expected_size > 0 &&
> >>> +		    new_blob->length != expected_size) {
> >>> +			drm_property_blob_put(new_blob);
> >>> +			return -EINVAL;
> >>> +		}
> >> One line needed here, matching the previous if() pattern
> > What line? Don't understand.
> I mean, I can see a blank line before previous if() condition, so lets 
> keep the same pattern for this if() too

OTOH the two ifs are related so maybe just keep them together? Doesn't
actually matter to me though.

> 
> - Shashank
> >>> +		if (expected_size_mod > 0 &&
> >>> +		    new_blob->length % expected_size_mod != 0) {
> >>>    			drm_property_blob_put(new_blob);
> >>>    			return -EINVAL;
> >>>    		}
> >>> @@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
> >>>    					&state->degamma_lut,
> >>>    					val,
> >>> -					-1,
> >>> +					-1, sizeof(struct drm_color_lut),
> >>>    					&replaced);
> >>>    		state->color_mgmt_changed |= replaced;
> >>>    		return ret;
> >>> @@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
> >>>    					&state->ctm,
> >>>    					val,
> >>> -					sizeof(struct drm_color_ctm),
> >>> +					sizeof(struct drm_color_ctm), -1,
> >>>    					&replaced);
> >>>    		state->color_mgmt_changed |= replaced;
> >>>    		return ret;
> >>> @@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> >>>    		ret = drm_atomic_replace_property_blob_from_id(dev,
> >>>    					&state->gamma_lut,
> >>>    					val,
> >>> -					-1,
> >>> +					-1, sizeof(struct drm_color_lut),
> >>>    					&replaced);
> >>>    		state->color_mgmt_changed |= replaced;
> >>>    		return ret;

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 4/6] drm: Introduce drm_color_lut_size()
  2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
@ 2018-03-06  7:54   ` Daniel Vetter
  2018-03-16 14:14     ` [Intel-gfx] " Ville Syrjälä
  2018-03-15 15:23   ` [PATCH v2 " Ville Syrjala
  1 sibling, 1 reply; 25+ messages in thread
From: Daniel Vetter @ 2018-03-06  7:54 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx, dri-devel

On Fri, Feb 23, 2018 at 09:25:04PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Provide a small helper to convert the blob length in bytes
> to the number of LUT entries.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  include/drm/drm_color_mgmt.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> index 03a59cbce621..7ddf4457f3c1 100644
> --- a/include/drm/drm_color_mgmt.h
> +++ b/include/drm/drm_color_mgmt.h
> @@ -37,4 +37,9 @@ void drm_crtc_enable_color_mgmt(struct drm_crtc *crtc,
>  int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
>  				 int gamma_size);
>  

Add a bit of kerneldoc and you get my

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

for this and all remaining patches.
-Daniel

> +static inline int drm_color_lut_size(const struct drm_property_blob *blob)
> +{
> +	return blob->length / sizeof(struct drm_color_lut);
> +}
> +
>  #endif
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH 3/6] drm: Verify gamma/degamma LUT size
  2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
  2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
@ 2018-03-06  7:56   ` Daniel Vetter
  2018-03-15 15:22   ` [PATCH v2 " Ville Syrjala
  2 siblings, 0 replies; 25+ messages in thread
From: Daniel Vetter @ 2018-03-06  7:56 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx, dri-devel

On Fri, Feb 23, 2018 at 09:25:03PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> While we want to potentially support multiple different gamma/degamma
> LUT sizes we can (and should) at least check that the blob length
> is a multiple of the LUT entry size.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_atomic.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 8945357212ba..933edec0299d 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -413,6 +413,7 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>  					 struct drm_property_blob **blob,
>  					 uint64_t blob_id,
>  					 ssize_t expected_size,
> +					 ssize_t expected_size_mod,

Needs kerneldoc, and I'm not sure it's the most descriptive name. Maybe
expected_array_element_size?

With or without the bikeshed, but with the kerneldoc fixed:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Up to this patch in the series.
-Daniel

>  					 bool *replaced)
>  {
>  	struct drm_property_blob *new_blob = NULL;
> @@ -422,7 +423,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
>  		if (new_blob == NULL)
>  			return -EINVAL;
>  
> -		if (expected_size > 0 && expected_size != new_blob->length) {
> +		if (expected_size > 0 &&
> +		    new_blob->length != expected_size) {
> +			drm_property_blob_put(new_blob);
> +			return -EINVAL;
> +		}
> +		if (expected_size_mod > 0 &&
> +		    new_blob->length % expected_size_mod != 0) {
>  			drm_property_blob_put(new_blob);
>  			return -EINVAL;
>  		}
> @@ -470,7 +477,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>  		ret = drm_atomic_replace_property_blob_from_id(dev,
>  					&state->degamma_lut,
>  					val,
> -					-1,
> +					-1, sizeof(struct drm_color_lut),
>  					&replaced);
>  		state->color_mgmt_changed |= replaced;
>  		return ret;
> @@ -478,7 +485,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>  		ret = drm_atomic_replace_property_blob_from_id(dev,
>  					&state->ctm,
>  					val,
> -					sizeof(struct drm_color_ctm),
> +					sizeof(struct drm_color_ctm), -1,
>  					&replaced);
>  		state->color_mgmt_changed |= replaced;
>  		return ret;
> @@ -486,7 +493,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
>  		ret = drm_atomic_replace_property_blob_from_id(dev,
>  					&state->gamma_lut,
>  					val,
> -					-1,
> +					-1, sizeof(struct drm_color_lut),
>  					&replaced);
>  		state->color_mgmt_changed |= replaced;
>  		return ret;
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v2 3/6] drm: Verify gamma/degamma LUT size
  2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
  2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
  2018-03-06  7:56   ` Daniel Vetter
@ 2018-03-15 15:22   ` Ville Syrjala
  2 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-03-15 15:22 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, intel-gfx

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

While we want to potentially support multiple different gamma/degamma
LUT sizes we can (and should) at least check that the blob length
is a multiple of the LUT entry size.

v2: s/expected_size_mod/expected_elem_size/ (Daniel)
    Add kernel doc (Daniel)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 Documentation/gpu/drm-kms.rst |  3 +++
 drivers/gpu/drm/drm_atomic.c  | 39 +++++++++++++++++++++++++++++++++++----
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
index 56a3780e39b8..1dffd1ac4cd4 100644
--- a/Documentation/gpu/drm-kms.rst
+++ b/Documentation/gpu/drm-kms.rst
@@ -286,6 +286,9 @@ Atomic Mode Setting Function Reference
 .. kernel-doc:: drivers/gpu/drm/drm_atomic.c
    :export:
 
+.. kernel-doc:: drivers/gpu/drm/drm_atomic.c
+   :internal:
+
 CRTC Abstraction
 ================
 
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 01060669dd49..a55f611d2a6f 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -408,11 +408,36 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 }
 EXPORT_SYMBOL(drm_atomic_set_mode_prop_for_crtc);
 
+/**
+ * drm_atomic_replace_property_blob_from_id - lookup the new blob and replace the old one with it
+ * @dev: DRM device
+ * @blob: a pointer to the member blob to be replaced
+ * @blob_id: ID of the new blob
+ * @expected_size: total expected size of the blob data (in bytes)
+ * @expected_elem_size: expected element size of the blob data (in bytes)
+ * @replaced: did the blob get replaced?
+ *
+ * Replace @blob with another blob with the ID @blob_id. If @blob_id is zero
+ * @blob becomes NULL.
+ *
+ * If @expected_size is positive the new blob length is expected to be equal
+ * to @expected_size bytes. If @expected_elem_size is positive the new blob
+ * length is expected to be a multiple of @expected_elem_size bytes. Otherwise
+ * an error is returned.
+ *
+ * @replaced will indicate to the caller whether the blob was replaced or not.
+ * If the old and new blobs we in fact the same blob @replaced will be false
+ * otherwise it will be true.
+ *
+ * RETURNS:
+ * Zero on success, error code on failure.
+ */
 static int
 drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
 					 struct drm_property_blob **blob,
 					 uint64_t blob_id,
 					 ssize_t expected_size,
+					 ssize_t expected_elem_size,
 					 bool *replaced)
 {
 	struct drm_property_blob *new_blob = NULL;
@@ -422,7 +447,13 @@ drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
 		if (new_blob == NULL)
 			return -EINVAL;
 
-		if (expected_size > 0 && expected_size != new_blob->length) {
+		if (expected_size > 0 &&
+		    new_blob->length != expected_size) {
+			drm_property_blob_put(new_blob);
+			return -EINVAL;
+		}
+		if (expected_elem_size > 0 &&
+		    new_blob->length % expected_elem_size != 0) {
 			drm_property_blob_put(new_blob);
 			return -EINVAL;
 		}
@@ -470,7 +501,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->degamma_lut,
 					val,
-					-1,
+					-1, sizeof(struct drm_color_lut),
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
@@ -478,7 +509,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->ctm,
 					val,
-					sizeof(struct drm_color_ctm),
+					sizeof(struct drm_color_ctm), -1,
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
@@ -486,7 +517,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		ret = drm_atomic_replace_property_blob_from_id(dev,
 					&state->gamma_lut,
 					val,
-					-1,
+					-1, sizeof(struct drm_color_lut),
 					&replaced);
 		state->color_mgmt_changed |= replaced;
 		return ret;
-- 
2.16.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v2 4/6] drm: Introduce drm_color_lut_size()
  2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
  2018-03-06  7:54   ` Daniel Vetter
@ 2018-03-15 15:23   ` Ville Syrjala
  1 sibling, 0 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-03-15 15:23 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, intel-gfx

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

Provide a small helper to convert the blob length in bytes
to the number of LUT entries.

v2: Add kerneldoc (Daniel)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 include/drm/drm_color_mgmt.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
index b3b6d302ca8c..44f04233e3db 100644
--- a/include/drm/drm_color_mgmt.h
+++ b/include/drm/drm_color_mgmt.h
@@ -38,6 +38,18 @@ void drm_crtc_enable_color_mgmt(struct drm_crtc *crtc,
 int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 				 int gamma_size);
 
+/**
+ * drm_color_lut_size - calculate the number of entries in the LUT
+ * @blob: blob containing the LUT
+ *
+ * Returns:
+ * The number of entries in the color LUT stored in @blob.
+ */
+static inline int drm_color_lut_size(const struct drm_property_blob *blob)
+{
+	return blob->length / sizeof(struct drm_color_lut);
+}
+
 enum drm_color_encoding {
 	DRM_COLOR_YCBCR_BT601,
 	DRM_COLOR_YCBCR_BT709,
-- 
2.16.1

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

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

* ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3)
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (7 preceding siblings ...)
  2018-03-01  8:49 ` [PATCH 1/6] " Sharma, Shashank
@ 2018-03-15 15:45 ` Patchwork
  2018-03-15 18:11 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4) Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-03-15 15:45 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3)
URL   : https://patchwork.freedesktop.org/series/38886/
State : failure

== Summary ==

Applying: Revert "drm: Use a flexible array member for blob property data"
Applying: drm: Remove now pointelss blob->data casts
Applying: drm: Verify gamma/degamma LUT size
Applying: drm: Introduce drm_color_lut_size()
Applying: drm/i915: Remove the blob->data casts
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/intel_color.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_color.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_color.c
Patch failed at 0005 drm/i915: Remove the blob->data casts
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

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

* [PATCH v2 5/6] drm/i915: Remove the blob->data casts
  2018-02-23 19:25 ` [PATCH 5/6] drm/i915: Remove the blob->data casts Ville Syrjala
@ 2018-03-15 17:13   ` Ville Syrjala
  0 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjala @ 2018-03-15 17:13 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

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

Now that blob->data is void* again we don't need to cast it.

v2: Rebase

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_color.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index 89ab0f70aa22..92f148832a89 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -153,8 +153,7 @@ static void ilk_load_csc_matrix(struct drm_crtc_state *crtc_state)
 		ilk_load_ycbcr_conversion_matrix(intel_crtc);
 		return;
 	} else if (crtc_state->ctm) {
-		struct drm_color_ctm *ctm =
-			(struct drm_color_ctm *)crtc_state->ctm->data;
+		struct drm_color_ctm *ctm = crtc_state->ctm->data;
 		const u64 *input;
 		u64 temp[9];
 
@@ -262,8 +261,7 @@ static void cherryview_load_csc_matrix(struct drm_crtc_state *state)
 	uint32_t mode;
 
 	if (state->ctm) {
-		struct drm_color_ctm *ctm =
-			(struct drm_color_ctm *) state->ctm->data;
+		struct drm_color_ctm *ctm = state->ctm->data;
 		uint16_t coeffs[9] = { 0, };
 		int i;
 
@@ -330,7 +328,7 @@ static void i9xx_load_luts_internal(struct drm_crtc *crtc,
 	}
 
 	if (blob) {
-		struct drm_color_lut *lut = (struct drm_color_lut *) blob->data;
+		struct drm_color_lut *lut = blob->data;
 		for (i = 0; i < 256; i++) {
 			uint32_t word =
 				(drm_color_lut_extract(lut[i].red, 8) << 16) |
@@ -400,8 +398,7 @@ static void bdw_load_degamma_lut(struct drm_crtc_state *state)
 		   PAL_PREC_SPLIT_MODE | PAL_PREC_AUTO_INCREMENT);
 
 	if (state->degamma_lut) {
-		struct drm_color_lut *lut =
-			(struct drm_color_lut *) state->degamma_lut->data;
+		struct drm_color_lut *lut = state->degamma_lut->data;
 
 		for (i = 0; i < lut_size; i++) {
 			uint32_t word =
@@ -435,8 +432,7 @@ static void bdw_load_gamma_lut(struct drm_crtc_state *state, u32 offset)
 		   offset);
 
 	if (state->gamma_lut) {
-		struct drm_color_lut *lut =
-			(struct drm_color_lut *) state->gamma_lut->data;
+		struct drm_color_lut *lut = state->gamma_lut->data;
 
 		for (i = 0; i < lut_size; i++) {
 			uint32_t word =
@@ -568,7 +564,7 @@ static void cherryview_load_luts(struct drm_crtc_state *state)
 	}
 
 	if (state->degamma_lut) {
-		lut = (struct drm_color_lut *) state->degamma_lut->data;
+		lut = state->degamma_lut->data;
 		lut_size = INTEL_INFO(dev_priv)->color.degamma_lut_size;
 		for (i = 0; i < lut_size; i++) {
 			/* Write LUT in U0.14 format. */
@@ -583,7 +579,7 @@ static void cherryview_load_luts(struct drm_crtc_state *state)
 	}
 
 	if (state->gamma_lut) {
-		lut = (struct drm_color_lut *) state->gamma_lut->data;
+		lut = state->gamma_lut->data;
 		lut_size = INTEL_INFO(dev_priv)->color.gamma_lut_size;
 		for (i = 0; i < lut_size; i++) {
 			/* Write LUT in U0.10 format. */
-- 
2.16.1

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

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

* ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (8 preceding siblings ...)
  2018-03-15 15:45 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3) Patchwork
@ 2018-03-15 18:11 ` Patchwork
  2018-03-15 20:09 ` ✓ Fi.CI.BAT: success " Patchwork
  2018-03-15 23:27 ` ✗ Fi.CI.IGT: failure " Patchwork
  11 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-03-15 18:11 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
URL   : https://patchwork.freedesktop.org/series/38886/
State : failure

== Summary ==

Series 38886v4 series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
https://patchwork.freedesktop.org/api/1.0/series/38886/revisions/4/mbox/

---- Possible new issues:

Test drv_module_reload:
        Subgroup basic-reload:
                pass       -> DMESG-WARN (fi-bdw-gvtdvm)
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                pass       -> INCOMPLETE (fi-skl-guc)

---- Known issues:

Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:437s
fi-bdw-gvtdvm    total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:381s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:533s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:298s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:513s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:511s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:517s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:504s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:413s
fi-cfl-s2        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:578s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:514s
fi-cnl-drrs      total:285  pass:254  dwarn:3   dfail:0   fail:0   skip:28  time:536s
fi-cnl-y3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:593s
fi-elk-e7500     total:285  pass:226  dwarn:0   dfail:0   fail:0   skip:59  time:424s
fi-gdg-551       total:285  pass:176  dwarn:0   dfail:0   fail:1   skip:108 time:317s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:540s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:401s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:421s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:474s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:432s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:482s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:465s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:515s
fi-pnv-d510      total:285  pass:219  dwarn:1   dfail:0   fail:0   skip:65  time:655s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:455s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:534s
fi-skl-6700hq    total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:541s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:504s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:496s
fi-skl-guc       total:109  pass:97   dwarn:0   dfail:0   fail:0   skip:11 
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:443s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:397s

3b4800f0237f9422817a1a9695d742598d2fb868 drm-tip: 2018y-03m-15d-15h-48m-56s UTC integration manifest
0b0cb08e3a43 drm/i915: Use drm_color_lut_size()
7844af96bfb7 drm/i915: Remove the blob->data casts
5ba3d49dfdda drm: Introduce drm_color_lut_size()
09561443137b drm: Verify gamma/degamma LUT size
7a8038be701b drm: Remove now pointelss blob->data casts
73972c43e891 Revert "drm: Use a flexible array member for blob property data"

== Logs ==

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (9 preceding siblings ...)
  2018-03-15 18:11 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4) Patchwork
@ 2018-03-15 20:09 ` Patchwork
  2018-03-15 23:27 ` ✗ Fi.CI.IGT: failure " Patchwork
  11 siblings, 0 replies; 25+ messages in thread
From: Patchwork @ 2018-03-15 20:09 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
URL   : https://patchwork.freedesktop.org/series/38886/
State : success

== Summary ==

Series 38886v4 series starting with [1/6] Revert "drm: Use a flexible array member for blob property data"
https://patchwork.freedesktop.org/api/1.0/series/38886/revisions/4/mbox/

---- Known issues:

Test debugfs_test:
        Subgroup read_all_entries:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:430s
fi-bdw-gvtdvm    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:447s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:379s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:539s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:296s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:513s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:513s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:526s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:503s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:410s
fi-cfl-s2        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:579s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:509s
fi-cnl-drrs      total:285  pass:254  dwarn:3   dfail:0   fail:0   skip:28  time:522s
fi-cnl-y3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:589s
fi-elk-e7500     total:285  pass:226  dwarn:0   dfail:0   fail:0   skip:59  time:427s
fi-gdg-551       total:285  pass:176  dwarn:0   dfail:0   fail:1   skip:108 time:316s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:536s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:424s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:477s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:428s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:475s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:472s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:511s
fi-pnv-d510      total:285  pass:219  dwarn:1   dfail:0   fail:0   skip:65  time:663s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:444s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-skl-6700hq    total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:542s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:504s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:489s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:426s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:447s
fi-snb-2520m     total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:572s
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:398s

3b4800f0237f9422817a1a9695d742598d2fb868 drm-tip: 2018y-03m-15d-15h-48m-56s UTC integration manifest
68f3ee590850 drm/i915: Use drm_color_lut_size()
1fa90c007ea3 drm/i915: Remove the blob->data casts
398a140ba5c6 drm: Introduce drm_color_lut_size()
d7495261fd50 drm: Verify gamma/degamma LUT size
c232fc1aed2d drm: Remove now pointelss blob->data casts
9acadb8402c7 Revert "drm: Use a flexible array member for blob property data"

== Logs ==

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

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

* ✗ Fi.CI.IGT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
  2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
                   ` (10 preceding siblings ...)
  2018-03-15 20:09 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-03-15 23:27 ` Patchwork
  2018-03-16 10:33   ` Ville Syrjälä
  11 siblings, 1 reply; 25+ messages in thread
From: Patchwork @ 2018-03-15 23:27 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
URL   : https://patchwork.freedesktop.org/series/38886/
State : failure

== Summary ==

---- Possible new issues:

Test kms_cursor_crc:
        Subgroup cursor-128x128-suspend:
                pass       -> FAIL       (shard-apl)

---- Known issues:

Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
                pass       -> FAIL       (shard-apl) fdo#101623
Test kms_vblank:
        Subgroup pipe-b-ts-continuation-suspend:
                pass       -> SKIP       (shard-snb) fdo#105411

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411

shard-apl        total:3442 pass:1812 dwarn:1   dfail:0   fail:9   skip:1619 time:12935s
shard-hsw        total:3442 pass:1768 dwarn:1   dfail:0   fail:1   skip:1671 time:11957s
shard-snb        total:3442 pass:1355 dwarn:1   dfail:0   fail:3   skip:2083 time:7154s
Blacklisted hosts:
shard-kbl        total:2091 pass:1139 dwarn:17  dfail:1   fail:4   skip:929 time:5806s

== Logs ==

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

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

* Re: ✗ Fi.CI.IGT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
  2018-03-15 23:27 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-03-16 10:33   ` Ville Syrjälä
  0 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjälä @ 2018-03-16 10:33 UTC (permalink / raw)
  To: intel-gfx

On Thu, Mar 15, 2018 at 11:27:54PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4)
> URL   : https://patchwork.freedesktop.org/series/38886/
> State : failure
> 
> == Summary ==
> 
> ---- Possible new issues:
> 
> Test kms_cursor_crc:
>         Subgroup cursor-128x128-suspend:
>                 pass       -> FAIL       (shard-apl)

<6>[  626.852771] Freezing user space processes ... 
<4>[  627.123848] hpet1: lost 7161 rtc interrupts
<4>[  628.008661] hpet1: lost 7161 rtc interrupts
<4>[  628.893790] hpet1: lost 7160 rtc interrupts
<4>[  629.779156] hpet1: lost 7161 rtc interrupts
<4>[  630.663018] hpet1: lost 7161 rtc interrupts
<4>[  631.526633] hpet1: lost 7161 rtc interrupts
<4>[  632.410351] hpet1: lost 7161 rtc interrupts
<4>[  633.294550] hpet1: lost 7161 rtc interrupts
<4>[  634.178637] hpet1: lost 7161 rtc interrupts
<4>[  635.062672] hpet1: lost 7160 rtc interrupts
<4>[  635.946840] hpet1: lost 7161 rtc interrupts
<4>[  636.832115] hpet1: lost 7161 rtc interrupts
<4>[  637.717328] hpet1: lost 7161 rtc interrupts
<4>[  638.581866] hpet1: lost 7161 rtc interrupts
<4>[  639.446595] hpet1: lost 7161 rtc interrupts
<4>[  640.332169] hpet1: lost 7161 rtc interrupts
<4>[  641.217026] hpet1: lost 7160 rtc interrupts
<3>[  646.850043] Freezing of tasks failed after 20.007 seconds (1 tasks refusing to freeze, wq_busy=0):
<6>[  646.850229] fstrim          D    0  1998   1997 0x00000004
<4>[  646.850259] Call Trace:
<4>[  646.850277]  ? __schedule+0x3c7/0xb00
<4>[  646.850289]  ? wait_for_common_io.constprop.2+0xe2/0x180
<4>[  646.850296]  schedule+0x37/0x90
<4>[  646.850303]  schedule_timeout+0x21d/0x510
<4>[  646.850311]  ? trace_hardirqs_on_caller+0xde/0x1c0
<4>[  646.850327]  ? wait_for_common_io.constprop.2+0xe2/0x180
<4>[  646.850333]  io_schedule_timeout+0x14/0x40
<4>[  646.850340]  wait_for_common_io.constprop.2+0x101/0x180
<4>[  646.850348]  ? wake_up_q+0x70/0x70
<4>[  646.850360]  submit_bio_wait+0x4a/0x60
<4>[  646.850376]  blkdev_issue_discard+0x6c/0xb0
<4>[  646.850394]  ? ext4_trim_fs+0x489/0xbe0
<4>[  646.850398]  ext4_trim_fs+0x489/0xbe0
<4>[  646.850431]  ext4_ioctl+0xc7c/0xf10
<4>[  646.850448]  do_vfs_ioctl+0x8a/0x670
<4>[  646.850455]  ? SyS_newfstat+0x29/0x40
<4>[  646.850463]  ? entry_SYSCALL_64_after_hwframe+0x52/0xb7
<4>[  646.850472]  SyS_ioctl+0x36/0x70
<4>[  646.850482]  do_syscall_64+0x65/0x1a0
<4>[  646.850490]  entry_SYSCALL_64_after_hwframe+0x42/0xb7
<4>[  646.850496] RIP: 0033:0x7fd55d4f1587
<4>[  646.850500] RSP: 002b:00007ffe19de8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
<4>[  646.850509] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fd55d4f1587
<4>[  646.850513] RDX: 00007ffe19de8040 RSI: 00000000c0185879 RDI: 0000000000000004
<4>[  646.850517] RBP: 0000557ba4f5ff90 R08: 0000557ba4f66180 R09: 0000000000000000
<4>[  646.850521] R10: 000000000000000a R11: 0000000000000246 R12: 0000557ba4f60800
<4>[  646.850526] R13: 0000000000000000 R14: 00007fd55dc09250 R15: 0000557ba4f60800
<6>[  646.850553] OOM killer enabled.
<6>[  646.850557] Restarting tasks ... done.
<6>[  646.866332] video LNXVIDEO:00: Restoring backlight state
<6>[  646.866359] PM: suspend exit

Doesn't seem particularly relevant for this series.

> 
> ---- Known issues:
> 
> Test kms_frontbuffer_tracking:
>         Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
>                 pass       -> FAIL       (shard-apl) fdo#101623
> Test kms_vblank:
>         Subgroup pipe-b-ts-continuation-suspend:
>                 pass       -> SKIP       (shard-snb) fdo#105411
> 
> fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
> fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
> 
> shard-apl        total:3442 pass:1812 dwarn:1   dfail:0   fail:9   skip:1619 time:12935s
> shard-hsw        total:3442 pass:1768 dwarn:1   dfail:0   fail:1   skip:1671 time:11957s
> shard-snb        total:3442 pass:1355 dwarn:1   dfail:0   fail:3   skip:2083 time:7154s
> Blacklisted hosts:
> shard-kbl        total:2091 pass:1139 dwarn:17  dfail:1   fail:4   skip:929 time:5806s
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8371/shards.html

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

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

* Re: [Intel-gfx] [PATCH 4/6] drm: Introduce drm_color_lut_size()
  2018-03-06  7:54   ` Daniel Vetter
@ 2018-03-16 14:14     ` Ville Syrjälä
  0 siblings, 0 replies; 25+ messages in thread
From: Ville Syrjälä @ 2018-03-16 14:14 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, dri-devel

On Tue, Mar 06, 2018 at 08:54:21AM +0100, Daniel Vetter wrote:
> On Fri, Feb 23, 2018 at 09:25:04PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Provide a small helper to convert the blob length in bytes
> > to the number of LUT entries.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  include/drm/drm_color_mgmt.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> > index 03a59cbce621..7ddf4457f3c1 100644
> > --- a/include/drm/drm_color_mgmt.h
> > +++ b/include/drm/drm_color_mgmt.h
> > @@ -37,4 +37,9 @@ void drm_crtc_enable_color_mgmt(struct drm_crtc *crtc,
> >  int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
> >  				 int gamma_size);
> >  
> 
> Add a bit of kerneldoc and you get my
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> for this and all remaining patches.

Entire series pushed to drm-misc-next. Thanks for the reviews.

> -Daniel
> 
> > +static inline int drm_color_lut_size(const struct drm_property_blob *blob)
> > +{
> > +	return blob->length / sizeof(struct drm_color_lut);
> > +}
> > +
> >  #endif
> > -- 
> > 2.13.6
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-03-16 14:14 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
2018-03-01  8:57   ` Sharma, Shashank
2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
2018-03-01 13:24     ` Ville Syrjälä
2018-03-01 14:28       ` Sharma, Shashank
2018-03-01 14:35         ` [Intel-gfx] " Ville Syrjälä
2018-03-06  7:56   ` Daniel Vetter
2018-03-15 15:22   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
2018-03-06  7:54   ` Daniel Vetter
2018-03-16 14:14     ` [Intel-gfx] " Ville Syrjälä
2018-03-15 15:23   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 5/6] drm/i915: Remove the blob->data casts Ville Syrjala
2018-03-15 17:13   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 6/6] drm/i915: Use drm_color_lut_size() Ville Syrjala
2018-02-23 19:55 ` ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" Patchwork
2018-02-23 20:38 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-01  8:49 ` [PATCH 1/6] " Sharma, Shashank
2018-03-15 15:45 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3) Patchwork
2018-03-15 18:11 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4) Patchwork
2018-03-15 20:09 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-15 23:27 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-16 10:33   ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.