"pad" was missing in Mesa's msm_drm.h.  sizeof(drm_msm_gem_info)
remains the same, but now the compiler initializes the field to
zero.

Buffer allocation results in EINVAL without this for me.

Cc: Rob Clark <[email protected]>
Cc: Kristian Høgsberg <[email protected]>
Signed-off-by: Chia-I Wu <[email protected]>
---
 src/freedreno/drm/msm_drm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/freedreno/drm/msm_drm.h b/src/freedreno/drm/msm_drm.h
index 09f16fd7be..91a16b333c 100644
--- a/src/freedreno/drm/msm_drm.h
+++ b/src/freedreno/drm/msm_drm.h
@@ -122,6 +122,7 @@ struct drm_msm_gem_info {
        __u32 info;           /* in - one of MSM_INFO_* */
        __u64 value;          /* in or out */
        __u32 len;            /* in or out */
+       __u32 pad;
 };
 
 #define MSM_PREP_READ        0x01
-- 
2.20.1.97.g81188d93c3-goog

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to