-From 67fc8bbb6e9fb09bcc94e57e2fd30a386ba03f75 Mon Sep 17 00:00:00 2001
+From 28753b88960f814baa69b401656226a821d3136a Mon Sep 17 00:00:00 2001
 From: Robert Nelson <robertcnelson@gmail.com>
-Date: Mon, 19 Jan 2015 09:09:12 -0600
+Date: Fri, 30 Jan 2015 15:39:42 -0600
 Subject: [PATCH] staging: etnaviv: add drm driver
 
 raw diff from: https://github.com/austriancoder/linux

 drivers/staging/etnaviv/state.xml.h           |  348 ++++++++
 drivers/staging/etnaviv/state_hi.xml.h        |  405 +++++++++
 include/uapi/drm/etnaviv_drm.h                |  223 +++++
 26 files changed, 6332 insertions(+)
 create mode 100644 drivers/staging/etnaviv/Kconfig
 create mode 100644 drivers/staging/etnaviv/Makefile
 create mode 100644 drivers/staging/etnaviv/cmdstream.xml.h

+    return "UNKOWN OPCODE";
+}
+
+static int validate_load_state(u32 cmd, u32 *data)
+{
+	unsigned int count, off;
+
+	count = VIV_FE_LOAD_STATE_HEADER_COUNT(cmd);
+	off = VIV_FE_LOAD_STATE_HEADER_OFFSET(cmd);
+
+	if (count == 0x0)
+		return -EINVAL;
+
+	/* TODO: validate offset */
+
+	return count + 1;
+}
+
+bool etnaviv_cmd_validate(struct etnaviv_gpu *gpu,
+	struct etnaviv_gem_object *obj, unsigned int size)
+{
