Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
assert(obj_surface);
i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
assert(obj_surface);
i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
+ gen7_mfd_context->jpeg_wa_surface_object = obj_surface;
if (!gen7_mfd_context->jpeg_wa_slice_data_bo) {
gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr,
if (!gen7_mfd_context->jpeg_wa_slice_data_bo) {
gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr,
gen75_jpeg_wa_surface_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
gen75_jpeg_wa_surface_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
- struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
BEGIN_BCS_BATCH(batch, 6);
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
BEGIN_BCS_BATCH(batch, 6);
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
}
gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE;
}
gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE;
+ gen7_mfd_context->jpeg_wa_surface_object = NULL;
switch (obj_config->profile) {
case VAProfileMPEG2Simple:
switch (obj_config->profile) {
case VAProfileMPEG2Simple:
obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
assert(obj_surface);
i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
assert(obj_surface);
i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
+ gen7_mfd_context->jpeg_wa_surface_object = obj_surface;
if (!gen7_mfd_context->jpeg_wa_slice_data_bo) {
gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr,
if (!gen7_mfd_context->jpeg_wa_slice_data_bo) {
gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr,
gen7_jpeg_wa_surface_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
gen7_jpeg_wa_surface_state(VADriverContextP ctx,
struct gen7_mfd_context *gen7_mfd_context)
{
- struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
BEGIN_BCS_BATCH(batch, 6);
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
BEGIN_BCS_BATCH(batch, 6);
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct gen7_mfd_context *gen7_mfd_context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id);
+ struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
struct intel_batchbuffer *batch = gen7_mfd_context->base.batch;
dri_bo *intra_bo;
int i;
}
gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE;
}
gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE;
+ gen7_mfd_context->jpeg_wa_surface_object = NULL;
switch (obj_config->profile) {
case VAProfileMPEG2Simple:
switch (obj_config->profile) {
case VAProfileMPEG2Simple:
GenBuffer bitplane_read_buffer;
VASurfaceID jpeg_wa_surface_id;
GenBuffer bitplane_read_buffer;
VASurfaceID jpeg_wa_surface_id;
+ struct object_surface *jpeg_wa_surface_object;
dri_bo *jpeg_wa_slice_data_bo;
int wa_mpeg2_slice_vertical_position;
dri_bo *jpeg_wa_slice_data_bo;
int wa_mpeg2_slice_vertical_position;