drm/amdgpu/display: check if fbc is available in set_static_screen_control (v2)
Subsystems (3)
PATCH 1/5 drm/amdgpu/display: check if fbc is available in set_static_screen_control (v2)
The value is dependent on whether fbc is available.
v2: only check if num_pipes is valid
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +6 -1
@@ -1750,7 +1750,12 @@ static void set_static_screen_control(struct pipe_ctx **pipe_ctx,if (events->force_trigger) value |=0x1 ; - value |=0x84 ; +if (num_pipes) { +struct dc *dc = pipe_ctx[0 ]->stream->ctx->dc; + +if (dc->fbc_compressor) + value |=0x84 ; + }for (i =0 ; i < num_pipes; i++) pipe_ctx[i]->stream_res.tg->funcs->
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20181106202910.1117-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/5 drm/amdgpu: add DC feature mask module parameter
Similar to ppfeaturemask. Allows you to selectively enable/disable DC features.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 4 ++++ 3 files changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -152,6 +152,7 @@ extern int amdgpu_compute_multipipe;extern int amdgpu_gpu_recovery;extern int amdgpu_emu_mode;extern uint amdgpu_smu_memory_pool_size; +extern uint amdgpu_dc_feature_mask;extern struct amdgpu_mgpu_info mgpu_info;#ifdef CONFIG_DRM_AMDGPU_SI
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +11 -0
@@ -127,6 +127,9 @@ int amdgpu_compute_multipipe = -1;int amdgpu_gpu_recovery =-1 ;/* auto */ int amdgpu_emu_mode =0 ;uint amdgpu_smu_memory_pool_size =0 ; +/* FBC (bit 0) disabled by default*/ +uint amdgpu_dc_feature_mask =0 ; +struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex), };
@@ -631,6 +634,14 @@ module_param(halt_if_hws_hang, int, 0644);MODULE_PARM_DESC (halt_if_hws_hang,"Halt if HWS hang is detected (0 = off (default), 1 = on)" );#endif +/** +* DOC: dcfeaturemask (uint) +* Override display features enabled. See enum DC_FEATURE_MASK in drivers/gpu/drm/amd/include/amd_shared.h. +* The default is the current set of stable display features. +*/ +MODULE_PARM_DESC (dcfeaturemask,"all stable DC features enabled (default))" ); +module_param_named (dcfeaturemask, amdgpu_dc_feature_mask, uint,0444 ); +static const struct pci_device_id pciidlist[] = { #ifdef CONFIG_DRM_AMDGPU_SI {0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI},
drivers/gpu/drm/amd/include/amd_shared.h +4 -0
@@ -133,6 +133,10 @@ enum PP_FEATURE_MASK { PP_AVFS_MASK = 0x40000, }; +enum DC_FEATURE_MASK { +DC_FBC_MASK =0x1 , +}; +/** * struct amd_ip_funcs - general hooks for managing amdgpu IP Blocks */
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amdgpu/display/dc: add FBC to dc_config
In reply to a message not in the archiveAdd FBC to the list of features that can be enabled from the DM.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -169,6 +169,7 @@ struct link_training_settings;struct dc_config {bool gpu_vm_support;bool disable_disp_pll_sharing; +bool fbc_support; };enum visual_confirm {
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amdgpu/display/dm: handle FBC dc feature parameter
In reply to a message not in the archiveSet the dc_config properly when the option is enabled.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -434,6 +434,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) adev->asic_type < CHIP_RAVEN) init_data.flags.gpu_vm_support = true; +if (amdgpu_dc_feature_mask &DC_FBC_MASK ) + init_data.flags.fbc_support = true; +/* Display Core create. */ adev->dm.dc =dc_create (&init_data);
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amdgpu/display/dce11: only enable FBC when selected
In reply to a message not in the archiveCauses a black screen on a Stoney laptop.
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +2 -1
@@ -1354,7 +1354,8 @@ static bool construct( pool->base.sw_i2cs[i] =NULL ; } - dc->fbc_compressor =dce110_compressor_create (ctx); +if (dc->config.fbc_support) + dc->fbc_compressor =dce110_compressor_create (ctx);if (!underlay_create (ctx, &pool->base)) goto res_create_fail;
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20181106202910.1117-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Wentland, Harry
Reviewed-by Harry WentlandRe: [PATCH 5/5] drm/amdgpu/display/dce11: only enable FBC when selected
Quoted 4 lines · Alex Deucher
Causes a black screen on a Stoney laptop.
Thanks.
Series is
Harry
Quoted 10 lines
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +0
-0
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c static bool construct( · line 1361
Quoted 9 lines
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +2
-1@@ -1354,7 +1354,8 @@ static bool construct( pool->base.sw_i2cs[i] =NULL ; } - dc->fbc_compressor =dce110_compressor_create (ctx); +if (dc->config.fbc_support) + dc->fbc_compressor =dce110_compressor_create (ctx);if (!underlay_create (ctx, &pool->base)) goto res_create_fail;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx