Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright © 2009 Intel Corporation
  3.  *
  4.  * Permission is hereby granted, free of charge, to any person obtaining a
  5.  * copy of this software and associated documentation files (the
  6.  * "Software"), to deal in the Software without restriction, including
  7.  * without limitation the rights to use, copy, modify, merge, publish,
  8.  * distribute, sub license, and/or sell copies of the Software, and to
  9.  * permit persons to whom the Software is furnished to do so, subject to
  10.  * the following conditions:
  11.  *
  12.  * The above copyright notice and this permission notice (including the
  13.  * next paragraph) shall be included in all copies or substantial portions
  14.  * of the Software.
  15.  *
  16.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  19.  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
  20.  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  21.  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  22.  * SOFTWAR
  23.  *
  24.  * Authors:
  25.  *    Zhou Chang <chang.zhou@intel.com>
  26.  *
  27.  */
  28.  
  29. #ifndef _GEN6_VME_H_
  30. #define _GEN6_VME_H_
  31.  
  32. #include <xf86drm.h>
  33. #include <drm.h>
  34. #include <i915_drm.h>
  35. #include <intel_bufmgr.h>
  36.  
  37.  
  38. #define INTRA_VME_OUTPUT_IN_BYTES       16      /* in bytes */
  39. #define MAX_INTERFACE_DESC_GEN6      32
  40. #define MAX_MEDIA_SURFACES_GEN6      34
  41.  
  42. #define GEN6_VME_KERNEL_NUMBER          2
  43.  
  44. struct encode_state;
  45. struct gen6_encoder_context;
  46.  
  47. struct gen6_vme_context
  48. {
  49.     struct {
  50.         dri_bo *bo;
  51.     } surface_state_binding_table;
  52.  
  53.     struct {
  54.         dri_bo *bo;
  55.     } idrt;  /* interface descriptor remap table */
  56.  
  57.     struct {
  58.         dri_bo *bo;
  59.     } curbe;
  60.  
  61.     struct {
  62.         unsigned int gpgpu_mode:1;
  63.         unsigned int max_num_threads:16;
  64.         unsigned int num_urb_entries:8;
  65.         unsigned int urb_entry_size:16;
  66.         unsigned int curbe_allocation_size:16;
  67.     } vfe_state;
  68.  
  69.     struct {
  70.         dri_bo *bo;
  71.     } vme_state;
  72.  
  73.     struct {
  74.         dri_bo *bo;
  75.         unsigned int num_blocks;
  76.         unsigned int size_block; /* in bytes */
  77.         unsigned int pitch;
  78.     } vme_output;
  79.  
  80.     struct i965_kernel vme_kernels[GEN6_VME_KERNEL_NUMBER];
  81.     void *vme_state_message;
  82. };
  83.  
  84. VAStatus gen6_vme_pipeline(VADriverContextP ctx,
  85.                            VAProfile profile,
  86.                            struct encode_state *encode_state,
  87.                            struct gen6_encoder_context *gen6_encoder_context);
  88. Bool gen6_vme_context_init(VADriverContextP ctx, struct gen6_vme_context *vme_context);
  89. Bool gen6_vme_context_destroy(struct gen6_vme_context *vme_context);
  90.  
  91. VAStatus gen75_vme_pipeline(VADriverContextP ctx,
  92.                            VAProfile profile,
  93.                            struct encode_state *encode_state,
  94.                            struct gen6_encoder_context *gen6_encoder_context);
  95.  
  96. Bool gen75_vme_context_init(VADriverContextP ctx, struct gen6_vme_context *vme_context);
  97. Bool gen75_vme_context_destroy(struct gen6_vme_context *vme_context);
  98. #endif /* _GEN6_VME_H_ */
  99.