diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-12 08:56:09 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-12 08:56:40 +0200 |
commit | 995c0b08a3006df39414a9ec6103c55c674b51fc (patch) | |
tree | e3b60f8fa195dd12e65fa27fc686b16b8ae9d8ef /src | |
parent | 31f10de6847b58c21b75888541ed7ee27a5b1fad (diff) | |
download | etna_viv-995c0b08a3006df39414a9ec6103c55c674b51fc.tar.gz etna_viv-995c0b08a3006df39414a9ec6103c55c674b51fc.tar.xz |
etnaviv: viv structure was not zeroed properly
Fixes hang bugs with new fence system.
Diffstat (limited to 'src')
-rw-r--r-- | src/etnaviv/viv.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <etnaviv/viv.h> +#include <etnaviv/etna_util.h> #include <unistd.h> #include <stdlib.h> @@ -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 */ |