diff options
author | Rob Clark <[email protected]> | 2014-06-18 10:24:04 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-07-25 13:29:28 -0400 |
commit | d48faad3c2d7efb7f4bf727b63487071c4a75e7a (patch) | |
tree | 63faf2efc4457849e9f06ffca81dcbcf68dd998e /src/gallium/drivers/freedreno/freedreno_screen.h | |
parent | 9613ca569f553666b7397c10321f43bdbb843a13 (diff) |
freedreno/a3xx: enable/disable wa's based on patch-level
It seems like for the most part, different behaviors, workarounds, etc,
should be conditional on GPU patch revision (ie. a320.0 vs a320.2)
rather than GPU id (a320 vs a330).
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 93501e722f4..e0377b561a9 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -44,7 +44,8 @@ struct fd_screen { uint32_t gmemsize_bytes; uint32_t device_id; - uint32_t gpu_id; + uint32_t gpu_id; /* 220, 305, etc */ + uint32_t chip_id; /* coreid:8 majorrev:8 minorrev:8 patch:8 */ struct fd_device *dev; struct fd_pipe *pipe; @@ -68,4 +69,11 @@ struct fd_bo * fd_screen_bo_from_handle(struct pipe_screen *pscreen, struct pipe_screen * fd_screen_create(struct fd_device *dev); +/* is a3xx patch revision 0? */ +static inline boolean +is_a3xx_p0(struct fd_screen *screen) +{ + return (screen->gpu_id & 0xff0000ff) == 0x0300000000; +} + #endif /* FREEDRENO_SCREEN_H_ */ |