@@ -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 */
@@ -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");
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@intel.com> --- intel/intel_chipset.h | 9 --------- intel/intel_decode.c | 13 +++++-------- 2 files changed, 5 insertions(+), 17 deletions(-)