示例#1
0
static void test_throttle(int fd)
{
    wedge_gpu(fd);

    igt_assert_eq(__gem_throttle(fd), -EIO);

    trigger_reset(fd);
}
示例#2
0
static void test_wait(int fd)
{
    igt_hang_ring_t hang;

    /* If the request we wait on completes due to a hang (even for
     * that request), the user expects the return value to 0 (success).
     */
    hang = igt_hang_ring(fd, I915_EXEC_DEFAULT);
    igt_assert_eq(__gem_wait(fd, hang.handle, -1), 0);
    igt_post_hang_ring(fd, hang);

    /* If the GPU is wedged during the wait, again we expect the return
     * value to be 0 (success).
     */
    igt_require(i915_reset_control(false));
    hang = igt_hang_ring(fd, I915_EXEC_DEFAULT);
    igt_assert_eq(__gem_wait(fd, hang.handle, -1), 0);
    igt_post_hang_ring(fd, hang);
    igt_require(i915_reset_control(true));

    trigger_reset(fd);
}
示例#3
0
static void test_execbuf(int fd)
{
    struct drm_i915_gem_execbuffer2 execbuf;
    struct drm_i915_gem_exec_object2 exec;
    uint32_t tmp[] = { MI_BATCH_BUFFER_END };

    memset(&exec, 0, sizeof(exec));
    memset(&execbuf, 0, sizeof(execbuf));

    exec.handle = gem_create(fd, 4096);
    gem_write(fd, exec.handle, 0, tmp, sizeof(tmp));

    execbuf.buffers_ptr = (uintptr_t)&exec;
    execbuf.buffer_count = 1;

    wedge_gpu(fd);

    igt_assert_eq(__gem_execbuf(fd, &execbuf), -EIO);
    gem_close(fd, exec.handle);

    trigger_reset(fd);
}
void lcd_output_text( char text[20] )
{
  /* If the incoming string is "ip_address" (case insensitive)
   * output the IP Address.  Otherwise, dump whatever's passed
   * into the text[] array.
   */
  if ( stricmp( text, "ip_address" ) == 0 )
  {
    lcd_ip_addr();
  }
#ifdef RECONFIG_REQUEST_PIO_NAME
  else if ( stricmp( text, "reset" ) == 0 )
  {
    trigger_reset();
  }
#endif
  else
  {
    lcdDevice = fopen( "/dev/lcd", "w" ); 
    fprintf(lcdDevice, "\n\n%s", text);
    fclose( lcdDevice );
  }
}
示例#5
0
 void reset()
 {
   enable();
   trigger_reset();
 }
示例#6
0
 void set_period(unsigned period_ = 0) {
   enabled = true;
   period = period_;
   trigger_reset();
 }