summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2014-09-12 10:14:00 +0800
committerZhao, Yakui <yakui.zhao@intel.com>2014-09-15 08:33:23 +0800
commit6405108e9dea62445c97bc2fa309c61febcdce6c (patch)
tree0d27d8e32b1422b32b0b1357e3cf07f5364c7fd7
parent77a7cbdd3c5648b691d5b07895780fab8fe5a342 (diff)
change the attribute of hw_codec_info so that it can be updated dynamically
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 065db8289d3f38a923959f87d1b75767a0633e61)
-rw-r--r--src/i965_device_info.c14
-rw-r--r--src/i965_drv_video.c2
-rw-r--r--src/i965_drv_video.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index 9573b7d..e6036cd 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -44,7 +44,7 @@ extern struct hw_context *i965_proc_context_init(VADriverContextP, struct object
extern struct hw_context *g4x_dec_hw_context_init(VADriverContextP, struct object_config *);
extern bool genx_render_init(VADriverContextP);
-static const struct hw_codec_info g4x_hw_codec_info = {
+static struct hw_codec_info g4x_hw_codec_info = {
.dec_hw_context_init = g4x_dec_hw_context_init,
.enc_hw_context_init = NULL,
.proc_hw_context_init = NULL,
@@ -64,7 +64,7 @@ static const struct hw_codec_info g4x_hw_codec_info = {
extern struct hw_context *ironlake_dec_hw_context_init(VADriverContextP, struct object_config *);
extern void i965_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
-static const struct hw_codec_info ilk_hw_codec_info = {
+static struct hw_codec_info ilk_hw_codec_info = {
.dec_hw_context_init = ironlake_dec_hw_context_init,
.enc_hw_context_init = NULL,
.proc_hw_context_init = i965_proc_context_init,
@@ -86,7 +86,7 @@ static const struct hw_codec_info ilk_hw_codec_info = {
extern struct hw_context *gen6_dec_hw_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *gen6_enc_hw_context_init(VADriverContextP, struct object_config *);
-static const struct hw_codec_info snb_hw_codec_info = {
+static struct hw_codec_info snb_hw_codec_info = {
.dec_hw_context_init = gen6_dec_hw_context_init,
.enc_hw_context_init = gen6_enc_hw_context_init,
.proc_hw_context_init = i965_proc_context_init,
@@ -120,7 +120,7 @@ static const struct hw_codec_info snb_hw_codec_info = {
extern struct hw_context *gen7_dec_hw_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *gen7_enc_hw_context_init(VADriverContextP, struct object_config *);
-static const struct hw_codec_info ivb_hw_codec_info = {
+static struct hw_codec_info ivb_hw_codec_info = {
.dec_hw_context_init = gen7_dec_hw_context_init,
.enc_hw_context_init = gen7_enc_hw_context_init,
.proc_hw_context_init = i965_proc_context_init,
@@ -158,7 +158,7 @@ static const struct hw_codec_info ivb_hw_codec_info = {
extern struct hw_context *gen75_dec_hw_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *gen75_enc_hw_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *gen75_proc_context_init(VADriverContextP, struct object_config *);
-static const struct hw_codec_info hsw_hw_codec_info = {
+static struct hw_codec_info hsw_hw_codec_info = {
.dec_hw_context_init = gen75_dec_hw_context_init,
.enc_hw_context_init = gen75_enc_hw_context_init,
.proc_hw_context_init = gen75_proc_context_init,
@@ -202,7 +202,7 @@ static const struct hw_codec_info hsw_hw_codec_info = {
extern struct hw_context *gen8_dec_hw_context_init(VADriverContextP, struct object_config *);
extern struct hw_context *gen8_enc_hw_context_init(VADriverContextP, struct object_config *);
extern void gen8_post_processing_context_init(VADriverContextP, void *, struct intel_batchbuffer *);
-static const struct hw_codec_info bdw_hw_codec_info = {
+static struct hw_codec_info bdw_hw_codec_info = {
.dec_hw_context_init = gen8_dec_hw_context_init,
.enc_hw_context_init = gen8_enc_hw_context_init,
.proc_hw_context_init = gen75_proc_context_init,
@@ -244,7 +244,7 @@ static const struct hw_codec_info bdw_hw_codec_info = {
},
};
-const struct hw_codec_info *
+struct hw_codec_info *
i965_get_codec_info(int devid)
{
switch (devid) {
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 0992956..aa521e5 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -5473,7 +5473,7 @@ VAStatus i965_QueryVideoProcPipelineCaps(
return VA_STATUS_SUCCESS;
}
-extern const struct hw_codec_info *i965_get_codec_info(int devid);
+extern struct hw_codec_info *i965_get_codec_info(int devid);
static bool
i965_driver_data_init(VADriverContextP ctx)
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index bc9913f..629489f 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -382,7 +382,7 @@ struct i965_driver_data
struct object_heap buffer_heap;
struct object_heap image_heap;
struct object_heap subpic_heap;
- const struct hw_codec_info *codec_info;
+ struct hw_codec_info *codec_info;
_I965Mutex render_mutex;
_I965Mutex pp_mutex;