radeon/vce: disable VCE dual instance for harvest part
authorLeo Liu <leo.liu@amd.com>
Mon, 13 Jul 2015 17:36:27 +0000 (13:36 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Aug 2015 13:02:31 +0000 (15:02 +0200)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vce.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index bc8f36db355d0ff35d02201e7cbd877725df250e..7eab974a3df94df08b359aa11e60fa2d4e872439 100644 (file)
@@ -408,7 +408,9 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
        if (rscreen->info.family >= CHIP_TONGA)
                enc->dual_pipe = true;
        /* TODO enable B frame with dual instance */
-       if ((rscreen->info.family >= CHIP_TONGA) && (templ->max_references == 1))
+       if ((rscreen->info.family >= CHIP_TONGA) &&
+               (templ->max_references == 1) &&
+               (rscreen->info.vce_harvest_config == 0))
                enc->dual_inst = true;
 
        enc->base = *templ;
index d7424eef27eed35dd6bea295457368e301cc5b6e..7ab6e56e0991655a0ba71d30479a1e9cf16fe341 100644 (file)
@@ -244,6 +244,7 @@ struct radeon_info {
 
     boolean                     cik_macrotile_mode_array_valid;
     uint32_t                    cik_macrotile_mode_array[16];
+    uint32_t                    vce_harvest_config;
 };
 
 enum radeon_feature_id {
index f57f45b618f33e2ad9b24c0f45d499f98a0f6366..012c9003b69a273c34b01936e8225a86f1e21ca0 100644 (file)
@@ -164,6 +164,7 @@ static boolean do_winsys_init(struct amdgpu_winsys *ws)
 
    /* Set chip identification. */
    ws->info.pci_id = ws->amdinfo.asic_id; /* TODO: is this correct? */
+   ws->info.vce_harvest_config = ws->amdinfo.vce_harvest_config;
 
    switch (ws->info.pci_id) {
 #define CHIPSET(pci_id, name, cfamily) case pci_id: ws->info.family = CHIP_##cfamily; break;