DC Patches Jan 25, 2017
Subsystems (3)
cover DC Patches Jan 25, 2017
* Fix bug where surface wasn't updated unless flipping
* Warning cleanup
* Debug and readability improvements
* Don't block gamma programming
Amy Zhang (1):
drm/amd/display: Fix Warnings
Andrey Grodzovsky (1):
drm/amd/display: Rename atomic_commit parameter.
Dmytro Laktyushkin (1):
drm/amd/display: fix timing trace debug print
Harry Wentland (1):
drm/amd/display: Make sure to update address without flip
Tony Cheng (1):
drm/amd/display: enable color gamma programming
.../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 +++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 18 ++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 24 +++++++++++++--------- 5 files changed, 35 insertions(+), 28 deletions(-)
Signature · 6 lines
2.9.3 _______________________________________________ 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): 20170125203358.32736-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 1/5 drm/amd/display: enable color gamma programming
From: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ------ drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 7 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -6
@@ -1498,9 +1498,6 @@ void dc_update_surfaces_for_stream(struct dc *dc, } } -if (dc->debug.disable_color_module) -continue ;/* skip below color updates */ -if (updates[i].gamma && updates[i].gamma != surface->public.gamma_correction) {if (surface->public.gamma_correction !=NULL )
@@ -1579,9 +1576,6 @@ void dc_update_surfaces_for_stream(struct dc *dc,if (cur_pipe_ctx->surface == pipe_ctx->surface) is_new_pipe_surface = false; -if (dc->debug.disable_color_module) -continue ;/* skip below color updates */ -if (is_new_pipe_surface || updates[i].in_transfer_func) core_dc->hwss.set_input_transfer_func(
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
@@ -147,7 +147,6 @@ struct dc_debug {bool disable_dfs_bypass;bool disable_clock_gate;bool disable_dmcu; -bool disable_color_module; };struct dc {
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/5 drm/amd/display: Fix Warnings
In reply to a message not in the archiveFrom: Amy Zhang <[email protected]>
- Remove mixed declarations and unused variables
--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +14 -10
@@ -581,12 +581,10 @@ static bool convert_to_custom_float(static bool dce110_translate_regamma_to_hw_format (const struct dc_transfer_func *output_tf,struct pwl_params *regamma_params) { -if (output_tf ==NULL || regamma_params ==NULL ) -return false; - -struct gamma_curve *arr_curve_points = regamma_params->arr_curve_points; -struct curve_points *arr_points = regamma_params->arr_points; -struct pwl_result_data *rgb_resulted = regamma_params->rgb_resulted; +struct curve_points *arr_points; +struct pwl_result_data *rgb_resulted; +struct pwl_result_data *rgb; +struct pwl_result_data *rgb_plus_1;struct fixed31_32 y_r;struct fixed31_32 y_g;struct fixed31_32 y_b;
@@ -594,8 +592,14 @@ static bool dce110_translate_regamma_to_hw_format(const struct dc_transfer_funcstruct fixed31_32 y3_max;int32_t segment_start, segment_end; -uint32_t i, j, k, seg_distr[16 ], increment, start_index; -uint32_t hw_points =0 ; +uint32_t i, j, k, seg_distr[16 ], increment, start_index, hw_points; + +if (output_tf ==NULL || regamma_params ==NULL ) +return false; + + arr_points = regamma_params->arr_points; + rgb_resulted = regamma_params->rgb_resulted; + hw_points =0 ;memset (regamma_params,0 ,sizeof (struct pwl_params ));
@@ -742,8 +746,8 @@ static bool dce110_translate_regamma_to_hw_format(const struct dc_transfer_func regamma_params->arr_curve_points[k].segments_num = seg_distr[k]; -struct pwl_result_data *rgb = rgb_resulted; -struct pwl_result_data *rgb_plus_1 = rgb_resulted +1 ; + rgb = rgb_resulted; + rgb_plus_1 = rgb_resulted +1 ; i =1 ;
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amd/display: fix timing trace debug print
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -1
@@ -1563,9 +1563,11 @@ void dc_update_surfaces_for_stream(struct dc *dc,if (update_type ==UPDATE_TYPE_FULL ) {/* only apply for top pipe */ -if (!pipe_ctx->top_pipe) +if (!pipe_ctx->top_pipe) { core_dc->hwss.apply_ctx_for_surface (core_dc, surface, context); +context_timing_trace (dc, &context->res_ctx); + } }else if (updates[i].flip_addr) core_dc->hwss.update_plane_addr (core_dc, pipe_ctx);
drivers/gpu/drm/amd/display/dc/core/dc_debug.c +12 -6
@@ -279,20 +279,26 @@ void context_timing_trace(int i;struct core_dc *core_dc =DC_TO_CORE (dc);struct dal_logger *logger = core_dc->ctx->logger; +int h_pos[MAX_PIPES ], v_pos[MAX_PIPES ];for (i =0 ; i < core_dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; -int h_pos =0 ; -int v_pos =0 ;if (pipe_ctx->stream ==NULL )continue ; - pipe_ctx->tg->funcs->get_position (pipe_ctx->tg, &h_pos, &v_pos); -TIMING_TRACE ("Pipe_%d H_tot:%d V_tot:%d H_pos:%d V_pos:%d\n" , - pipe_ctx->pipe_idx, + pipe_ctx->tg->funcs->get_position (pipe_ctx->tg, &h_pos[i], &v_pos[i]); + } +for (i =0 ; i < core_dc->res_pool->pipe_count; i++) { +struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; + +if (pipe_ctx->stream ==NULL ) +continue ; + +TIMING_TRACE ("OTG_%d H_tot:%d V_tot:%d H_pos:%d V_pos:%d\n" , + pipe_ctx->tg->inst, pipe_ctx->stream->public.timing.h_total, pipe_ctx->stream->public.timing.v_total, - h_pos, v_pos); + h_pos[i], v_pos[i]); } }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amd/display: Make sure to update address without flip
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -1
@@ -1568,7 +1568,9 @@ void dc_update_surfaces_for_stream(struct dc *dc, surface, context);context_timing_trace (dc, &context->res_ctx); } - }else if (updates[i].flip_addr) + } + +if (updates[i].flip_addr) core_dc->hwss.update_plane_addr (core_dc, pipe_ctx);if (update_type ==UPDATE_TYPE_FAST )
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amd/display: Rename atomic_commit parameter.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
This parameter name is misleading. It's previous meaning confuses with ASYNC (immidiate flip) which is totatlly different thing then nonblocking commit.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +3 -3
@@ -2481,7 +2481,7 @@ static void remove_stream(struct amdgpu_device *adev, struct amdgpu_crtc *acrtc)int amdgpu_dm_atomic_commit (struct drm_device *dev,struct drm_atomic_state *state, -bool async) +bool nonblock) {struct amdgpu_device *adev = dev->dev_private;struct amdgpu_display_manager *dm = &adev->dm;
@@ -2510,7 +2510,7 @@ int amdgpu_dm_atomic_commit(* we should not pin/unpin the fb here, it should be done in * amdgpu_crtc_flip and from the vblank irq handler. */ -if (!async) { +if (!nonblock) { ret =drm_atomic_helper_prepare_planes (dev, state);if (ret)return ret;
@@ -2849,7 +2849,7 @@ int amdgpu_dm_atomic_commit(/* In this state all old framebuffers would be unpinned */ /* TODO: Revisit when we support true asynchronous commit.*/ -if (!async) +if (!nonblock)drm_atomic_helper_cleanup_planes (dev, state);drm_atomic_state_free (state);
Signature · 6 lines
2.9.3 _______________________________________________ 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): 20170125203358.32736-6-harry.wentland-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 5/5] drm/amd/display: Rename atomic_commit parameter.
Quoted 10 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Harry Wentland
Sent: Wednesday, January 25, 2017 3:34 PM
To: [email protected]
Cc: Grodzovsky, Andrey
Subject: [PATCH 5/5] drm/amd/display: Renameatomic_commitparameter.From: Andrey Grodzovsky <[email protected]>
Quoted 8 lines
This parameter name is misleading. It's previous meaning confuses with ASYNC (immidiate flip) which is totatlly different thing then nonblocking commit.
Change-Id Ia8ed1fad025b9b1344a470eff100da9cb1c46d31Signed-off-by Andrey Grodzovsky <[email protected]>Reviewed-by Harry Wentland <[email protected]>
Quoted 40 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +1
-1@@ -2481,7 +2481,7 @@ static void remove_stream(struct amdgpu_device *adev, struct amdgpu_crtc *acrtc)int amdgpu_dm_atomic_commit (struct drm_device *dev,struct drm_atomic_state *state, -bool async) +bool nonblock) {struct amdgpu_device *adev = dev->dev_private;drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +2
-3struct amdgpu_display_manager *dm = &adev->dm;@@ -2510,7 +2510,7 @@ int amdgpu_dm_atomic_commit(* we should not pin/unpin the fb here, it should be done in * amdgpu_crtc_flip and from the vblank irq handler. */ -if (!async) { +if (!nonblock) { ret =drm_atomic_helper_prepare_planes (dev, state);if (ret)return ret;@@ -2849,7 +2849,7 @@ int amdgpu_dm_atomic_commit(/* In this state all old framebuffers would be unpinned */ /* TODO: Revisit when we support true asynchronous commit.*/ -if (!async) +if (!nonblock)drm_atomic_helper_cleanup_planes (dev, state);drm_atomic_state_free (state); --2.9.3
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx