diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2014-04-19 00:12:37 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-05-26 11:59:10 +0800 |
commit | 5684002ddffc89398755bccf3962febf88e1dd2d (patch) | |
tree | 21a826ca7d8392f729d9fa1deebfbcc0c15d9b5a | |
parent | ae70674e879aa40fe4cd3a01e66b239d642519b5 (diff) | |
download | libva-intel-driver-5684002ddffc89398755bccf3962febf88e1dd2d.tar.gz libva-intel-driver-5684002ddffc89398755bccf3962febf88e1dd2d.tar.bz2 libva-intel-driver-5684002ddffc89398755bccf3962febf88e1dd2d.zip |
Remove URB_SIZE()
Instead directly use the value stored in intel_device_info
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit a0fe5a6262f9ff1398a512c83d193556bbd0eae9)
-rw-r--r-- | src/i965_avc_hw_scoreboard.c | 4 | ||||
-rw-r--r-- | src/i965_avc_ildb.c | 4 | ||||
-rwxr-xr-x | src/i965_defines.h | 6 | ||||
-rw-r--r-- | src/i965_media.c | 2 | ||||
-rw-r--r-- | src/i965_media_h264.c | 2 | ||||
-rw-r--r-- | src/i965_media_mpeg2.c | 2 | ||||
-rwxr-xr-x | src/i965_post_processing.c | 4 |
7 files changed, 9 insertions, 15 deletions
diff --git a/src/i965_avc_hw_scoreboard.c b/src/i965_avc_hw_scoreboard.c index b17ea83..f866599 100644 --- a/src/i965_avc_hw_scoreboard.c +++ b/src/i965_avc_hw_scoreboard.c @@ -217,7 +217,7 @@ i965_avc_hw_scoreboard_urb_layout(VADriverContextP ctx, struct i965_h264_context unsigned int vfe_fence, cs_fence; vfe_fence = avc_hw_scoreboard_context->urb.cs_start; - cs_fence = URB_SIZE((&i965->intel)); + cs_fence = i965->intel.device_info->urb_size; BEGIN_BATCH(batch, 3); OUT_BATCH(batch, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1); @@ -429,7 +429,7 @@ i965_avc_hw_scoreboard_decode_init(VADriverContextP ctx, void *h264_context) avc_hw_scoreboard_context->urb.cs_start = avc_hw_scoreboard_context->urb.vfe_start + avc_hw_scoreboard_context->urb.num_vfe_entries * avc_hw_scoreboard_context->urb.size_vfe_entry; assert(avc_hw_scoreboard_context->urb.cs_start + - avc_hw_scoreboard_context->urb.num_cs_entries * avc_hw_scoreboard_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + avc_hw_scoreboard_context->urb.num_cs_entries * avc_hw_scoreboard_context->urb.size_cs_entry <= i965->intel.device_info->urb_size); } } diff --git a/src/i965_avc_ildb.c b/src/i965_avc_ildb.c index 8b93c51..e0cc743 100644 --- a/src/i965_avc_ildb.c +++ b/src/i965_avc_ildb.c @@ -410,7 +410,7 @@ i965_avc_ildb_urb_layout(VADriverContextP ctx, struct i965_h264_context *i965_h2 unsigned int vfe_fence, cs_fence; vfe_fence = avc_ildb_context->urb.cs_start; - cs_fence = URB_SIZE((&i965->intel)); + cs_fence = i965->intel.device_info->urb_size; BEGIN_BATCH(batch, 3); OUT_BATCH(batch, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1); @@ -597,7 +597,7 @@ i965_avc_ildb_decode_init(VADriverContextP ctx, void *h264_context) avc_ildb_context->urb.cs_start = avc_ildb_context->urb.vfe_start + avc_ildb_context->urb.num_vfe_entries * avc_ildb_context->urb.size_vfe_entry; assert(avc_ildb_context->urb.cs_start + - avc_ildb_context->urb.num_cs_entries * avc_ildb_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + avc_ildb_context->urb.num_cs_entries * avc_ildb_context->urb.size_cs_entry <= i965->intel.device_info->urb_size); for (i = 0; i < NUM_AVC_ILDB_SURFACES; i++) { dri_bo_unreference(avc_ildb_context->surface[i].s_bo); diff --git a/src/i965_defines.h b/src/i965_defines.h index 5b4a076..f010ca2 100755 --- a/src/i965_defines.h +++ b/src/i965_defines.h @@ -821,10 +821,4 @@ #define SUBSAMPLE_YUV411 5 #define SUBSAMPLE_RGBX 6 -#define URB_SIZE(intel) (IS_GEN7(intel->device_id) ? 4096 : \ - IS_GEN8(intel->device_id) ? 4096 : \ - IS_GEN6(intel->device_id) ? 1024 : \ - IS_IRONLAKE(intel->device_id) ? 1024 : \ - IS_G4X(intel->device_id) ? 384 : 256) - #endif /* _I965_DEFINES_H_ */ diff --git a/src/i965_media.c b/src/i965_media.c index e6f1c16..5654109 100644 --- a/src/i965_media.c +++ b/src/i965_media.c @@ -60,7 +60,7 @@ i965_media_urb_layout(VADriverContextP ctx, struct i965_media_context *media_con unsigned int vfe_fence, cs_fence; vfe_fence = media_context->urb.cs_start; - cs_fence = URB_SIZE((&i965->intel)); + cs_fence = i965->intel.device_info->urb_size; BEGIN_BATCH(batch, 3); OUT_BATCH(batch, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1); diff --git a/src/i965_media_h264.c b/src/i965_media_h264.c index f6c8c11..abfecef 100644 --- a/src/i965_media_h264.c +++ b/src/i965_media_h264.c @@ -901,7 +901,7 @@ i965_media_h264_dec_context_init(VADriverContextP ctx, struct i965_media_context media_context->urb.cs_start = media_context->urb.vfe_start + media_context->urb.num_vfe_entries * media_context->urb.size_vfe_entry; assert(media_context->urb.cs_start + - media_context->urb.num_cs_entries * media_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + media_context->urb.num_cs_entries * media_context->urb.size_cs_entry <= i965->intel.device_info->urb_size); /* hook functions */ media_context->media_states_setup = i965_media_h264_states_setup; diff --git a/src/i965_media_mpeg2.c b/src/i965_media_mpeg2.c index 76a7035..a5c757f 100644 --- a/src/i965_media_mpeg2.c +++ b/src/i965_media_mpeg2.c @@ -1013,7 +1013,7 @@ i965_media_mpeg2_dec_context_init(VADriverContextP ctx, struct i965_media_contex media_context->urb.cs_start = media_context->urb.vfe_start + media_context->urb.num_vfe_entries * media_context->urb.size_vfe_entry; assert(media_context->urb.cs_start + - media_context->urb.num_cs_entries * media_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + media_context->urb.num_cs_entries * media_context->urb.size_cs_entry <= i965->intel.device_info->urb_size); /* hook functions */ media_context->media_states_setup = i965_media_mpeg2_states_setup; diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c index 95b20e4..6358033 100755 --- a/src/i965_post_processing.c +++ b/src/i965_post_processing.c @@ -5212,7 +5212,7 @@ i965_post_processing_context_init(VADriverContextP ctx, }; if (IS_IRONLAKE(i965->intel.device_id)) { - pp_context->urb.size = URB_SIZE((&i965->intel)); + pp_context->urb.size = i965->intel.device_info->urb_size; pp_context->urb.num_vfe_entries = 32; pp_context->urb.size_vfe_entry = 1; /* in 512 bits unit */ pp_context->urb.num_cs_entries = 1; @@ -5221,7 +5221,7 @@ i965_post_processing_context_init(VADriverContextP ctx, pp_context->urb.cs_start = pp_context->urb.vfe_start + pp_context->urb.num_vfe_entries * pp_context->urb.size_vfe_entry; assert(pp_context->urb.cs_start + - pp_context->urb.num_cs_entries * pp_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + pp_context->urb.num_cs_entries * pp_context->urb.size_cs_entry <= i965->intel.device_info->urb_size); pp_context->intel_post_processing = ironlake_post_processing; } else { pp_context->vfe_gpu_state.max_num_threads = 60; |