[PATCH 06/12] intel: Kill the IS_9XX() macro
Damien Lespiau
damien.lespiau at intel.com
Thu Mar 5 08:20:14 PST 2015
IS_9XX() has grown to mean gen >= 3. It was only used in a single test:
(IS_9XX && !IS_GEN3)
Which has then be replaced with gen >= 4.
The code in that area was idented a bit weirdly, so do a pass on that as
well.
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
intel/intel_chipset.h | 9 ---------
intel/intel_decode.c | 13 +++++--------
2 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h
index 9a8df6a..a8a2b0e 100644
--- a/intel/intel_chipset.h
+++ b/intel/intel_chipset.h
@@ -354,13 +354,4 @@
#define IS_GEN9(devid) IS_SKYLAKE(devid)
-#define IS_9XX(dev) (IS_GEN3(dev) || \
- IS_GEN4(dev) || \
- IS_GEN5(dev) || \
- IS_GEN6(dev) || \
- IS_GEN7(dev) || \
- IS_GEN8(dev) || \
- IS_GEN9(dev))
-
-
#endif /* _INTEL_CHIPSET_H */
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 9ada2fa..2fd2cc5 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -3949,15 +3949,12 @@ drm_intel_decode(struct drm_intel_decode *ctx)
index += decode_2d(ctx);
break;
case 0x3:
- if (IS_9XX(devid) && !IS_GEN3(devid)) {
- index +=
- decode_3d_965(ctx);
- } else if (IS_GEN3(devid)) {
+ if (ctx->dev->gen >= 4)
+ index += decode_3d_965(ctx);
+ else if (IS_GEN3(devid))
index += decode_3d(ctx);
- } else {
- index +=
- decode_3d_i830(ctx);
- }
+ else
+ index += decode_3d_i830(ctx);
break;
default:
instr_out(ctx, index, "UNKNOWN\n");
--
1.8.3.1
More information about the dri-devel
mailing list