All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/panfrost: Document base field location constraint in panfrost_gem_object
@ 2019-11-29 13:56 Boris Brezillon
  2019-11-29 14:13 ` Steven Price
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Boris Brezillon @ 2019-11-29 13:56 UTC (permalink / raw)
  To: Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig, Steven Price
  Cc: Boris Brezillon, dri-devel

I've spent hours chasing a memory corruption that was caused by
insertion of an extra field field before ->base. Let's document the
fact that base has to be the first field in panfrost_gem_object.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
Changes in v2:
* Use the proper prefix in the subject line
---
 drivers/gpu/drm/panfrost/panfrost_gem.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.h b/drivers/gpu/drm/panfrost/panfrost_gem.h
index b3517ff9630c..d480261fc177 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.h
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.h
@@ -10,6 +10,10 @@
 struct panfrost_mmu;
 
 struct panfrost_gem_object {
+	/*
+	 * Must be the first element because we're using some of the
+	 * drm_gem_shmem helpers.
+	 */
 	struct drm_gem_shmem_object base;
 	struct sg_table *sgts;
 
-- 
2.23.0

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

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

end of thread, other threads:[~2019-11-29 22:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-29 13:56 [PATCH v2] drm/panfrost: Document base field location constraint in panfrost_gem_object Boris Brezillon
2019-11-29 14:13 ` Steven Price
2019-11-29 14:19   ` Boris Brezillon
2019-11-29 18:40     ` Daniel Vetter
2019-11-29 19:24       ` Boris Brezillon
2019-11-29 19:43         ` Ville Syrjälä
2019-11-29 22:23           ` Boris Brezillon
2019-11-29 14:16 ` Alyssa Rosenzweig
2019-11-29 14:28 ` 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.