[Freedreno] [RFC PATCH 2/5] freedreno: add function to test for A20x chips.

Martin Fuzzey mfuzzey at parkeon.com
Tue Aug 4 10:53:01 PDT 2015


Signed-off-by: Martin Fuzzey <mfuzzey at parkeon.com>
---
 src/gallium/drivers/freedreno/freedreno_screen.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h
index 3b470d1..cb56c0d 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.h
+++ b/src/gallium/drivers/freedreno/freedreno_screen.h
@@ -70,6 +70,12 @@ struct fd_bo * fd_screen_bo_from_handle(struct pipe_screen *pscreen,
 
 struct pipe_screen * fd_screen_create(struct fd_device *dev);
 
+static inline boolean
+is_a20x(struct fd_screen *screen)
+{
+	return (screen->gpu_id >= 200) && (screen->gpu_id < 210);
+}
+
 /* is a3xx patch revision 0? */
 static inline boolean
 is_a3xx_p0(struct fd_screen *screen)



More information about the Freedreno mailing list