From 995c0b08a3006df39414a9ec6103c55c674b51fc Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 12 Oct 2013 08:56:09 +0200 Subject: etnaviv: viv structure was not zeroed properly Fixes hang bugs with new fence system. --- src/etnaviv/viv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/etnaviv/viv.c b/src/etnaviv/viv.c index 6bcfc13..6c62731 100644 --- a/src/etnaviv/viv.c +++ b/src/etnaviv/viv.c @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ #include +#include #include #include @@ -184,7 +185,7 @@ static void convert_chip_specs(struct viv_specs *out, const struct _gcsHAL_QUERY int viv_open(enum viv_hw_type hw_type, struct viv_conn **out) { - struct viv_conn *conn = malloc(sizeof(struct viv_conn)); + struct viv_conn *conn = ETNA_CALLOC_STRUCT(viv_conn); int err = 0; if(conn == NULL) return -1; @@ -609,6 +610,7 @@ int viv_write_register(struct viv_conn *conn, uint32_t address, uint32_t data) return viv_invoke(conn, &id); } +/* Fence emulation */ int _viv_fence_new(struct viv_conn *conn, uint32_t *fence_out, int *signal_out) { /* Request fence and queue signal */ -- cgit