DC Patches Jan 23, 2017
Subsystems (3)
cover DC Patches Jan 23, 2017
* Use VBLANK instead of VUPDATE for VBLANK notification
* Cleanup pflip code a bit more
* Bunch of bug fixes all over the place
* Removing some more dead code
Amy Zhang (3):
drm/amd/display: Output Transfer Function Regamma Refactor drm/amd/display: Set default degamma to sRGB instead of bypass drm/amd/display: HDR Enablement For Applications
Andrey Grodzovsky (4):
drm/amd/display: Use pflip prepare and submit parts (v2) drm/amd/display: Add interrupt entries for VBLANK isr. drm/amd/display: Register on VLBLANK ISR. drm/amd/display: Clean index in irq init loop
Anthony Koo (1):
drm/amd/display: Disable Modules at Runtime
Dmytro Laktyushkin (2):
drm/amd/display: Remove meta_pitch drm/amd/display: add missing dcc update on flip call
Hersen Wu (1):
drm/amd/display: No audio output heard from DP panel
Leon Elazar (2):
drm/amd/display: Fixing some fallout from dc_target removal drm/amd/display: Add missing MI masks
Tony Cheng (10):
drm/amd/display: mode change without breaking unaffected streams drm/amd/display: assert if mask is 0 in set_reg_field_value_ex drm/amd/display: remove un-used defines and dead code drm/amd/display: remove hw_crtc_timing drm/amd/display: remove hw_info_frame drm/amd/display: remove SIGNAL_TYPE_WIRELESS drm/amd/display: remove dead code
drm/amd/display: remove calculate_adjustments in conversion.h drm/amd/display: refactor clk_resync to avoid assertion drm/amd/display: rename BGRA8888 to ABGR8888
Yongqiang Sun (1):
drm/amd/display: Null check clock source.
Zeyu Fan (1):
drm/amd/display: Fix missing conditions in hw sequencer.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 96 +- drivers/gpu/drm/amd/display/dc/basics/conversion.c | 118 -- drivers/gpu/drm/amd/display/dc/basics/conversion.h | 10 - drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 + .../gpu/drm/amd/display/dc/basics/log_helpers.c | 1 - .../gpu/drm/amd/display/dc/basics/signal_types.c | 38 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 76 - .../gpu/drm/amd/display/dc/bios/command_table.c | 169 --- .../gpu/drm/amd/display/dc/bios/command_table.h | 10 - drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- .../gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 4 +- drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 1481 -------------------- drivers/gpu/drm/amd/display/dc/core/dc.c | 23 +- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 - drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 142 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +- drivers/gpu/drm/amd/display/dc/dc.h | 11 +- drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 6 - drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 12 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 4 +- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 57 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 2 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 1 - drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 2 + drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 7 + .../drm/amd/display/dc/dce/dce_stream_encoder.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 530 ++++++- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 2 +- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 7 + .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 6 +- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 4 + .../drm/amd/display/dc/dce110/dce110_resource.c | 17 +- drivers/gpu/drm/amd/display/dc/dm_services.h | 1 + drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 + drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h | 20 - drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 1 - .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 3 +- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 11 + .../amd/display/dc/irq/dce110/irq_service_dce110.c | 42 + .../amd/display/dc/irq/dce80/irq_service_dce80.c | 22 + drivers/gpu/drm/amd/display/dc/irq_types.h | 8 + .../display/include/asic_capability_interface.h | 55 - .../amd/display/include/asic_capability_types.h | 116 -- .../drm/amd/display/include/bios_parser_types.h | 28 - .../drm/amd/display/include/ddc_service_types.h | 7 - drivers/gpu/drm/amd/display/include/fixed31_32.h | 8 + .../drm/amd/display/include/hw_sequencer_types.h | 63 - .../gpu/drm/amd/display/include/irq_interface.h | 31 - .../drm/amd/display/include/link_service_types.h | 75 - drivers/gpu/drm/amd/display/include/signal_types.h | 7 - .../drm/amd/display/modules/freesync/freesync.c | 94 +- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 7 - 61 files changed, 938 insertions(+), 2556 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c delete mode 100644 drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h delete mode 100644 drivers/gpu/drm/amd/display/include/asic_capability_interface.h delete mode 100644 drivers/gpu/drm/amd/display/include/asic_capability_types.h delete mode 100644 drivers/gpu/drm/amd/display/include/irq_interface.h
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): 20170123143613.15441-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 1/25 drm/amd/display: Null check clock source.
From: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +2 -1
@@ -74,7 +74,8 @@ void dp_enable_link_phy(if (pipes[i].stream !=NULL && pipes[i].stream->sink !=NULL && pipes[i].stream->sink->link == link) { -if (pipes[i].clock_source->id !=CLOCK_SOURCE_ID_DP_DTO ) { +if (pipes[i].clock_source !=NULL && + pipes[i].clock_source->id !=CLOCK_SOURCE_ID_DP_DTO ) { pipes[i].clock_source = dp_cs; pipes[i].pix_clk_params.requested_pix_clk = pipes[i].stream->public.timing.pix_clk_khz;
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/25 drm/amd/display: Output Transfer Function Regamma Refactor
In reply to a message not in the archiveFrom: Amy Zhang <[email protected]>
- Create translation function to translate logical format to hw format
- Refactor to use transfer function in dc instead of input gamma
--- drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 + drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 1481 -------------------- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +- drivers/gpu/drm/amd/display/dc/dc.h | 11 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 440 +++++- drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h | 20 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 2 - drivers/gpu/drm/amd/display/include/fixed31_32.h | 8 + 9 files changed, 466 insertions(+), 1517 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c delete mode 100644 drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +9 -0
@@ -246,6 +246,15 @@ struct fixed31_32 dal_fixed31_32_add(return res; } +struct fixed31_32 dal_fixed31_32_add_int ( +struct fixed31_32 arg1, +int32_t arg2) +{ +return dal_fixed31_32_add ( + arg1, +dal_fixed31_32_from_int (arg2)); +} +struct fixed31_32 dal_fixed31_32_sub_int (struct fixed31_32 arg1,int32_t arg2)
drivers/gpu/drm/amd/display/dc/calcs/Makefile +1 -1
@@ -3,7 +3,7 @@ # It calculates Bandwidth and Watermarks values for HW programming # -BW_CALCS = bandwidth_calcs.o bw_fixed.o gamma_calcs.o +BW_CALCS = bandwidth_calcs.o bw_fixed.o AMD_DAL_BW_CALCS = $(addprefix $(AMDDALPATH)/dc/calcs/,$(BW_CALCS))
drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c deleted +0 -1481
1,481 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -5
@@ -1519,23 +1519,23 @@ void dc_update_surfaces_for_stream(struct dc *dc, struct dc_surface_update *updaif (dc->debug.disable_color_module)continue ;/* skip below color updates */ -if (updates[i].hdr_static_metadata) { -resource_build_info_frame (pipe_ctx); - core_dc->hwss.update_info_frame (pipe_ctx); - }if (is_new_pipe_surface[j] || updates[i].in_transfer_func) core_dc->hwss.set_input_transfer_func ( pipe_ctx, pipe_ctx->surface);if (is_new_pipe_surface[j] || - updates[i].gamma || updates[i].out_transfer_func) core_dc->hwss.set_output_transfer_func ( pipe_ctx, pipe_ctx->surface, pipe_ctx->stream); +if (updates[i].hdr_static_metadata) { +resource_build_info_frame (pipe_ctx); + core_dc->hwss.update_info_frame (pipe_ctx); + } + }if (apply_ctx) { core_dc->hwss.apply_ctx_for_surface (core_dc, surface, context);
drivers/gpu/drm/amd/display/dc/dc.h +7 -4
@@ -213,11 +213,14 @@ enum dc_transfer_func_type { };struct dc_transfer_func_distributed_points { -uint16_t red[TRANSFER_FUNC_POINTS ]; -uint16_t green[TRANSFER_FUNC_POINTS ]; -uint16_t blue[TRANSFER_FUNC_POINTS ]; +struct fixed31_32 red[TRANSFER_FUNC_POINTS ]; +struct fixed31_32 green[TRANSFER_FUNC_POINTS ]; +struct fixed31_32 blue[TRANSFER_FUNC_POINTS ]; +uint16_t end_exponent; -uint16_t x_point_at_y1; +uint16_t x_point_at_y1_red; +uint16_t x_point_at_y1_green; +uint16_t x_point_at_y1_blue; };enum dc_transfer_func_predefined {
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +436 -4
459 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* gamma_calcs.h -* -* Created on: Feb 9, 2016 -* Author: yonsun -*/ - -#ifndef DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_GAMMA_CALCS_H_ -#define DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_GAMMA_CALCS_H_ - -#include "opp.h" -#include "core_types.h" -#include "dc.h" - -bool calculate_regamma_params (struct pwl_params *params, -const struct core_gamma *ramp, -const struct core_surface *surface, -const struct core_stream *stream); - -#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_GAMMA_CALCS_H_ */
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +0 -2
@@ -138,9 +138,7 @@ struct custom_float_value {struct hw_x_point {uint32_t custom_float_x; -uint32_t custom_float_x_adjusted;struct fixed31_32 x; -struct fixed31_32 adjusted_x;struct fixed31_32 regamma_y_red;struct fixed31_32 regamma_y_green;struct fixed31_32 regamma_y_blue;
drivers/gpu/drm/amd/display/include/fixed31_32.h +8 -0
@@ -192,6 +192,14 @@ struct fixed31_32 dal_fixed31_32_add(/* * @brief +* result = arg1 + arg2 +*/ +struct fixed31_32 dal_fixed31_32_add_int ( +struct fixed31_32 arg1, +int32_t arg2); + +/* +* @brief * result = arg1 - arg2 */ struct fixed31_32 dal_fixed31_32_sub_int(
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/25 drm/amd/display: Disable Modules at Runtime
In reply to a message not in the archiveFrom: Anthony Koo <[email protected]>
Add NULL check in modules
--- .../drm/amd/display/modules/freesync/freesync.c | 94 +++++++++++++++------- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 7 -- 2 files changed, 65 insertions(+), 36 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +65 -29
@@ -205,11 +205,16 @@ static unsigned int map_index_from_stream(struct core_freesync *core_freesync,bool mod_freesync_add_stream (struct mod_freesync *mod_freesync,const struct dc_stream *stream,struct mod_freesync_caps *caps) { -struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); -struct core_stream *core_stream = -DC_STREAM_TO_CORE (stream); -struct core_dc *core_dc =DC_TO_CORE (core_freesync->dc); +struct core_stream *core_stream =NULL ; +struct core_dc *core_dc =NULL ; +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return false; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); + core_stream =DC_STREAM_TO_CORE (stream); + core_dc =DC_TO_CORE (core_freesync->dc);int persistent_freesync_enable =0 ;struct persistent_data_flag flag;
@@ -270,11 +275,16 @@ bool mod_freesync_add_stream(struct mod_freesync *mod_freesync,bool mod_freesync_remove_stream (struct mod_freesync *mod_freesync,const struct dc_stream *stream) { -struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); -int i =0 ; -unsigned int index =map_index_from_stream (core_freesync, stream); +struct core_freesync *core_freesync =NULL ; +unsigned int index =0 ; + +if (mod_freesync ==NULL ) +return false; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); + index =map_index_from_stream (core_freesync, stream); +dc_stream_release (core_freesync->map[index].stream); core_freesync->map[index].stream =NULL ;/* To remove this entity, shift everything after down */
@@ -621,11 +631,14 @@ static void set_static_ramp_variables(struct core_freesync *core_freesync,void mod_freesync_handle_v_update (struct mod_freesync *mod_freesync,const struct dc_stream **streams,int num_streams) { -struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); -unsigned int index, v_total =0 ;struct freesync_state *state; +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return ; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync);if (core_freesync->num_entities ==0 )return ;
@@ -691,11 +704,15 @@ void mod_freesync_update_state(struct mod_freesync *mod_freesync, const struct dc_stream **streams, int num_streams, struct mod_freesync_params *freesync_params) { - struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); bool freesync_program_required = false;unsigned int stream_index;struct freesync_state *state; +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return ; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync);if (core_freesync->num_entities ==0 )return ;
@@ -762,10 +779,14 @@ bool mod_freesync_get_state(struct mod_freesync *mod_freesync,const struct dc_stream *stream, struct mod_freesync_params *freesync_params) { - struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); + unsigned int index = NULL; +struct core_freesync *core_freesync =NULL ; -unsigned int index =map_index_from_stream (core_freesync, stream); +if (mod_freesync ==NULL ) +return false; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); + index =map_index_from_stream (core_freesync, stream);if (core_freesync->map[index].state.fullscreen) { freesync_params->state =FREESYNC_STATE_FULLSCREEN ;
@@ -794,13 +815,17 @@ bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, const struct dc_stream **streams, int num_streams, struct mod_freesync_user_enable *user_enable) { - struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); -struct core_dc *core_dc =DC_TO_CORE (core_freesync->dc); - unsigned int stream_index, map_index;int persistent_data =0 ;struct persistent_data_flag flag; +struct core_dc *core_dc =NULL ; +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return false; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); + core_dc =DC_TO_CORE (core_freesync->dc); flag.save_per_edid = true; flag.save_per_link = false;
@@ -842,10 +867,14 @@ bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync,const struct dc_stream *stream, struct mod_freesync_user_enable *user_enable) { - struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); + unsigned int index = 0; +struct core_freesync *core_freesync =NULL ; -unsigned int index =map_index_from_stream (core_freesync, stream); +if (mod_freesync ==NULL ) +return false; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); + index =map_index_from_stream (core_freesync, stream); *user_enable = core_freesync->map[index].user_enable;
@@ -855,12 +884,15 @@ bool mod_freesync_get_user_enable(struct mod_freesync *mod_freesync,void mod_freesync_notify_mode_change (struct mod_freesync *mod_freesync,const struct dc_stream **streams,int num_streams) { -struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); -unsigned int stream_index, map_index;unsigned min_frame_duration_in_ns, max_frame_duration_in_ns;struct freesync_state *state; +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return ; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync);for (stream_index =0 ; stream_index < num_streams; stream_index++) {
@@ -1121,8 +1153,12 @@ void mod_freesync_pre_update_plane_addresses(struct mod_freesync *mod_freesync, unsigned int curr_time_stamp_in_us) {unsigned int stream_index, map_index, last_render_time_in_us =0 ; -struct core_freesync *core_freesync = -MOD_FREESYNC_TO_CORE (mod_freesync); +struct core_freesync *core_freesync =NULL ; + +if (mod_freesync ==NULL ) +return ; + + core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync);for (stream_index =0 ; stream_index < num_streams; stream_index++) {
drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h +0 -7
@@ -110,13 +110,6 @@ bool mod_freesync_remove_stream(struct mod_freesync *mod_freesync, const struct dc_stream *stream);/* -* Build additional parameters for dc_stream when creating stream for -* sink to support freesync -*/ -void mod_freesync_update_stream (struct mod_freesync *mod_freesync, -struct dc_stream *stream); - -/* * Update the freesync state flags for each display and program * freesync accordingly */
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/25 drm/amd/display: Fixing some fallout from dc_target removal
In reply to a message not in the archiveFrom: Leon Elazar <[email protected]>
Also avoid allocating memory dce110_set_output_transfer_func if not needed
--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +++-- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 7 +++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 30 +++++----------------- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 7 +++++ .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 6 ++++- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 4 +++ .../drm/amd/display/dc/dce110/dce110_resource.c | 17 +++++++++--- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + 9 files changed, 49 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +4 -2
@@ -192,7 +192,8 @@ bool dc_stream_set_cursor_attributes(for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; -if (pipe_ctx->stream == stream) { +if ((pipe_ctx->stream == stream) && + (pipe_ctx->ipp !=NULL )) {struct input_pixel_processor *ipp = pipe_ctx->ipp; if (ipp->funcs->ipp_cursor_set_attributes(
@@ -231,7 +232,8 @@ bool dc_stream_set_cursor_position(for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; -if (pipe_ctx->stream == stream) { +if ((pipe_ctx->stream == stream) && + (pipe_ctx->ipp !=NULL )) {struct input_pixel_processor *ipp = pipe_ctx->ipp;struct dc_cursor_mi_param param = { .pixel_clk_khz = dc_stream->timing.pix_clk_khz,
drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +7 -0
@@ -973,6 +973,10 @@ bool dce110_opp_construct(struct dce110_opp *opp110, opp110->base.inst = inst; + opp110->base.regamma_params =dm_alloc (sizeof (struct pwl_params )); +if (opp110->base.regamma_params ==NULL ) +return false; + opp110->regs = regs; opp110->opp_shift = opp_shift; opp110->opp_mask = opp_mask;
@@ -982,6 +986,9 @@ bool dce110_opp_construct(struct dce110_opp *opp110,void dce110_opp_destroy (struct output_pixel_processor **opp) { +dm_free ((*opp)->regamma_params); + (*opp)->regamma_params =NULL ; +dm_free (FROM_DCE11_OPP (*opp)); *opp =NULL ; }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +7 -23
@@ -721,43 +721,27 @@ static bool dce110_set_output_transfer_func( const struct core_stream *stream) {struct output_pixel_processor *opp = pipe_ctx->opp; -const struct core_gamma *ramp =NULL ; -struct pwl_params *regamma_params; -bool result = false; - -if (surface->public.gamma_correction) - ramp =DC_GAMMA_TO_CORE (surface->public.gamma_correction); - - regamma_params =dm_alloc (sizeof (struct pwl_params )); -if (regamma_params ==NULL ) - goto regamma_alloc_fail; - - regamma_params->hw_points_num =GAMMA_HW_POINTS_NUM ; opp->funcs->opp_power_on_regamma_lut (opp, true); + opp->regamma_params->hw_points_num =GAMMA_HW_POINTS_NUM ;if (stream->public.out_transfer_func && - stream->public.out_transfer_func->type == + stream->public.out_transfer_func->type ==TF_TYPE_PREDEFINED && - stream->public.out_transfer_func->tf == + stream->public.out_transfer_func->tf ==TRANSFER_FUNCTION_SRGB ) { opp->funcs->opp_set_regamma_mode (opp,OPP_REGAMMA_SRGB ); }else if (dce110_translate_regamma_to_hw_format ( - stream->public.out_transfer_func, regamma_params)) { - opp->funcs->opp_program_regamma_pwl (opp, regamma_params); - opp->funcs->opp_set_regamma_mode (opp,OPP_REGAMMA_USER ); + stream->public.out_transfer_func, opp->regamma_params)) { + opp->funcs->opp_program_regamma_pwl (opp, opp->regamma_params); + opp->funcs->opp_set_regamma_mode (opp,OPP_REGAMMA_USER ); }else { opp->funcs->opp_set_regamma_mode (opp,OPP_REGAMMA_BYPASS ); } opp->funcs->opp_power_on_regamma_lut (opp, false); - result = true; - -dm_free (regamma_params); - -regamma_alloc_fail: -return result; +return true; } static enum dc_status bios_parser_crtc_source_select(
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c +7 -0
@@ -548,3 +548,10 @@ void dce110_opp_power_on_regamma_lut_v(dm_write_reg (opp->ctx, mmDCFEV_MEM_PWR_CTRL, value); } + +void dce110_opp_set_regamma_mode_v ( +struct output_pixel_processor *opp, +enum opp_regamma mode) +{ +// TODO: need to implement the function +}
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c +5 -1
@@ -42,7 +42,7 @@ static const struct opp_funcs funcs = { .opp_set_csc_default = dce110_opp_v_set_csc_default, .opp_set_csc_adjustment = dce110_opp_v_set_csc_adjustment, .opp_set_dyn_expansion = dce110_opp_set_dyn_expansion, - .opp_set_regamma_mode = dce110_opp_set_regamma_mode, + .opp_set_regamma_mode = dce110_opp_set_regamma_mode_v, .opp_destroy = dce110_opp_destroy, .opp_program_fmt = dce110_opp_program_fmt, .opp_program_bit_depth_reduction =
@@ -56,6 +56,10 @@ bool dce110_opp_v_construct(struct dce110_opp *opp110, opp110->base.ctx = ctx; + opp110->base.regamma_params =dm_alloc (sizeof (struct pwl_params )); +if (opp110->base.regamma_params ==NULL ) +return false; +return true; }
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h +4 -0
@@ -49,4 +49,8 @@ void dce110_opp_power_on_regamma_lut_v(struct output_pixel_processor *opp, bool power_on); +void dce110_opp_set_regamma_mode_v ( +struct output_pixel_processor *opp, +enum opp_regamma mode); +#endif /* __DC_OPP_DCE110_V_H__ */
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +14 -3
@@ -1114,14 +1114,22 @@ static const struct resource_funcs dce110_res_pool_funcs = {dce110_resource_build_bit_depth_reduction_params }; -static void underlay_create (struct dc_context *ctx,struct resource_pool *pool) +static bool underlay_create (struct dc_context *ctx,struct resource_pool *pool) {struct dce110_timing_generator *dce110_tgv =dm_alloc (sizeof (*dce110_tgv));struct dce_transform *dce110_xfmv =dm_alloc (sizeof (*dce110_xfmv));struct dce110_mem_input *dce110_miv =dm_alloc (sizeof (*dce110_miv));struct dce110_opp *dce110_oppv =dm_alloc (sizeof (*dce110_oppv)); -dce110_opp_v_construct (dce110_oppv, ctx); +if ((dce110_tgv ==NULL ) || + (dce110_xfmv ==NULL ) || + (dce110_miv ==NULL ) || + (dce110_oppv ==NULL )) +return false; + +if (!dce110_opp_v_construct (dce110_oppv, ctx)) +return false; +dce110_timing_generator_v_construct (dce110_tgv, ctx);dce110_mem_input_v_construct (dce110_miv, ctx);dce110_transform_v_construct (dce110_xfmv, ctx);
@@ -1135,6 +1143,8 @@ static void underlay_create(struct dc_context *ctx, struct resource_pool *pool)/* update the public caps to indicate an underlay is available */ ctx->dc->caps.max_slave_planes =1 ; ctx->dc->caps.max_slave_planes =1 ; + +return true; }static void bw_calcs_data_update_from_pplib (struct core_dc *dc)
@@ -1334,7 +1344,8 @@ static bool construct( } } -underlay_create (ctx, &pool->base); +if (!underlay_create (ctx, &pool->base)) + goto res_create_fail;if (!resource_construct (num_virtual_links, dc, &pool->base, &res_create_funcs))
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +0 -1
@@ -65,7 +65,6 @@ struct pwl_result_data { };struct pwl_params { -uint32_t *data;struct gamma_curve arr_curve_points[16 ];struct curve_points arr_points[3 ];struct pwl_result_data rgb_resulted[256 +3 ];
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +1 -0
@@ -202,6 +202,7 @@ enum opp_regamma {struct output_pixel_processor {struct dc_context *ctx;uint32_t inst; +struct pwl_params *regamma_params;const struct opp_funcs *funcs; };
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/25 drm/amd/display: No audio output heard from DP panel
In reply to a message not in the archiveFrom: Hersen Wu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_audio.h +2 -2
@@ -50,8 +50,8 @@SF (DCCG_AUDIO_DTO_SOURCE ,DCCG_AUDIO_DTO_SEL , mask_sh),\SF (DCCG_AUDIO_DTO0_MODULE ,DCCG_AUDIO_DTO0_MODULE , mask_sh),\SF (DCCG_AUDIO_DTO0_PHASE ,DCCG_AUDIO_DTO0_PHASE , mask_sh),\ -SF (DCCG_AUDIO_DTO0_MODULE ,DCCG_AUDIO_DTO0_MODULE , mask_sh),\ -SF (DCCG_AUDIO_DTO0_PHASE ,DCCG_AUDIO_DTO0_PHASE , mask_sh),\ +SF (DCCG_AUDIO_DTO1_MODULE ,DCCG_AUDIO_DTO1_MODULE , mask_sh),\ +SF (DCCG_AUDIO_DTO1_PHASE ,DCCG_AUDIO_DTO1_PHASE , mask_sh),\SF (AZALIA_F0_CODEC_FUNCTION_PARAMETER_SUPPORTED_SIZE_RATES ,AUDIO_RATE_CAPABILITIES , mask_sh),\SF (AZALIA_F0_CODEC_FUNCTION_PARAMETER_POWER_STATES ,CLKSTOP , mask_sh),\SF (AZALIA_F0_CODEC_FUNCTION_PARAMETER_POWER_STATES ,EPSS , mask_sh)
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/25 drm/amd/display: Use pflip prepare and submit parts (v2)
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Use new functions so flip failures can be gracefully handled
v2:
Avoid -EINVAL returned from amdgpu_crtc_prepare_flip in some error cases, it is not allowed according to expected return values for atomic_commit hook.
--- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 96 +++++++++++++++++++--- 1 file changed, 83 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +83 -13
@@ -1647,6 +1647,7 @@ static void clear_unrelated_fields(struct drm_plane_state *state)static bool page_flip_needed (const struct drm_plane_state *new_state,const struct drm_plane_state *old_state, +struct drm_pending_vblank_event *event,bool commit_surface_required) {struct drm_plane_state old_state_tmp;
@@ -1676,7 +1677,7 @@ static bool page_flip_needed( old_state_tmp = *old_state; new_state_tmp = *new_state; -if (!new_state->crtc->state->event) +if (!event)return false; amdgpu_fb_old =to_amdgpu_framebuffer (old_state->fb);
@@ -2485,17 +2486,21 @@ int amdgpu_dm_atomic_commit(struct amdgpu_device *adev = dev->dev_private;struct amdgpu_display_manager *dm = &adev->dm;struct drm_plane *plane; +struct drm_plane_state *new_plane_state;struct drm_plane_state *old_plane_state;uint32_t i;int32_t ret =0 ;uint32_t commit_streams_count =0 ;uint32_t new_crtcs_count =0 ; +uint32_t flip_crtcs_count =0 ;struct drm_crtc *crtc;struct drm_crtc_state *old_crtc_state; -const struct dc_stream *commit_streams[MAX_STREAMS ];struct amdgpu_crtc *new_crtcs[MAX_STREAMS ];const struct dc_stream *new_stream; +struct drm_crtc *flip_crtcs[MAX_STREAMS ]; +struct amdgpu_flip_work *work[MAX_STREAMS ] = {0 }; +struct amdgpu_bo *new_abo[MAX_STREAMS ] = {0 };/* In this step all new fb would be pinned */
@@ -2511,6 +2516,61 @@ int amdgpu_dm_atomic_commit(return ret; } +/* Page flip if needed */ +for_each_plane_in_state (state, plane, new_plane_state, i) { +struct drm_plane_state *old_plane_state = plane->state; +struct drm_crtc *crtc = new_plane_state->crtc; +struct amdgpu_crtc *acrtc =to_amdgpu_crtc (crtc); +struct drm_framebuffer *fb = new_plane_state->fb; +struct drm_crtc_state *crtc_state; + +if (!fb || !crtc) +continue ; + + crtc_state =drm_atomic_get_crtc_state (state, crtc); + +if (!crtc_state->planes_changed || !crtc_state->active) +continue ; + +if (page_flip_needed ( + new_plane_state, + old_plane_state, + crtc_state->event, + false)) { + ret =amdgpu_crtc_prepare_flip (crtc, + fb, + crtc_state->event, + acrtc->flip_flags, +drm_crtc_vblank_count (crtc), + &work[flip_crtcs_count], + &new_abo[flip_crtcs_count]); + +if (ret) { +/* According to atomic_commit hook API, EINVAL is not allowed */ +if (unlikely (ret == -EINVAL )) + ret = -ENOMEM ; + +DRM_ERROR ("Atomic commit: Flip for crtc id %d: [%p], " +"failed, errno = %d\n" , + acrtc->crtc_id, + acrtc, + ret); +/* cleanup all flip configurations which +* succeeded in this commit +*/ +for (i =0 ; i < flip_crtcs_count; i++) +amdgpu_crtc_cleanup_flip_ctx ( + work[i], + new_abo[i]); + +return ret; + } + + flip_crtcs[flip_crtcs_count] = crtc; + flip_crtcs_count++; + } + } +/* * This is the point of no return - everything below never fails except * when the hw goes bonghits. Which means we can commit the new state on
@@ -2699,7 +2759,10 @@ int amdgpu_dm_atomic_commit(* 1. This commit is not a page flip. * 2. This commit is a page flip, and streams are created. */ -if (!page_flip_needed (plane_state, old_plane_state, true) || +if (!page_flip_needed ( + plane_state, + old_plane_state, + crtc->state->event, true) || action ==DM_COMMIT_ACTION_DPMS_ON || action ==DM_COMMIT_ACTION_SET ) { list_for_each_entry(connector,
@@ -2755,7 +2818,8 @@ int amdgpu_dm_atomic_commit( } -/* Page flip if needed */ +/* Do actual flip */ + flip_crtcs_count =0 ;for_each_plane_in_state (state, plane, old_plane_state, i) {struct drm_plane_state *plane_state = plane->state;struct drm_crtc *crtc = plane_state->crtc;
@@ -2766,16 +2830,19 @@ int amdgpu_dm_atomic_commit( !crtc->state->active)continue ; -if (page_flip_needed (plane_state, old_plane_state, false)) { - ret =amdgpu_crtc_page_flip_target (crtc, - fb, - crtc->state->event, - acrtc->flip_flags, -drm_crtc_vblank_count (crtc)); +if (page_flip_needed ( + plane_state, + old_plane_state, + crtc->state->event, + false)) { +amdgpu_crtc_submit_flip ( + crtc, + fb, + work[flip_crtcs_count], + new_abo[i]); + flip_crtcs_count++;/*clean up the flags for next usage*/ acrtc->flip_flags =0 ; -if (ret) -return ret; } }
@@ -3127,6 +3194,8 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,struct drm_connector *connector;struct dm_connector_state *dm_state =NULL ;enum dm_commit_action action; +struct drm_crtc_state *crtc_state; +if (!fb || !crtc || crtc_set[i] != crtc || !crtc->state->planes_changed || !crtc->state->active)
@@ -3138,8 +3207,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,* 1. This commit is not a page flip. * 2. This commit is a page flip, and streams are created. */ + crtc_state =drm_atomic_get_crtc_state (state, crtc);if (!page_flip_needed (plane_state, old_plane_state, - true) || + crtc_state->event, true) || action ==DM_COMMIT_ACTION_DPMS_ON || action ==DM_COMMIT_ACTION_SET ) {struct dc_surface *surface;
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/25 drm/amd/display: mode change without breaking unaffected streams
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
- include clock constraint logic in validate
- in dc_commit_streams, include surfaces of unaffected streams
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +9 -2
@@ -1007,7 +1007,7 @@ bool dc_commit_streams(struct dc_bios *dcb = core_dc->ctx->dc_bios;enum dc_status result =DC_ERROR_UNEXPECTED ;struct validate_context *context; -struct dc_validation_set set[MAX_STREAMS ]; +struct dc_validation_set set[MAX_STREAMS ] = {0 };int i, j, k;if (false ==streams_changed (core_dc, streams, stream_count))
@@ -1018,13 +1018,20 @@ bool dc_commit_streams(for (i =0 ; i < stream_count; i++) {const struct dc_stream *stream = streams[i]; +const struct dc_stream_status *status =dc_stream_get_status (stream); +int j;dc_stream_log (stream, core_dc->ctx->logger,LOG_DC ); set[i].stream = stream; - set[i].surface_count =0 ; + +if (status) { + set[i].surface_count = status->surface_count; +for (j =0 ; j < status->surface_count; j++) + set[i].surfaces[j] = status->surfaces[j]; + } }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -585,7 +585,7 @@ enum dc_status resource_build_scaling_params_for_context(if (!resource_build_scaling_params ( &context->res_ctx.pipe_ctx[i].surface->public, &context->res_ctx.pipe_ctx[i])) -return DC_FAIL_BANDWIDTH_VALIDATE ; +return DC_FAIL_SCALING ; }return DC_OK ;
drivers/gpu/drm/amd/display/dc/inc/core_status.h +2 -0
@@ -40,6 +40,8 @@ enum dc_status {DC_EXCEED_DONGLE_MAX_CLK ,DC_SURFACE_PIXEL_FORMAT_UNSUPPORTED ,DC_FAIL_BANDWIDTH_VALIDATE ,/* BW and Watermark validation */ +DC_FAIL_SCALING , +DC_FAIL_CLK_CONSTRAINT , DC_ERROR_UNEXPECTED = -1 };
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/25 drm/amd/display: assert if mask is 0 in set_reg_field_value_ex
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
- mask = 0 means something is wrong in caller and no register field will be updated
--- drivers/gpu/drm/amd/display/dc/dm_services.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dm_services.h +1 -0
@@ -165,6 +165,7 @@ static inline uint32_t set_reg_field_value_ex( uint32_t mask, uint8_t shift) { +ASSERT (mask !=0 );return (reg_value & ~mask) | (mask & (value << shift)); }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/25 drm/amd/display: remove un-used defines and dead code
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- .../gpu/drm/amd/display/dc/basics/signal_types.c | 35 ------- .../gpu/drm/amd/display/dc/bios/command_table.c | 55 ---------- .../gpu/drm/amd/display/dc/bios/command_table.h | 3 - drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- .../display/include/asic_capability_interface.h | 55 ---------- .../amd/display/include/asic_capability_types.h | 116 --------------------- .../drm/amd/display/include/bios_parser_types.h | 8 -- .../drm/amd/display/include/ddc_service_types.h | 7 -- .../gpu/drm/amd/display/include/irq_interface.h | 31 ------ .../drm/amd/display/include/link_service_types.h | 75 ------------- drivers/gpu/drm/amd/display/include/signal_types.h | 3 - 12 files changed, 1 insertion(+), 390 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/include/asic_capability_interface.h delete mode 100644 drivers/gpu/drm/amd/display/include/asic_capability_types.h delete mode 100644 drivers/gpu/drm/amd/display/include/irq_interface.h
drivers/gpu/drm/amd/display/dc/basics/signal_types.c +0 -35
@@ -44,23 +44,6 @@ bool dc_is_dp_signal(enum signal_type signal) signal == SIGNAL_TYPE_DISPLAY_PORT_MST); } -bool dc_is_dp_external_signal (enum signal_type signal) -{ -return (signal ==SIGNAL_TYPE_DISPLAY_PORT || - signal ==SIGNAL_TYPE_DISPLAY_PORT_MST ); -} - -bool dc_is_analog_signal (enum signal_type signal) -{ -switch (signal) { -case SIGNAL_TYPE_RGB : -return true; -break ; -default : -return false; - } -} -bool dc_is_embedded_signal (enum signal_type signal) {return (signal ==SIGNAL_TYPE_EDP || signal ==SIGNAL_TYPE_LVDS );
@@ -96,21 +79,3 @@ bool dc_is_audio_capable_signal(enum signal_type signal) signal == SIGNAL_TYPE_WIRELESS); } -/* -* @brief -* Returns whether the signal is compatible -* with other digital encoder signal types. -* This is true for DVI, LVDS, and HDMI signal types. -*/ -bool dc_is_digital_encoder_compatible_signal (enum signal_type signal) -{ -switch (signal) { -case SIGNAL_TYPE_DVI_SINGLE_LINK : -case SIGNAL_TYPE_DVI_DUAL_LINK : -case SIGNAL_TYPE_HDMI_TYPE_A : -case SIGNAL_TYPE_LVDS : -return true; -default : -return false; - } -}
drivers/gpu/drm/amd/display/dc/bios/command_table.c +0 -55
73 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/bios/command_table.h +0 -3
@@ -75,9 +75,6 @@ struct cmd_tbl {enum bp_result (*set_crtc_timing)(struct bios_parser *bp,struct bp_hw_crtc_timing_parameters *bp_params); -enum bp_result (*set_crtc_overscan)( -struct bios_parser *bp, -struct bp_hw_crtc_overscan_parameters *bp_params);enum bp_result (*select_crtc_source)(struct bios_parser *bp,struct bp_crtc_source_select *bp_params);
drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 -1
@@ -38,7 +38,6 @@#include "hw_sequencer.h" #include "resource.h" #include "fixed31_32.h" -#include "include/asic_capability_interface.h" #include "dpcd_defs.h" #include "dce/dce_11_0_d.h"
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -1922,7 +1922,7 @@ static void get_active_converter_info(break ; } -if (link->dpcd_caps.dpcd_rev.raw >=DCS_DPCD_REV_11 ) { +if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_11 ) {uint8_t det_caps[4 ];union dwnstream_port_caps_byte0 *port_caps = (union dwnstream_port_caps_byte0 *)det_caps;
drivers/gpu/drm/amd/display/include/asic_capability_interface.h deleted +0 -55
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/include/asic_capability_types.h deleted +0 -116
116 lines not on this page · raw message
drivers/gpu/drm/amd/display/include/bios_parser_types.h +0 -8
@@ -190,14 +190,6 @@ struct bp_hw_crtc_timing_parameters { } flags; }; -struct bp_hw_crtc_overscan_parameters { -enum controller_id controller_id; -uint32_t h_overscan_left; -uint32_t h_overscan_right; -uint32_t v_overscan_top; -uint32_t v_overscan_bottom; -}; -struct bp_adjust_pixel_clock_parameters {/* Input: Signal Type - to be converted to Encoder mode */ enum signal_type signal_type;
drivers/gpu/drm/amd/display/include/ddc_service_types.h +0 -7
@@ -52,12 +52,6 @@ enum ddc_service_type { DDC_SERVICE_TYPE_DISPLAY_PORT_MST, }; -enum dcs_dpcd_revision { -DCS_DPCD_REV_10 =0x10 , -DCS_DPCD_REV_11 =0x11 , -DCS_DPCD_REV_12 =0x12 -}; -/** * display sink capability */
@@ -97,7 +91,6 @@ struct display_sink_capability {uint32_t dp_link_rate;uint32_t dp_link_spead; -enum dcs_dpcd_revision dpcd_revision;/* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER, indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/ bool is_dp_hdmi_s3d_converter;
drivers/gpu/drm/amd/display/include/irq_interface.h deleted +0 -31
@@ -1,31 +0,0 @@ -/* -* Copyright 2012-15 Advanced Micro Devices, Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -* OTHER DEALINGS IN THE SOFTWARE. -* -* Authors: AMD -* -*/ - -#ifndef __DAL_IRQ_INTERFACE_H__ -#define __DAL_IRQ_INTERFACE_H__ - -#include "gpio_types.h" - -#endif
drivers/gpu/drm/amd/display/include/link_service_types.h +0 -75
98 lines not on this page · raw message
drivers/gpu/drm/amd/display/include/signal_types.h +0 -3
@@ -47,13 +47,10 @@ enum signal_type {bool dc_is_hdmi_signal (enum signal_type signal);bool dc_is_dp_sst_signal (enum signal_type signal);bool dc_is_dp_signal (enum signal_type signal); -bool dc_is_dp_external_signal (enum signal_type signal); -bool dc_is_analog_signal (enum signal_type signal);bool dc_is_embedded_signal (enum signal_type signal);bool dc_is_dvi_signal (enum signal_type signal);bool dc_is_dvi_single_link_signal (enum signal_type signal);bool dc_is_dual_link_signal (enum signal_type signal);bool dc_is_audio_capable_signal (enum signal_type signal); -bool dc_is_digital_encoder_compatible_signal (enum signal_type signal);#endif
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/25 drm/amd/display: remove hw_crtc_timing
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- .../drm/amd/display/include/hw_sequencer_types.h | 40 ---------------------- 4 files changed, 3 insertions(+), 43 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +1 -1
@@ -681,7 +681,7 @@ static void dce110_stream_encoder_dp_unblank(uint64_t m_vid_l = n_vid; - m_vid_l *= param->crtc_timing.pixel_clock; + m_vid_l *= param->pixel_clk_khz; m_vid_l =div_u64 (m_vid_l, param->link_settings.link_rate *LINK_RATE_REF_FREQ_IN_KHZ );
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -1
@@ -886,7 +886,7 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,struct encoder_unblank_param params = { {0 } };/* only 3 items below are used by unblank */ - params.crtc_timing.pixel_clock = + params.pixel_clk_khz = pipe_ctx->stream->public.timing.pix_clk_khz; params.link_settings.link_rate = link_settings->link_rate; pipe_ctx->stream_enc->funcs->dp_unblank (pipe_ctx->stream_enc, ¶ms);
drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h +1 -1
@@ -36,8 +36,8 @@ struct encoder_info_frame { };struct encoder_unblank_param { -struct hw_crtc_timing crtc_timing;struct dc_link_settings link_settings; +unsigned int pixel_clk_khz; };struct encoder_set_dp_phy_pattern_param {
drivers/gpu/drm/amd/display/include/hw_sequencer_types.h +0 -40
@@ -40,46 +40,6 @@ struct drr_params {uint32_t vertical_total_max; }; -/* CRTC timing structure */ -struct hw_crtc_timing { -uint32_t h_total; -uint32_t h_addressable; -uint32_t h_overscan_left; -uint32_t h_overscan_right; -uint32_t h_sync_start; -uint32_t h_sync_width; - -uint32_t v_total; -uint32_t v_addressable; -uint32_t v_overscan_top; -uint32_t v_overscan_bottom; -uint32_t v_sync_start; -uint32_t v_sync_width; - -/* in KHz */ -uint32_t pixel_clock; - -struct { -uint32_t INTERLACED:1 ; -uint32_t DOUBLESCAN:1 ; -uint32_t PIXEL_REPETITION:4 ;/* 1...10 */ -uint32_t HSYNC_POSITIVE_POLARITY:1 ; -uint32_t VSYNC_POSITIVE_POLARITY:1 ; -/* frame should be packed for 3D -* (currently this refers to HDMI 1.4a FramePacking format */ -uint32_t HORZ_COUNT_BY_TWO:1 ; -uint32_t PACK_3D_FRAME:1 ; -/* 0 - left eye polarity, 1 - right eye polarity */ -uint32_t RIGHT_EYE_3D_POLARITY:1 ; -/* DVI-DL High-Color mode */ -uint32_t HIGH_COLOR_DL_MODE:1 ; -uint32_t Y_ONLY:1 ; -/* HDMI 2.0 - Support scrambling for TMDS character -* rates less than or equal to 340Mcsc */ -uint32_t LTE_340MCSC_SCRAMBLE:1 ; - } flags; -}; -/* TODO hw_info_frame and hw_info_packet structures are same as in encoder * merge it*/ struct hw_info_packet {
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/25 drm/amd/display: remove hw_info_frame
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
- construct using encoder_info_frame directly
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 124 +++++++-------------- .../drm/amd/display/include/hw_sequencer_types.h | 23 ---- 2 files changed, 40 insertions(+), 107 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +40 -84
@@ -1211,70 +1211,27 @@ void validate_guaranteed_copy_streams( } } -static void translate_info_frame (const struct hw_info_frame *hw_info_frame, -struct encoder_info_frame *encoder_info_frame) +static void patch_gamut_packet_checksum ( +struct encoder_info_packet *gamut_packet) { -memset ( - encoder_info_frame,0 ,sizeof (struct encoder_info_frame )); -/* For gamut we recalc checksum */ -if (hw_info_frame->gamut_packet.valid) { +if (gamut_packet->valid) {uint8_t chk_sum =0 ;uint8_t *ptr;uint8_t i; -memmove ( - &encoder_info_frame->gamut, - &hw_info_frame->gamut_packet, -sizeof (struct hw_info_packet )); -/*start of the Gamut data. */ - ptr = &encoder_info_frame->gamut.sb[3 ]; + ptr = &gamut_packet->sb[3 ]; -for (i =0 ; i <= encoder_info_frame->gamut.sb[1 ]; i++) +for (i =0 ; i <= gamut_packet->sb[1 ]; i++) chk_sum += ptr[i]; - encoder_info_frame->gamut.sb[2 ] = (uint8_t ) (0x100 - chk_sum); - } - -if (hw_info_frame->avi_info_packet.valid) { -memmove ( - &encoder_info_frame->avi, - &hw_info_frame->avi_info_packet, -sizeof (struct hw_info_packet )); - } - -if (hw_info_frame->vendor_info_packet.valid) { -memmove ( - &encoder_info_frame->vendor, - &hw_info_frame->vendor_info_packet, -sizeof (struct hw_info_packet )); - } - -if (hw_info_frame->spd_packet.valid) { -memmove ( - &encoder_info_frame->spd, - &hw_info_frame->spd_packet, -sizeof (struct hw_info_packet )); - } - -if (hw_info_frame->vsc_packet.valid) { -memmove ( - &encoder_info_frame->vsc, - &hw_info_frame->vsc_packet, -sizeof (struct hw_info_packet )); - } - -if (hw_info_frame->hdrsmd_packet.valid) { -memmove ( - &encoder_info_frame->hdrsmd, - &hw_info_frame->hdrsmd_packet, -sizeof (struct hw_info_packet )); + gamut_packet->sb[2 ] = (uint8_t ) (0x100 - chk_sum); } }static void set_avi_info_frame ( -struct hw_info_packet *info_packet, +struct encoder_info_packet *info_packet,struct pipe_ctx *pipe_ctx) {struct core_stream *stream = pipe_ctx->stream;
@@ -1288,9 +1245,6 @@ static void set_avi_info_frame(uint8_t *check_sum =NULL ;uint8_t byte_index =0 ; -if (info_packet ==NULL ) -return ; - color_space = pipe_ctx->stream->public.output_color_space;/* Initialize header */
@@ -1458,8 +1412,9 @@ static void set_avi_info_frame( info_packet->valid = true; } -static void set_vendor_info_packet (struct core_stream *stream, -struct hw_info_packet *info_packet) +static void set_vendor_info_packet ( +struct encoder_info_packet *info_packet, +struct core_stream *stream) {uint32_t length =0 ;bool hdmi_vic_mode = false;
@@ -1467,9 +1422,6 @@ static void set_vendor_info_packet(struct core_stream *stream,uint32_t i =0 ;enum dc_timing_3d_format format; -ASSERT_CRITICAL (stream !=NULL ); -ASSERT_CRITICAL (info_packet !=NULL ); - format = stream->public.timing.timing_3d_format;/* Can be different depending on packet content */
@@ -1567,8 +1519,9 @@ static void set_vendor_info_packet(struct core_stream *stream, info_packet->valid = true; } -static void set_spd_info_packet (struct core_stream *stream, -struct hw_info_packet *info_packet) +static void set_spd_info_packet ( +struct encoder_info_packet *info_packet, +struct core_stream *stream) {/* SPD info packet for FreeSync */
@@ -1688,9 +1641,9 @@ static void set_spd_info_packet(struct core_stream *stream, }static void set_hdr_static_info_packet ( +struct encoder_info_packet *info_packet,struct core_surface *surface, -struct core_stream *stream, -struct hw_info_packet *info_packet) +struct core_stream *stream) {uint16_t i =0 ;enum signal_type signal = stream->signal;
@@ -1791,8 +1744,9 @@ static void set_hdr_static_info_packet( } } -static void set_vsc_info_packet (struct core_stream *stream, -struct hw_info_packet *info_packet) +static void set_vsc_info_packet ( +struct encoder_info_packet *info_packet, +struct core_stream *stream) {unsigned int vscPacketRevision =0 ;unsigned int i;
@@ -1894,36 +1848,38 @@ struct clock_source *dc_resource_find_first_free_pll(void resource_build_info_frame (struct pipe_ctx *pipe_ctx) {enum signal_type signal =SIGNAL_TYPE_NONE ; -struct hw_info_frame info_frame = { {0 } }; +struct encoder_info_frame *info = &pipe_ctx->encoder_info_frame;/* default all packets to invalid */ - info_frame.avi_info_packet.valid = false; - info_frame.gamut_packet.valid = false; - info_frame.vendor_info_packet.valid = false; - info_frame.spd_packet.valid = false; - info_frame.vsc_packet.valid = false; - info_frame.hdrsmd_packet.valid = false; + info->avi.valid = false; + info->gamut.valid = false; + info->vendor.valid = false; + info->hdrsmd.valid = false; + info->vsc.valid = false; signal = pipe_ctx->stream->signal;/* HDMi and DP have different info packets*/ if (dc_is_hdmi_signal (signal)) { -set_avi_info_frame ( - &info_frame.avi_info_packet, pipe_ctx); -set_vendor_info_packet ( - pipe_ctx->stream, &info_frame.vendor_info_packet); -set_spd_info_packet (pipe_ctx->stream, &info_frame.spd_packet); -set_hdr_static_info_packet (pipe_ctx->surface, - pipe_ctx->stream, &info_frame.hdrsmd_packet); +set_avi_info_frame (&info->avi, pipe_ctx); + +set_vendor_info_packet (&info->vendor, pipe_ctx->stream); + +set_spd_info_packet (&info->spd, pipe_ctx->stream); + +set_hdr_static_info_packet (&info->hdrsmd, + pipe_ctx->surface, pipe_ctx->stream); + }else if (dc_is_dp_signal (signal)) { -set_vsc_info_packet (pipe_ctx->stream, &info_frame.vsc_packet); -set_spd_info_packet (pipe_ctx->stream, &info_frame.spd_packet); -set_hdr_static_info_packet (pipe_ctx->surface, - pipe_ctx->stream, &info_frame.hdrsmd_packet); +set_vsc_info_packet (&info->vsc, pipe_ctx->stream); + +set_spd_info_packet (&info->spd, pipe_ctx->stream); + +set_hdr_static_info_packet (&info->hdrsmd, + pipe_ctx->surface, pipe_ctx->stream); } -translate_info_frame (&info_frame, - &pipe_ctx->encoder_info_frame); +patch_gamut_packet_checksum (&info->gamut); } enum dc_status resource_map_clock_resources(
drivers/gpu/drm/amd/display/include/hw_sequencer_types.h +0 -23
@@ -40,27 +40,4 @@ struct drr_params { uint32_t vertical_total_max; }; -/* TODO hw_info_frame and hw_info_packet structures are same as in encoder -* merge it*/ -struct hw_info_packet { -bool valid; -uint8_t hb0; -uint8_t hb1; -uint8_t hb2; -uint8_t hb3; -uint8_t sb[32 ]; -}; - -struct hw_info_frame { -/* Auxiliary Video Information */ -struct hw_info_packet avi_info_packet; -struct hw_info_packet gamut_packet; -struct hw_info_packet vendor_info_packet; -/* Source Product Description */ -struct hw_info_packet spd_packet; -/* Video Stream Configuration */ -struct hw_info_packet vsc_packet; -struct hw_info_packet hdrsmd_packet; -}; -#endif
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/25 drm/amd/display: remove SIGNAL_TYPE_WIRELESS
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/basics/log_helpers.c | 1 - drivers/gpu/drm/amd/display/dc/basics/signal_types.c | 3 +-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 - drivers/gpu/drm/amd/display/include/signal_types.h | 4 ---- 6 files changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/basics/log_helpers.c +0 -1
@@ -44,7 +44,6 @@ static const struct dc_signal_type_info signal_type_info_tbl[] = { {SIGNAL_TYPE_DISPLAY_PORT, "DP"}, {SIGNAL_TYPE_DISPLAY_PORT_MST, "MST"}, {SIGNAL_TYPE_EDP, "eDP"}, - {SIGNAL_TYPE_WIRELESS, "Wireless"}, {SIGNAL_TYPE_VIRTUAL, "Virtual"} };
drivers/gpu/drm/amd/display/dc/basics/signal_types.c +1 -2
@@ -75,7 +75,6 @@ bool dc_is_audio_capable_signal(enum signal_type signal) {return (signal ==SIGNAL_TYPE_DISPLAY_PORT || signal ==SIGNAL_TYPE_DISPLAY_PORT_MST || -dc_is_hdmi_signal (signal) || - signal ==SIGNAL_TYPE_WIRELESS ); +dc_is_hdmi_signal (signal)); }
drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 -3
@@ -1051,9 +1051,6 @@ static bool construct(if (link->device_tag.dev_id.device_type ==DEVICE_TYPE_LCD && link->public.connector_signal ==SIGNAL_TYPE_RGB )continue ; -if (link->device_tag.dev_id.device_type ==DEVICE_TYPE_WIRELESS - && link->public.connector_signal !=SIGNAL_TYPE_WIRELESS ) -continue ;break ; }
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +0 -1
@@ -941,7 +941,6 @@ bool dce110_link_encoder_construct( enc110->base.hpd_source = init_data->hpd_source; enc110->base.connector = init_data->connector; - enc110->base.input_signals =SIGNAL_TYPE_ALL ; enc110->base.preferred_engine =ENGINE_ID_UNKNOWN ;
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +0 -1
@@ -186,7 +186,6 @@ struct link_encoder {struct dc_context *ctx;struct graphics_object_id id;struct graphics_object_id connector; -uint32_t input_signals;uint32_t output_signals;enum engine_id preferred_engine;struct encoder_feature_support features;
drivers/gpu/drm/amd/display/include/signal_types.h +0 -4
@@ -36,11 +36,7 @@ enum signal_type {SIGNAL_TYPE_DISPLAY_PORT = (1 <<5 ),SIGNAL_TYPE_DISPLAY_PORT_MST = (1 <<6 ),SIGNAL_TYPE_EDP = (1 <<7 ), -SIGNAL_TYPE_WIRELESS = (1 <<8 ),/* Wireless Display */ SIGNAL_TYPE_VIRTUAL = (1 << 9), /* Virtual Display */ - -SIGNAL_TYPE_COUNT =10 , - SIGNAL_TYPE_ALL = (1 << SIGNAL_TYPE_COUNT) - 1 };/* help functions for signal types manipulation */
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/25 drm/amd/display: remove dead code
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 76 -------------- .../gpu/drm/amd/display/dc/bios/command_table.c | 114 --------------------- .../gpu/drm/amd/display/dc/bios/command_table.h | 7 -- drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 6 -- .../drm/amd/display/include/bios_parser_types.h | 20 ---- 5 files changed, 223 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +0 -76
@@ -545,80 +545,6 @@ static enum bp_result bios_parser_get_hpd_info(struct dc_bios *dcb,return BP_RESULT_NORECORD ; } -static uint32_t bios_parser_get_gpio_record ( -struct dc_bios *dcb, -struct graphics_object_id id, -struct bp_gpio_cntl_info *gpio_record, -uint32_t record_size) -{ -struct bios_parser *bp =BP_FROM_DCB (dcb); -ATOM_COMMON_RECORD_HEADER *header =NULL ; -ATOM_OBJECT_GPIO_CNTL_RECORD *record =NULL ; -ATOM_OBJECT *object =get_bios_object (bp, id); -uint32_t offset; -uint32_t pins_number; -uint32_t i; - -if (!object) -return 0 ; - -/* Initialise offset */ - offset =le16_to_cpu (object->usRecordOffset) - + bp->object_info_tbl_offset; - -for (;;) { -/* Get record header */ - header =GET_IMAGE (ATOM_COMMON_RECORD_HEADER , offset); -if (!header || header->ucRecordType ==LAST_RECORD_TYPE || - !header->ucRecordSize) -break ; - -/* If this is gpio control record - stop. We found the record */ -if (header->ucRecordType ==ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE - && header->ucRecordSize - >=sizeof (ATOM_OBJECT_GPIO_CNTL_RECORD )) { - record = (ATOM_OBJECT_GPIO_CNTL_RECORD *) header; -break ; - } - -/* Advance to next record */ - offset += header->ucRecordSize; - } - -/* If we did not find a record - return */ -if (!record) -return 0 ; - -/* Extract gpio IDs from bios record (make sure we do not exceed passed -* array size) */ - pins_number = (record->ucNumberOfPins < record_size ? - record->ucNumberOfPins : record_size); -for (i =0 ; i < pins_number; i++) { -uint8_t output_state = ((record->asGpio[i].ucGPIO_PinState - &GPIO_PIN_OUTPUT_STATE_MASK ) - >>GPIO_PIN_OUTPUT_STATE_SHIFT ); - gpio_record[i].id = record->asGpio[i].ucGPIOID; - -switch (output_state) { -case GPIO_PIN_STATE_ACTIVE_LOW : - gpio_record[i].state = -GPIO_PIN_OUTPUT_STATE_ACTIVE_LOW ; -break ; - -case GPIO_PIN_STATE_ACTIVE_HIGH : - gpio_record[i].state = -GPIO_PIN_OUTPUT_STATE_ACTIVE_HIGH ; -break ; - -default : -BREAK_TO_DEBUGGER ();/* Invalid Pin Output State */ -break ; - } - } - -return pins_number; -} - enum bp_result bios_parser_get_device_tag_record( struct bios_parser *bp, ATOM_OBJECT *object,
@@ -4064,8 +3990,6 @@ static const struct dc_vbios_funcs vbios_funcs = { .get_dst_number = bios_parser_get_dst_number, - .get_gpio_record = bios_parser_get_gpio_record, - .get_src_obj = bios_parser_get_src_obj, .get_dst_obj = bios_parser_get_dst_obj,
drivers/gpu/drm/amd/display/dc/bios/command_table.c +0 -114
147 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/bios/command_table.h +0 -7
@@ -68,10 +68,6 @@ struct cmd_tbl {enum bp_result (*dac2_output_control)(struct bios_parser *bp,bool enable); -enum bp_result (*blank_crtc)( -struct bios_parser *bp, -struct bp_blank_crtc_parameters *bp_params, -bool blank);enum bp_result (*set_crtc_timing)(struct bios_parser *bp,struct bp_hw_crtc_timing_parameters *bp_params);
@@ -89,9 +85,6 @@ struct cmd_tbl {enum bp_result (*program_clock)(struct bios_parser *bp,struct bp_pixel_clock_parameters *bp_params); -enum bp_result (*compute_memore_engine_pll)( -struct bios_parser *bp, -struct bp_display_clock_parameters *bp_params);enum bp_result (*external_encoder_control)(struct bios_parser *bp,struct bp_external_encoder_control *cntl);
drivers/gpu/drm/amd/display/dc/dc_bios_types.h +0 -6
@@ -51,12 +51,6 @@ struct dc_vbios_funcs {struct dc_bios *bios, struct graphics_object_id id); -uint32_t (*get_gpio_record)( -struct dc_bios *dcb, -struct graphics_object_id id, -struct bp_gpio_cntl_info *gpio_record, -uint32_t record_size); - enum bp_result (*get_src_obj)( struct dc_bios *bios, struct graphics_object_id object_id, uint32_t index,
drivers/gpu/drm/amd/display/include/bios_parser_types.h +0 -20
@@ -156,13 +156,6 @@ struct bp_transmitter_control {bool single_pll_mode; }; -struct bp_blank_crtc_parameters { -enum controller_id controller_id; -uint32_t black_color_rcr; -uint32_t black_color_gy; -uint32_t black_color_bcb; -}; -struct bp_hw_crtc_timing_parameters {enum controller_id controller_id;/* horizontal part */
@@ -252,14 +245,6 @@ struct bp_pixel_clock_parameters { } flags; }; -struct bp_display_clock_parameters { -uint32_t target_display_clock;/* KHz */ -/* Actual Display Clock set due to clock divider granularity KHz */ -uint32_t actual_display_clock; -/* Actual Post Divider ID used to generate the actual clock */ -uint32_t actual_post_divider_id; -}; -enum bp_dce_clock_type {DCECLOCK_TYPE_DISPLAY_CLOCK =0 ,DCECLOCK_TYPE_DPREFCLK =1
@@ -322,9 +307,4 @@ struct bp_encoder_cap_info { uint32_t RESERVED:30; }; -struct bp_gpio_cntl_info { -uint32_t id; -enum gpio_pin_output_state state; -}; -#endif /*__DAL_BIOS_PARSER_TYPES_H__ */
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/25 drm/amd/display: remove calculate_adjustments in conversion.h
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
- these are moved to color module
--- drivers/gpu/drm/amd/display/dc/basics/conversion.c | 118 --------------------- drivers/gpu/drm/amd/display/dc/basics/conversion.h | 10 -- 2 files changed, 128 deletions(-)
drivers/gpu/drm/amd/display/dc/basics/conversion.c +0 -118
@@ -103,124 +103,6 @@ void convert_float_matrix( } } -static void calculate_adjustments_common ( -const struct fixed31_32 *ideal_matrix, -const struct dc_csc_adjustments *adjustments, -struct fixed31_32 *matrix) -{ -const struct fixed31_32 sin_hue = -dal_fixed31_32_sin (adjustments->hue); -const struct fixed31_32 cos_hue = -dal_fixed31_32_cos (adjustments->hue); - -const struct fixed31_32 multiplier = -dal_fixed31_32_mul ( - adjustments->contrast, - adjustments->saturation); - - matrix[0 ] =dal_fixed31_32_mul ( - ideal_matrix[0 ], - adjustments->contrast); - - matrix[1 ] =dal_fixed31_32_mul ( - ideal_matrix[1 ], - adjustments->contrast); - - matrix[2 ] =dal_fixed31_32_mul ( - ideal_matrix[2 ], - adjustments->contrast); - - matrix[4 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_add ( -dal_fixed31_32_mul ( - ideal_matrix[8 ], - sin_hue), -dal_fixed31_32_mul ( - ideal_matrix[4 ], - cos_hue))); - - matrix[5 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_add ( -dal_fixed31_32_mul ( - ideal_matrix[9 ], - sin_hue), -dal_fixed31_32_mul ( - ideal_matrix[5 ], - cos_hue))); - - matrix[6 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_add ( -dal_fixed31_32_mul ( - ideal_matrix[10 ], - sin_hue), -dal_fixed31_32_mul ( - ideal_matrix[6 ], - cos_hue))); - - matrix[7 ] = ideal_matrix[7 ]; - - matrix[8 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_sub ( -dal_fixed31_32_mul ( - ideal_matrix[8 ], - cos_hue), -dal_fixed31_32_mul ( - ideal_matrix[4 ], - sin_hue))); - - matrix[9 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_sub ( -dal_fixed31_32_mul ( - ideal_matrix[9 ], - cos_hue), -dal_fixed31_32_mul ( - ideal_matrix[5 ], - sin_hue))); - - matrix[10 ] =dal_fixed31_32_mul ( - multiplier, -dal_fixed31_32_sub ( -dal_fixed31_32_mul ( - ideal_matrix[10 ], - cos_hue), -dal_fixed31_32_mul ( - ideal_matrix[6 ], - sin_hue))); - - matrix[11 ] = ideal_matrix[11 ]; -} - -void calculate_adjustments ( -const struct fixed31_32 *ideal_matrix, -const struct dc_csc_adjustments *adjustments, -struct fixed31_32 *matrix) -{ -calculate_adjustments_common (ideal_matrix, adjustments, matrix); - - matrix[3 ] =dal_fixed31_32_add ( - ideal_matrix[3 ], -dal_fixed31_32_mul ( - adjustments->brightness, -dal_fixed31_32_from_fraction (86 ,100 ))); -} - -void calculate_adjustments_y_only ( -const struct fixed31_32 *ideal_matrix, -const struct dc_csc_adjustments *adjustments, -struct fixed31_32 *matrix) -{ -calculate_adjustments_common (ideal_matrix, adjustments, matrix); - - matrix[3 ] =dal_fixed31_32_add ( - ideal_matrix[3 ], - adjustments->brightness); -} -unsigned int log_2 (unsigned int num) {unsigned int result =0 ;
drivers/gpu/drm/amd/display/dc/basics/conversion.h +0 -10
@@ -38,16 +38,6 @@ void convert_float_matrix(struct fixed31_32 *flt, uint32_t buffer_size); -void calculate_adjustments ( -const struct fixed31_32 *ideal_matrix, -const struct dc_csc_adjustments *adjustments, -struct fixed31_32 *matrix); - -void calculate_adjustments_y_only ( -const struct fixed31_32 *ideal_matrix, -const struct dc_csc_adjustments *adjustments, -struct fixed31_32 *matrix); -unsigned int log_2 (unsigned int num);#endif
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/25 drm/amd/display: Set default degamma to sRGB instead of bypass
In reply to a message not in the archiveFrom: Amy Zhang <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -1
@@ -255,7 +255,7 @@ static bool dce110_set_input_transfer_func(if (tf ==NULL ) {/* Default case if no input transfer function specified */ ipp->funcs->ipp_set_degamma (ipp, -IPP_DEGAMMA_MODE_BYPASS ); + IPP_DEGAMMA_MODE_HW_sRGB); }else if (tf->public.type ==TF_TYPE_PREDEFINED ) {switch (tf->public.tf) {case TRANSFER_FUNCTION_SRGB :
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/25 drm/amd/display: HDR Enablement For Applications
In reply to a message not in the archiveFrom: Amy Zhang <[email protected]>
- Made sure dest color space is updated in stream and info frame
- Optimized segment distribution algorithm for regamma mapping
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 6 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 94 ++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 11 +++ 4 files changed, 107 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +14 -0
@@ -1310,6 +1310,20 @@ static void set_avi_info_frame( info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 =COLORIMETRY_NO_DATA ; +if (color_space ==COLOR_SPACE_2020_RGB_FULLRANGE || + color_space ==COLOR_SPACE_2020_RGB_LIMITEDRANGE || + color_space ==COLOR_SPACE_2020_YCBCR ) { + info_frame.avi_info_packet.info_packet_hdmi.bits.EC0_EC2 = +COLORIMETRYEX_BT2020RGBYCBCR ; + info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = +COLORIMETRY_EXTENDED ; + }else if (color_space ==COLOR_SPACE_ADOBERGB ) { + info_frame.avi_info_packet.info_packet_hdmi.bits.EC0_EC2 = +COLORIMETRYEX_ADOBERGB ; + info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = +COLORIMETRY_EXTENDED ; + } +/* TODO: un-hardcode aspect ratio */ aspect = stream->public.timing.aspect_ratio;
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +5 -1
@@ -444,7 +444,11 @@ enum dc_color_space {COLOR_SPACE_YCBCR601 ,COLOR_SPACE_YCBCR709 ,COLOR_SPACE_YCBCR601_LIMITED , -COLOR_SPACE_YCBCR709_LIMITED +COLOR_SPACE_YCBCR709_LIMITED , +COLOR_SPACE_2020_RGB_FULLRANGE , +COLOR_SPACE_2020_RGB_LIMITEDRANGE , +COLOR_SPACE_2020_YCBCR , + COLOR_SPACE_ADOBERGB, }; enum dc_quantization_range {
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +77 -17
127 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw/transform.h +11 -0
@@ -47,6 +47,17 @@ enum colorimetry {COLORIMETRY_EXTENDED =3 }; +enum colorimetry_ext { +COLORIMETRYEX_XVYCC601 =0 , +COLORIMETRYEX_XVYCC709 =1 , +COLORIMETRYEX_SYCC601 =2 , +COLORIMETRYEX_ADOBEYCC601 =3 , +COLORIMETRYEX_ADOBERGB =4 , +COLORIMETRYEX_BT2020YCC =5 , +COLORIMETRYEX_BT2020RGBYCBCR =6 , +COLORIMETRYEX_RESERVED =7 +}; +enum active_format_info {ACTIVE_FORMAT_NO_DATA =0 ,ACTIVE_FORMAT_VALID =1
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/25 drm/amd/display: refactor clk_resync to avoid assertion
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
- not all DCE has PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE bit defined.
--- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 57 ++++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +30 -27
@@ -767,41 +767,44 @@ static void dce112_program_pixel_clk_resync(enum dc_color_depth colordepth, bool enable_ycbcr420) { -REG_UPDATE (PIXCLK_RESYNC_CNTL , - PHYPLLA_DCCG_DEEP_COLOR_CNTL, 0); + uint32_t deep_color_cntl = 0; +uint32_t double_rate_enable =0 ; +/* 24 bit mode: TMDS clock = 1.0 x pixel clock (1:1) 30 bit mode: TMDS clock = 1.25 x pixel clock (5:4) 36 bit mode: TMDS clock = 1.5 x pixel clock (3:2) 48 bit mode: TMDS clock = 2 x pixel clock (2:1) */ -if (signal_type !=SIGNAL_TYPE_HDMI_TYPE_A ) -return ; +if (signal_type ==SIGNAL_TYPE_HDMI_TYPE_A ) { + double_rate_enable = enable_ycbcr420 ?1 :0 ; -switch (colordepth) { -case COLOR_DEPTH_888 : -REG_UPDATE_2 (PIXCLK_RESYNC_CNTL , -PHYPLLA_DCCG_DEEP_COLOR_CNTL ,0 , -PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE , enable_ycbcr420); -break ; -case COLOR_DEPTH_101010 : -REG_UPDATE_2 (PIXCLK_RESYNC_CNTL , -PHYPLLA_DCCG_DEEP_COLOR_CNTL ,1 , -PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE , enable_ycbcr420); -break ; -case COLOR_DEPTH_121212 : -REG_UPDATE_2 (PIXCLK_RESYNC_CNTL , -PHYPLLA_DCCG_DEEP_COLOR_CNTL ,2 , -PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE , enable_ycbcr420); -break ; -case COLOR_DEPTH_161616 : -REG_UPDATE_2 (PIXCLK_RESYNC_CNTL , -PHYPLLA_DCCG_DEEP_COLOR_CNTL ,3 , -PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE , enable_ycbcr420); -break ; -default : -break ; +switch (colordepth) { +case COLOR_DEPTH_888 : + deep_color_cntl =0 ; +break ; +case COLOR_DEPTH_101010 : + deep_color_cntl =1 ; +break ; +case COLOR_DEPTH_121212 : + deep_color_cntl =2 ; +break ; +case COLOR_DEPTH_161616 : + deep_color_cntl =3 ; +break ; +default : +break ; + } } + +if (clk_src->cs_mask->PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE) +REG_UPDATE_2 (PIXCLK_RESYNC_CNTL , +PHYPLLA_DCCG_DEEP_COLOR_CNTL , deep_color_cntl, +PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE , double_rate_enable); +else +REG_UPDATE (PIXCLK_RESYNC_CNTL , +PHYPLLA_DCCG_DEEP_COLOR_CNTL , deep_color_cntl); + } static bool dce110_program_pix_clk(
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/25 drm/amd/display: Remove meta_pitch
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 8 ++------ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_debug.c +2 -6
@@ -94,14 +94,12 @@ void pre_surface_trace("surface->plane_size.grph.surface_size.y = %d;\n" "surface->plane_size.grph.surface_size.width = %d;\n" "surface->plane_size.grph.surface_size.height = %d;\n" -"surface->plane_size.grph.surface_pitch = %d;\n" -"surface->plane_size.grph.meta_pitch = %d;\n" , +"surface->plane_size.grph.surface_pitch = %d;\n" , surface->plane_size.grph.surface_size.x, surface->plane_size.grph.surface_size.y, surface->plane_size.grph.surface_size.width, surface->plane_size.grph.surface_size.height, - surface->plane_size.grph.surface_pitch, - surface->plane_size.grph.meta_pitch); + surface->plane_size.grph.surface_pitch); SURFACE_TRACE(
@@ -176,7 +174,6 @@ void update_surface_trace(SURFACE_TRACE ("plane_info->color_space = %d;\n" "plane_info->format = %d;\n" -"plane_info->plane_size.grph.meta_pitch = %d;\n" "plane_info->plane_size.grph.surface_pitch = %d;\n" "plane_info->plane_size.grph.surface_size.height = %d;\n" "plane_info->plane_size.grph.surface_size.width = %d;\n"
@@ -185,7 +182,6 @@ void update_surface_trace("plane_info->rotation = %d;\n" , update->plane_info->color_space, update->plane_info->format, - update->plane_info->plane_size.grph.meta_pitch, update->plane_info->plane_size.grph.surface_pitch, update->plane_info->plane_size.grph.surface_size.height, update->plane_info->plane_size.grph.surface_size.width,
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +0 -4
@@ -123,8 +123,6 @@ union plane_size {* is 32 pixel aligned. */ uint32_t surface_pitch; - -uint32_t meta_pitch; } grph;struct {
@@ -134,7 +132,6 @@ union plane_size {* 32 pixel aligned. */ uint32_t luma_pitch; -uint32_t meta_luma_pitch;struct rect chroma_size;/* Graphic surface pitch in pixels.
@@ -142,7 +139,6 @@ union plane_size {* 32 pixel aligned. */ uint32_t chroma_pitch; -uint32_t meta_chroma_pitch; } video; };
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/25 drm/amd/display: rename BGRA8888 to ABGR8888
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
DC actually support ABGR8888 instead of BGRA8888 (R/B swap rather than endian swap) , rename to avoid confusion
--- drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c +2 -2
@@ -2530,7 +2530,7 @@ static void populate_initial_data( data->bytes_per_pixel[num_displays +4 ] =2 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 :case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010 :case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010 :case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS :
@@ -2626,7 +2626,7 @@ static void populate_initial_data( data->bytes_per_pixel[num_displays +4 ] =2 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 :case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010 :case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010 :case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS :
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -341,7 +341,7 @@ static enum pixel_format convert_pixel_format_to_dalsurface(case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : dal_pixel_format =PIXEL_FORMAT_ARGB8888 ;break ; -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : dal_pixel_format =PIXEL_FORMAT_ARGB8888 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010 :
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +1 -1
@@ -174,7 +174,7 @@ enum surface_pixel_format {/*32 bpp*/ SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 ,/*32 bpp swaped*/ -SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 , +SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 , SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010,/*swaped*/
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +2 -2
@@ -302,7 +302,7 @@ static void program_grph_pixel_format(uint32_t grph_depth, grph_format;uint32_t sign =0 , floating =0 ; - if (format == SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 || + if (format == SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 || /*todo: doesn't look like we handle BGRA here, * should problem swap endian*/ format == SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010 ||
@@ -331,7 +331,7 @@ static void program_grph_pixel_format( grph_format =1 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : grph_depth =2 ; grph_format =0 ;break ;
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -1
@@ -214,7 +214,7 @@ static void build_prescale_params(struct ipp_prescale_params *prescale_params,switch (surface->public.format) {case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : prescale_params->scale =0x2020 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010 :
drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c +1 -1
@@ -405,7 +405,7 @@ static void program_pixel_format( grph_format =1 ;break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : -case SURFACE_PIXEL_FORMAT_GRPH_BGRA8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : grph_depth =2 ; grph_format =0 ;break ;
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/25 drm/amd/display: Fix missing conditions in hw sequencer.
In reply to a message not in the archiveFrom: Zeyu Fan <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c +1 -1
@@ -160,7 +160,7 @@ void dce_crtc_switch_to_clk_src(struct dce_hwseq *hws,struct clock_source *clk_src, unsigned int tg_inst) { - if (clk_src->id == CLOCK_SOURCE_ID_DP_DTO) { + if (clk_src->id == CLOCK_SOURCE_ID_DP_DTO || clk_src->dp_clk_src) {REG_UPDATE (PIXEL_RATE_CNTL [tg_inst], DP_DTO0_ENABLE, 1);
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/25 drm/amd/display: Add missing MI masks
In reply to a message not in the archiveFrom: Leon Elazar <[email protected]>
This will fix the memory Input programing with MST tiled display. This Fix should fix connectivity problems with MST tiled Display
--- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h +2 -0
@@ -92,6 +92,8 @@ struct dce_mem_input_registers { .field_name = blk_name ## reg_name ## __ ## field_name ## post_fix#define MI_GFX8_TILE_MASK_SH_LIST (mask_sh, blk)\ + SFB(blk, GRPH_CONTROL, GRPH_NUM_BANKS, mask_sh),\ + SFB(blk, GRPH_CONTROL, GRPH_BANK_WIDTH, mask_sh),\ SFB(blk, GRPH_CONTROL, GRPH_BANK_HEIGHT, mask_sh),\ SFB(blk, GRPH_CONTROL, GRPH_MACRO_TILE_ASPECT, mask_sh),\ SFB(blk, GRPH_CONTROL, GRPH_TILE_SPLIT, mask_sh),\
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/25 drm/amd/display: Add interrupt entries for VBLANK isr.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
--- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 42 ++++++++++++++++++++++ .../amd/display/dc/irq/dce80/irq_service_dce80.c | 22 ++++++++++++ drivers/gpu/drm/amd/display/dc/irq_types.h | 8 +++++ 3 files changed, 72 insertions(+)
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +42 -0
@@ -33,6 +33,13 @@#include "dce/dce_11_0_sh_mask.h" #include "ivsrcid/ivsrcid_vislands30.h" +#define VISLANDS30_IV_SRCID_D1_VBLANK 1 +#define VISLANDS30_IV_SRCID_D2_VBLANK 2 +#define VISLANDS30_IV_SRCID_D3_VBLANK 3 +#define VISLANDS30_IV_SRCID_D4_VBLANK 4 +#define VISLANDS30_IV_SRCID_D5_VBLANK 5 +#define VISLANDS30_IV_SRCID_D6_VBLANK 6 +static bool hpd_ack (struct irq_service *irq_service,const struct irq_source_info *info)
@@ -139,6 +146,22 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = { .funcs = &vblank_irq_info_funcs\ } +#define vblank_int_entry (reg_num)\ + [DC_IRQ_SOURCE_VBLANK1 + reg_num] = {\ + .enable_reg = mmLB ## reg_num ## _LB_INTERRUPT_MASK,\ + .enable_mask =\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + .enable_value = {\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + ~LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK},\ + .ack_reg = mmLB ## reg_num ## _LB_VBLANK_STATUS,\ + .ack_mask =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .ack_value =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .funcs = &vblank_irq_info_funcs\ + } +#define dummy_irq_entry () \ {\ .funcs = &dummy_irq_info_funcs\
@@ -264,6 +287,13 @@ irq_source_info_dce110[DAL_IRQ_SOURCES_NUMBER] = {vupdate_int_entry (3 ),vupdate_int_entry (4 ),vupdate_int_entry (5 ), +vblank_int_entry (0 ), +vblank_int_entry (1 ), +vblank_int_entry (2 ), +vblank_int_entry (3 ), +vblank_int_entry (4 ), + vblank_int_entry(5), + }; enum dc_irq_source to_dal_irq_source_dce110(
@@ -272,6 +302,18 @@ enum dc_irq_source to_dal_irq_source_dce110( uint32_t ext_id) {switch (src_id) { +case VISLANDS30_IV_SRCID_D1_VBLANK : +return DC_IRQ_SOURCE_VBLANK1 ; +case VISLANDS30_IV_SRCID_D2_VBLANK : +return DC_IRQ_SOURCE_VBLANK2 ; +case VISLANDS30_IV_SRCID_D3_VBLANK : +return DC_IRQ_SOURCE_VBLANK3 ; +case VISLANDS30_IV_SRCID_D4_VBLANK : +return DC_IRQ_SOURCE_VBLANK4 ; +case VISLANDS30_IV_SRCID_D5_VBLANK : +return DC_IRQ_SOURCE_VBLANK5 ; +case VISLANDS30_IV_SRCID_D6_VBLANK : +return DC_IRQ_SOURCE_VBLANK6 ;case VISLANDS30_IV_SRCID_D1_V_UPDATE_INT :return DC_IRQ_SOURCE_VUPDATE1 ;case VISLANDS30_IV_SRCID_D2_V_UPDATE_INT :
drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c +22 -0
@@ -143,6 +143,22 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = { .funcs = &vblank_irq_info_funcs\ } +#define vblank_int_entry (reg_num)\ + [DC_IRQ_SOURCE_VBLANK1 + reg_num] = {\ + .enable_reg = mmLB ## reg_num ## _LB_INTERRUPT_MASK,\ + .enable_mask =\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + .enable_value = {\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + ~LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK},\ + .ack_reg = mmLB ## reg_num ## _LB_VBLANK_STATUS,\ + .ack_mask =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .ack_value =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .funcs = &vblank_irq_info_funcs\ + } +#define dummy_irq_entry () \ {\ .funcs = &dummy_irq_info_funcs\
@@ -246,6 +262,12 @@ irq_source_info_dce80[DAL_IRQ_SOURCES_NUMBER] = {vupdate_int_entry (3 ),vupdate_int_entry (4 ),vupdate_int_entry (5 ), +vblank_int_entry (0 ), +vblank_int_entry (1 ), +vblank_int_entry (2 ), +vblank_int_entry (3 ), +vblank_int_entry (4 ), + vblank_int_entry(5), }; static const struct irq_service_funcs irq_service_funcs_dce80 = {
drivers/gpu/drm/amd/display/dc/irq_types.h +8 -0
@@ -128,6 +128,13 @@ enum dc_irq_source {DC_IRQ_SOURCE_VUPDATE5 ,DC_IRQ_SOURCE_VUPDATE6 , +DC_IRQ_SOURCE_VBLANK1 , +DC_IRQ_SOURCE_VBLANK2 , +DC_IRQ_SOURCE_VBLANK3 , +DC_IRQ_SOURCE_VBLANK4 , +DC_IRQ_SOURCE_VBLANK5 , +DC_IRQ_SOURCE_VBLANK6 , +DAL_IRQ_SOURCES_NUMBER };
@@ -135,6 +142,7 @@ enum irq_type {IRQ_TYPE_PFLIP =DC_IRQ_SOURCE_PFLIP1 ,IRQ_TYPE_VUPDATE =DC_IRQ_SOURCE_VUPDATE1 , + IRQ_TYPE_VBLANK = DC_IRQ_SOURCE_VBLANK1, };#define DAL_VALID_IRQ_SRC_NUM (src) \
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): 20170123143613.15441-23-harry.wentland-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 22/25] drm/amd/display: Add interrupt entries for VBLANK isr.
Quoted 17 lines · Harry Wentland
From: Andrey Grodzovsky <[email protected]>
Change-Id Ia59c22ea5a78d5eecca6c62c7f50e651f29ef5f7Signed-off-by Andrey Grodzovsky <[email protected]>Acked-by Harry Wentland <[email protected]>Reviewed-by Tony Cheng <[email protected]>--- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 42 ++++++++++++++++++++++ .../amd/display/dc/irq/dce80/irq_service_dce80.c | 22 ++++++++++++ drivers/gpu/drm/amd/display/dc/irq_types.h | 8 +++++ 3 files changed, 72 insertions(+)drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +0
-0
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c line 42
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +7
-0@@ -33,6 +33,13 @@#include "dce/dce_11_0_sh_mask.h" #include "ivsrcid/ivsrcid_vislands30.h" +#define VISLANDS30_IV_SRCID_D1_VBLANK 1 +#define VISLANDS30_IV_SRCID_D2_VBLANK 2 +#define VISLANDS30_IV_SRCID_D3_VBLANK 3 +#define VISLANDS30_IV_SRCID_D4_VBLANK 4 +#define VISLANDS30_IV_SRCID_D5_VBLANK 5 +#define VISLANDS30_IV_SRCID_D6_VBLANK 6 +
Add these to ivsrcid/ivsrcid_vislands30.h instead of this file? or maybe drop ivsrcid/ivsrcid_vislands30.h if we don't need it?
Alex
Quoted 128 lines
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +35
-0static bool hpd_ack (struct irq_service *irq_service,const struct irq_source_info *info)@@ -139,6 +146,22 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = { .funcs = &vblank_irq_info_funcs\ } +#define vblank_int_entry (reg_num)\ + [DC_IRQ_SOURCE_VBLANK1 + reg_num] = {\ + .enable_reg = mmLB ## reg_num ## _LB_INTERRUPT_MASK,\ + .enable_mask =\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + .enable_value = {\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + ~LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK},\ + .ack_reg = mmLB ## reg_num ## _LB_VBLANK_STATUS,\ + .ack_mask =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .ack_value =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .funcs = &vblank_irq_info_funcs\ + } +#define dummy_irq_entry () \ {\ .funcs = &dummy_irq_info_funcs\@@ -264,6 +287,13 @@ irq_source_info_dce110[DAL_IRQ_SOURCES_NUMBER] = {vupdate_int_entry (3 ),vupdate_int_entry (4 ),vupdate_int_entry (5 ), +vblank_int_entry (0 ), +vblank_int_entry (1 ), +vblank_int_entry (2 ), +vblank_int_entry (3 ), +vblank_int_entry (4 ), + vblank_int_entry(5), + }; enum dc_irq_source to_dal_irq_source_dce110(@@ -272,6 +302,18 @@ enum dc_irq_source to_dal_irq_source_dce110( uint32_t ext_id) {switch (src_id) { +case VISLANDS30_IV_SRCID_D1_VBLANK : +return DC_IRQ_SOURCE_VBLANK1 ; +case VISLANDS30_IV_SRCID_D2_VBLANK : +return DC_IRQ_SOURCE_VBLANK2 ; +case VISLANDS30_IV_SRCID_D3_VBLANK : +return DC_IRQ_SOURCE_VBLANK3 ; +case VISLANDS30_IV_SRCID_D4_VBLANK : +return DC_IRQ_SOURCE_VBLANK4 ; +case VISLANDS30_IV_SRCID_D5_VBLANK : +return DC_IRQ_SOURCE_VBLANK5 ; +case VISLANDS30_IV_SRCID_D6_VBLANK : +return DC_IRQ_SOURCE_VBLANK6 ;case VISLANDS30_IV_SRCID_D1_V_UPDATE_INT :return DC_IRQ_SOURCE_VUPDATE1 ;case VISLANDS30_IV_SRCID_D2_V_UPDATE_INT :drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c +22
-0@@ -143,6 +143,22 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = { .funcs = &vblank_irq_info_funcs\ } +#define vblank_int_entry (reg_num)\ + [DC_IRQ_SOURCE_VBLANK1 + reg_num] = {\ + .enable_reg = mmLB ## reg_num ## _LB_INTERRUPT_MASK,\ + .enable_mask =\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + .enable_value = {\ + LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK,\ + ~LB_INTERRUPT_MASK__VBLANK_INTERRUPT_MASK_MASK},\ + .ack_reg = mmLB ## reg_num ## _LB_VBLANK_STATUS,\ + .ack_mask =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .ack_value =\ + LB_VBLANK_STATUS__VBLANK_ACK_MASK,\ + .funcs = &vblank_irq_info_funcs\ + } +#define dummy_irq_entry () \ {\ .funcs = &dummy_irq_info_funcs\@@ -246,6 +262,12 @@ irq_source_info_dce80[DAL_IRQ_SOURCES_NUMBER] = {vupdate_int_entry (3 ),vupdate_int_entry (4 ),vupdate_int_entry (5 ), +vblank_int_entry (0 ), +vblank_int_entry (1 ), +vblank_int_entry (2 ), +vblank_int_entry (3 ), +vblank_int_entry (4 ), + vblank_int_entry(5), }; static const struct irq_service_funcs irq_service_funcs_dce80 = {drivers/gpu/drm/amd/display/dc/irq_types.h +8
-1@@ -128,6 +128,13 @@ enum dc_irq_source {DC_IRQ_SOURCE_VUPDATE5 ,DC_IRQ_SOURCE_VUPDATE6 , +DC_IRQ_SOURCE_VBLANK1 , +DC_IRQ_SOURCE_VBLANK2 , +DC_IRQ_SOURCE_VBLANK3 , +DC_IRQ_SOURCE_VBLANK4 , +DC_IRQ_SOURCE_VBLANK5 , +DC_IRQ_SOURCE_VBLANK6 , +DAL_IRQ_SOURCES_NUMBER };@@ -135,6 +142,7 @@ enum irq_type {IRQ_TYPE_PFLIP =DC_IRQ_SOURCE_PFLIP1 ,IRQ_TYPE_VUPDATE =DC_IRQ_SOURCE_VUPDATE1 , + IRQ_TYPE_VBLANK = DC_IRQ_SOURCE_VBLANK1, };#define DAL_VALID_IRQ_SRC_NUM (src) \ --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
PATCH 23/25 drm/amd/display: Register on VLBLANK ISR.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Switch from VUPDATE to VBLANK.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++------ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -6
@@ -207,7 +207,7 @@ static void dm_crtc_high_irq(void *interrupt_params)uint8_t crtc_index =0 ;struct amdgpu_crtc *acrtc; - acrtc =get_crtc_by_otg_inst (adev, irq_params->irq_src -IRQ_TYPE_VUPDATE ); + acrtc =get_crtc_by_otg_inst (adev, irq_params->irq_src -IRQ_TYPE_VBLANK );if (acrtc) crtc_index = acrtc->crtc_id;
@@ -1032,9 +1032,10 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev)* amdgpu_dm_irq_handler() will re-direct the interrupt to DC * for acknowledging and handling. */ -for (i =VISLANDS30_IV_SRCID_D1_V_UPDATE_INT ; - i <=VISLANDS30_IV_SRCID_D6_V_UPDATE_INT ; i +=2 ) { - r =amdgpu_irq_add_id (adev, i, &adev->crtc_irq); +/* Use VBLANK interrupt */ +for (i =0 ; i < adev->mode_info.num_crtc; i++) { + r =amdgpu_irq_add_id (adev, i+1 , &adev->crtc_irq); +if (r) {DRM_ERROR ("Failed to add crtc irq id!\n" );return r;
@@ -1042,9 +1043,9 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) int_params.int_context =INTERRUPT_HIGH_IRQ_CONTEXT ; int_params.irq_source = -dc_interrupt_to_irq_source (dc, i,0 ); +dc_interrupt_to_irq_source (dc, i+1 ,0 ); - c_irq_params = &adev->dm.vupdate_params[int_params.irq_source -DC_IRQ_SOURCE_VUPDATE1 ]; + c_irq_params = &adev->dm.vblank_params[int_params.irq_source -DC_IRQ_SOURCE_VBLANK1 ]; c_irq_params->adev = adev; c_irq_params->irq_src = int_params.irq_source;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -105,7 +105,7 @@ struct amdgpu_display_manager { pflip_params[DC_IRQ_SOURCE_PFLIP_LAST -DC_IRQ_SOURCE_PFLIP_FIRST +1 ];struct common_irq_params - vupdate_params[DC_IRQ_SOURCE_VUPDATE6 -DC_IRQ_SOURCE_VUPDATE1 +1 ]; + vblank_params[DC_IRQ_SOURCE_VBLANK6 -DC_IRQ_SOURCE_VBLANK1 +1 ];/* this spin lock synchronizes access to 'irq_handler_list_table' */ spinlock_t irq_handler_list_table_lock;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c +1 -1
@@ -736,7 +736,7 @@ static int amdgpu_dm_set_crtc_irq_state(struct amdgpu_device *adev, source, crtc_id, state, -IRQ_TYPE_VUPDATE , +IRQ_TYPE_VBLANK , __func__); }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/25 drm/amd/display: Clean index in irq init loop
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -3
@@ -1033,8 +1033,8 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev)* for acknowledging and handling. */ /* Use VBLANK interrupt */ -for (i =0 ; i < adev->mode_info.num_crtc; i++) { - r =amdgpu_irq_add_id (adev, i+1 , &adev->crtc_irq); +for (i =1 ; i <= adev->mode_info.num_crtc; i++) { + r =amdgpu_irq_add_id (adev, i, &adev->crtc_irq);if (r) {DRM_ERROR ("Failed to add crtc irq id!\n" );
@@ -1043,7 +1043,7 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) int_params.int_context =INTERRUPT_HIGH_IRQ_CONTEXT ; int_params.irq_source = -dc_interrupt_to_irq_source (dc, i+1 ,0 ); +dc_interrupt_to_irq_source (dc, i,0 ); c_irq_params = &adev->dm.vblank_params[int_params.irq_source -DC_IRQ_SOURCE_VBLANK1 ];
@@ -1054,6 +1054,7 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) dm_crtc_high_irq, c_irq_params); } +/* Use GRPH_PFLIP interrupt */ for (i =VISLANDS30_IV_SRCID_D1_GRPH_PFLIP ; i <=VISLANDS30_IV_SRCID_D6_GRPH_PFLIP ; i +=2 ) { r =amdgpu_irq_add_id (adev, i, &adev->pageflip_irq);
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/25 drm/amd/display: add missing dcc update on flip call
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -1429,6 +1429,8 @@ void dc_update_surfaces_for_stream(struct dc *dc, struct dc_surface_update *upda updates[i].plane_info->tiling_info; surface->public.visible = updates[i].plane_info->visible; + surface->public.dcc = + updates[i].plane_info->dcc; }if (updates[i].scaling_info) {
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx