DC Patches Sep 18, 2018
Subsystems (3)
cover DC Patches Sep 18, 2018
*Summary of Changes
*Add Stereo 3D support in VSC
*Add Null pointers in flip and pp_smu
*Fix gamma not being applied
Charlene Liu (1):
drm/amd/display: add pp_smu NULL pointer check
Christian König (1):
drm/amdgpu: move reserving GDS/GWS/OA into common code
Eric Bernstein (1):
drm/amd/display: Stereo 3D support in VSC
Leo Li (1):
drm/amd/display: Remove mst_hotplug_work
Nicholas Kazlauskas (1):
drm/amd/display: Guard against null stream dereference in do flip
Nikola Cornij (1):
drm/amd/display: Refactor FPGA-specific link setup
Samson Tam (1):
drm/amd/display: use proper pipe_ctx index
SivapiriyanKumarasamy (2):
drm/amd/display: Add color bit info to freesync infoframe drm/amd/display: fix gamma not being applied
Su Sung Chung (1):
drm/amd/display: program v_update and v_ready with proper field
Tony Cheng (1):
drm/amd/display: dc 3.1.67
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 18 +++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 19 --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 19 --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 19 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 ++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 8 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 41 +++++- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 56 +++---- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 15 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 6 +- .../drm/amd/display/modules/freesync/freesync.c | 164 ++++++++++++++++++--- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 4 +- .../gpu/drm/amd/display/modules/inc/mod_shared.h | 49 ++++++ .../amd/display/modules/info_packet/info_packet.c | 58 +++++++- 18 files changed, 363 insertions(+), 157 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
Signature · 6 lines
2.14.1 _______________________________________________ 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): 20180918160910.10041-1-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org
PATCH 1/11 drm/amdgpu: move reserving GDS/GWS/OA into common code
From: Christian König <[email protected]>
We don't need that in the per ASIC code.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 19 ------------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 19 ------------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 19 ------------------- 4 files changed, 18 insertions(+), 57 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +18 -0
@@ -1852,6 +1852,12 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)return r; } + r =amdgpu_bo_create_kernel (adev, adev->gds.mem.gfx_partition_size, +PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GDS , + &adev->gds.gds_gfx_bo,NULL ,NULL ); +if (r) +return r; + r =ttm_bo_init_mm (&adev->mman.bdev,AMDGPU_PL_GWS , adev->gds.gws.total_size);if (r) {
@@ -1859,6 +1865,12 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)return r; } + r =amdgpu_bo_create_kernel (adev, adev->gds.gws.gfx_partition_size, +PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GWS , + &adev->gds.gws_gfx_bo,NULL ,NULL ); +if (r) +return r; + r =ttm_bo_init_mm (&adev->mman.bdev,AMDGPU_PL_OA , adev->gds.oa.total_size);if (r) {
@@ -1866,6 +1878,12 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)return r; } + r =amdgpu_bo_create_kernel (adev, adev->gds.oa.gfx_partition_size, +PAGE_SIZE ,AMDGPU_GEM_DOMAIN_OA , + &adev->gds.oa_gfx_bo,NULL ,NULL ); +if (r) +return r; +/* Register debugfs entries for amdgpu_ttm */ r =amdgpu_ttm_debugfs_init (adev);if (r) {
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0 -19
@@ -4582,25 +4582,6 @@ static int gfx_v7_0_sw_init(void *handle) } } -/* reserve GDS, GWS and OA resource for gfx */ - r =amdgpu_bo_create_kernel (adev, adev->gds.mem.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GDS , - &adev->gds.gds_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.gws.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GWS , - &adev->gds.gws_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.oa.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_OA , - &adev->gds.oa_gfx_bo,NULL ,NULL ); -if (r) -return r; - adev->gfx.ce_ram_size =0x8000 ;gfx_v7_0_gpu_early_init (adev);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -19
@@ -2161,25 +2161,6 @@ static int gfx_v8_0_sw_init(void *handle)if (r)return r; -/* reserve GDS, GWS and OA resource for gfx */ - r =amdgpu_bo_create_kernel (adev, adev->gds.mem.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GDS , - &adev->gds.gds_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.gws.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GWS , - &adev->gds.gws_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.oa.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_OA , - &adev->gds.oa_gfx_bo,NULL ,NULL ); -if (r) -return r; - adev->gfx.ce_ram_size =0x8000 ; r =gfx_v8_0_gpu_early_init (adev);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -19
@@ -1700,25 +1700,6 @@ static int gfx_v9_0_sw_init(void *handle)if (r)return r; -/* reserve GDS, GWS and OA resource for gfx */ - r =amdgpu_bo_create_kernel (adev, adev->gds.mem.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GDS , - &adev->gds.gds_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.gws.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_GWS , - &adev->gds.gws_gfx_bo,NULL ,NULL ); -if (r) -return r; - - r =amdgpu_bo_create_kernel (adev, adev->gds.oa.gfx_partition_size, -PAGE_SIZE ,AMDGPU_GEM_DOMAIN_OA , - &adev->gds.oa_gfx_bo,NULL ,NULL ); -if (r) -return r; - adev->gfx.ce_ram_size =0x8000 ; r =gfx_v9_0_gpu_early_init (adev);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/11 drm/amd/display: Refactor FPGA-specific link setup
In reply to a message not in the archiveFrom: Nikola Cornij <[email protected]>
FPGA doesn't program backend, so we don't need certain link settings (audio stream for example).
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 56 ++++++++++++---------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 15 +----- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + 3 files changed, 32 insertions(+), 40 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +30 -26
@@ -2559,23 +2559,24 @@ void core_link_enable_stream( pipe_ctx->stream_res.stream_enc, &stream->timing); -resource_build_info_frame (pipe_ctx); - core_dc->hwss.update_info_frame (pipe_ctx); - -/* eDP lit up by bios already, no need to enable again. */ -if (pipe_ctx->stream->signal ==SIGNAL_TYPE_EDP && - pipe_ctx->stream->apply_edp_fast_boot_optimization) { - pipe_ctx->stream->apply_edp_fast_boot_optimization = false; - pipe_ctx->stream->dpms_off = false; -return ; - } +if (!IS_FPGA_MAXIMUS_DC (core_dc->ctx->dce_environment)) { +resource_build_info_frame (pipe_ctx); + core_dc->hwss.update_info_frame (pipe_ctx); + +/* eDP lit up by bios already, no need to enable again. */ +if (pipe_ctx->stream->signal ==SIGNAL_TYPE_EDP && + pipe_ctx->stream->apply_edp_fast_boot_optimization) { + pipe_ctx->stream->apply_edp_fast_boot_optimization = false; + pipe_ctx->stream->dpms_off = false; +return ; + } -if (pipe_ctx->stream->dpms_off) -return ; +if (pipe_ctx->stream->dpms_off) +return ; - status =enable_link (state, pipe_ctx); + status =enable_link (state, pipe_ctx); -if (status !=DC_OK ) { +if (status !=DC_OK ) {DC_LOG_WARNING ("enabling link %u failed: %d\n" , pipe_ctx->stream->sink->link->link_index, status);
@@ -2590,23 +2591,26 @@ void core_link_enable_stream(BREAK_TO_DEBUGGER ();return ; } - } + } - core_dc->hwss.enable_audio_stream (pipe_ctx); + core_dc->hwss.enable_audio_stream (pipe_ctx); -/* turn off otg test pattern if enable */ -if (pipe_ctx->stream_res.tg->funcs->set_test_pattern) - pipe_ctx->stream_res.tg->funcs->set_test_pattern (pipe_ctx->stream_res.tg, -CONTROLLER_DP_TEST_PATTERN_VIDEOMODE , -COLOR_DEPTH_UNDEFINED ); +/* turn off otg test pattern if enable */ +if (pipe_ctx->stream_res.tg->funcs->set_test_pattern) + pipe_ctx->stream_res.tg->funcs->set_test_pattern (pipe_ctx->stream_res.tg, +CONTROLLER_DP_TEST_PATTERN_VIDEOMODE , +COLOR_DEPTH_UNDEFINED ); - core_dc->hwss.enable_stream (pipe_ctx); + core_dc->hwss.enable_stream (pipe_ctx); -if (pipe_ctx->stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST ) -allocate_mst_payload (pipe_ctx); +if (pipe_ctx->stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST ) +allocate_mst_payload (pipe_ctx); + + core_dc->hwss.unblank_stream (pipe_ctx, + &pipe_ctx->stream->sink->link->cur_link_settings); + + } - core_dc->hwss.unblank_stream (pipe_ctx, - &pipe_ctx->stream->sink->link->cur_link_settings); }void core_link_disable_stream (struct pipe_ctx *pipe_ctx,int option)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -14
@@ -1377,26 +1377,13 @@ static enum dc_status apply_single_controller_ctx_to_hw(/* */ dc->hwss.enable_stream_timing (pipe_ctx, context, dc); -/* FPGA does not program backend */ -if (IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) { - pipe_ctx->stream_res.opp->funcs->opp_set_dyn_expansion ( - pipe_ctx->stream_res.opp, -COLOR_SPACE_YCBCR601 , - stream->timing.display_color_depth, - pipe_ctx->stream->signal); - - pipe_ctx->stream_res.opp->funcs->opp_program_fmt ( - pipe_ctx->stream_res.opp, - &stream->bit_depth_params, - &stream->clamping); -return DC_OK ; - }/* TODO: move to stream encoder */ if (pipe_ctx->stream->signal !=SIGNAL_TYPE_VIRTUAL )if (DC_OK !=bios_parser_crtc_source_select (pipe_ctx)) {BREAK_TO_DEBUGGER ();return DC_ERROR_UNEXPECTED ; } + pipe_ctx->stream_res.opp->funcs->opp_set_dyn_expansion( pipe_ctx->stream_res.opp, COLOR_SPACE_YCBCR601,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -0
@@ -44,6 +44,7 @@#include "dcn10_hubp.h" #include "dcn10_hubbub.h" #include "dcn10_cm_common.h" +#include "dc_link_dp.h" #define DC_LOGGER_INIT (logger)
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/11 drm/amd/display: use proper pipe_ctx index
In reply to a message not in the archiveFrom: Samson Tam <[email protected]>
Use link->link_index as index to pipe_ctx[] to get proper link information instead of using index 0 to avoid potential miss matches.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -2
@@ -460,9 +460,25 @@ void dc_link_set_preferred_link_settings(struct dc *dc,struct dc_link_settings *link_setting, struct dc_link *link) { + int i; +struct pipe_ctx *pipe; +struct dc_stream_state *link_stream;struct dc_link_settings store_settings = *link_setting; -struct dc_stream_state *link_stream = - link->dc->current_state->res_ctx.pipe_ctx[0 ].stream; + +for (i =0 ; i <MAX_PIPES ; i++) { + pipe = &dc->current_state->res_ctx.pipe_ctx[i]; +if (pipe->stream && pipe->stream->sink + && pipe->stream->sink->link) { +if (pipe->stream->sink->link == link) +break ; + } + } + +/* Stream not found */ +if (i ==MAX_PIPES ) +return ; + + link_stream = link->dc->current_state->res_ctx.pipe_ctx[i].stream; link->preferred_link_setting = store_settings;if (link_stream)
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/11 drm/amd/display: add pp_smu NULL pointer check
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
add pp_smu NULL ptr check
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -1395,7 +1395,7 @@ static void notify_display_count_to_smu(* sent as part of pplib_apply_display_requirements. * So just return. */ -if (!pp_smu->set_display_count) +if (!pp_smu || !pp_smu->set_display_count)return ; display_count =0 ;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/11 drm/amd/display: Add color bit info to freesync infoframe
In reply to a message not in the archiveFrom: SivapiriyanKumarasamy <[email protected]>
Parse the native color bit and send it to freesync module for future use
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + .../drm/amd/display/modules/freesync/freesync.c | 164 ++++++++++++++++++--- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 4 +- .../gpu/drm/amd/display/modules/inc/mod_shared.h | 49 ++++++ 4 files changed, 198 insertions(+), 21 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -4812,6 +4812,8 @@ void set_freesync_on_stream(struct amdgpu_display_manager *dm,mod_freesync_build_vrr_infopacket (dm->freesync_module, new_stream, &vrr, + packet_type_fs1, +NULL , &vrr_infopacket); new_crtc_state->adjust = vrr.adjust;
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +144 -20
205 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h +3 -1
@@ -54,7 +54,7 @@#ifndef MOD_FREESYNC_H_ #define MOD_FREESYNC_H_ -#include "dm_services.h" +#include "mod_shared.h" // Access structures struct mod_freesync {
@@ -144,6 +144,8 @@ void mod_freesync_get_settings(struct mod_freesync *mod_freesync,void mod_freesync_build_vrr_infopacket (struct mod_freesync *mod_freesync,const struct dc_stream_state *stream,const struct mod_vrr_params *vrr, +enum vrr_packet_type packet_type, +const enum color_transfer_func *app_tf,struct dc_info_packet *infopacket); void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
drivers/gpu/drm/amd/display/modules/inc/mod_shared.h new file +49 -0
49 lines not on this page · raw message
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/11 drm/amd/display: program v_update and v_ready with proper field
In reply to a message not in the archiveFrom: Su Sung Chung <[email protected]>
[WHY]
There are two different variables used to calculate v_update and v_ready, one for validation and the other for performance parameter calculation. Before the variable for validation was used which caused underflow on 1080edp with vsr enabled
[HOW]
program v_update and v_ready with the variables for performance parameter calculation
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 12 ++++++------ drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c +4 -4
@@ -1625,11 +1625,11 @@ void dispclkdppclkdcfclk_deep_sleep_prefetch_parameters_watermarks_and_performanelse { v->dsty_after_scaler =0.0 ; } - v->v_update_offset_pix =dcn_bw_ceil2 (v->htotal[k] /4.0 ,1.0 ); + v->v_update_offset_pix[k] =dcn_bw_ceil2 (v->htotal[k] /4.0 ,1.0 ); v->total_repeater_delay_time = v->max_inter_dcn_tile_repeaters * (2.0 / v->dppclk +3.0 / v->dispclk); - v->v_update_width_pix = (14.0 / v->dcf_clk_deep_sleep +12.0 / v->dppclk + v->total_repeater_delay_time) * v->pixel_clock[k]; - v->v_ready_offset_pix =dcn_bw_max2 (150.0 / v->dppclk, v->total_repeater_delay_time +20.0 / v->dcf_clk_deep_sleep +10.0 / v->dppclk) * v->pixel_clock[k]; - v->t_setup = (v->v_update_offset_pix + v->v_update_width_pix + v->v_ready_offset_pix) / v->pixel_clock[k]; + v->v_update_width_pix[k] = (14.0 / v->dcf_clk_deep_sleep +12.0 / v->dppclk + v->total_repeater_delay_time) * v->pixel_clock[k]; + v->v_ready_offset_pix[k] =dcn_bw_max2 (150.0 / v->dppclk, v->total_repeater_delay_time +20.0 / v->dcf_clk_deep_sleep +10.0 / v->dppclk) * v->pixel_clock[k]; + v->t_setup = (v->v_update_offset_pix[k] + v->v_update_width_pix[k] + v->v_ready_offset_pix[k]) / v->pixel_clock[k]; v->v_startup[k] =dcn_bw_min2 (v->v_startup_lines, v->max_vstartup_lines[k]);if (v->prefetch_mode ==0.0 ) { v->t_wait =dcn_bw_max3 (v->dram_clock_change_latency + v->urgent_latency, v->sr_enter_plus_exit_time, v->urgent_latency);
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +6 -6
@@ -1096,9 +1096,9 @@ bool dcn_validate_bandwidth(if (pipe->top_pipe && pipe->top_pipe->plane_state == pipe->plane_state)continue ; - pipe->pipe_dlg_param.vupdate_width = v->v_update_width[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; - pipe->pipe_dlg_param.vupdate_offset = v->v_update_offset[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; - pipe->pipe_dlg_param.vready_offset = v->v_ready_offset[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; + pipe->pipe_dlg_param.vupdate_width = v->v_update_width_pix[input_idx]; + pipe->pipe_dlg_param.vupdate_offset = v->v_update_offset_pix[input_idx]; + pipe->pipe_dlg_param.vready_offset = v->v_ready_offset_pix[input_idx]; pipe->pipe_dlg_param.vstartup_start = v->v_startup[input_idx]; pipe->pipe_dlg_param.htotal = pipe->stream->timing.h_total;
@@ -1137,9 +1137,9 @@ bool dcn_validate_bandwidth( TIMING_3D_FORMAT_SIDE_BY_SIDE))) {if (hsplit_pipe && hsplit_pipe->plane_state == pipe->plane_state) {/* update previously split pipe */ - hsplit_pipe->pipe_dlg_param.vupdate_width = v->v_update_width[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; - hsplit_pipe->pipe_dlg_param.vupdate_offset = v->v_update_offset[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; - hsplit_pipe->pipe_dlg_param.vready_offset = v->v_ready_offset[input_idx][v->dpp_per_plane[input_idx] ==2 ?1 :0 ]; + hsplit_pipe->pipe_dlg_param.vupdate_width = v->v_update_width_pix[input_idx]; + hsplit_pipe->pipe_dlg_param.vupdate_offset = v->v_update_offset_pix[input_idx]; + hsplit_pipe->pipe_dlg_param.vready_offset = v->v_ready_offset_pix[input_idx]; hsplit_pipe->pipe_dlg_param.vstartup_start = v->v_startup[input_idx]; hsplit_pipe->pipe_dlg_param.htotal = pipe->stream->timing.h_total;
drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h +3 -3
@@ -504,10 +504,10 @@ struct dcn_bw_internal_vars {float prefetch_mode;float dstx_after_scaler;float dsty_after_scaler; -float v_update_offset_pix; +float v_update_offset_pix[number_of_planes_minus_one +1 ];float total_repeater_delay_time; -float v_update_width_pix; -float v_ready_offset_pix; +float v_update_width_pix[number_of_planes_minus_one +1 ]; +float v_ready_offset_pix[number_of_planes_minus_one +1 ];float t_setup;float t_wait;float bandwidth_available_for_immediate_flip;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/11 drm/amd/display: dc 3.1.67
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -38,7 +38,7 @@#include "inc/compressor.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.1.66" +#define DC_VER "3.1.67"#define MAX_SURFACES 3#define MAX_STREAMS 6
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/11 drm/amd/display: Stereo 3D support in VSC
In reply to a message not in the archiveFrom: Eric Bernstein <[email protected]>
[Why]
Need to add strere 3D information in VSC
[How]
Update mod_build_vsc_infopacket with stereo info
--- .../amd/display/modules/info_packet/info_packet.c | 58 ++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +54 -4
@@ -48,9 +48,12 @@ static void mod_build_vsc_infopacket(const struct dc_stream_state *stream,unsigned int i;unsigned int pixelEncoding =0 ;unsigned int colorimetryFormat =0 ; +bool stereo3dSupport = false; -if (stream->timing.timing_3d_format !=TIMING_3D_FORMAT_NONE && stream->view_format !=VIEW_3D_FORMAT_NONE ) +if (stream->timing.timing_3d_format !=TIMING_3D_FORMAT_NONE && stream->view_format !=VIEW_3D_FORMAT_NONE ) { vscPacketRevision =1 ; + stereo3dSupport = true; + }/*VSC packet set to 2 when DP revision >= 1.2*/ if (stream->psr_version !=0 )
@@ -94,12 +97,59 @@ static void mod_build_vsc_infopacket(const struct dc_stream_state *stream, info_packet->hb2 =0x01 ;// 01h = Revision number. VSC SDP supporting 3D stereo only info_packet->hb3 =0x01 ;// 01h = VSC SDP supporting 3D stereo only (HB2 = 01h). -if (stream->timing.timing_3d_format ==TIMING_3D_FORMAT_INBAND_FA ) - info_packet->sb[0 ] =0x1 ; - info_packet->valid = true; } +if (stereo3dSupport) { +/* ==============================================================================================================| +* A. STEREO 3D +* ==============================================================================================================| +* VSC Payload (1 byte) From DP1.2 spec +* +* Bits 3:0 (Stereo Interface Method Code) | Bits 7:4 (Stereo Interface Method Specific Parameter) +* ----------------------------------------------------------------------------------------------------- +* 0 = Non Stereo Video | Must be set to 0x0 +* ----------------------------------------------------------------------------------------------------- +* 1 = Frame/Field Sequential | 0x0: L + R view indication based on MISC1 bit 2:1 +* | 0x1: Right when Stereo Signal = 1 +* | 0x2: Left when Stereo Signal = 1 +* | (others reserved) +* ----------------------------------------------------------------------------------------------------- +* 2 = Stacked Frame | 0x0: Left view is on top and right view on bottom +* | (others reserved) +* ----------------------------------------------------------------------------------------------------- +* 3 = Pixel Interleaved | 0x0: horiz interleaved, right view pixels on even lines +* | 0x1: horiz interleaved, right view pixels on odd lines +* | 0x2: checker board, start with left view pixel +* | 0x3: vertical interleaved, start with left view pixels +* | 0x4: vertical interleaved, start with right view pixels +* | (others reserved) +* ----------------------------------------------------------------------------------------------------- +* 4 = Side-by-side | 0x0: left half represents left eye view +* | 0x1: left half represents right eye view +*/ +switch (stream->timing.timing_3d_format) { +case TIMING_3D_FORMAT_HW_FRAME_PACKING : +case TIMING_3D_FORMAT_SW_FRAME_PACKING : +case TIMING_3D_FORMAT_TOP_AND_BOTTOM : +case TIMING_3D_FORMAT_TB_SW_PACKED : + info_packet->sb[0 ] =0x02 ;// Stacked Frame, Left view is on top and right view on bottom. +break ; +case TIMING_3D_FORMAT_DP_HDMI_INBAND_FA : +case TIMING_3D_FORMAT_INBAND_FA : + info_packet->sb[0 ] =0x01 ;// Frame/Field Sequential, L + R view indication based on MISC1 bit 2:1 +break ; +case TIMING_3D_FORMAT_SIDE_BY_SIDE : +case TIMING_3D_FORMAT_SBS_SW_PACKED : + info_packet->sb[0 ] =0x04 ;// Side-by-side +break ; +default : + info_packet->sb[0 ] =0x00 ;// No Stereo Video, Shall be cleared to 0x0. +break ; + } + + } +/* 05h = VSC SDP supporting 3D stereo, PSR2, and Pixel Encoding/Colorimetry Format indication. * Added in DP1.3, a DP Source device is allowed to indicate the pixel encoding/colorimetry * format to the DP Sink device with VSC SDP only when the DP Sink device supports it
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/11 drm/amd/display: Guard against null stream dereference in do flip
In reply to a message not in the archiveFrom: Nicholas Kazlauskas <[email protected]>
[Why]
During suspend under some hardware configurations can result in a series of atomic commits with a NULL stream status - which causes a NULL pointer dereference. This should be guarded.
[How]
Exit early from the function - if we can't access the stream then there isn't anything that can be done here.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +14 -1
@@ -4094,6 +4094,7 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc,/* TODO eliminate or rename surface_update */ struct dc_surface_update surface_updates[1 ] = { {0 } };struct dm_crtc_state *acrtc_state =to_dm_crtc_state (crtc->state); +struct dc_stream_status *stream_status;/* Prepare wait for target vblank early - before the fence-waits */
@@ -4149,7 +4150,19 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc,spin_unlock_irqrestore (&crtc->dev->event_lock, flags); - surface_updates->surface =dc_stream_get_status (acrtc_state->stream)->plane_states[0 ]; + stream_status =dc_stream_get_status (acrtc_state->stream); +if (!stream_status) { +DRM_ERROR ("No stream status for CRTC: id=%d\n" , + acrtc->crtc_id); +return ; + } + + surface_updates->surface = stream_status->plane_states[0 ]; +if (!surface_updates->surface) { +DRM_ERROR ("No surface for CRTC: id=%d\n" , + acrtc->crtc_id); +return ; + } surface_updates->flip_addr = &addr; dc_commit_updates_for_stream(adev->dm.dc,
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/11 drm/amd/display: Remove mst_hotplug_work
In reply to a message not in the archiveFrom: Leo Li <[email protected]>
[Why]
The work struct's schedule call was removed a while ago, making this useless.
[How]
Remove it.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ---------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 -- 2 files changed, 12 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -10
@@ -338,14 +338,6 @@ static int dm_set_powergating_state(void *handle,/* Prototypes of private functions */ static int dm_early_init (void * handle); -static void hotplug_notify_work_func (struct work_struct *work) -{ - struct amdgpu_display_manager *dm = container_of(work, struct amdgpu_display_manager, mst_hotplug_work); -struct drm_device *dev = dm->ddev; - -drm_kms_helper_hotplug_event (dev); -} -/* Allocate memory for FBC compressed data */ static void amdgpu_dm_fbc_init (struct drm_connector *connector) {
@@ -447,8 +439,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) goto error; } -INIT_WORK (&adev->dm.mst_hotplug_work, hotplug_notify_work_func); - adev->dm.freesync_module =mod_freesync_create (adev->dm.dc);if (!adev->dm.freesync_module) { DRM_ERROR(
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 -2
@@ -108,8 +108,6 @@ struct amdgpu_display_manager {const struct dc_link *backlight_link; -struct work_struct mst_hotplug_work; -struct mod_freesync *freesync_module;/**
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/11 drm/amd/display: fix gamma not being applied
In reply to a message not in the archiveFrom: SivapiriyanKumarasamy <[email protected]>
[WHY]
Previously night light forced a full update by
applying a transfer function update regardless of if it was changed. This logic was removed,
Now gamma surface updates are only applied when there is also a plane info update, this does not work in cases such as using the night light slider.
[HOW]
When moving the night light slider we will perform a full update if the gamma has changed and there is a surface, even when the surface has not changed. Also get stream updates in setgamma prior to update planes and stream.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +14 -5
@@ -1176,9 +1176,6 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa*/ update_flags->bits.bpp_change =1 ; -if (u->gamma &&dce_use_lut (u->plane_info->format)) - update_flags->bits.gamma_change =1 ; -if (memcmp (&u->plane_info->tiling_info, &u->surface->tiling_info,sizeof (union dc_tiling_info )) !=0 ) { update_flags->bits.swizzle_change =1 ;
@@ -1195,7 +1192,6 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfaif (update_flags->bits.rotation_change || update_flags->bits.stereo_format_change || update_flags->bits.pixel_format_change - || update_flags->bits.gamma_change || update_flags->bits.bpp_change || update_flags->bits.bandwidth_change || update_flags->bits.output_tf_change)
@@ -1285,13 +1281,26 @@ static enum surface_update_type det_surface_update(const struct dc *dc,if (u->coeff_reduction_factor) update_flags->bits.coeff_reduction_change =1 ; +if (u->gamma) { +enum surface_pixel_format format =SURFACE_PIXEL_FORMAT_GRPH_BEGIN ; + +if (u->plane_info) + format = u->plane_info->format; +else if (u->surface) + format = u->surface->format; + +if (dce_use_lut (format)) + update_flags->bits.gamma_change =1 ; + } +if (update_flags->bits.in_transfer_func_change) { type =UPDATE_TYPE_MED ;elevate_update_type (&overall_type, type); }if (update_flags->bits.input_csc_change - || update_flags->bits.coeff_reduction_change) { + || update_flags->bits.coeff_reduction_change + || update_flags->bits.gamma_change) { type =UPDATE_TYPE_FULL ;elevate_update_type (&overall_type, type); }
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx