On Tue, Sep 06, 2016 at 12:28:55PM +0300, Juha-Pekka Heikkila wrote: > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@xxxxxxxxx> > --- > tests/gem_pipe_control_store_loop.c | 2 +- > tests/kms_cursor_crc.c | 3 ++- > tools/intel_error_decode.c | 2 +- > tools/intel_stepping.c | 40 ++++++++++++++++++------------------- > tools/intel_watermark.c | 14 ++++++------- > 5 files changed, 31 insertions(+), 30 deletions(-) > > diff --git a/tests/gem_pipe_control_store_loop.c b/tests/gem_pipe_control_store_loop.c > index a155ad1..0e1d477 100644 > --- a/tests/gem_pipe_control_store_loop.c > +++ b/tests/gem_pipe_control_store_loop.c > @@ -167,7 +167,7 @@ igt_main > igt_assert(bufmgr); > > igt_skip_on(IS_GEN2(devid) || IS_GEN3(devid)); > - igt_skip_on(devid == PCI_CHIP_I965_G); /* has totally broken pipe control */ > + igt_skip_on(IS_BROADWATER(devid)); /* I965_G has totally broken pipe control */ > > /* IMPORTANT: No call to > * drm_intel_bufmgr_gem_enable_reuse(bufmgr); > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c > index d1de450..7137f1c 100644 > --- a/tests/kms_cursor_crc.c > +++ b/tests/kms_cursor_crc.c > @@ -427,7 +427,8 @@ static bool has_nonsquare_cursors(uint32_t devid) > * Test non-square cursors a bit on the platforms > * that support such things. > */ > - return devid == PCI_CHIP_845_G || devid == PCI_CHIP_I865_G; > + return (intel_get_device_info(devid)->is_brookdale > + || intel_get_device_info(devid)->is_springdale); /* 845_G || I865_G */ return (intel_get_device_info(devid)->is_brookdale || intel_get_device_info(devid)->is_springdale); /* 845_G || I865_G */ logic operators go at the end of the line, not the beginning of the next. > } > > static void test_cursor_size(data_t *data) > diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c > index 8cbbe84..3c74475 100644 > --- a/tools/intel_error_decode.c > +++ b/tools/intel_error_decode.c > @@ -548,7 +548,7 @@ static void > read_data_file(FILE *file) > { > struct drm_intel_decode *decode_ctx = NULL; > - uint32_t devid = PCI_CHIP_I855_GM; > + uint32_t devid = 0x3582; /* I855GM */ > uint32_t *data = NULL; > uint32_t head[MAX_RINGS]; > int head_idx = 0; > diff --git a/tools/intel_stepping.c b/tools/intel_stepping.c > index 7839ef5..24f1ae8 100644 > --- a/tools/intel_stepping.c > +++ b/tools/intel_stepping.c > @@ -205,8 +205,7 @@ int main(int argc, char **argv) > exit(1); > } > > - switch (dev->device_id) { > - case PCI_CHIP_I915_G: > + if(IS_915G(dev->device_id)) { ^ space missing (and more below) > if (stepping < 0x04) > step_desc = "<B1"; > else if (stepping == 0x04) > @@ -217,8 +216,8 @@ int main(int argc, char **argv) > step_desc = ">C2"; > else > step_desc = ">B1 <C2"; > - break; > - case PCI_CHIP_I915_GM: > + } > + else if(IS_915GM(dev->device_id)) { } else if > if (stepping < 0x03) > step_desc = "<B1"; > else if (stepping == 0x03) > @@ -227,51 +226,53 @@ int main(int argc, char **argv) > step_desc = "C1/C2"; > else > step_desc = ">C2"; > - break; > - case PCI_CHIP_I945_GM: > + } > + else if(IS_945GM(dev->device_id)) { > if (stepping < 0x03) > step_desc = "<A3"; > else if (stepping == 0x03) > step_desc = "A3"; > else > step_desc = ">A3"; > - break; > - case PCI_CHIP_I965_G: > - case PCI_CHIP_I965_Q: > + } > + else if (IS_BROADWATER(dev->device_id) && dev->device_id != 0x2982) { && !IS_I965_G_1() Adding devid numbers is not great, :| -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx