nouveau_client_del(&dec->client);
- if (dec->mpeg12_bs)
- FREE(dec->mpeg12_bs);
+ FREE(dec->mpeg12_bs);
FREE(dec);
}
mip.base.domain = NOUVEAU_BO_VRAM;
mip.base.bo = dec->mbring;
mip.base.address = dec->mbring->offset;
- context->clear_render_target(context, &surf.base, &color, 0, 0, 64, 4760);
+ context->clear_render_target(context, &surf.base, &color, 0, 0, 64, 4760, false);
surf.offset = dec->vpring->size / 2 - 0x1000;
surf.width = 1024;
surf.height = 1;
mip.level[0].pitch = surf.width * 4;
mip.base.bo = dec->vpring;
mip.base.address = dec->vpring->offset;
- context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1);
+ context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1, false);
surf.offset = dec->vpring->size - 0x1000;
- context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1);
+ context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1, false);
PUSH_SPACE(screen->pushbuf, 5);
PUSH_REFN(screen->pushbuf, dec->fence, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
struct pipe_sampler_view sv_templ;
struct pipe_surface surf_templ;
struct nv50_miptree *mt0, *mt1;
- struct nouveau_bo *empty = NULL;
struct nouveau_screen *screen = &((struct nv50_context *)pipe)->screen->base;
union nouveau_bo_config cfg;
unsigned bo_size;
bo_size, &cfg, &buffer->full))
goto error;
- mt0->base.bo = buffer->interlaced;
+ nouveau_bo_ref(buffer->interlaced, &mt0->base.bo);
mt0->base.domain = NOUVEAU_BO_VRAM;
- mt0->base.offset = 0;
- mt0->base.address = buffer->interlaced->offset + mt0->base.offset;
- nouveau_bo_ref(buffer->interlaced, &empty);
+ mt0->base.address = buffer->interlaced->offset;
- mt1->base.bo = buffer->interlaced;
+ nouveau_bo_ref(buffer->interlaced, &mt1->base.bo);
mt1->base.domain = NOUVEAU_BO_VRAM;
- mt1->base.offset = mt0->layer_stride * 2;
- mt1->base.address = buffer->interlaced->offset + mt1->base.offset;
- nouveau_bo_ref(buffer->interlaced, &empty);
+ mt1->base.offset = mt0->total_size;
+ mt1->base.address = buffer->interlaced->offset + mt0->total_size;
memset(&sv_templ, 0, sizeof(sv_templ));
for (component = 0, i = 0; i < 2; ++i ) {
for (j = 0; j < nr_components; ++j, ++component) {
sv_templ.swizzle_r = sv_templ.swizzle_g = sv_templ.swizzle_b =
- PIPE_SWIZZLE_RED + j;
- sv_templ.swizzle_a = PIPE_SWIZZLE_ONE;
+ PIPE_SWIZZLE_X + j;
+ sv_templ.swizzle_a = PIPE_SWIZZLE_1;
buffer->sampler_view_components[component] =
pipe->create_sampler_view(pipe, res, &sv_templ);
int present, ret;
if (!FIRMWARE_PRESENT(checked, VP_KERN)) {
- nouveau_object_new(screen->channel, 0, 0x7476, NULL, 0, &obj);
- if (obj)
+ ret = nouveau_object_new(screen->channel, 0, 0x7476, NULL, 0, &obj);
+ if (!ret)
screen->firmware_info.profiles_present |= FIRMWARE_VP_KERN;
nouveau_object_del(&obj);
screen->firmware_info.profiles_checked |= FIRMWARE_VP_KERN;
if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
if (!FIRMWARE_PRESENT(checked, BSP_KERN)) {
- nouveau_object_new(screen->channel, 0, 0x74b0, NULL, 0, &obj);
- if (obj)
+ ret = nouveau_object_new(screen->channel, 0, 0x74b0, NULL, 0, &obj);
+ if (!ret)
screen->firmware_info.profiles_present |= FIRMWARE_BSP_KERN;
nouveau_object_del(&obj);
screen->firmware_info.profiles_checked |= FIRMWARE_BSP_KERN;