Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
396cc42a
Commit
396cc42a
authored
Apr 14, 2011
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video/encode: fix interface descriptor table
Signed-off-by:
Xiang, Haihao
<
haihao.xiang@intel.com
>
parent
57c6d5cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
i965_drv_video/gen6_vme.c
i965_drv_video/gen6_vme.c
+11
-17
No files found.
i965_drv_video/gen6_vme.c
View file @
396cc42a
...
@@ -73,7 +73,7 @@ static struct media_kernel gen6_vme_kernels[] = {
...
@@ -73,7 +73,7 @@ static struct media_kernel gen6_vme_kernels[] = {
}
}
};
};
#define GEN6_VME_KERNEL_NUMBER
2
#define GEN6_VME_KERNEL_NUMBER
ARRAY_ELEMS(gen6_vme_kernels)
static
void
static
void
gen6_vme_set_source_surface_tiling
(
struct
i965_surface_state2
*
ss
,
unsigned
int
tiling
)
gen6_vme_set_source_surface_tiling
(
struct
i965_surface_state2
*
ss
,
unsigned
int
tiling
)
...
@@ -273,8 +273,7 @@ static VAStatus gen6_vme_surface_setup(VADriverContextP ctx,
...
@@ -273,8 +273,7 @@ static VAStatus gen6_vme_surface_setup(VADriverContextP ctx,
static
VAStatus
gen6_vme_interface_setup
(
VADriverContextP
ctx
,
static
VAStatus
gen6_vme_interface_setup
(
VADriverContextP
ctx
,
VAContextID
context
,
VAContextID
context
,
struct
mfc_encode_state
*
encode_state
,
struct
mfc_encode_state
*
encode_state
)
int
is_intra
)
{
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
gen6_media_state
*
media_state
=
&
i965
->
gen6_media_state
;
struct
gen6_media_state
*
media_state
=
&
i965
->
gen6_media_state
;
...
@@ -287,15 +286,10 @@ static VAStatus gen6_vme_interface_setup(VADriverContextP ctx,
...
@@ -287,15 +286,10 @@ static VAStatus gen6_vme_interface_setup(VADriverContextP ctx,
assert
(
bo
->
virtual
);
assert
(
bo
->
virtual
);
desc
=
bo
->
virtual
;
desc
=
bo
->
virtual
;
for
(
i
=
0
;
i
<
1
;
i
++
)
{
for
(
i
=
0
;
i
<
GEN6_VME_KERNEL_NUMBER
;
i
++
)
{
/*Load kernel into GPU memory*/
struct
media_kernel
*
kernel
;
struct
media_kernel
*
kernel
;
if
(
is_intra
)
{
kernel
=
&
gen6_vme_kernels
[
i
];
kernel
=
&
gen6_vme_kernels
[
0
];
assert
(
sizeof
(
*
desc
)
==
32
);
}
else
{
kernel
=
&
gen6_vme_kernels
[
1
];
}
/*Setup the descritor table*/
/*Setup the descritor table*/
memset
(
desc
,
0
,
sizeof
(
*
desc
));
memset
(
desc
,
0
,
sizeof
(
*
desc
));
desc
->
desc0
.
kernel_start_pointer
=
(
kernel
->
bo
->
offset
>>
6
);
desc
->
desc0
.
kernel_start_pointer
=
(
kernel
->
bo
->
offset
>>
6
);
...
@@ -310,19 +304,19 @@ static VAStatus gen6_vme_interface_setup(VADriverContextP ctx,
...
@@ -310,19 +304,19 @@ static VAStatus gen6_vme_interface_setup(VADriverContextP ctx,
dri_bo_emit_reloc
(
bo
,
dri_bo_emit_reloc
(
bo
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
0
,
0
,
offsetof
(
struct
gen6_interface_descriptor_data
,
desc0
),
i
*
sizeof
(
*
desc
)
+
offsetof
(
struct
gen6_interface_descriptor_data
,
desc0
),
kernel
->
bo
);
kernel
->
bo
);
/*Sampler State(VME state pointer)*/
/*Sampler State(VME state pointer)*/
dri_bo_emit_reloc
(
bo
,
dri_bo_emit_reloc
(
bo
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
(
1
<<
2
),
//
(
1
<<
2
),
//
offsetof
(
struct
gen6_interface_descriptor_data
,
desc2
),
i
*
sizeof
(
*
desc
)
+
offsetof
(
struct
gen6_interface_descriptor_data
,
desc2
),
media_state
->
vme_state
.
bo
);
media_state
->
vme_state
.
bo
);
/*binding table*/
/*binding table*/
dri_bo_emit_reloc
(
bo
,
dri_bo_emit_reloc
(
bo
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
4
,
//One Entry
4
,
//One Entry
offsetof
(
struct
gen6_interface_descriptor_data
,
desc3
),
i
*
sizeof
(
*
desc
)
+
offsetof
(
struct
gen6_interface_descriptor_data
,
desc3
),
media_state
->
binding_table
.
bo
);
media_state
->
binding_table
.
bo
);
desc
++
;
desc
++
;
}
}
...
@@ -451,7 +445,7 @@ static void gen6_vme_idrt(VADriverContextP ctx)
...
@@ -451,7 +445,7 @@ static void gen6_vme_idrt(VADriverContextP ctx)
OUT_BATCH
(
ctx
,
CMD_MEDIA_INTERFACE_LOAD
|
2
);
OUT_BATCH
(
ctx
,
CMD_MEDIA_INTERFACE_LOAD
|
2
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
32
);
OUT_BATCH
(
ctx
,
GEN6_VME_KERNEL_NUMBER
*
sizeof
(
struct
gen6_interface_descriptor_data
)
);
OUT_RELOC
(
ctx
,
media_state
->
idrt
.
bo
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
0
);
OUT_RELOC
(
ctx
,
media_state
->
idrt
.
bo
,
I915_GEM_DOMAIN_INSTRUCTION
,
0
,
0
);
ADVANCE_BATCH
(
ctx
);
ADVANCE_BATCH
(
ctx
);
...
@@ -606,7 +600,7 @@ static int gen6_vme_media_object_inter(VADriverContextP ctx,
...
@@ -606,7 +600,7 @@ static int gen6_vme_media_object_inter(VADriverContextP ctx,
BEGIN_BATCH
(
ctx
,
len_in_dowrds
);
BEGIN_BATCH
(
ctx
,
len_in_dowrds
);
OUT_BATCH
(
ctx
,
CMD_MEDIA_OBJECT
|
(
len_in_dowrds
-
2
));
OUT_BATCH
(
ctx
,
CMD_MEDIA_OBJECT
|
(
len_in_dowrds
-
2
));
OUT_BATCH
(
ctx
,
VME_INT
RA
_SHADER
);
/*Interface Descriptor Offset*/
OUT_BATCH
(
ctx
,
VME_INT
ER
_SHADER
);
/*Interface Descriptor Offset*/
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
...
@@ -847,7 +841,7 @@ static VAStatus gen6_vme_prepare(VADriverContextP ctx,
...
@@ -847,7 +841,7 @@ static VAStatus gen6_vme_prepare(VADriverContextP ctx,
/*Setup all the memory object*/
/*Setup all the memory object*/
gen6_vme_surface_setup
(
ctx
,
context
,
encode_state
,
is_intra
);
gen6_vme_surface_setup
(
ctx
,
context
,
encode_state
,
is_intra
);
gen6_vme_interface_setup
(
ctx
,
context
,
encode_state
,
is_intra
);
gen6_vme_interface_setup
(
ctx
,
context
,
encode_state
);
gen6_vme_constant_setup
(
ctx
,
context
,
encode_state
);
gen6_vme_constant_setup
(
ctx
,
context
,
encode_state
);
gen6_vme_vme_state_setup
(
ctx
,
context
,
encode_state
,
is_intra
);
gen6_vme_vme_state_setup
(
ctx
,
context
,
encode_state
,
is_intra
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment