Linux Patches Aug 31, 2017
Subsystems (3)
cover Linux Patches Aug 31, 2017
A long list of changes all at once again, this time, since we've had a couple regressions to iron out.
* Build state per streams and planes to follow model of other atomic drivers
* Rename context to state to avoid confusion
* Flatten core_dc object
* Remove bunch of unneeded code
* Rework HW object code to fit HW layout better
* Bunch of Raven fixes and ongoing work
* Fix some races with DC object refcounts by using atomic_t
* Fix some MST regressions
Andrey Grodzovsky (5):
drm/amd/display: Per stream validate_context build v2. drm/amd/display: Per plane validation context build. drm/amd/display: Refactor atomic check. drm/amd/display: Use DRM provided page flip flag. drm/amd/display: Move dis_clk into dc_state.
Bhawanpreet Lakha (8):
drm/amd/display: change bw_dceip and bw_vbios into pointers drm/amd/display: change dcn_ip and dcn_soc into pointers drm/amd/display: Flattening core_dc to dc drm/amd/display: Disable stutter for Raven drm/amd/display: Change log level for DCN powergatting drm/amd/display: Remove unneeded code drm/amd/display: Clean up flattening core_dc to dc drm/amd/display: Rename dc resource_validate_ctx methods
Charlene Liu (9):
drm/amd/display: fix eDP bootup/S4 backlight on drm/amd/display: eDP power sequence T9 fail drm/amd/display: fix not enter/exit PSR with latest driver/SBIOS drm/amd/display: write dpcd 0x600 to 2 for DP/eDP when powerdown drm/amd/display: Block 6Ghz timing if SBIOS set HDMI_6G_en to 0 drm/amd/display: add aux arbitration logic drm/amd/display: only polling VSync Phase within VSync peroroid drm/amd/display: not override the FMT setting set by VBIOS for eDP drm/amd/display: add backlight control in blankstream.
Corbin McElhanney (2):
drm/amd/display: Add comment explaining context free drm/amd/display: Log OTG registers with dcn10 hw state
Dmytro Laktyushkin (4):
drm/amd/display: Use function pointer for update_plane_addr drm/amd/display: Use MAX_PIPES for DTO reg arrays drm/amd/display: fix hubp mpcc and opp tracking drm/amd/display: Fixed mpc add, enable always scaler for video
surface.
Duke Du (1):
drm/amd/display: add display write back(DWB)
Eric Bernstein (1):
drm/amd/display: Update DSCL
Eric Yang (1):
drm/amd/display: Fix time out on boot
Harry Wentland (8):
drm/amd/display: Leave DCN config guard around fpu header drm/amd/display: Remove unnecessary assignemnt drm/amd/display: dc: Remove unneeded includes in DCN drm/amd/display: Remove old, misleading comment drm/amd/display: Stop including atomfimrwareid.h directly drm/amd/display: Set add_stream_ctx for CZ, Hawaii and others drm/amd/display: Restore missing DCE8 xfm regs drm/amd/display: Don't spam log with failed validation
Hersen Wu (1):
drm/amd/display: DF C-state entry blocked when DPMS
Jerry Zuo (4):
drm/amd/display: Use atomic types for ref_count drm/amd/display: Fix two MST not light up regressions drm/amd/display: Fix MST downstream display not light up regression drm/amd/display: Rename dc validate_context and current_context
Mikita Lipski (1):
drm/amd/display: Add a clock source to a sharing pipe
Roman Li (5):
drm/amd/display: fix gamma distortion on Vega drm/amd/display: Fix FBC compilation
drm/amd/display: increase polling interval for fbc status update drm/amd/display: Fix FBC disable for stereo drm/amd/display: program fbc for scatter/gather
Tony Cheng (6):
drm/amd/display: remove fake address reporting when blank drm/amd/display: refactor pplib/smu communication drm/amd/display: memory leak dwb
drm/amd/display: version 3.1.01
drm/amd/display: retire dm_pp_apply_clock_for_voltage_request drm/amd/display: delete dead code
Wenjing Liu (6):
drm/amd/display: Cache edp config in dc link drm/amd/display: re-enable audio after LT test drm/amd/display: retry LT on failing LT in automated request drm/amd/display: Fix return value from rx irq handler on up request drm/amd/display: Safe stream encoder id in stream_status drm/amd/display: do not reset lane count in EQ fallback
Yongqiang Sun (6):
drm/amd/display: blank otg before power gate front end. drm/amd/display: Enable double buffer when unblank crtc. drm/amd/display: work around for 8k sleep crash drm/amd/display: Remove mpc from bios left over, keep double buffer
disabled.
drm/amd/display: Program reg for vertical interrupt. drm/amd/display: Disable OTG double buffer.
Yue Hin Lau (8):
drm/amd/display: move vm registers to hwsequencer drm/amd/display: separate scl functions out from dcn10_dpp drm/amd/display: separate cm functions out from dcn10_dpp drm/amd/display: cleanup naming of DCN DPP functions drm/amd/display: move cm registers from ipp to dpp_cm drm/amd/display: clean up header file includes drm/amd/display: clean up functions in dcn10_dpp_cm drm/amd/display: clean up cm register programming functions
Zeyu Fan (1):
drm/amd/display: Implement HDMI retimer settings for RV AM4 support.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 545 +++---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 13 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 70 +- .../gpu/drm/amd/display/dc/bios/command_table2.c | 1 - .../amd/display/dc/bios/command_table_helper2.c | 1 - drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 733 +++++----- drivers/gpu/drm/amd/display/dc/core/dc.c | 791 ++++------ drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 22 +- .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 507 ++++++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 27 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 48 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 798 ++++++---- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 68 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 50 +- drivers/gpu/drm/amd/display/dc/dc.h | 211 +-- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 87 +- .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 14 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 35 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 32 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 54 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 8 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 + drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 13 + .../amd/display/dc/dce100/dce100_hw_sequencer.c | 17 +- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 10 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 123 +- .../drm/amd/display/dc/dce100/dce100_resource.h | 9 +- .../drm/amd/display/dc/dce110/dce110_compressor.c | 26 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 248 ++-- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 25 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 185 +-- .../drm/amd/display/dc/dce110/dce110_resource.h | 4 +- .../amd/display/dc/dce112/dce112_hw_sequencer.c | 5 +- .../amd/display/dc/dce112/dce112_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 237 ++- .../drm/amd/display/dc/dce112/dce112_resource.h | 23 +- .../amd/display/dc/dce120/dce120_hw_sequencer.c | 6 +- .../amd/display/dc/dce120/dce120_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 46 +- .../drm/amd/display/dc/dce120/dce120_resource.h | 4 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.h | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 152 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.h | 8 +- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 1521 +++----------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 787 +++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 864 +++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 710 +++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 651 +++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 32 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 433 ++++-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 6 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 717 +-------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 416 ------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 118 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 41 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 16 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 189 +-- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 4 +- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 49 + .../amd/display/dc/dcn10/dcn10_timing_generator.h | 29 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 - drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 131 ++ drivers/gpu/drm/amd/display/dc/dm_services.h | 7 +- drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 + drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 6 + drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h | 2 + .../display/dc/i2caux/dce110/aux_engine_dce110.c | 30 +- drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 4 + drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 55 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 57 +- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 16 +- .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 193 +++ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 17 +- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 24 + drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 20 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 61 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 44 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 8 +- .../amd/display/dc/irq/dce80/irq_service_dce80.c | 1 - .../amd/display/include/grph_object_ctrl_defs.h | 38 + .../gpu/drm/amd/display/include/logger_interface.h | 14 +- .../drm/amd/display/modules/freesync/freesync.c | 20 +- 95 files changed, 6912 insertions(+), 5755 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dm_pp_smu.h delete mode 100644 drivers/gpu/drm/amd/display/dc/inc/core_dc.h create mode 100644 drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170831180912.5898-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 1/77 drm/amd/display: fix gamma distortion on Vega
From: Roman Li <[email protected]>
Added missing reg shift/masks to soc base
--- drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_transform.h +3 -0
@@ -237,6 +237,7 @@XFM_SF (DCP0_REGAMMA_CNTLA_REGION_0_1 ,REGAMMA_CNTLA_EXP_REGION0_NUM_SEGMENTS , mask_sh),\XFM_SF (DCP0_REGAMMA_CNTLA_REGION_0_1 ,REGAMMA_CNTLA_EXP_REGION1_LUT_OFFSET , mask_sh),\XFM_SF (DCP0_REGAMMA_CNTLA_REGION_0_1 ,REGAMMA_CNTLA_EXP_REGION1_NUM_SEGMENTS , mask_sh),\ +XFM_SF (DCP0_REGAMMA_CONTROL ,GRPH_REGAMMA_MODE , mask_sh),\XFM_SF (SCL0_SCL_MODE ,SCL_MODE , mask_sh), \XFM_SF (SCL0_SCL_TAP_CONTROL ,SCL_H_NUM_OF_TAPS , mask_sh), \ XFM_SF(SCL0_SCL_TAP_CONTROL, SCL_V_NUM_OF_TAPS, mask_sh), \
@@ -270,6 +271,8 @@XFM_SF (SCL0_SCL_UPDATE ,SCL_COEF_UPDATE_COMPLETE , mask_sh), \XFM_SF (LB0_LB_DATA_FORMAT ,ALPHA_EN , mask_sh), \XFM_SF (DCFE0_DCFE_MEM_PWR_CTRL ,SCL_COEFF_MEM_PWR_DIS , mask_sh), \ +XFM_SF (DCFE0_DCFE_MEM_PWR_CTRL ,DCP_REGAMMA_MEM_PWR_DIS , mask_sh),\ +XFM_SF (DCFE0_DCFE_MEM_PWR_CTRL ,DCP_LUT_MEM_PWR_DIS , mask_sh),\XFM_SF (DCFE0_DCFE_MEM_PWR_STATUS ,SCL_COEFF_MEM_PWR_STATE , mask_sh), \XFM_SF (SCL0_SCL_MODE ,SCL_PSCL_EN , mask_sh)
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/77 drm/amd/display: Use atomic types for ref_count
In reply to a message not in the archiveFrom: Jerry Zuo <[email protected]>
Current ref_count inc/dec is not guarded by locks which leads to a raced condition where two threads try to access the variable at the same time. In this case, both might act on the same cached value and inc/dec from the same value, rather than inc/dec by 2.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 24 +++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 12 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 ++++----- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 36 +++++++++++------------ drivers/gpu/drm/amd/display/dc/dc.h | 8 ++--- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 8 files changed, 49 insertions(+), 51 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +12 -12
@@ -454,7 +454,7 @@ static bool construct(struct core_dc *dc, goto val_ctx_fail; } - dc->current_context->ref_count++; +atomic_inc (&dc->current_context->ref_count); dc_ctx->cgs_device = init_params->cgs_device; dc_ctx->driver_context = init_params->driver;
@@ -704,7 +704,7 @@ struct validate_context *dc_get_validate_context(if (context ==NULL ) goto context_alloc_fail; - ++context->ref_count; +atomic_inc (&context->ref_count);if (!is_validation_required (core_dc, set, set_count)) {dc_resource_validate_ctx_copy_construct (core_dc->current_context, context);
@@ -748,7 +748,7 @@ bool dc_validate_resources(if (context ==NULL ) goto context_alloc_fail; - ++context->ref_count; +atomic_inc (&context->ref_count); result = core_dc->res_pool->funcs->validate_with_context ( core_dc, set, set_count, context,NULL );
@@ -782,7 +782,7 @@ bool dc_validate_guaranteed(if (context ==NULL ) goto context_alloc_fail; - ++context->ref_count; +atomic_inc (&context->ref_count); result = core_dc->res_pool->funcs->validate_guaranteed ( core_dc, stream, context);
@@ -1090,7 +1090,7 @@ bool dc_commit_streams(if (context ==NULL ) goto context_alloc_fail; - ++context->ref_count; +atomic_inc (&context->ref_count); result = core_dc->res_pool->funcs->validate_with_context ( core_dc, set, stream_count, context, core_dc->current_context);
@@ -1203,16 +1203,16 @@ bool dc_commit_planes_to_stream(void dc_retain_validate_context (struct validate_context *context) { -ASSERT (context->ref_count >0 ); - ++context->ref_count; +ASSERT (atomic_read (&context->ref_count) >0 ); +atomic_inc (&context->ref_count); }void dc_release_validate_context (struct validate_context *context) { -ASSERT (context->ref_count >0 ); - --context->ref_count; +ASSERT (atomic_read (&context->ref_count) >0 ); +atomic_dec (&context->ref_count); -if (context->ref_count ==0 ) { +if (atomic_read (&context->ref_count) ==0 ) {dc_resource_validate_ctx_destruct (context);dm_free (context); }
@@ -1485,7 +1485,7 @@ void dc_update_planes_and_stream(struct dc *dc,if (context ==NULL ) goto context_alloc_fail; - ++context->ref_count; +atomic_inc (&context->ref_count);dc_resource_validate_ctx_copy_construct ( core_dc->current_context, context);
@@ -1800,7 +1800,7 @@ void dc_set_power_state( enum dc_acpi_cm_power_state power_state) {struct core_dc *core_dc =DC_TO_CORE (dc); -int ref_count; +atomic_t ref_count;switch (power_state) {case DC_ACPI_CM_POWER_STATE_D0 :
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -2238,7 +2238,7 @@ void dc_resource_validate_ctx_copy_construct( struct validate_context *dst_ctx) {int i, j; -int ref_count = dst_ctx->ref_count; +atomic_t ref_count = dst_ctx->ref_count; *dst_ctx = *src_ctx;
drivers/gpu/drm/amd/display/dc/core/dc_sink.c +6 -6
@@ -63,16 +63,16 @@ static bool construct(struct dc_sink *sink, const struct dc_sink_init_data *initvoid dc_sink_retain (struct dc_sink *sink) { -ASSERT (sink->ref_count >0 ); - ++sink->ref_count; +ASSERT (atomic_read (&sink->ref_count) >0 ); +atomic_inc (&sink->ref_count); }void dc_sink_release (struct dc_sink *sink) { -ASSERT (sink->ref_count >0 ); - --sink->ref_count; +ASSERT (atomic_read (&sink->ref_count) >0 ); +atomic_dec (&sink->ref_count); -if (sink->ref_count ==0 ) { +if (atomic_read (&sink->ref_count) ==0 ) {destruct (sink);dm_free (sink); }
@@ -88,7 +88,7 @@ struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)if (false ==construct (sink, init_params)) goto construct_fail; - ++sink->ref_count; +atomic_inc (&sink->ref_count);return sink;
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +6 -8
@@ -96,19 +96,17 @@ static void destruct(struct dc_stream_state *stream)void dc_stream_retain (struct dc_stream_state *stream) { - -ASSERT (stream->ref_count >0 ); - stream->ref_count++; +ASSERT (atomic_read (&stream->ref_count) >0 ); +atomic_inc (&stream->ref_count); }void dc_stream_release (struct dc_stream_state *stream) { -if (stream !=NULL ) { -ASSERT (stream->ref_count >0 ); - stream->ref_count--; +ASSERT (atomic_read (&stream->ref_count) >0 ); +atomic_dec (&stream->ref_count); -if (stream->ref_count ==0 ) { +if (atomic_read (&stream->ref_count) ==0 ) {destruct (stream);dm_free (stream); }
@@ -131,7 +129,7 @@ struct dc_stream_state *dc_create_stream_for_sink(if (false ==construct (stream, sink)) goto construct_fail; - stream->ref_count++; +atomic_inc (&stream->ref_count);return stream;
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +18 -18
@@ -76,7 +76,7 @@ struct dc_plane_state *dc_create_plane_state(const struct dc *dc)if (false ==construct (core_dc->ctx, plane_state)) goto construct_fail; - ++plane_state->ref_count; +atomic_inc (&plane_state->ref_count);return plane_state;
@@ -122,16 +122,16 @@ const struct dc_plane_status *dc_plane_get_status(void dc_plane_state_retain (struct dc_plane_state *plane_state) { -ASSERT (plane_state->ref_count >0 ); - ++plane_state->ref_count; +ASSERT (atomic_read (&plane_state->ref_count) >0 ); +atomic_inc (&plane_state->ref_count); }void dc_plane_state_release (struct dc_plane_state *plane_state) { -ASSERT (plane_state->ref_count >0 ); - --plane_state->ref_count; +ASSERT (atomic_read (&plane_state->ref_count) >0 ); +atomic_dec (&plane_state->ref_count); -if (plane_state->ref_count ==0 ) { +if (atomic_read (&plane_state->ref_count) ==0 ) {destruct (plane_state);dm_free (plane_state); }
@@ -139,16 +139,16 @@ void dc_plane_state_release(struct dc_plane_state *plane_state)void dc_gamma_retain (struct dc_gamma *gamma) { -ASSERT (gamma->ref_count >0 ); - ++gamma->ref_count; +ASSERT (atomic_read (&gamma->ref_count) >0 ); +atomic_inc (&gamma->ref_count); }void dc_gamma_release (struct dc_gamma **gamma) { -ASSERT ((*gamma)->ref_count >0 ); - --(*gamma)->ref_count; +ASSERT (atomic_read (&(*gamma)->ref_count) >0 ); +atomic_dec (&(*gamma)->ref_count); -if ((*gamma)->ref_count ==0 ) +if (atomic_read (&(*gamma)->ref_count) ==0 )dm_free ((*gamma)); *gamma =NULL ;
@@ -161,7 +161,7 @@ struct dc_gamma *dc_create_gamma()if (gamma ==NULL ) goto alloc_fail; - ++gamma->ref_count; +atomic_inc (&gamma->ref_count);return gamma;
@@ -171,16 +171,16 @@ struct dc_gamma *dc_create_gamma()void dc_transfer_func_retain (struct dc_transfer_func *tf) { -ASSERT (tf->ref_count >0 ); - ++tf->ref_count; +ASSERT (atomic_read (&tf->ref_count) >0 ); +atomic_inc (&tf->ref_count); }void dc_transfer_func_release (struct dc_transfer_func *tf) { -ASSERT (tf->ref_count >0 ); - --tf->ref_count; +ASSERT (atomic_read (&tf->ref_count) >0 ); +atomic_dec (&tf->ref_count); -if (tf->ref_count ==0 ) +if (atomic_read (&tf->ref_count) ==0 )dm_free (tf); }
@@ -191,7 +191,7 @@ struct dc_transfer_func *dc_create_transfer_func()if (tf ==NULL ) goto alloc_fail; - ++tf->ref_count; +atomic_inc (&tf->ref_count);return tf;
drivers/gpu/drm/amd/display/dc/dc.h +4 -4
@@ -295,7 +295,7 @@ struct dc_transfer_func {enum dc_transfer_func_type type;enum dc_transfer_func_predefined tf;struct dc_context *ctx; -int ref_count; +atomic_t ref_count; };/*
@@ -342,7 +342,7 @@ struct dc_plane_state {/* private to dc_surface.c */ enum dc_irq_source irq_source; -int ref_count; +atomic_t ref_count; };struct dc_plane_info {
@@ -518,7 +518,7 @@ struct dc_stream_state {struct dc_stream_status status;/* from stream struct */ -int ref_count; +atomic_t ref_count; };struct dc_stream_update {
@@ -902,7 +902,7 @@ struct dc_sink {struct dc_context *ctx;/* private to dc_sink.c */ -int ref_count; +atomic_t ref_count; };void dc_sink_retain (struct dc_sink *sink);
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +1 -1
@@ -433,7 +433,7 @@ struct dc_gamma {struct dc_context *ctx;/* private to dc_surface.c */ -int ref_count; +atomic_t ref_count; };/* Used by both ipp amd opp functions*/
drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 -1
@@ -260,7 +260,7 @@ struct validate_context {struct dcn_bw_internal_vars dcn_bw_vars;#endif - int ref_count; + atomic_t ref_count; };#endif /* _CORE_TYPES_H_ */
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/77 drm/amd/display: add display write back(DWB)
In reply to a message not in the archiveFrom: Duke Du <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 + drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 87 ++- .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 8 + drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 652 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 32 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 9 + drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 4 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 193 ++++++ 11 files changed, 1003 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h create mode 100644 drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h
drivers/gpu/drm/amd/display/dc/core/dc.c +10 -0
@@ -1749,6 +1749,16 @@ struct dc_link *dc_get_link_at_index(const struct dc *dc, uint32_t link_index)return core_dc->links[link_index]; } +struct dwbc *dc_get_dwb_at_pipe (const struct dc *dc,uint32_t pipe) +{ +struct core_dc *core_dc =DC_TO_CORE (dc); +if ((pipe >= dwb_pipe0) && (pipe < dwb_pipe_max_num)) { +return core_dc->res_pool->dwbc[(int )pipe]; + }else { +return NULL ; + } +} +const struct graphics_object_id dc_get_link_id_at_index (struct dc *dc,uint32_t link_index) {
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
@@ -797,6 +797,8 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);*/ struct dc_link *dc_get_link_at_index (const struct dc *dc,uint32_t link_index); +struct dwbc *dc_get_dwb_at_pipe (const struct dc *dc,uint32_t pipe); +/* Return id of physical connector represented by a dc_link at link_index.*/ const struct graphics_object_id dc_get_link_id_at_index (struct dc *dc,uint32_t link_index);
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +86 -1
105 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h +8 -0
@@ -55,6 +55,8 @@CS_SF (PHYPLLA_PIXCLK_RESYNC_CNTL ,PHYPLLA_DCCG_DEEP_COLOR_CNTL , mask_sh),\ CS_SF(PHYPLLA_PIXCLK_RESYNC_CNTL, PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE, mask_sh) +#if defined(CONFIG_DRM_AMD_DC_DCN1_0 ) +#define CS_COMMON_REG_LIST_DCN1_0 (index, pllid) \ SRI(PIXCLK_RESYNC_CNTL, PHYPLL, pllid),\ SRII(PHASE, DP_DTO, 0),\
@@ -71,9 +73,13 @@ SRII(PIXEL_RATE_CNTL, OTG, 3)#define CS_COMMON_MASK_SH_LIST_DCN1_0 (mask_sh)\ + CS_SF(DP_DTO0_PHASE, DP_DTO0_PHASE, mask_sh),\ + CS_SF(DP_DTO0_MODULO, DP_DTO0_MODULO, mask_sh),\ CS_SF(PHYPLLA_PIXCLK_RESYNC_CNTL, PHYPLLA_DCCG_DEEP_COLOR_CNTL, mask_sh),\ CS_SF(OTG0_PIXEL_RATE_CNTL, DP_DTO0_ENABLE, mask_sh) +#endif +#define CS_REG_FIELD_LIST (type) \ type PLL_REF_DIV_SRC; \ type DCCG_DEEP_COLOR_CNTL1; \
@@ -81,6 +87,8 @@type PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE ; \type PLL_POST_DIV_PIXCLK ; \type PLL_REF_DIV ; \ +type DP_DTO0_PHASE ; \ +type DP_DTO0_MODULO ; \type DP_DTO0_ENABLE ;struct dce110_clk_src_shift {
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
@@ -3,7 +3,7 @@ DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ dcn10_dpp.o dcn10_opp.o dcn10_timing_generator.o \ - dcn10_mem_input.o dcn10_mpc.o + dcn10_mem_input.o dcn10_mpc.o dcn10_dwb.o AMD_DAL_DCN10 = $(addprefix $(AMDDALPATH)/dc/dcn10/,$(DCN10))
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c new file +652 -0
652 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h new file +32 -0
@@ -0,0 +1,32 @@ +/* Copyright 2012-17 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 __DC_DWBC_DCN10_H__ +#define __DC_DWBC_DCN10_H__ + +#if defined(CONFIG_DRM_AMD_DC_DCN1_0 ) + +bool dcn10_dwbc_create (struct dc_context *ctx,struct resource_pool *pool); +#endif + +#endif
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +9 -0
@@ -32,6 +32,7 @@#include "dcn10/dcn10_ipp.h" #include "dcn10/dcn10_mpc.h" +#include "dcn10/dcn10_dwb.h" #include "irq/dcn10/irq_service_dcn10.h" #include "dcn10/dcn10_dpp.h" #include "dcn10/dcn10_timing_generator.h"
@@ -410,6 +411,7 @@ static const struct resource_caps res_cap = { .num_audio = 4, .num_stream_encoder = 4, .num_pll = 4, + .num_dwb = 2, };static const struct dc_debug debug_defaults_drv = {
@@ -1410,6 +1412,12 @@ static bool construct( goto mpc_create_fail; } +#if defined(CONFIG_DRM_AMD_DC_DCN1_0 ) +if (!dcn10_dwbc_create (ctx, &pool->base)) { + goto dwbc_create_fail; + } +#endif +if (!resource_construct (num_virtual_links, dc, &pool->base, (!IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment) ? &res_create_funcs : &res_create_maximus_funcs)))
@@ -1432,6 +1440,7 @@ static bool construct( irqs_create_fail: res_create_fail: clock_source_create_fail: +dwbc_create_fail:destruct (pool);
drivers/gpu/drm/amd/display/dc/inc/clock_source.h +4 -0
@@ -166,6 +166,10 @@ struct clock_source_funcs { struct clock_source *, struct pixel_clk_params *, struct pll_settings *); +uint32_t (*get_pix_rate_in_hz)( +struct clock_source *, +struct pixel_clk_params *, +struct pll_settings *); };struct clock_source {
drivers/gpu/drm/amd/display/dc/inc/core_types.h +6 -0
@@ -32,7 +32,10 @@#include "ddc_service_types.h" #include "dc_bios_types.h" #include "mem_input.h" +#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )#include "mpc.h" +#endif +#include "dwb.h" #define MAX_CLOCK_SOURCES 7
@@ -125,6 +128,8 @@ struct resource_pool {struct mpc *mpc;#endif +struct dwbc *dwbc[MAX_DWB_PIPES ]; +unsigned int pipe_count;unsigned int underlay_pipe_index;unsigned int stream_enc_count;
@@ -193,6 +198,7 @@ struct pipe_ctx {struct _vcs_dpi_display_rq_regs_st rq_regs;struct _vcs_dpi_display_pipe_dest_params_st pipe_dlg_param;#endif +struct dwbc *dwbc; };struct resource_context {
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h new file +193 -0
193 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170831180912.5898-4-harry.wentland-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 03/77] drm/amd/display: add display write back(DWB)
Quoted 1 line · Harry Wentland
From: Duke Du <[email protected]>
I happened to look at dwb stuff in passing today.
there is a bunch of dwb API that look to be never called, and a bunch of over engineered interfaces.
Comments inline:
Quoted 17 lines
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h new file +17
-0+struct dwbc_funcs { +bool (*get_caps)(struct dwbc *dwbc,struct dwb_caps *caps); + +bool (*enable)(struct dwbc *dwbc); + +bool (*disable)(struct dwbc *dwbc); + +bool (*get_status)(struct dwbc *dwbc,struct dwb_status *status); + +bool (*dump_frame)(struct dwbc *dwbc,struct dwb_frame_info *frame_info, +unsigned char *luma_buffer,unsigned char *chroma_buffer, +unsigned char *dest_luma_buffer,unsigned char *dest_chroma_buffer); + +bool (*set_basic_settings)(struct dwbc *dwbc, +const struct dwb_basic_settings *basic_settings); + + bool (*get_basic_settings)(struct dwbc *dwbc,
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h line 191
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h new file +10
-0+ struct dwb_basic_settings *basic_settings); + +bool (*set_advanced_settings)(struct dwbc *dwbc, +const struct dwb_advanced_settings *advanced_settings); + +bool (*get_advanced_settings)(struct dwbc *dwbc, +struct dwb_advanced_settings *advanced_settings); + +bool (*reset_advanced_settings)(struct dwbc *dwbc); +};
So a fair few of these return bool for no reason, and accept NULL as a parameter,
returning true or false. this is all pointless, apart from the fact that no code currently
calls these, calling APIs and passing NULL should be caught with code inspection,
not adding error paths that nobody will ever test.
If your API expects something assert on it being there, don't add true/false return values.
Dave.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/77 drm/amd/display: change bw_dceip and bw_vbios into pointers
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
-Change bw_calcs_dceip into pointer
-Change bw_calcs_vbios into pointer
This is needed for flattening of core_dc into dc, as without this the diags build fails
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 34 +++++++-------- .../drm/amd/display/dc/dce112/dce112_resource.c | 50 +++++++++++----------- .../drm/amd/display/dc/dce120/dce120_resource.c | 24 +++++------ drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 4 +- 6 files changed, 83 insertions(+), 57 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +26 -0
@@ -433,6 +433,13 @@ static void destruct(struct core_dc *dc)dm_free (dc->ctx); dc->ctx =NULL ; + +dm_free (dc->bw_vbios); + dc->bw_vbios =NULL ; + +dm_free (dc->bw_dceip); + dc->bw_dceip =NULL ; + } static bool construct(struct core_dc *dc,
@@ -440,8 +447,25 @@ static bool construct(struct core_dc *dc, {struct dal_logger *logger;struct dc_context *dc_ctx =dm_alloc (sizeof (*dc_ctx)); +struct bw_calcs_dceip *dc_dceip =dm_alloc (sizeof (*dc_dceip)); +struct bw_calcs_vbios *dc_vbios =dm_alloc (sizeof (*dc_vbios)); +enum dce_version dc_version =DCE_VERSION_UNKNOWN ; +if (!dc_dceip) { +dm_error ("%s: failed to create dceip\n" , __func__); + goto dceip_fail; + } + + dc->bw_dceip = dc_dceip; + +if (!dc_vbios) { +dm_error ("%s: failed to create vbios\n" , __func__); + goto vbios_fail; + } + + dc->bw_vbios = dc_vbios; +if (!dc_ctx) {dm_error ("%s: failed to create ctx\n" , __func__); goto ctx_fail;
@@ -544,6 +568,8 @@ static bool construct(struct core_dc *dc, logger_fail: val_ctx_fail: ctx_fail: +dceip_fail: +vbios_fail:destruct (dc);return false; }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -1
@@ -1264,7 +1264,7 @@ void dce110_set_displaymarks(continue ; total_dest_line_time_ns =compute_pstate_blackout_duration ( - dc->bw_vbios.blackout_duration, pipe_ctx->stream); + dc->bw_vbios->blackout_duration, pipe_ctx->stream); pipe_ctx->plane_res.mi->funcs->mem_input_program_display_marks( pipe_ctx->plane_res.mi, context->bw.dce.nbp_state_change_wm_ns[num_pipes],
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +17 -17
@@ -826,8 +826,8 @@ static bool dce110_validate_bandwidth(if (bw_calcs ( dc->ctx, - &dc->bw_dceip, - &dc->bw_vbios, + dc->bw_dceip, + dc->bw_vbios, context->res_ctx.pipe_ctx, dc->res_pool->pipe_count, &context->bw.dce))
@@ -1127,21 +1127,21 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc)DM_PP_CLOCK_TYPE_ENGINE_CLK , &clks);/* convert all the clock fro kHz to fix point mHz */ - dc->bw_vbios.high_sclk =bw_frc_to_fixed ( + dc->bw_vbios->high_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels-1 ],1000 ); - dc->bw_vbios.mid1_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid1_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels/8 ],1000 ); - dc->bw_vbios.mid2_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid2_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels*2 /8 ],1000 ); - dc->bw_vbios.mid3_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid3_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels*3 /8 ],1000 ); - dc->bw_vbios.mid4_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid4_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels*4 /8 ],1000 ); - dc->bw_vbios.mid5_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid5_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels*5 /8 ],1000 ); - dc->bw_vbios.mid6_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid6_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels*6 /8 ],1000 ); - dc->bw_vbios.low_sclk =bw_frc_to_fixed ( + dc->bw_vbios->low_sclk =bw_frc_to_fixed ( clks.clocks_in_khz[0 ],1000 ); dc->sclk_lvls = clks;
@@ -1150,11 +1150,11 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc) dc->ctx,DM_PP_CLOCK_TYPE_DISPLAY_CLK , &clks); - dc->bw_vbios.high_voltage_max_dispclk =bw_frc_to_fixed ( + dc->bw_vbios->high_voltage_max_dispclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels-1 ],1000 ); - dc->bw_vbios.mid_voltage_max_dispclk =bw_frc_to_fixed ( + dc->bw_vbios->mid_voltage_max_dispclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels>>1 ],1000 ); - dc->bw_vbios.low_voltage_max_dispclk =bw_frc_to_fixed ( + dc->bw_vbios->low_voltage_max_dispclk =bw_frc_to_fixed ( clks.clocks_in_khz[0 ],1000 );/*do memory clock*/
@@ -1163,12 +1163,12 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc)DM_PP_CLOCK_TYPE_MEMORY_CLK , &clks); - dc->bw_vbios.low_yclk =bw_frc_to_fixed ( + dc->bw_vbios->low_yclk =bw_frc_to_fixed ( clks.clocks_in_khz[0 ] *MEMORY_TYPE_MULTIPLIER ,1000 ); - dc->bw_vbios.mid_yclk =bw_frc_to_fixed ( + dc->bw_vbios->mid_yclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels>>1 ] *MEMORY_TYPE_MULTIPLIER ,1000 ); - dc->bw_vbios.high_yclk =bw_frc_to_fixed ( + dc->bw_vbios->high_yclk =bw_frc_to_fixed ( clks.clocks_in_khz[clks.num_levels-1 ] *MEMORY_TYPE_MULTIPLIER ,1000 ); }
@@ -1353,7 +1353,7 @@ static bool construct( dc->public.caps.max_planes = pool->base.pipe_count; -bw_calcs_init (&dc->bw_dceip, &dc->bw_vbios, dc->ctx->asic_id); +bw_calcs_init (dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);bw_calcs_data_update_from_pplib (dc);
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +25 -25
106 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +12 -12
@@ -729,21 +729,21 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc) }/* convert all the clock fro kHz to fix point mHz TODO: wloop data */ - dc->bw_vbios.high_sclk =bw_frc_to_fixed ( + dc->bw_vbios->high_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels-1 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid1_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid1_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels/8 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid2_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid2_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels*2 /8 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid3_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid3_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels*3 /8 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid4_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid4_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels*4 /8 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid5_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid5_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels*5 /8 ].clocks_in_khz,1000 ); - dc->bw_vbios.mid6_sclk =bw_frc_to_fixed ( + dc->bw_vbios->mid6_sclk =bw_frc_to_fixed ( eng_clks.data[eng_clks.num_levels*6 /8 ].clocks_in_khz,1000 ); - dc->bw_vbios.low_sclk =bw_frc_to_fixed ( + dc->bw_vbios->low_sclk =bw_frc_to_fixed ( eng_clks.data[0 ].clocks_in_khz,1000 );/*do memory clock*/
@@ -770,12 +770,12 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc)* ALSO always convert UMA clock (from PPLIB) to YCLK (HW formula): * YCLK = UMACLK*m_memoryTypeMultiplier */ - dc->bw_vbios.low_yclk =bw_frc_to_fixed ( + dc->bw_vbios->low_yclk =bw_frc_to_fixed ( mem_clks.data[0 ].clocks_in_khz *MEMORY_TYPE_MULTIPLIER ,1000 ); - dc->bw_vbios.mid_yclk =bw_frc_to_fixed ( + dc->bw_vbios->mid_yclk =bw_frc_to_fixed ( mem_clks.data[mem_clks.num_levels>>1 ].clocks_in_khz *MEMORY_TYPE_MULTIPLIER ,1000 ); - dc->bw_vbios.high_yclk =bw_frc_to_fixed ( + dc->bw_vbios->high_yclk =bw_frc_to_fixed ( mem_clks.data[mem_clks.num_levels-1 ].clocks_in_khz *MEMORY_TYPE_MULTIPLIER ,1000 );
@@ -984,7 +984,7 @@ static bool construct( dc->public.caps.max_planes = pool->base.pipe_count; -bw_calcs_init (&dc->bw_dceip, &dc->bw_vbios, dc->ctx->asic_id); +bw_calcs_init (dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);bw_calcs_data_update_from_pplib (dc);
drivers/gpu/drm/amd/display/dc/inc/core_dc.h +2 -2
@@ -29,8 +29,8 @@ struct core_dc {struct dm_pp_clock_levels sclk_lvls;/* Inputs into BW and WM calculations. */ -struct bw_calcs_dceip bw_dceip; -struct bw_calcs_vbios bw_vbios; +struct bw_calcs_dceip *bw_dceip; +struct bw_calcs_vbios *bw_vbios;#ifdef CONFIG_DRM_AMD_DC_DCN1_0 struct dcn_soc_bounding_box dcn_soc;struct dcn_ip_params dcn_ip;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/77 drm/amd/display: Add comment explaining context free
In reply to a message not in the archiveFrom: Corbin McElhanney <[email protected]>
This comment explains a previous change that adds some complexity to the context free in dc:
commit 9ad58779a895 ("drm/amd/display: Fix accessing freed memory")
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +9 -0
@@ -1740,6 +1740,15 @@ void dc_update_planes_and_stream(struct dc *dc, }if (core_dc->current_context != context) { + +/* Since memory free requires elevated IRQL, an interrupt +* request is generated by mem free. If this happens +* between freeing and reassigning the context, our vsync +* interrupt will call into dc and cause a memory +* corruption BSOD. Hence, we first reassign the context, +* then free the old context. +*/ +struct validate_context *old = core_dc->current_context; core_dc->current_context = context;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/77 drm/amd/display: change dcn_ip and dcn_soc into pointers
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
-Change dcn_ip into pointer
-Change dcn_soc into pointer
This is needed for flattening of core_dc into dc, as without this the diags build fails
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 553 +++++++++++---------- drivers/gpu/drm/amd/display/dc/core/dc.c | 59 ++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 28 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 4 +- 4 files changed, 331 insertions(+), 313 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +277 -276
@@ -457,7 +457,7 @@ static void dcn_bw_calc_rq_dlg_ttu( }/*todo: soc->sr_enter_plus_exit_time??*/ - dlg_sys_param.t_srx_delay_us = dc->dcn_ip.dcfclk_cstate_latency / v->dcf_clk_deep_sleep; + dlg_sys_param.t_srx_delay_us = dc->dcn_ip->dcfclk_cstate_latency / v->dcf_clk_deep_sleep;dml_rq_dlg_get_rq_params (dml, &rq_param, input.pipe.src);extract_rq_regs (dml, rq_regs, rq_param);
@@ -679,39 +679,39 @@ static bool dcn_bw_apply_registry_override(struct core_dc *dc)bool updated = false;kernel_fpu_begin (); -if ((int )(dc->dcn_soc.sr_exit_time *1000 ) != dc->public.debug.sr_exit_time_ns +if ((int )(dc->dcn_soc->sr_exit_time *1000 ) != dc->public.debug.sr_exit_time_ns && dc->public.debug.sr_exit_time_ns) { updated = true; - dc->dcn_soc.sr_exit_time = dc->public.debug.sr_exit_time_ns /1000.0 ; + dc->dcn_soc->sr_exit_time = dc->public.debug.sr_exit_time_ns /1000.0 ; } -if ((int )(dc->dcn_soc.sr_enter_plus_exit_time *1000 ) +if ((int )(dc->dcn_soc->sr_enter_plus_exit_time *1000 ) != dc->public.debug.sr_enter_plus_exit_time_ns && dc->public.debug.sr_enter_plus_exit_time_ns) { updated = true; - dc->dcn_soc.sr_enter_plus_exit_time = + dc->dcn_soc->sr_enter_plus_exit_time = dc->public.debug.sr_enter_plus_exit_time_ns /1000.0 ; } -if ((int )(dc->dcn_soc.urgent_latency *1000 ) != dc->public.debug.urgent_latency_ns +if ((int )(dc->dcn_soc->urgent_latency *1000 ) != dc->public.debug.urgent_latency_ns && dc->public.debug.urgent_latency_ns) { updated = true; - dc->dcn_soc.urgent_latency = dc->public.debug.urgent_latency_ns /1000.0 ; + dc->dcn_soc->urgent_latency = dc->public.debug.urgent_latency_ns /1000.0 ; } -if ((int )(dc->dcn_soc.percent_of_ideal_drambw_received_after_urg_latency *1000 ) +if ((int )(dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency *1000 ) != dc->public.debug.percent_of_ideal_drambw && dc->public.debug.percent_of_ideal_drambw) { updated = true; - dc->dcn_soc.percent_of_ideal_drambw_received_after_urg_latency = + dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency = dc->public.debug.percent_of_ideal_drambw; } -if ((int )(dc->dcn_soc.dram_clock_change_latency *1000 ) +if ((int )(dc->dcn_soc->dram_clock_change_latency *1000 ) != dc->public.debug.dram_clock_change_latency_ns && dc->public.debug.dram_clock_change_latency_ns) { updated = true; - dc->dcn_soc.dram_clock_change_latency = + dc->dcn_soc->dram_clock_change_latency = dc->public.debug.dram_clock_change_latency_ns /1000.0 ; }kernel_fpu_end ();
@@ -735,83 +735,83 @@ bool dcn_validate_bandwidth(memset (v,0 ,sizeof (*v));kernel_fpu_begin (); - v->sr_exit_time = dc->dcn_soc.sr_exit_time; - v->sr_enter_plus_exit_time = dc->dcn_soc.sr_enter_plus_exit_time; - v->urgent_latency = dc->dcn_soc.urgent_latency; - v->write_back_latency = dc->dcn_soc.write_back_latency; + v->sr_exit_time = dc->dcn_soc->sr_exit_time; + v->sr_enter_plus_exit_time = dc->dcn_soc->sr_enter_plus_exit_time; + v->urgent_latency = dc->dcn_soc->urgent_latency; + v->write_back_latency = dc->dcn_soc->write_back_latency; v->percent_of_ideal_drambw_received_after_urg_latency = - dc->dcn_soc.percent_of_ideal_drambw_received_after_urg_latency; - - v->dcfclkv_min0p65 = dc->dcn_soc.dcfclkv_min0p65; - v->dcfclkv_mid0p72 = dc->dcn_soc.dcfclkv_mid0p72; - v->dcfclkv_nom0p8 = dc->dcn_soc.dcfclkv_nom0p8; - v->dcfclkv_max0p9 = dc->dcn_soc.dcfclkv_max0p9; - - v->max_dispclk_vmin0p65 = dc->dcn_soc.max_dispclk_vmin0p65; - v->max_dispclk_vmid0p72 = dc->dcn_soc.max_dispclk_vmid0p72; - v->max_dispclk_vnom0p8 = dc->dcn_soc.max_dispclk_vnom0p8; - v->max_dispclk_vmax0p9 = dc->dcn_soc.max_dispclk_vmax0p9; - - v->max_dppclk_vmin0p65 = dc->dcn_soc.max_dppclk_vmin0p65; - v->max_dppclk_vmid0p72 = dc->dcn_soc.max_dppclk_vmid0p72; - v->max_dppclk_vnom0p8 = dc->dcn_soc.max_dppclk_vnom0p8; - v->max_dppclk_vmax0p9 = dc->dcn_soc.max_dppclk_vmax0p9; - - v->socclk = dc->dcn_soc.socclk; - - v->fabric_and_dram_bandwidth_vmin0p65 = dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65; - v->fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72; - v->fabric_and_dram_bandwidth_vnom0p8 = dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8; - v->fabric_and_dram_bandwidth_vmax0p9 = dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9; - - v->phyclkv_min0p65 = dc->dcn_soc.phyclkv_min0p65; - v->phyclkv_mid0p72 = dc->dcn_soc.phyclkv_mid0p72; - v->phyclkv_nom0p8 = dc->dcn_soc.phyclkv_nom0p8; - v->phyclkv_max0p9 = dc->dcn_soc.phyclkv_max0p9; - - v->downspreading = dc->dcn_soc.downspreading; - v->round_trip_ping_latency_cycles = dc->dcn_soc.round_trip_ping_latency_cycles; - v->urgent_out_of_order_return_per_channel = dc->dcn_soc.urgent_out_of_order_return_per_channel; - v->number_of_channels = dc->dcn_soc.number_of_channels; - v->vmm_page_size = dc->dcn_soc.vmm_page_size; - v->dram_clock_change_latency = dc->dcn_soc.dram_clock_change_latency; - v->return_bus_width = dc->dcn_soc.return_bus_width; - - v->rob_buffer_size_in_kbyte = dc->dcn_ip.rob_buffer_size_in_kbyte; - v->det_buffer_size_in_kbyte = dc->dcn_ip.det_buffer_size_in_kbyte; - v->dpp_output_buffer_pixels = dc->dcn_ip.dpp_output_buffer_pixels; - v->opp_output_buffer_lines = dc->dcn_ip.opp_output_buffer_lines; - v->pixel_chunk_size_in_kbyte = dc->dcn_ip.pixel_chunk_size_in_kbyte; - v->pte_enable = dc->dcn_ip.pte_enable; - v->pte_chunk_size = dc->dcn_ip.pte_chunk_size; - v->meta_chunk_size = dc->dcn_ip.meta_chunk_size; - v->writeback_chunk_size = dc->dcn_ip.writeback_chunk_size; - v->odm_capability = dc->dcn_ip.odm_capability; - v->dsc_capability = dc->dcn_ip.dsc_capability; - v->line_buffer_size = dc->dcn_ip.line_buffer_size; - v->is_line_buffer_bpp_fixed = dc->dcn_ip.is_line_buffer_bpp_fixed; - v->line_buffer_fixed_bpp = dc->dcn_ip.line_buffer_fixed_bpp; - v->max_line_buffer_lines = dc->dcn_ip.max_line_buffer_lines; - v->writeback_luma_buffer_size = dc->dcn_ip.writeback_luma_buffer_size; - v->writeback_chroma_buffer_size = dc->dcn_ip.writeback_chroma_buffer_size; - v->max_num_dpp = dc->dcn_ip.max_num_dpp; - v->max_num_writeback = dc->dcn_ip.max_num_writeback; - v->max_dchub_topscl_throughput = dc->dcn_ip.max_dchub_topscl_throughput; - v->max_pscl_tolb_throughput = dc->dcn_ip.max_pscl_tolb_throughput; - v->max_lb_tovscl_throughput = dc->dcn_ip.max_lb_tovscl_throughput; - v->max_vscl_tohscl_throughput = dc->dcn_ip.max_vscl_tohscl_throughput; - v->max_hscl_ratio = dc->dcn_ip.max_hscl_ratio; - v->max_vscl_ratio = dc->dcn_ip.max_vscl_ratio; - v->max_hscl_taps = dc->dcn_ip.max_hscl_taps; - v->max_vscl_taps = dc->dcn_ip.max_vscl_taps; - v->under_scan_factor = dc->dcn_ip.under_scan_factor; - v->pte_buffer_size_in_requests = dc->dcn_ip.pte_buffer_size_in_requests; - v->dispclk_ramping_margin = dc->dcn_ip.dispclk_ramping_margin; - v->max_inter_dcn_tile_repeaters = dc->dcn_ip.max_inter_dcn_tile_repeaters; + dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency; + + v->dcfclkv_min0p65 = dc->dcn_soc->dcfclkv_min0p65; + v->dcfclkv_mid0p72 = dc->dcn_soc->dcfclkv_mid0p72; + v->dcfclkv_nom0p8 = dc->dcn_soc->dcfclkv_nom0p8; + v->dcfclkv_max0p9 = dc->dcn_soc->dcfclkv_max0p9; + + v->max_dispclk_vmin0p65 = dc->dcn_soc->max_dispclk_vmin0p65; + v->max_dispclk_vmid0p72 = dc->dcn_soc->max_dispclk_vmid0p72; + v->max_dispclk_vnom0p8 = dc->dcn_soc->max_dispclk_vnom0p8; + v->max_dispclk_vmax0p9 = dc->dcn_soc->max_dispclk_vmax0p9; + + v->max_dppclk_vmin0p65 = dc->dcn_soc->max_dppclk_vmin0p65; + v->max_dppclk_vmid0p72 = dc->dcn_soc->max_dppclk_vmid0p72; + v->max_dppclk_vnom0p8 = dc->dcn_soc->max_dppclk_vnom0p8; + v->max_dppclk_vmax0p9 = dc->dcn_soc->max_dppclk_vmax0p9; + + v->socclk = dc->dcn_soc->socclk; + + v->fabric_and_dram_bandwidth_vmin0p65 = dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65; + v->fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72; + v->fabric_and_dram_bandwidth_vnom0p8 = dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8; + v->fabric_and_dram_bandwidth_vmax0p9 = dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9; + + v->phyclkv_min0p65 = dc->dcn_soc->phyclkv_min0p65; + v->phyclkv_mid0p72 = dc->dcn_soc->phyclkv_mid0p72; + v->phyclkv_nom0p8 = dc->dcn_soc->phyclkv_nom0p8; + v->phyclkv_max0p9 = dc->dcn_soc->phyclkv_max0p9; + + v->downspreading = dc->dcn_soc->downspreading; + v->round_trip_ping_latency_cycles = dc->dcn_soc->round_trip_ping_latency_cycles; + v->urgent_out_of_order_return_per_channel = dc->dcn_soc->urgent_out_of_order_return_per_channel; + v->number_of_channels = dc->dcn_soc->number_of_channels; + v->vmm_page_size = dc->dcn_soc->vmm_page_size; + v->dram_clock_change_latency = dc->dcn_soc->dram_clock_change_latency; + v->return_bus_width = dc->dcn_soc->return_bus_width; + + v->rob_buffer_size_in_kbyte = dc->dcn_ip->rob_buffer_size_in_kbyte; + v->det_buffer_size_in_kbyte = dc->dcn_ip->det_buffer_size_in_kbyte; + v->dpp_output_buffer_pixels = dc->dcn_ip->dpp_output_buffer_pixels; + v->opp_output_buffer_lines = dc->dcn_ip->opp_output_buffer_lines; + v->pixel_chunk_size_in_kbyte = dc->dcn_ip->pixel_chunk_size_in_kbyte; + v->pte_enable = dc->dcn_ip->pte_enable; + v->pte_chunk_size = dc->dcn_ip->pte_chunk_size; + v->meta_chunk_size = dc->dcn_ip->meta_chunk_size; + v->writeback_chunk_size = dc->dcn_ip->writeback_chunk_size; + v->odm_capability = dc->dcn_ip->odm_capability; + v->dsc_capability = dc->dcn_ip->dsc_capability; + v->line_buffer_size = dc->dcn_ip->line_buffer_size; + v->is_line_buffer_bpp_fixed = dc->dcn_ip->is_line_buffer_bpp_fixed; + v->line_buffer_fixed_bpp = dc->dcn_ip->line_buffer_fixed_bpp; + v->max_line_buffer_lines = dc->dcn_ip->max_line_buffer_lines; + v->writeback_luma_buffer_size = dc->dcn_ip->writeback_luma_buffer_size; + v->writeback_chroma_buffer_size = dc->dcn_ip->writeback_chroma_buffer_size; + v->max_num_dpp = dc->dcn_ip->max_num_dpp; + v->max_num_writeback = dc->dcn_ip->max_num_writeback; + v->max_dchub_topscl_throughput = dc->dcn_ip->max_dchub_topscl_throughput; + v->max_pscl_tolb_throughput = dc->dcn_ip->max_pscl_tolb_throughput; + v->max_lb_tovscl_throughput = dc->dcn_ip->max_lb_tovscl_throughput; + v->max_vscl_tohscl_throughput = dc->dcn_ip->max_vscl_tohscl_throughput; + v->max_hscl_ratio = dc->dcn_ip->max_hscl_ratio; + v->max_vscl_ratio = dc->dcn_ip->max_vscl_ratio; + v->max_hscl_taps = dc->dcn_ip->max_hscl_taps; + v->max_vscl_taps = dc->dcn_ip->max_vscl_taps; + v->under_scan_factor = dc->dcn_ip->under_scan_factor; + v->pte_buffer_size_in_requests = dc->dcn_ip->pte_buffer_size_in_requests; + v->dispclk_ramping_margin = dc->dcn_ip->dispclk_ramping_margin; + v->max_inter_dcn_tile_repeaters = dc->dcn_ip->max_inter_dcn_tile_repeaters; v->can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one = - dc->dcn_ip.can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one; + dc->dcn_ip->can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one; v->bug_forcing_luma_and_chroma_request_to_same_size_fixed = - dc->dcn_ip.bug_forcing_luma_and_chroma_request_to_same_size_fixed; + dc->dcn_ip->bug_forcing_luma_and_chroma_request_to_same_size_fixed; v->voltage[5 ] = dcn_bw_no_support; v->voltage[4 ] = dcn_bw_v_max0p9;
@@ -1021,7 +1021,7 @@ bool dcn_validate_bandwidth( context->bw.dcn.calc_clk.dcfclk_khz = (int )(v->dcfclk *1000 ); context->bw.dcn.calc_clk.dispclk_khz = (int )(v->dispclk *1000 );if (dc->public.debug.max_disp_clk == true) - context->bw.dcn.calc_clk.dispclk_khz = (int )(dc->dcn_soc.max_dispclk_vmax0p9 *1000 ); + context->bw.dcn.calc_clk.dispclk_khz = (int )(dc->dcn_soc->max_dispclk_vmax0p9 *1000 ); context->bw.dcn.calc_clk.dppclk_div = (int )(v->dispclk_dppclk_ratio) ==2 ;for (i =0 , input_idx =0 ; i < pool->pipe_count; i++) {
@@ -1118,15 +1118,15 @@ bool dcn_validate_bandwidth(struct core_dc *dc_core =DC_TO_CORE (&dc->public); dc_core->dml.soc.sr_enter_plus_exit_time_us = - dc_core->dcn_soc.sr_enter_plus_exit_time; - dc_core->dml.soc.sr_exit_time_us = dc_core->dcn_soc.sr_exit_time; + dc_core->dcn_soc->sr_enter_plus_exit_time; + dc_core->dml.soc.sr_exit_time_us = dc_core->dcn_soc->sr_exit_time; }/* * BW limit is set to prevent display from impacting other system functions */ - bw_limit = dc->dcn_soc.percent_disp_bw_limit * v->fabric_and_dram_bandwidth_vmax0p9; + bw_limit = dc->dcn_soc->percent_disp_bw_limit * v->fabric_and_dram_bandwidth_vmax0p9; bw_limit_pass = (v->total_data_read_bandwidth /1000.0 ) < bw_limit;kernel_fpu_end ();
@@ -1149,41 +1149,41 @@ unsigned int dcn_find_normalized_clock_vdd_Level(switch (clocks_type) {case DM_PP_CLOCK_TYPE_DISPLAY_CLK : -if (clocks_in_khz > dc->dcn_soc.max_dispclk_vmax0p9*1000 ) { +if (clocks_in_khz > dc->dcn_soc->max_dispclk_vmax0p9*1000 ) { vdd_level = dcn_bw_v_max0p91;BREAK_TO_DEBUGGER (); - }else if (clocks_in_khz > dc->dcn_soc.max_dispclk_vnom0p8*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dispclk_vnom0p8*1000 ) { vdd_level = dcn_bw_v_max0p9; - }else if (clocks_in_khz > dc->dcn_soc.max_dispclk_vmid0p72*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dispclk_vmid0p72*1000 ) { vdd_level = dcn_bw_v_nom0p8; - }else if (clocks_in_khz > dc->dcn_soc.max_dispclk_vmin0p65*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dispclk_vmin0p65*1000 ) { vdd_level = dcn_bw_v_mid0p72; }else vdd_level = dcn_bw_v_min0p65;break ;case DM_PP_CLOCK_TYPE_DISPLAYPHYCLK : -if (clocks_in_khz > dc->dcn_soc.phyclkv_max0p9*1000 ) { +if (clocks_in_khz > dc->dcn_soc->phyclkv_max0p9*1000 ) { vdd_level = dcn_bw_v_max0p91;BREAK_TO_DEBUGGER (); - }else if (clocks_in_khz > dc->dcn_soc.phyclkv_nom0p8*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->phyclkv_nom0p8*1000 ) { vdd_level = dcn_bw_v_max0p9; - }else if (clocks_in_khz > dc->dcn_soc.phyclkv_mid0p72*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->phyclkv_mid0p72*1000 ) { vdd_level = dcn_bw_v_nom0p8; - }else if (clocks_in_khz > dc->dcn_soc.phyclkv_min0p65*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->phyclkv_min0p65*1000 ) { vdd_level = dcn_bw_v_mid0p72; }else vdd_level = dcn_bw_v_min0p65;break ;case DM_PP_CLOCK_TYPE_DPPCLK : -if (clocks_in_khz > dc->dcn_soc.max_dppclk_vmax0p9*1000 ) { +if (clocks_in_khz > dc->dcn_soc->max_dppclk_vmax0p9*1000 ) { vdd_level = dcn_bw_v_max0p91;BREAK_TO_DEBUGGER (); - }else if (clocks_in_khz > dc->dcn_soc.max_dppclk_vnom0p8*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dppclk_vnom0p8*1000 ) { vdd_level = dcn_bw_v_max0p9; - }else if (clocks_in_khz > dc->dcn_soc.max_dppclk_vmid0p72*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dppclk_vmid0p72*1000 ) { vdd_level = dcn_bw_v_nom0p8; - }else if (clocks_in_khz > dc->dcn_soc.max_dppclk_vmin0p65*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->max_dppclk_vmin0p65*1000 ) { vdd_level = dcn_bw_v_mid0p72; }else vdd_level = dcn_bw_v_min0p65;
@@ -1191,15 +1191,16 @@ unsigned int dcn_find_normalized_clock_vdd_Level(case DM_PP_CLOCK_TYPE_MEMORY_CLK : { -unsigned factor = (ddr4_dram_factor_single_Channel * dc->dcn_soc.number_of_channels); -if (clocks_in_khz > dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9*1000000 /factor) { +unsigned factor = (ddr4_dram_factor_single_Channel * dc->dcn_soc->number_of_channels); + +if (clocks_in_khz > dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9*1000000 /factor) { vdd_level = dcn_bw_v_max0p91;BREAK_TO_DEBUGGER (); - }else if (clocks_in_khz > dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8*1000000 /factor) { + }else if (clocks_in_khz > dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8*1000000 /factor) { vdd_level = dcn_bw_v_max0p9; - }else if (clocks_in_khz > dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72*1000000 /factor) { + }else if (clocks_in_khz > dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72*1000000 /factor) { vdd_level = dcn_bw_v_nom0p8; - }else if (clocks_in_khz > dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65*1000000 /factor) { + }else if (clocks_in_khz > dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65*1000000 /factor) { vdd_level = dcn_bw_v_mid0p72; }else vdd_level = dcn_bw_v_min0p65;
@@ -1207,14 +1208,14 @@ unsigned int dcn_find_normalized_clock_vdd_Level(break ;case DM_PP_CLOCK_TYPE_DCFCLK : -if (clocks_in_khz > dc->dcn_soc.dcfclkv_max0p9*1000 ) { +if (clocks_in_khz > dc->dcn_soc->dcfclkv_max0p9*1000 ) { vdd_level = dcn_bw_v_max0p91;BREAK_TO_DEBUGGER (); - }else if (clocks_in_khz > dc->dcn_soc.dcfclkv_nom0p8*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->dcfclkv_nom0p8*1000 ) { vdd_level = dcn_bw_v_max0p9; - }else if (clocks_in_khz > dc->dcn_soc.dcfclkv_mid0p72*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->dcfclkv_mid0p72*1000 ) { vdd_level = dcn_bw_v_nom0p8; - }else if (clocks_in_khz > dc->dcn_soc.dcfclkv_min0p65*1000 ) { + }else if (clocks_in_khz > dc->dcn_soc->dcfclkv_min0p65*1000 ) { vdd_level = dcn_bw_v_mid0p72; }else vdd_level = dcn_bw_v_min0p65;
@@ -1254,15 +1255,15 @@ unsigned int dcn_find_dcfclk_suits_all( vdd_level =dcn_bw_max (vdd_level, vdd_level_temp);if (vdd_level == dcn_bw_v_max0p91) {BREAK_TO_DEBUGGER (); - dcf_clk = dc->dcn_soc.dcfclkv_max0p9*1000 ; + dcf_clk = dc->dcn_soc->dcfclkv_max0p9*1000 ; }else if (vdd_level == dcn_bw_v_max0p9) - dcf_clk = dc->dcn_soc.dcfclkv_max0p9*1000 ; + dcf_clk = dc->dcn_soc->dcfclkv_max0p9*1000 ;else if (vdd_level == dcn_bw_v_nom0p8) - dcf_clk = dc->dcn_soc.dcfclkv_nom0p8*1000 ; + dcf_clk = dc->dcn_soc->dcfclkv_nom0p8*1000 ;else if (vdd_level == dcn_bw_v_mid0p72) - dcf_clk = dc->dcn_soc.dcfclkv_mid0p72*1000 ; + dcf_clk = dc->dcn_soc->dcfclkv_mid0p72*1000 ;else - dcf_clk = dc->dcn_soc.dcfclkv_min0p65*1000 ; + dcf_clk = dc->dcn_soc->dcfclkv_min0p65*1000 ;dm_logger_write (dc->ctx->logger,LOG_HW_MARKS ,"\tdcf_clk for voltage = %d\n" , dcf_clk);
@@ -1282,27 +1283,27 @@ void dcn_bw_update_from_pplib(struct core_dc *dc) ctx, DM_PP_CLOCK_TYPE_FCLK, &clks) && clks.num_levels != 0) {ASSERT (clks.num_levels >=3 ); - dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65 =32 * (clks.data[0 ].clocks_in_khz /1000.0 ) /1000.0 ; + dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 =32 * (clks.data[0 ].clocks_in_khz /1000.0 ) /1000.0 ;if (clks.num_levels >2 ) { - dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc.number_of_channels * + dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc->number_of_channels * (clks.data[clks.num_levels -3 ].clocks_in_khz /1000.0 ) * ddr4_dram_factor_single_Channel /1000.0 ; }else { - dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc.number_of_channels * + dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 = dc->dcn_soc->number_of_channels * (clks.data[clks.num_levels -2 ].clocks_in_khz /1000.0 ) * ddr4_dram_factor_single_Channel /1000.0 ; } - dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8 = dc->dcn_soc.number_of_channels * + dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8 = dc->dcn_soc->number_of_channels * (clks.data[clks.num_levels -2 ].clocks_in_khz /1000.0 ) * ddr4_dram_factor_single_Channel /1000.0 ; - dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 = dc->dcn_soc.number_of_channels * + dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 = dc->dcn_soc->number_of_channels * (clks.data[clks.num_levels -1 ].clocks_in_khz /1000.0 ) * ddr4_dram_factor_single_Channel /1000.0 ; } elseBREAK_TO_DEBUGGER ();if (dm_pp_get_clock_levels_by_type_with_voltage ( ctx,DM_PP_CLOCK_TYPE_DCFCLK , &clks) && clks.num_levels >=3 ) { - dc->dcn_soc.dcfclkv_min0p65 = clks.data[0 ].clocks_in_khz /1000.0 ; - dc->dcn_soc.dcfclkv_mid0p72 = clks.data[clks.num_levels -3 ].clocks_in_khz /1000.0 ; - dc->dcn_soc.dcfclkv_nom0p8 = clks.data[clks.num_levels -2 ].clocks_in_khz /1000.0 ; - dc->dcn_soc.dcfclkv_max0p9 = clks.data[clks.num_levels -1 ].clocks_in_khz /1000.0 ; + dc->dcn_soc->dcfclkv_min0p65 = clks.data[0 ].clocks_in_khz /1000.0 ; + dc->dcn_soc->dcfclkv_mid0p72 = clks.data[clks.num_levels -3 ].clocks_in_khz /1000.0 ; + dc->dcn_soc->dcfclkv_nom0p8 = clks.data[clks.num_levels -2 ].clocks_in_khz /1000.0 ; + dc->dcn_soc->dcfclkv_max0p9 = clks.data[clks.num_levels -1 ].clocks_in_khz /1000.0 ; }else BREAK_TO_DEBUGGER ();
@@ -1315,17 +1316,17 @@ void dcn_bw_notify_pplib_of_wm_ranges(struct core_dc *dc)int max_fclk_khz, nom_fclk_khz, min_fclk_khz, max_dcfclk_khz, nom_dcfclk_khz, mid_fclk_khz, min_dcfclk_khz, socclk_khz;const int overdrive =5000000 ;/* 5 GHz to cover Overdrive */ -unsigned factor = (ddr4_dram_factor_single_Channel * dc->dcn_soc.number_of_channels); +unsigned factor = (ddr4_dram_factor_single_Channel * dc->dcn_soc->number_of_channels);kernel_fpu_begin (); - max_fclk_khz = dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 *1000000 / factor; - nom_fclk_khz = dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8 *1000000 / factor; - mid_fclk_khz = dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72 *1000000 / factor; - min_fclk_khz = dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65 *1000000 /32 ; - max_dcfclk_khz = dc->dcn_soc.dcfclkv_max0p9 *1000 ; - nom_dcfclk_khz = dc->dcn_soc.dcfclkv_nom0p8 *1000 ; - min_dcfclk_khz = dc->dcn_soc.dcfclkv_min0p65 *1000 ; - socclk_khz = dc->dcn_soc.socclk *1000 ; + max_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 *1000000 / factor; + nom_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8 *1000000 / factor; + mid_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 *1000000 / factor; + min_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 *1000000 /32 ; + max_dcfclk_khz = dc->dcn_soc->dcfclkv_max0p9 *1000 ; + nom_dcfclk_khz = dc->dcn_soc->dcfclkv_nom0p8 *1000 ; + min_dcfclk_khz = dc->dcn_soc->dcfclkv_min0p65 *1000 ; + socclk_khz = dc->dcn_soc->socclk *1000 ;kernel_fpu_end ();/* Now notify PPLib/SMU about which Watermarks sets they should select
@@ -1425,40 +1426,40 @@ void dcn_bw_sync_calcs_and_dml(struct core_dc *dc)"vmm_page_size: %d Bytes\n" "dram_clock_change_latency: %d ns\n" "return_bus_width: %d Bytes\n" , - dc->dcn_soc.sr_exit_time *1000 , - dc->dcn_soc.sr_enter_plus_exit_time *1000 , - dc->dcn_soc.urgent_latency *1000 , - dc->dcn_soc.write_back_latency *1000 , - dc->dcn_soc.percent_of_ideal_drambw_received_after_urg_latency, - dc->dcn_soc.max_request_size, - dc->dcn_soc.dcfclkv_max0p9 *1000 , - dc->dcn_soc.dcfclkv_nom0p8 *1000 , - dc->dcn_soc.dcfclkv_mid0p72 *1000 , - dc->dcn_soc.dcfclkv_min0p65 *1000 , - dc->dcn_soc.max_dispclk_vmax0p9 *1000 , - dc->dcn_soc.max_dispclk_vnom0p8 *1000 , - dc->dcn_soc.max_dispclk_vmid0p72 *1000 , - dc->dcn_soc.max_dispclk_vmin0p65 *1000 , - dc->dcn_soc.max_dppclk_vmax0p9 *1000 , - dc->dcn_soc.max_dppclk_vnom0p8 *1000 , - dc->dcn_soc.max_dppclk_vmid0p72 *1000 , - dc->dcn_soc.max_dppclk_vmin0p65 *1000 , - dc->dcn_soc.socclk *1000 , - dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 *1000 , - dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8 *1000 , - dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72 *1000 , - dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65 *1000 , - dc->dcn_soc.phyclkv_max0p9 *1000 , - dc->dcn_soc.phyclkv_nom0p8 *1000 , - dc->dcn_soc.phyclkv_mid0p72 *1000 , - dc->dcn_soc.phyclkv_min0p65 *1000 , - dc->dcn_soc.downspreading *100 , - dc->dcn_soc.round_trip_ping_latency_cycles, - dc->dcn_soc.urgent_out_of_order_return_per_channel, - dc->dcn_soc.number_of_channels, - dc->dcn_soc.vmm_page_size, - dc->dcn_soc.dram_clock_change_latency *1000 , - dc->dcn_soc.return_bus_width); + dc->dcn_soc->sr_exit_time *1000 , + dc->dcn_soc->sr_enter_plus_exit_time *1000 , + dc->dcn_soc->urgent_latency *1000 , + dc->dcn_soc->write_back_latency *1000 , + dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency, + dc->dcn_soc->max_request_size, + dc->dcn_soc->dcfclkv_max0p9 *1000 , + dc->dcn_soc->dcfclkv_nom0p8 *1000 , + dc->dcn_soc->dcfclkv_mid0p72 *1000 , + dc->dcn_soc->dcfclkv_min0p65 *1000 , + dc->dcn_soc->max_dispclk_vmax0p9 *1000 , + dc->dcn_soc->max_dispclk_vnom0p8 *1000 , + dc->dcn_soc->max_dispclk_vmid0p72 *1000 , + dc->dcn_soc->max_dispclk_vmin0p65 *1000 , + dc->dcn_soc->max_dppclk_vmax0p9 *1000 , + dc->dcn_soc->max_dppclk_vnom0p8 *1000 , + dc->dcn_soc->max_dppclk_vmid0p72 *1000 , + dc->dcn_soc->max_dppclk_vmin0p65 *1000 , + dc->dcn_soc->socclk *1000 , + dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 *1000 , + dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8 *1000 , + dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 *1000 , + dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 *1000 , + dc->dcn_soc->phyclkv_max0p9 *1000 , + dc->dcn_soc->phyclkv_nom0p8 *1000 , + dc->dcn_soc->phyclkv_mid0p72 *1000 , + dc->dcn_soc->phyclkv_min0p65 *1000 , + dc->dcn_soc->downspreading *100 , + dc->dcn_soc->round_trip_ping_latency_cycles, + dc->dcn_soc->urgent_out_of_order_return_per_channel, + dc->dcn_soc->number_of_channels, + dc->dcn_soc->vmm_page_size, + dc->dcn_soc->dram_clock_change_latency *1000 , + dc->dcn_soc->return_bus_width);dm_logger_write (dc->ctx->logger,LOG_BANDWIDTH_CALCS ,"rob_buffer_size_in_kbyte: %d\n" "det_buffer_size_in_kbyte: %d\n"
@@ -1494,120 +1495,120 @@ void dcn_bw_sync_calcs_and_dml(struct core_dc *dc)"can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one: %d\n" "bug_forcing_luma_and_chroma_request_to_same_size_fixed: %d\n" "dcfclk_cstate_latency: %d\n" , - dc->dcn_ip.rob_buffer_size_in_kbyte, - dc->dcn_ip.det_buffer_size_in_kbyte, - dc->dcn_ip.dpp_output_buffer_pixels, - dc->dcn_ip.opp_output_buffer_lines, - dc->dcn_ip.pixel_chunk_size_in_kbyte, - dc->dcn_ip.pte_enable, - dc->dcn_ip.pte_chunk_size, - dc->dcn_ip.meta_chunk_size, - dc->dcn_ip.writeback_chunk_size, - dc->dcn_ip.odm_capability, - dc->dcn_ip.dsc_capability, - dc->dcn_ip.line_buffer_size, - dc->dcn_ip.max_line_buffer_lines, - dc->dcn_ip.is_line_buffer_bpp_fixed, - dc->dcn_ip.line_buffer_fixed_bpp, - dc->dcn_ip.writeback_luma_buffer_size, - dc->dcn_ip.writeback_chroma_buffer_size, - dc->dcn_ip.max_num_dpp, - dc->dcn_ip.max_num_writeback, - dc->dcn_ip.max_dchub_topscl_throughput, - dc->dcn_ip.max_pscl_tolb_throughput, - dc->dcn_ip.max_lb_tovscl_throughput, - dc->dcn_ip.max_vscl_tohscl_throughput, - dc->dcn_ip.max_hscl_ratio, - dc->dcn_ip.max_vscl_ratio, - dc->dcn_ip.max_hscl_taps, - dc->dcn_ip.max_vscl_taps, - dc->dcn_ip.pte_buffer_size_in_requests, - dc->dcn_ip.dispclk_ramping_margin, - dc->dcn_ip.under_scan_factor *100 , - dc->dcn_ip.max_inter_dcn_tile_repeaters, - dc->dcn_ip.can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one, - dc->dcn_ip.bug_forcing_luma_and_chroma_request_to_same_size_fixed, - dc->dcn_ip.dcfclk_cstate_latency); - dc->dml.soc.vmin.socclk_mhz = dc->dcn_soc.socclk; - dc->dml.soc.vmid.socclk_mhz = dc->dcn_soc.socclk; - dc->dml.soc.vnom.socclk_mhz = dc->dcn_soc.socclk; - dc->dml.soc.vmax.socclk_mhz = dc->dcn_soc.socclk; - - dc->dml.soc.vmin.dcfclk_mhz = dc->dcn_soc.dcfclkv_min0p65; - dc->dml.soc.vmid.dcfclk_mhz = dc->dcn_soc.dcfclkv_mid0p72; - dc->dml.soc.vnom.dcfclk_mhz = dc->dcn_soc.dcfclkv_nom0p8; - dc->dml.soc.vmax.dcfclk_mhz = dc->dcn_soc.dcfclkv_max0p9; - - dc->dml.soc.vmin.dispclk_mhz = dc->dcn_soc.max_dispclk_vmin0p65; - dc->dml.soc.vmid.dispclk_mhz = dc->dcn_soc.max_dispclk_vmid0p72; - dc->dml.soc.vnom.dispclk_mhz = dc->dcn_soc.max_dispclk_vnom0p8; - dc->dml.soc.vmax.dispclk_mhz = dc->dcn_soc.max_dispclk_vmax0p9; - - dc->dml.soc.vmin.dppclk_mhz = dc->dcn_soc.max_dppclk_vmin0p65; - dc->dml.soc.vmid.dppclk_mhz = dc->dcn_soc.max_dppclk_vmid0p72; - dc->dml.soc.vnom.dppclk_mhz = dc->dcn_soc.max_dppclk_vnom0p8; - dc->dml.soc.vmax.dppclk_mhz = dc->dcn_soc.max_dppclk_vmax0p9; - - dc->dml.soc.vmin.phyclk_mhz = dc->dcn_soc.phyclkv_min0p65; - dc->dml.soc.vmid.phyclk_mhz = dc->dcn_soc.phyclkv_mid0p72; - dc->dml.soc.vnom.phyclk_mhz = dc->dcn_soc.phyclkv_nom0p8; - dc->dml.soc.vmax.phyclk_mhz = dc->dcn_soc.phyclkv_max0p9; - - dc->dml.soc.vmin.dram_bw_per_chan_gbps = dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65; - dc->dml.soc.vmid.dram_bw_per_chan_gbps = dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72; - dc->dml.soc.vnom.dram_bw_per_chan_gbps = dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8; - dc->dml.soc.vmax.dram_bw_per_chan_gbps = dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9; - - dc->dml.soc.sr_exit_time_us = dc->dcn_soc.sr_exit_time; - dc->dml.soc.sr_enter_plus_exit_time_us = dc->dcn_soc.sr_enter_plus_exit_time; - dc->dml.soc.urgent_latency_us = dc->dcn_soc.urgent_latency; - dc->dml.soc.writeback_latency_us = dc->dcn_soc.write_back_latency; + dc->dcn_ip->rob_buffer_size_in_kbyte, + dc->dcn_ip->det_buffer_size_in_kbyte, + dc->dcn_ip->dpp_output_buffer_pixels, + dc->dcn_ip->opp_output_buffer_lines, + dc->dcn_ip->pixel_chunk_size_in_kbyte, + dc->dcn_ip->pte_enable, + dc->dcn_ip->pte_chunk_size, + dc->dcn_ip->meta_chunk_size, + dc->dcn_ip->writeback_chunk_size, + dc->dcn_ip->odm_capability, + dc->dcn_ip->dsc_capability, + dc->dcn_ip->line_buffer_size, + dc->dcn_ip->max_line_buffer_lines, + dc->dcn_ip->is_line_buffer_bpp_fixed, + dc->dcn_ip->line_buffer_fixed_bpp, + dc->dcn_ip->writeback_luma_buffer_size, + dc->dcn_ip->writeback_chroma_buffer_size, + dc->dcn_ip->max_num_dpp, + dc->dcn_ip->max_num_writeback, + dc->dcn_ip->max_dchub_topscl_throughput, + dc->dcn_ip->max_pscl_tolb_throughput, + dc->dcn_ip->max_lb_tovscl_throughput, + dc->dcn_ip->max_vscl_tohscl_throughput, + dc->dcn_ip->max_hscl_ratio, + dc->dcn_ip->max_vscl_ratio, + dc->dcn_ip->max_hscl_taps, + dc->dcn_ip->max_vscl_taps, + dc->dcn_ip->pte_buffer_size_in_requests, + dc->dcn_ip->dispclk_ramping_margin, + dc->dcn_ip->under_scan_factor *100 , + dc->dcn_ip->max_inter_dcn_tile_repeaters, + dc->dcn_ip->can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one, + dc->dcn_ip->bug_forcing_luma_and_chroma_request_to_same_size_fixed, + dc->dcn_ip->dcfclk_cstate_latency); + dc->dml.soc.vmin.socclk_mhz = dc->dcn_soc->socclk; + dc->dml.soc.vmid.socclk_mhz = dc->dcn_soc->socclk; + dc->dml.soc.vnom.socclk_mhz = dc->dcn_soc->socclk; + dc->dml.soc.vmax.socclk_mhz = dc->dcn_soc->socclk; + + dc->dml.soc.vmin.dcfclk_mhz = dc->dcn_soc->dcfclkv_min0p65; + dc->dml.soc.vmid.dcfclk_mhz = dc->dcn_soc->dcfclkv_mid0p72; + dc->dml.soc.vnom.dcfclk_mhz = dc->dcn_soc->dcfclkv_nom0p8; + dc->dml.soc.vmax.dcfclk_mhz = dc->dcn_soc->dcfclkv_max0p9; + + dc->dml.soc.vmin.dispclk_mhz = dc->dcn_soc->max_dispclk_vmin0p65; + dc->dml.soc.vmid.dispclk_mhz = dc->dcn_soc->max_dispclk_vmid0p72; + dc->dml.soc.vnom.dispclk_mhz = dc->dcn_soc->max_dispclk_vnom0p8; + dc->dml.soc.vmax.dispclk_mhz = dc->dcn_soc->max_dispclk_vmax0p9; + + dc->dml.soc.vmin.dppclk_mhz = dc->dcn_soc->max_dppclk_vmin0p65; + dc->dml.soc.vmid.dppclk_mhz = dc->dcn_soc->max_dppclk_vmid0p72; + dc->dml.soc.vnom.dppclk_mhz = dc->dcn_soc->max_dppclk_vnom0p8; + dc->dml.soc.vmax.dppclk_mhz = dc->dcn_soc->max_dppclk_vmax0p9; + + dc->dml.soc.vmin.phyclk_mhz = dc->dcn_soc->phyclkv_min0p65; + dc->dml.soc.vmid.phyclk_mhz = dc->dcn_soc->phyclkv_mid0p72; + dc->dml.soc.vnom.phyclk_mhz = dc->dcn_soc->phyclkv_nom0p8; + dc->dml.soc.vmax.phyclk_mhz = dc->dcn_soc->phyclkv_max0p9; + + dc->dml.soc.vmin.dram_bw_per_chan_gbps = dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65; + dc->dml.soc.vmid.dram_bw_per_chan_gbps = dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72; + dc->dml.soc.vnom.dram_bw_per_chan_gbps = dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8; + dc->dml.soc.vmax.dram_bw_per_chan_gbps = dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9; + + dc->dml.soc.sr_exit_time_us = dc->dcn_soc->sr_exit_time; + dc->dml.soc.sr_enter_plus_exit_time_us = dc->dcn_soc->sr_enter_plus_exit_time; + dc->dml.soc.urgent_latency_us = dc->dcn_soc->urgent_latency; + dc->dml.soc.writeback_latency_us = dc->dcn_soc->write_back_latency; dc->dml.soc.ideal_dram_bw_after_urgent_percent = - dc->dcn_soc.percent_of_ideal_drambw_received_after_urg_latency; - dc->dml.soc.max_request_size_bytes = dc->dcn_soc.max_request_size; - dc->dml.soc.downspread_percent = dc->dcn_soc.downspreading; + dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency; + dc->dml.soc.max_request_size_bytes = dc->dcn_soc->max_request_size; + dc->dml.soc.downspread_percent = dc->dcn_soc->downspreading; dc->dml.soc.round_trip_ping_latency_dcfclk_cycles = - dc->dcn_soc.round_trip_ping_latency_cycles; + dc->dcn_soc->round_trip_ping_latency_cycles; dc->dml.soc.urgent_out_of_order_return_per_channel_bytes = - dc->dcn_soc.urgent_out_of_order_return_per_channel; - dc->dml.soc.num_chans = dc->dcn_soc.number_of_channels; - dc->dml.soc.vmm_page_size_bytes = dc->dcn_soc.vmm_page_size; - dc->dml.soc.dram_clock_change_latency_us = dc->dcn_soc.dram_clock_change_latency; - dc->dml.soc.return_bus_width_bytes = dc->dcn_soc.return_bus_width; - - dc->dml.ip.rob_buffer_size_kbytes = dc->dcn_ip.rob_buffer_size_in_kbyte; - dc->dml.ip.det_buffer_size_kbytes = dc->dcn_ip.det_buffer_size_in_kbyte; - dc->dml.ip.dpp_output_buffer_pixels = dc->dcn_ip.dpp_output_buffer_pixels; - dc->dml.ip.opp_output_buffer_lines = dc->dcn_ip.opp_output_buffer_lines; - dc->dml.ip.pixel_chunk_size_kbytes = dc->dcn_ip.pixel_chunk_size_in_kbyte; - dc->dml.ip.pte_enable = dc->dcn_ip.pte_enable == dcn_bw_yes; - dc->dml.ip.pte_chunk_size_kbytes = dc->dcn_ip.pte_chunk_size; - dc->dml.ip.meta_chunk_size_kbytes = dc->dcn_ip.meta_chunk_size; - dc->dml.ip.writeback_chunk_size_kbytes = dc->dcn_ip.writeback_chunk_size; - dc->dml.ip.line_buffer_size_bits = dc->dcn_ip.line_buffer_size; - dc->dml.ip.max_line_buffer_lines = dc->dcn_ip.max_line_buffer_lines; - dc->dml.ip.IsLineBufferBppFixed = dc->dcn_ip.is_line_buffer_bpp_fixed == dcn_bw_yes; - dc->dml.ip.LineBufferFixedBpp = dc->dcn_ip.line_buffer_fixed_bpp; - dc->dml.ip.writeback_luma_buffer_size_kbytes = dc->dcn_ip.writeback_luma_buffer_size; - dc->dml.ip.writeback_chroma_buffer_size_kbytes = dc->dcn_ip.writeback_chroma_buffer_size; - dc->dml.ip.max_num_dpp = dc->dcn_ip.max_num_dpp; - dc->dml.ip.max_num_wb = dc->dcn_ip.max_num_writeback; - dc->dml.ip.max_dchub_pscl_bw_pix_per_clk = dc->dcn_ip.max_dchub_topscl_throughput; - dc->dml.ip.max_pscl_lb_bw_pix_per_clk = dc->dcn_ip.max_pscl_tolb_throughput; - dc->dml.ip.max_lb_vscl_bw_pix_per_clk = dc->dcn_ip.max_lb_tovscl_throughput; - dc->dml.ip.max_vscl_hscl_bw_pix_per_clk = dc->dcn_ip.max_vscl_tohscl_throughput; - dc->dml.ip.max_hscl_ratio = dc->dcn_ip.max_hscl_ratio; - dc->dml.ip.max_vscl_ratio = dc->dcn_ip.max_vscl_ratio; - dc->dml.ip.max_hscl_taps = dc->dcn_ip.max_hscl_taps; - dc->dml.ip.max_vscl_taps = dc->dcn_ip.max_vscl_taps; + dc->dcn_soc->urgent_out_of_order_return_per_channel; + dc->dml.soc.num_chans = dc->dcn_soc->number_of_channels; + dc->dml.soc.vmm_page_size_bytes = dc->dcn_soc->vmm_page_size; + dc->dml.soc.dram_clock_change_latency_us = dc->dcn_soc->dram_clock_change_latency; + dc->dml.soc.return_bus_width_bytes = dc->dcn_soc->return_bus_width; + + dc->dml.ip.rob_buffer_size_kbytes = dc->dcn_ip->rob_buffer_size_in_kbyte; + dc->dml.ip.det_buffer_size_kbytes = dc->dcn_ip->det_buffer_size_in_kbyte; + dc->dml.ip.dpp_output_buffer_pixels = dc->dcn_ip->dpp_output_buffer_pixels; + dc->dml.ip.opp_output_buffer_lines = dc->dcn_ip->opp_output_buffer_lines; + dc->dml.ip.pixel_chunk_size_kbytes = dc->dcn_ip->pixel_chunk_size_in_kbyte; + dc->dml.ip.pte_enable = dc->dcn_ip->pte_enable == dcn_bw_yes; + dc->dml.ip.pte_chunk_size_kbytes = dc->dcn_ip->pte_chunk_size; + dc->dml.ip.meta_chunk_size_kbytes = dc->dcn_ip->meta_chunk_size; + dc->dml.ip.writeback_chunk_size_kbytes = dc->dcn_ip->writeback_chunk_size; + dc->dml.ip.line_buffer_size_bits = dc->dcn_ip->line_buffer_size; + dc->dml.ip.max_line_buffer_lines = dc->dcn_ip->max_line_buffer_lines; + dc->dml.ip.IsLineBufferBppFixed = dc->dcn_ip->is_line_buffer_bpp_fixed == dcn_bw_yes; + dc->dml.ip.LineBufferFixedBpp = dc->dcn_ip->line_buffer_fixed_bpp; + dc->dml.ip.writeback_luma_buffer_size_kbytes = dc->dcn_ip->writeback_luma_buffer_size; + dc->dml.ip.writeback_chroma_buffer_size_kbytes = dc->dcn_ip->writeback_chroma_buffer_size; + dc->dml.ip.max_num_dpp = dc->dcn_ip->max_num_dpp; + dc->dml.ip.max_num_wb = dc->dcn_ip->max_num_writeback; + dc->dml.ip.max_dchub_pscl_bw_pix_per_clk = dc->dcn_ip->max_dchub_topscl_throughput; + dc->dml.ip.max_pscl_lb_bw_pix_per_clk = dc->dcn_ip->max_pscl_tolb_throughput; + dc->dml.ip.max_lb_vscl_bw_pix_per_clk = dc->dcn_ip->max_lb_tovscl_throughput; + dc->dml.ip.max_vscl_hscl_bw_pix_per_clk = dc->dcn_ip->max_vscl_tohscl_throughput; + dc->dml.ip.max_hscl_ratio = dc->dcn_ip->max_hscl_ratio; + dc->dml.ip.max_vscl_ratio = dc->dcn_ip->max_vscl_ratio; + dc->dml.ip.max_hscl_taps = dc->dcn_ip->max_hscl_taps; + dc->dml.ip.max_vscl_taps = dc->dcn_ip->max_vscl_taps;/*pte_buffer_size_in_requests missing in dml*/ - dc->dml.ip.dispclk_ramp_margin_percent = dc->dcn_ip.dispclk_ramping_margin; - dc->dml.ip.underscan_factor = dc->dcn_ip.under_scan_factor; - dc->dml.ip.max_inter_dcn_tile_repeaters = dc->dcn_ip.max_inter_dcn_tile_repeaters; + dc->dml.ip.dispclk_ramp_margin_percent = dc->dcn_ip->dispclk_ramping_margin; + dc->dml.ip.underscan_factor = dc->dcn_ip->under_scan_factor; + dc->dml.ip.max_inter_dcn_tile_repeaters = dc->dcn_ip->max_inter_dcn_tile_repeaters; dc->dml.ip.can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one = - dc->dcn_ip.can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one == dcn_bw_yes; + dc->dcn_ip->can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one == dcn_bw_yes; dc->dml.ip.bug_forcing_LC_req_same_size_fixed = - dc->dcn_ip.bug_forcing_luma_and_chroma_request_to_same_size_fixed == dcn_bw_yes; - dc->dml.ip.dcfclk_cstate_latency = dc->dcn_ip.dcfclk_cstate_latency; + dc->dcn_ip->bug_forcing_luma_and_chroma_request_to_same_size_fixed == dcn_bw_yes; + dc->dml.ip.dcfclk_cstate_latency = dc->dcn_ip->dcfclk_cstate_latency;kernel_fpu_end (); }
drivers/gpu/drm/amd/display/dc/core/dc.c +38 -21
131 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +14 -14
@@ -1322,28 +1322,28 @@ static bool construct( }dml_init_instance (&dc->dml,DML_PROJECT_RAVEN1 ); - dc->dcn_ip = dcn10_ip_defaults; - dc->dcn_soc = dcn10_soc_defaults; +memcpy (dc->dcn_ip, &dcn10_ip_defaults,sizeof (dcn10_ip_defaults)); +memcpy (dc->dcn_soc, &dcn10_soc_defaults,sizeof (dcn10_soc_defaults));if (ASICREV_IS_RV1_F0 (dc->ctx->asic_id.hw_internal_rev)) { - dc->dcn_soc.urgent_latency =3 ; + dc->dcn_soc->urgent_latency =3 ; dc->public.debug.disable_dmcu = true; - dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 =41.60f ; + dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 =41.60f ; } - dc->dcn_soc.number_of_channels = dc->ctx->asic_id.vram_width / ddr4_dram_width; -ASSERT (dc->dcn_soc.number_of_channels <3 ); -if (dc->dcn_soc.number_of_channels ==0 )/*old sbios bug*/ - dc->dcn_soc.number_of_channels =2 ; + dc->dcn_soc->number_of_channels = dc->ctx->asic_id.vram_width / ddr4_dram_width; +ASSERT (dc->dcn_soc->number_of_channels <3 ); +if (dc->dcn_soc->number_of_channels ==0 )/*old sbios bug*/ + dc->dcn_soc->number_of_channels =2 ; -if (dc->dcn_soc.number_of_channels ==1 ) { - dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 =19.2f ; - dc->dcn_soc.fabric_and_dram_bandwidth_vnom0p8 =17.066f ; - dc->dcn_soc.fabric_and_dram_bandwidth_vmid0p72 =14.933f ; - dc->dcn_soc.fabric_and_dram_bandwidth_vmin0p65 =12.8f ; +if (dc->dcn_soc->number_of_channels ==1 ) { + dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 =19.2f ; + dc->dcn_soc->fabric_and_dram_bandwidth_vnom0p8 =17.066f ; + dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 =14.933f ; + dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 =12.8f ;if (ASICREV_IS_RV1_F0 (dc->ctx->asic_id.hw_internal_rev)) { - dc->dcn_soc.fabric_and_dram_bandwidth_vmax0p9 =20.80f ; + dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 =20.80f ; } }
drivers/gpu/drm/amd/display/dc/inc/core_dc.h +2 -2
@@ -32,8 +32,8 @@ struct core_dc {struct bw_calcs_dceip *bw_dceip;struct bw_calcs_vbios *bw_vbios;#ifdef CONFIG_DRM_AMD_DC_DCN1_0 -struct dcn_soc_bounding_box dcn_soc; -struct dcn_ip_params dcn_ip; +struct dcn_soc_bounding_box *dcn_soc; +struct dcn_ip_params *dcn_ip;struct display_mode_lib dml;#endif
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/77 drm/amd/display: fix eDP bootup/S4 backlight on
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
also pass-in correct dispclk tor DMCU
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 12 +++++------- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 22 ++++++++++++++-------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 ++ .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +5 -7
@@ -169,16 +169,14 @@ static void update_num_audio(unsigned int *num_audio, struct audio_support *aud_support) { + aud_support->dp_audio = true; + aud_support->hdmi_audio_native = false; + aud_support->hdmi_audio_on_dongle = false; +if (straps->hdmi_disable ==0 ) { - aud_support->hdmi_audio_native = true; - aud_support->hdmi_audio_on_dongle = true; - aud_support->dp_audio = true; - }else {if (straps->dc_pinstraps_audio &0x2 ) { aud_support->hdmi_audio_on_dongle = true; - aud_support->dp_audio = true; - }else { - aud_support->dp_audio = true; + aud_support->hdmi_audio_native = true; } }
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +14 -8
@@ -327,13 +327,14 @@ static bool dce_clock_set_min_clocks_state(return true; } -static void dce_set_clock ( +static int dce_set_clock (struct display_clock *clk,int requested_clk_khz) {struct dce_disp_clk *clk_dce =TO_DCE_CLOCKS (clk);struct bp_pixel_clock_parameters pxl_clk_params = {0 };struct dc_bios *bp = clk->ctx->dc_bios; +int actual_clock = requested_clk_khz;/* Make sure requested clock isn't lower than minimum threshold*/ if (requested_clk_khz >0 )
@@ -351,15 +352,17 @@ static void dce_set_clock(/* Cache the fixed display clock*/ clk_dce->dfs_bypass_disp_clk = pxl_clk_params.dfs_bypass_display_clock; + actual_clock = pxl_clk_params.dfs_bypass_display_clock; }/* from power down, we need mark the clock state as ClocksStateNominal * from HWReset, so when resume we will call pplib voltage regulator.*/ if (requested_clk_khz ==0 ) clk->cur_min_clks_state =DM_PP_CLOCKS_STATE_NOMINAL ; +return actual_clock; } -static void dce_psr_set_clock ( +static int dce_psr_set_clock (struct display_clock *clk,int requested_clk_khz) {
@@ -367,13 +370,15 @@ static void dce_psr_set_clock(struct dc_context *ctx = clk_dce->base.ctx;struct core_dc *core_dc =DC_TO_CORE (ctx->dc);struct dmcu *dmcu = core_dc->res_pool->dmcu; +int actual_clk_khz = requested_clk_khz; -dce_set_clock (clk, requested_clk_khz); + actual_clk_khz =dce_set_clock (clk, requested_clk_khz); - dmcu->funcs->set_psr_wait_loop (dmcu, requested_clk_khz /1000 /7 ); + dmcu->funcs->set_psr_wait_loop (dmcu, actual_clk_khz /1000 /7 ); +return actual_clk_khz; } -static void dce112_set_clock ( +static int dce112_set_clock (struct display_clock *clk,int requested_clk_khz) {
@@ -383,7 +388,7 @@ static void dce112_set_clock(struct core_dc *core_dc =DC_TO_CORE (clk->ctx->dc);struct abm *abm = core_dc->res_pool->abm;struct dmcu *dmcu = core_dc->res_pool->dmcu; - +int actual_clock = requested_clk_khz;/* Prepare to program display clock*/ memset (&dce_clk_params,0 ,sizeof (dce_clk_params));
@@ -397,6 +402,7 @@ static void dce112_set_clock( dce_clk_params.clock_type =DCECLOCK_TYPE_DISPLAY_CLOCK ; bp->funcs->set_dce_clock (bp, &dce_clk_params); + actual_clock = dce_clk_params.target_clock_frequency;/* from power down, we need mark the clock state as ClocksStateNominal * from HWReset, so when resume we will call pplib voltage regulator.*/
@@ -415,8 +421,8 @@ static void dce112_set_clock(if (abm->funcs->is_dmcu_initialized (abm)) dmcu->funcs->set_psr_wait_loop (dmcu, - requested_clk_khz /1000 /7 ); - + actual_clock /1000 /7 ); +return actual_clock; }static void dce_clock_read_integrated_info (struct dce_disp_clk *clk_dce)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +2 -0
@@ -1288,6 +1288,8 @@ void dce110_link_encoder_disable_output(/* OF_SKIP_POWER_DOWN_INACTIVE_ENCODER */ return ; } +if (enc110->base.connector.id ==CONNECTOR_ID_EDP ) +dce110_link_encoder_edp_backlight_control (enc, false);/* Power-down RX and disable GPU PHY should be paired. * Disabling PHY without powering down RX may cause * symbol lock loss, on which we will get DP Sink interrupt. */
drivers/gpu/drm/amd/display/dc/inc/hw/display_clock.h +1 -1
@@ -62,7 +62,7 @@ struct display_clock { };struct display_clock_funcs { -void (*set_clock)(struct display_clock *disp_clk, +int (*set_clock)(struct display_clock *disp_clk,int requested_clock_khz); enum dm_pp_clocks_state (*get_required_clocks_state)(
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/77 drm/amd/display: Use function pointer for update_plane_addr
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -132,7 +132,7 @@ struct resource_pool *dc_create_resource_pool(#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )case DCN_VERSION_1_0 : res_pool =dcn10_create_resource_pool ( - num_virtual_links, dc); + num_virtual_links, dc);break ;#endif
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +1 -0
@@ -615,6 +615,7 @@ static uint32_t dce110_get_pll_pixel_rate_in_hz(/* This function need separate to different DCE version, before separate, just use pixel clock */ return pipe_ctx->stream->phy_pix_clk; + } static uint32_t dce110_get_dp_pixel_rate_from_combo_phy_pll(
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -3
@@ -1246,7 +1246,7 @@ static void toggle_watermark_change_req(struct dce_hwseq *hws) DCHUBBUB_ARB_WATERMARK_CHANGE_REQUEST, watermark_change_req); } -static void update_plane_addr (const struct core_dc *dc,struct pipe_ctx *pipe_ctx) +static void dcn10_update_plane_addr (const struct core_dc *dc,struct pipe_ctx *pipe_ctx) {bool addr_patched = false;PHYSICAL_ADDRESS_LOC addr;
@@ -2115,7 +2115,7 @@ static void update_dchubp_dpp(*/ REG_UPDATE (DCHUBP_CNTL [pipe_ctx->pipe_idx],HUBP_VTG_SEL , pipe_ctx->stream_res.tg->inst); -update_plane_addr (dc, pipe_ctx); + dc->hwss.update_plane_addr (dc, pipe_ctx); mi->funcs->mem_input_setup( mi,
@@ -2687,7 +2687,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = { .apply_ctx_to_hw = dce110_apply_ctx_to_hw, .apply_ctx_for_surface = dcn10_apply_ctx_for_surface, .set_plane_config = set_plane_config, - .update_plane_addr = update_plane_addr, + .update_plane_addr = dcn10_update_plane_addr, .update_dchub = dcn10_update_dchub, .update_pending_status = dcn10_update_pending_status, .set_input_transfer_func = dcn10_set_input_transfer_func,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/77 drm/amd/display: Flattening core_dc to dc
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
-Flattening core_dc to dc
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 73 +++++----- drivers/gpu/drm/amd/display/dc/core/dc.c | 162 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 20 +-- .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 19 ++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 22 +-- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 10 +- drivers/gpu/drm/amd/display/dc/dc.h | 71 +++++++-- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 5 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 10 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 9 +- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 6 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 22 +-- .../drm/amd/display/dc/dce100/dce100_resource.h | 4 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 72 ++++----- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 12 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 26 ++-- .../drm/amd/display/dc/dce110/dce110_resource.h | 4 +- .../amd/display/dc/dce112/dce112_hw_sequencer.c | 5 +- .../amd/display/dc/dce112/dce112_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 26 ++-- .../drm/amd/display/dc/dce112/dce112_resource.h | 10 +- .../amd/display/dc/dce120/dce120_hw_sequencer.c | 5 +- .../amd/display/dc/dce120/dce120_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 18 +-- .../drm/amd/display/dc/dce120/dce120_resource.h | 4 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.h | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 46 +++--- .../gpu/drm/amd/display/dc/dce80/dce80_resource.h | 8 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 1 - .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 108 +++++++------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 4 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 34 ++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 55 ------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 8 +- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 12 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 50 ++++--- drivers/gpu/drm/amd/display/dc/inc/resource.h | 15 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 6 +- .../amd/display/dc/irq/dce80/irq_service_dce80.c | 1 - .../gpu/drm/amd/display/include/logger_interface.h | 10 +- .../drm/amd/display/modules/freesync/freesync.c | 11 +- 51 files changed, 507 insertions(+), 527 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/inc/core_dc.h
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +36 -37
@@ -27,7 +27,6 @@#include "dcn_calcs.h" #include "dcn_calc_auto.h" #include "dc.h" -#include "core_dc.h" #include "dal_asic_id.h" #include "resource.h"
@@ -399,7 +398,7 @@ static void pipe_ctx_to_e2e_pipe_params ( }static void dcn_bw_calc_rq_dlg_ttu ( -const struct core_dc *dc, +const struct dc *dc,const struct dcn_bw_internal_vars *v,struct pipe_ctx *pipe,int in_idx)
@@ -674,45 +673,45 @@ static void calc_wm_sets_and_perf_params( context->bw.dcn.watermarks.d = context->bw.dcn.watermarks.a; } -static bool dcn_bw_apply_registry_override (struct core_dc *dc) +static bool dcn_bw_apply_registry_override (struct dc *dc) {bool updated = false;kernel_fpu_begin (); -if ((int )(dc->dcn_soc->sr_exit_time *1000 ) != dc->public.debug.sr_exit_time_ns - && dc->public.debug.sr_exit_time_ns) { +if ((int )(dc->dcn_soc->sr_exit_time *1000 ) != dc->debug.sr_exit_time_ns + && dc->debug.sr_exit_time_ns) { updated = true; - dc->dcn_soc->sr_exit_time = dc->public.debug.sr_exit_time_ns /1000.0 ; + dc->dcn_soc->sr_exit_time = dc->debug.sr_exit_time_ns /1000.0 ; }if ((int )(dc->dcn_soc->sr_enter_plus_exit_time *1000 ) - != dc->public.debug.sr_enter_plus_exit_time_ns - && dc->public.debug.sr_enter_plus_exit_time_ns) { + != dc->debug.sr_enter_plus_exit_time_ns + && dc->debug.sr_enter_plus_exit_time_ns) { updated = true; dc->dcn_soc->sr_enter_plus_exit_time = - dc->public.debug.sr_enter_plus_exit_time_ns /1000.0 ; + dc->debug.sr_enter_plus_exit_time_ns /1000.0 ; } -if ((int )(dc->dcn_soc->urgent_latency *1000 ) != dc->public.debug.urgent_latency_ns - && dc->public.debug.urgent_latency_ns) { +if ((int )(dc->dcn_soc->urgent_latency *1000 ) != dc->debug.urgent_latency_ns + && dc->debug.urgent_latency_ns) { updated = true; - dc->dcn_soc->urgent_latency = dc->public.debug.urgent_latency_ns /1000.0 ; + dc->dcn_soc->urgent_latency = dc->debug.urgent_latency_ns /1000.0 ; }if ((int )(dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency *1000 ) - != dc->public.debug.percent_of_ideal_drambw - && dc->public.debug.percent_of_ideal_drambw) { + != dc->debug.percent_of_ideal_drambw + && dc->debug.percent_of_ideal_drambw) { updated = true; dc->dcn_soc->percent_of_ideal_drambw_received_after_urg_latency = - dc->public.debug.percent_of_ideal_drambw; + dc->debug.percent_of_ideal_drambw; }if ((int )(dc->dcn_soc->dram_clock_change_latency *1000 ) - != dc->public.debug.dram_clock_change_latency_ns - && dc->public.debug.dram_clock_change_latency_ns) { + != dc->debug.dram_clock_change_latency_ns + && dc->debug.dram_clock_change_latency_ns) { updated = true; dc->dcn_soc->dram_clock_change_latency = - dc->public.debug.dram_clock_change_latency_ns /1000.0 ; + dc->debug.dram_clock_change_latency_ns /1000.0 ; }kernel_fpu_end ();
@@ -720,7 +719,7 @@ static bool dcn_bw_apply_registry_override(struct core_dc *dc) }bool dcn_validate_bandwidth ( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context) {const struct resource_pool *pool = dc->res_pool;
@@ -730,8 +729,8 @@ bool dcn_validate_bandwidth(bool bw_limit_pass;float bw_limit; -if (dcn_bw_apply_registry_override (DC_TO_CORE (&dc->public))) -dcn_bw_sync_calcs_and_dml (DC_TO_CORE (&dc->public)); +if (dcn_bw_apply_registry_override (dc)) +dcn_bw_sync_calcs_and_dml (dc);memset (v,0 ,sizeof (*v));kernel_fpu_begin ();
@@ -850,7 +849,7 @@ bool dcn_validate_bandwidth( v->phyclk_per_state[1 ] = v->phyclkv_mid0p72; v->phyclk_per_state[0 ] = v->phyclkv_min0p65; -if (dc->public.debug.disable_pipe_split) { +if (dc->debug.disable_pipe_split) { v->max_dispclk[0 ] = v->max_dppclk_vmin0p65; }
@@ -982,15 +981,15 @@ bool dcn_validate_bandwidth(mode_support_and_system_configuration (v);if (v->voltage_level ==0 && - (dc->public.debug.sr_exit_time_dpm0_ns - || dc->public.debug.sr_enter_plus_exit_time_dpm0_ns)) { -struct core_dc *dc_core =DC_TO_CORE (&dc->public); + (dc->debug.sr_exit_time_dpm0_ns + || dc->debug.sr_enter_plus_exit_time_dpm0_ns)) { +struct dc *dc_core = dc; -if (dc->public.debug.sr_enter_plus_exit_time_dpm0_ns) +if (dc->debug.sr_enter_plus_exit_time_dpm0_ns) v->sr_enter_plus_exit_time = - dc->public.debug.sr_enter_plus_exit_time_dpm0_ns /1000.0f ; -if (dc->public.debug.sr_exit_time_dpm0_ns) - v->sr_exit_time = dc->public.debug.sr_exit_time_dpm0_ns /1000.0f ; + dc->debug.sr_enter_plus_exit_time_dpm0_ns /1000.0f ; +if (dc->debug.sr_exit_time_dpm0_ns) + v->sr_exit_time = dc->debug.sr_exit_time_dpm0_ns /1000.0f ; dc_core->dml.soc.sr_enter_plus_exit_time_us = v->sr_enter_plus_exit_time; dc_core->dml.soc.sr_exit_time_us = v->sr_exit_time;mode_support_and_system_configuration (v);
@@ -1020,7 +1019,7 @@ bool dcn_validate_bandwidth( context->bw.dcn.calc_clk.dcfclk_deep_sleep_khz = (int )(v->dcf_clk_deep_sleep *1000 ); context->bw.dcn.calc_clk.dcfclk_khz = (int )(v->dcfclk *1000 ); context->bw.dcn.calc_clk.dispclk_khz = (int )(v->dispclk *1000 ); -if (dc->public.debug.max_disp_clk == true) +if (dc->debug.max_disp_clk == true) context->bw.dcn.calc_clk.dispclk_khz = (int )(dc->dcn_soc->max_dispclk_vmax0p9 *1000 ); context->bw.dcn.calc_clk.dppclk_div = (int )(v->dispclk_dppclk_ratio) ==2 ;
@@ -1109,13 +1108,13 @@ bool dcn_validate_bandwidth( input_idx++; } -if (dc->public.debug.use_dml_wm) +if (dc->debug.use_dml_wm)dcn_dml_wm_override (v, (struct display_mode_lib *) &dc->dml, context, pool); }if (v->voltage_level ==0 ) { -struct core_dc *dc_core =DC_TO_CORE (&dc->public); +struct dc *dc_core = dc; dc_core->dml.soc.sr_enter_plus_exit_time_us = dc_core->dcn_soc->sr_enter_plus_exit_time;
@@ -1138,7 +1137,7 @@ bool dcn_validate_bandwidth( }unsigned int dcn_find_normalized_clock_vdd_Level ( -const struct core_dc *dc, +const struct dc *dc,enum dm_pp_clock_type clocks_type,int clocks_in_khz) {
@@ -1228,7 +1227,7 @@ unsigned int dcn_find_normalized_clock_vdd_Level( }unsigned int dcn_find_dcfclk_suits_all ( -const struct core_dc *dc, +const struct dc *dc,struct clocks_value *clocks) {unsigned vdd_level, vdd_level_temp;
@@ -1270,7 +1269,7 @@ unsigned int dcn_find_dcfclk_suits_all(return dcf_clk; } -void dcn_bw_update_from_pplib (struct core_dc *dc) +void dcn_bw_update_from_pplib (struct dc *dc) {struct dc_context *ctx = dc->ctx;struct dm_pp_clock_levels_with_voltage clks = {0 };
@@ -1310,7 +1309,7 @@ void dcn_bw_update_from_pplib(struct core_dc *dc)kernel_fpu_end (); } -void dcn_bw_notify_pplib_of_wm_ranges (struct core_dc *dc) +void dcn_bw_notify_pplib_of_wm_ranges (struct dc *dc) {struct dm_pp_wm_sets_with_clock_ranges_soc15 clk_ranges = {0 }; int max_fclk_khz, nom_fclk_khz, min_fclk_khz, max_dcfclk_khz,
@@ -1388,7 +1387,7 @@ void dcn_bw_notify_pplib_of_wm_ranges(struct core_dc *dc)dm_pp_notify_wm_clock_changes_soc15 (dc->ctx, &clk_ranges); } -void dcn_bw_sync_calcs_and_dml (struct core_dc *dc) +void dcn_bw_sync_calcs_and_dml (struct dc *dc) {kernel_fpu_begin (); dm_logger_write(dc->ctx->logger, LOG_BANDWIDTH_CALCS,
drivers/gpu/drm/amd/display/dc/core/dc.c +81 -81
528 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_debug.c +10 -10
@@ -37,12 +37,12 @@ }while (0 ) void pre_surface_trace( - const struct dc *dc, + struct dc *dc, const struct dc_plane_state *const *plane_states, int surface_count) { int i; -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dal_logger *logger = core_dc->ctx->logger;for (i =0 ; i < surface_count; i++) {
@@ -158,12 +158,12 @@ void pre_surface_trace( }void update_surface_trace ( -const struct dc *dc, +struct dc *dc,const struct dc_surface_update *updates,int surface_count) {int i; -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dal_logger *logger = core_dc->ctx->logger;for (i =0 ; i < surface_count; i++) {
@@ -279,9 +279,9 @@ void update_surface_trace(SURFACE_TRACE ("\n" ); } -void post_surface_trace (const struct dc *dc) +void post_surface_trace (struct dc *dc) { -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dal_logger *logger = core_dc->ctx->logger;SURFACE_TRACE ("post surface process.\n" );
@@ -289,11 +289,11 @@ void post_surface_trace(const struct dc *dc) }void context_timing_trace ( -const struct dc *dc, +struct dc *dc,struct resource_context *res_ctx) {int i; -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dal_logger *logger = core_dc->ctx->logger;int h_pos[MAX_PIPES ], v_pos[MAX_PIPES ];struct crtc_position position;
@@ -328,11 +328,11 @@ void context_timing_trace( }void context_clock_trace ( -const struct dc *dc, +struct dc *dc,struct validate_context *context) {#if defined(CONFIG_DRM_AMD_DC_DCN1_0 ) -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dal_logger *logger = core_dc->ctx->logger; CLOCK_TRACE("Current: dispclk_khz:%d dppclk_div:%d dcfclk_khz:%d\n"
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +1 -2
@@ -25,7 +25,6 @@#include "dm_services.h" #include "core_types.h" -#include "core_dc.h" #include "timing_generator.h" #include "hw_sequencer.h"
@@ -55,7 +54,7 @@ static const struct tg_color black_color_format[] = { };void color_space_to_black_color ( -const struct core_dc *dc, +const struct dc *dc,enum dc_color_space colorspace,struct tg_color *black_color) {
drivers/gpu/drm/amd/display/dc/core/dc_link.c +9 -10
@@ -26,14 +26,13 @@#include "dm_services.h" #include "dm_helpers.h" #include "dc.h" -#include "core_dc.h" #include "grph_object_id.h" #include "gpio_service_interface.h" #include "core_status.h" #include "dc_link_dp.h" #include "dc_link_ddc.h" #include "link_hwss.h" -#include "stream_encoder.h" +#include "link_encoder.h" #include "hw_sequencer.h" #include "resource.h"
@@ -1392,7 +1391,7 @@ enum dc_status dc_link_validate_mode_timing(bool dc_link_set_backlight_level (const struct dc_link *link,uint32_t level,uint32_t frame_ramp,const struct dc_stream_state *stream) { -struct core_dc *core_dc =DC_TO_CORE (link->ctx->dc); +struct dc *core_dc = link->ctx->dc;struct abm *abm = core_dc->res_pool->abm;unsigned int controller_id =0 ;int i;
@@ -1431,7 +1430,7 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level,bool dc_link_set_abm_disable (const struct dc_link *link) { -struct core_dc *core_dc =DC_TO_CORE (link->ctx->dc); +struct dc *core_dc = link->ctx->dc;struct abm *abm = core_dc->res_pool->abm;if ((abm ==NULL ) || (abm->funcs->set_backlight_level ==NULL ))
@@ -1445,7 +1444,7 @@ bool dc_link_set_abm_disable(const struct dc_link *link)bool dc_link_set_psr_enable (const struct dc_link *link,bool enable) { -struct core_dc *core_dc =DC_TO_CORE (link->ctx->dc); +struct dc *core_dc = link->ctx->dc;struct dmcu *dmcu = core_dc->res_pool->dmcu;if (dmcu !=NULL && link->psr_enabled)
@@ -1456,7 +1455,7 @@ bool dc_link_set_psr_enable(const struct dc_link *link, bool enable)bool dc_link_get_psr_state (const struct dc_link *link,uint32_t *psr_state) { -struct core_dc *core_dc =DC_TO_CORE (link->ctx->dc); +struct dc *core_dc = link->ctx->dc;struct dmcu *dmcu = core_dc->res_pool->dmcu;if (dmcu !=NULL && link->psr_enabled)
@@ -1469,7 +1468,7 @@ bool dc_link_setup_psr(struct dc_link *link, const struct dc_stream_state *stream, struct psr_config *psr_config, struct psr_context *psr_context) { - struct core_dc *core_dc = DC_TO_CORE(link->ctx->dc); + struct dc *core_dc = link->ctx->dc;struct dmcu *dmcu = core_dc->res_pool->dmcu;int i;
@@ -1874,7 +1873,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)void core_link_enable_stream (struct pipe_ctx *pipe_ctx) { -struct core_dc *core_dc =DC_TO_CORE (pipe_ctx->stream->ctx->dc); +struct dc *core_dc = pipe_ctx->stream->ctx->dc;enum dc_status status =enable_link (pipe_ctx);
@@ -1907,7 +1906,7 @@ void core_link_enable_stream(struct pipe_ctx *pipe_ctx)void core_link_disable_stream (struct pipe_ctx *pipe_ctx) { -struct core_dc *core_dc =DC_TO_CORE (pipe_ctx->stream->ctx->dc); +struct dc *core_dc = pipe_ctx->stream->ctx->dc;if (pipe_ctx->stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST )deallocate_mst_payload (pipe_ctx);
@@ -1919,7 +1918,7 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx)void core_link_set_avmute (struct pipe_ctx *pipe_ctx,bool enable) { -struct core_dc *core_dc =DC_TO_CORE (pipe_ctx->stream->ctx->dc); +struct dc *core_dc = pipe_ctx->stream->ctx->dc;if (pipe_ctx->stream->signal !=SIGNAL_TYPE_HDMI_TYPE_A )return ;
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +0 -1
@@ -10,7 +10,6 @@#include "core_status.h" #include "dpcd_defs.h" -#include "core_dc.h" #include "resource.h" /* maximum pre emphasis level allowed for each voltage swing level*/
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +1 -1
@@ -3,7 +3,7 @@#include "dm_services.h" #include "dc.h" -#include "inc/core_dc.h" +#include "inc/core_types.h" #include "include/ddc_service_types.h" #include "include/i2caux_interface.h" #include "link_hwss.h"
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +11 -11
@@ -92,7 +92,7 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id) }struct resource_pool *dc_create_resource_pool ( -struct core_dc *dc, +struct dc *dc,int num_virtual_links,enum dce_version dc_version,struct hw_asic_id asic_id)
@@ -153,7 +153,7 @@ struct resource_pool *dc_create_resource_pool(return res_pool; } -void dc_destroy_resource_pool (struct core_dc *dc) +void dc_destroy_resource_pool (struct dc *dc) {if (dc) {if (dc->res_pool)
@@ -193,7 +193,7 @@ static void update_num_audio(bool resource_construct (unsigned int num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct resource_pool *pool,const struct resource_create_funcs *create_funcs) {
@@ -892,7 +892,7 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)enum dc_status resource_build_scaling_params_for_context ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context) {int i;
@@ -1438,7 +1438,7 @@ static void calculate_phy_pix_clks(struct dc_stream_state *stream) }enum dc_status resource_map_pool_resources ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -2316,7 +2316,7 @@ void resource_build_info_frame(struct pipe_ctx *pipe_ctx) }enum dc_status resource_map_clock_resources ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -2343,7 +2343,7 @@ enum dc_status resource_map_clock_resources(else { pipe_ctx->clock_source =NULL ; -if (!dc->public.config.disable_disp_pll_sharing) +if (!dc->config.disable_disp_pll_sharing)resource_find_used_clk_src_for_sharing ( &context->res_ctx, pipe_ctx);
@@ -2515,9 +2515,9 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream, fmt_bit_depth->pixel_encoding = pixel_encoding; } -bool dc_validate_stream (const struct dc *dc,struct dc_stream_state *stream) +bool dc_validate_stream (struct dc *dc,struct dc_stream_state *stream) { -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dc_context *dc_ctx = core_dc->ctx;struct dc_link *link = stream->sink->link;struct timing_generator *tg = core_dc->res_pool->timing_generators[0 ];
@@ -2547,9 +2547,9 @@ bool dc_validate_stream(const struct dc *dc, struct dc_stream_state *stream)return res ==DC_OK ; } -bool dc_validate_plane (const struct dc *dc,const struct dc_plane_state *plane_state) +bool dc_validate_plane (struct dc *dc,const struct dc_plane_state *plane_state) { -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;/* TODO For now validates pixel format only */ if (core_dc->res_pool->funcs->validate_plane)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +7 -7
@@ -144,7 +144,7 @@ struct dc_stream_status *dc_stream_get_status( struct dc_stream_state *stream) {uint8_t i; -struct core_dc *dc =DC_TO_CORE (stream->ctx->dc); +struct dc *dc = stream->ctx->dc;for (i =0 ; i < dc->current_context->stream_count; i++) {if (stream == dc->current_context->streams[i]) {
@@ -163,7 +163,7 @@ bool dc_stream_set_cursor_attributes( const struct dc_cursor_attributes *attributes) {int i; -struct core_dc *core_dc; +struct dc *core_dc;struct resource_context *res_ctx;if (NULL == stream) {
@@ -175,7 +175,7 @@ bool dc_stream_set_cursor_attributes(return false; } - core_dc =DC_TO_CORE (stream->ctx->dc); + core_dc = stream->ctx->dc; res_ctx = &core_dc->current_context->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {
@@ -198,7 +198,7 @@ bool dc_stream_set_cursor_position( const struct dc_cursor_position *position) {int i; -struct core_dc *core_dc; +struct dc *core_dc;struct resource_context *res_ctx;if (NULL == stream) {
@@ -211,7 +211,7 @@ bool dc_stream_set_cursor_position(return false; } - core_dc =DC_TO_CORE (stream->ctx->dc); + core_dc = stream->ctx->dc; res_ctx = &core_dc->current_context->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {
@@ -246,7 +246,7 @@ bool dc_stream_set_cursor_position(uint32_t dc_stream_get_vblank_counter (const struct dc_stream_state *stream) {uint8_t i; -struct core_dc *core_dc =DC_TO_CORE (stream->ctx->dc); +struct dc *core_dc = stream->ctx->dc;struct resource_context *res_ctx = &core_dc->current_context->res_ctx;
@@ -270,7 +270,7 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream, {uint8_t i;bool ret = false; -struct core_dc *core_dc =DC_TO_CORE (stream->ctx->dc); +struct dc *core_dc = stream->ctx->dc;struct resource_context *res_ctx = &core_dc->current_context->res_ctx;
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +5 -5
@@ -28,7 +28,7 @@#include "dc.h" /* DC core (private) */ -#include "core_dc.h" +#include "core_types.h" #include "transform.h" /*******************************************************************************
@@ -64,9 +64,9 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state,/*register_flip_interrupt(surface);*/ } -struct dc_plane_state *dc_create_plane_state (const struct dc *dc) +struct dc_plane_state *dc_create_plane_state (struct dc *dc) { -struct core_dc *core_dc =DC_TO_CORE (dc); +struct dc *core_dc = dc;struct dc_plane_state *plane_state =dm_alloc (sizeof (*plane_state));
@@ -91,7 +91,7 @@ const struct dc_plane_status *dc_plane_get_status( const struct dc_plane_state *plane_state) {const struct dc_plane_status *plane_status; -struct core_dc *core_dc; +struct dc *core_dc;int i; if (!plane_state ||
@@ -102,7 +102,7 @@ const struct dc_plane_status *dc_plane_get_status( } plane_status = &plane_state->status; - core_dc =DC_TO_CORE (plane_state->ctx->dc); + core_dc = plane_state->ctx->dc;if (core_dc->current_context ==NULL )return NULL ;
drivers/gpu/drm/amd/display/dc/dc.h +56 -15
156 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +2 -3
@@ -34,7 +34,6 @@#include "dce_clock_source.h" -#include "core_dc.h" #include "reg_helper.h" #define REG (reg)\
@@ -609,7 +608,7 @@ static uint32_t dce110_get_pll_pixel_rate_in_hz( struct pll_settings *pll_settings) {uint32_t inst = pix_clk_params->controller_id -CONTROLLER_ID_D0 ; -struct core_dc *dc_core =DC_TO_CORE (cs->ctx->dc); +struct dc *dc_core = cs->ctx->dc;struct validate_context *context = dc_core->current_context;struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[inst];
@@ -624,7 +623,7 @@ static uint32_t dce110_get_dp_pixel_rate_from_combo_phy_pll( struct pll_settings *pll_settings) {uint32_t inst = pix_clk_params->controller_id -CONTROLLER_ID_D0 ; -struct core_dc *dc_core =DC_TO_CORE (cs->ctx->dc); +struct dc *dc_core = cs->ctx->dc;struct validate_context *context = dc_core->current_context;struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[inst];
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +4 -6
@@ -29,14 +29,12 @@#include "fixed32_32.h" #include "bios_parser_interface.h" #include "dc.h" -#include "core_dc.h" #include "dce_abm.h" #include "dmcu.h" #if defined(CONFIG_DRM_AMD_DC_DCN1_0 )#include "dcn_calcs.h" -#include "core_dc.h" #endif - +#include "core_types.h" #define TO_DCE_CLOCKS (clocks)\
@@ -368,7 +366,7 @@ static int dce_psr_set_clock( {struct dce_disp_clk *clk_dce =TO_DCE_CLOCKS (clk);struct dc_context *ctx = clk_dce->base.ctx; -struct core_dc *core_dc =DC_TO_CORE (ctx->dc); +struct dc *core_dc = ctx->dc;struct dmcu *dmcu = core_dc->res_pool->dmcu;int actual_clk_khz = requested_clk_khz;
@@ -385,7 +383,7 @@ static int dce112_set_clock(struct dce_disp_clk *clk_dce =TO_DCE_CLOCKS (clk);struct bp_set_dce_clock_parameters dce_clk_params;struct dc_bios *bp = clk->ctx->dc_bios; -struct core_dc *core_dc =DC_TO_CORE (clk->ctx->dc); +struct dc *core_dc = clk->ctx->dc;struct abm *abm = core_dc->res_pool->abm;struct dmcu *dmcu = core_dc->res_pool->dmcu;int actual_clock = requested_clk_khz;
@@ -621,7 +619,7 @@ static bool dce_apply_clock_voltage_request(if (send_request) {#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )if (clk->ctx->dce_version >=DCN_VERSION_1_0 ) { -struct core_dc *core_dc =DC_TO_CORE (clk->ctx->dc); +struct dc *core_dc = clk->ctx->dc;/*use dcfclk request voltage*/ clock_voltage_req.clk_type =DM_PP_CLOCK_TYPE_DCFCLK ; clock_voltage_req.clocks_in_khz =
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c +2 -2
@@ -26,7 +26,7 @@#include "dce_hwseq.h" #include "reg_helper.h" #include "hw_sequencer.h" -#include "core_dc.h" +#include "core_types.h" #define CTX \ hws->ctx
@@ -44,7 +44,7 @@ void dce_enable_fe_clock(struct dce_hwseq *hws, DCFE_CLOCK_ENABLE, enable); } -void dce_pipe_control_lock (struct core_dc *dc, +void dce_pipe_control_lock (struct dc *dc,struct pipe_ctx *pipe,bool lock) {
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +1 -1
@@ -528,7 +528,7 @@ enum blnd_mode {void dce_enable_fe_clock (struct dce_hwseq *hwss,unsigned int inst,bool enable); -void dce_pipe_control_lock (struct core_dc *dc, +void dce_pipe_control_lock (struct dc *dc,struct pipe_ctx *pipe,bool lock);
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c +4 -5
@@ -24,7 +24,6 @@*/ #include "dm_services.h" #include "dc.h" -#include "core_dc.h" #include "core_types.h" #include "hw_sequencer.h" #include "dce100_hw_sequencer.h"
@@ -71,7 +70,7 @@ static const struct dce100_hw_seq_reg_offsets reg_offsets[] = {/***************************PIPE_CONTROL***********************************/ static bool dce100_enable_display_power_gating ( -struct core_dc *dc, +struct dc *dc,uint8_t controller_id,struct dc_bios *dcb,enum pipe_gating_control power_gating)
@@ -107,7 +106,7 @@ static bool dce100_enable_display_power_gating( }static void dce100_pplib_apply_display_requirements ( -struct core_dc *dc, +struct dc *dc,struct validate_context *context) {struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg;
@@ -127,7 +126,7 @@ static void dce100_pplib_apply_display_requirements( }void dce100_set_bandwidth ( -struct core_dc *dc, +struct dc *dc,struct validate_context *context,bool decrease_allowed) {
@@ -143,7 +142,7 @@ void dce100_set_bandwidth(/**************************************************************************/ -bool dce100_hw_sequencer_construct (struct core_dc *dc) +bool dce100_hw_sequencer_construct (struct dc *dc) {dce110_hw_sequencer_construct (dc);
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h +3 -3
@@ -28,13 +28,13 @@#include "core_types.h" -struct core_dc ; +struct dc ;struct validate_context ; -bool dce100_hw_sequencer_construct (struct core_dc *dc); +bool dce100_hw_sequencer_construct (struct dc *dc);void dce100_set_bandwidth ( -struct core_dc *dc, +struct dc *dc,struct validate_context *context,bool decrease_allowed);
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +11 -11
@@ -652,7 +652,7 @@ static void destruct(struct dce110_resource_pool *pool) }static enum dc_status build_mapped_resource ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -688,7 +688,7 @@ static enum dc_status build_mapped_resource( }bool dce100_validate_bandwidth ( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context) {/* TODO implement when needed but for now hardcode max value*/
@@ -720,7 +720,7 @@ static bool dce100_validate_surface_sets( } enum dc_status dce100_validate_with_context( - const struct core_dc *dc, + struct dc *dc, const struct dc_validation_set set[], int set_count, struct validate_context *context,
@@ -764,7 +764,7 @@ enum dc_status dce100_validate_with_context( }enum dc_status dce100_validate_guaranteed ( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *dc_stream,struct validate_context *context) {
@@ -784,7 +784,7 @@ enum dc_status dce100_validate_guaranteed(if (result ==DC_OK ) {validate_guaranteed_copy_streams ( - context, dc->public.caps.max_streams); + context, dc->caps.max_streams); result =resource_build_scaling_params_for_context (dc, context); }
@@ -824,7 +824,7 @@ static const struct resource_funcs dce100_res_pool_funcs = {static bool construct (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct dce110_resource_pool *pool) {unsigned int i;
@@ -909,9 +909,9 @@ static bool construct(*************************************************/ pool->base.underlay_pipe_index =NO_UNDERLAY_PIPE ; pool->base.pipe_count = res_cap.num_timing_generator; - dc->public.caps.max_downscale_ratio =200 ; - dc->public.caps.i2c_speed_in_khz =40 ; - dc->public.caps.max_cursor_size =128 ; + dc->caps.max_downscale_ratio =200 ; + dc->caps.i2c_speed_in_khz =40 ; + dc->caps.max_cursor_size =128 ;for (i =0 ; i < pool->base.pipe_count; i++) { pool->base.timing_generators[i] =
@@ -958,7 +958,7 @@ static bool construct( } } - dc->public.caps.max_planes = pool->base.pipe_count; + dc->caps.max_planes = pool->base.pipe_count;if (!resource_construct (num_virtual_links, dc, &pool->base, &res_create_funcs))
@@ -978,7 +978,7 @@ static bool construct(struct resource_pool *dce100_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc) +struct dc *dc) {struct dce110_resource_pool *pool =dm_alloc (sizeof (struct dce110_resource_pool ));
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h +2 -2
@@ -8,13 +8,13 @@#ifndef DCE100_RESOURCE_H_ #define DCE100_RESOURCE_H_ -struct core_dc ; +struct dc ;struct resource_pool ;struct dc_validation_set ;struct resource_pool *dce100_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);enum dc_status dce100_validate_plane (const struct dc_plane_state *plane_state);
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +36 -36
288 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +6 -6
@@ -29,20 +29,20 @@#include "core_types.h" #define GAMMA_HW_POINTS_NUM 256 -struct core_dc ; +struct dc ;struct validate_context ;struct dm_pp_display_configuration ; -bool dce110_hw_sequencer_construct (struct core_dc *dc); +bool dce110_hw_sequencer_construct (struct dc *dc);enum dc_status dce110_apply_ctx_to_hw ( -struct core_dc *dc, +struct dc *dc,struct validate_context *context);void dce110_set_display_clock (struct validate_context *context);void dce110_set_displaymarks ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context);void dce110_enable_stream (struct pipe_ctx *pipe_ctx);
@@ -55,9 +55,9 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,void dce110_update_info_frame (struct pipe_ctx *pipe_ctx);void dce110_set_avmute (struct pipe_ctx *pipe_ctx,bool enable); -void dce110_enable_accelerated_mode (struct core_dc *dc); +void dce110_enable_accelerated_mode (struct dc *dc); -void dce110_power_down (struct core_dc *dc); +void dce110_power_down (struct dc *dc);void dce110_update_pending_status (struct pipe_ctx *pipe_ctx);
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +13 -13
@@ -772,7 +772,7 @@ static bool is_surface_pixel_format_supported(struct pipe_ctx *pipe_ctx, unsigne }static enum dc_status build_mapped_resource ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -814,7 +814,7 @@ static enum dc_status build_mapped_resource( }static bool dce110_validate_bandwidth ( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context) {bool result = false;
@@ -928,7 +928,7 @@ static bool dce110_validate_surface_sets( } static enum dc_status dce110_validate_with_context( - const struct core_dc *dc, + struct dc *dc, const struct dc_validation_set set[], int set_count, struct validate_context *context,
@@ -972,7 +972,7 @@ static enum dc_status dce110_validate_with_context( }static enum dc_status dce110_validate_guaranteed ( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *dc_stream,struct validate_context *context) {
@@ -992,7 +992,7 @@ static enum dc_status dce110_validate_guaranteed(if (result ==DC_OK ) {validate_guaranteed_copy_streams ( - context, dc->public.caps.max_streams); + context, dc->caps.max_streams); result =resource_build_scaling_params_for_context (dc, context); }
@@ -1008,7 +1008,7 @@ static struct pipe_ctx *dce110_acquire_underlay(const struct resource_pool *pool, struct dc_stream_state *stream) { - struct core_dc *dc = DC_TO_CORE(stream->ctx->dc); + struct dc *dc = stream->ctx->dc;struct resource_context *res_ctx = &context->res_ctx;unsigned int underlay_idx = pool->underlay_pipe_index;struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[underlay_idx];
@@ -1117,7 +1117,7 @@ static bool underlay_create(struct dc_context *ctx, struct resource_pool *pool)return true; } -static void bw_calcs_data_update_from_pplib (struct core_dc *dc) +static void bw_calcs_data_update_from_pplib (struct dc *dc) {struct dm_pp_clock_levels clks = {0 };
@@ -1184,7 +1184,7 @@ const struct resource_caps *dce110_resource_cap(static bool construct (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct dce110_resource_pool *pool,struct hw_asic_id asic_id) {
@@ -1206,9 +1206,9 @@ static bool construct( pool->base.pipe_count = pool->base.res_cap->num_timing_generator; pool->base.underlay_pipe_index = pool->base.pipe_count; - dc->public.caps.max_downscale_ratio =150 ; - dc->public.caps.i2c_speed_in_khz =100 ; - dc->public.caps.max_cursor_size =128 ; + dc->caps.max_downscale_ratio =150 ; + dc->caps.i2c_speed_in_khz =100 ; + dc->caps.max_cursor_size =128 ;/************************************************* * Create resources *
@@ -1351,7 +1351,7 @@ static bool construct(if (!dce110_hw_sequencer_construct (dc)) goto res_create_fail; - dc->public.caps.max_planes = pool->base.pipe_count; + dc->caps.max_planes = pool->base.pipe_count;bw_calcs_init (dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);
@@ -1366,7 +1366,7 @@ static bool construct(struct resource_pool *dce110_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct hw_asic_id asic_id) { struct dce110_resource_pool *pool =
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h +2 -2
@@ -28,7 +28,7 @@#include "core_types.h" -struct core_dc ; +struct dc ;struct resource_pool ;#define TO_DCE110_RES_POOL (pool)\
@@ -42,7 +42,7 @@ enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx);struct resource_pool *dce110_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct hw_asic_id asic_id);#endif /* __DC_RESOURCE_DCE110_H__ */
drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.c +2 -3
@@ -25,7 +25,6 @@#include "dm_services.h" #include "dc.h" -#include "core_dc.h" #include "core_types.h" #include "dce112_hw_sequencer.h"
@@ -112,7 +111,7 @@ static void dce112_init_pte(struct dc_context *ctx) }static bool dce112_enable_display_power_gating ( -struct core_dc *dc, +struct dc *dc,uint8_t controller_id,struct dc_bios *dcb,enum pipe_gating_control power_gating)
@@ -153,7 +152,7 @@ static bool dce112_enable_display_power_gating(return false; } -bool dce112_hw_sequencer_construct (struct core_dc *dc) +bool dce112_hw_sequencer_construct (struct dc *dc) {/* All registers used by dce11.2 match those in dce11 in offset and * structure
drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.h +2 -2
@@ -28,9 +28,9 @@#include "core_types.h" -struct core_dc ; +struct dc ; -bool dce112_hw_sequencer_construct (struct core_dc *dc); +bool dce112_hw_sequencer_construct (struct dc *dc);#endif /* __DC_HWSS_DCE112_H__ */
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +13 -13
@@ -723,7 +723,7 @@ static struct clock_source *find_matching_pll( }static enum dc_status build_mapped_resource ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -759,7 +759,7 @@ static enum dc_status build_mapped_resource( }bool dce112_validate_bandwidth ( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context) {bool result = false;
@@ -837,7 +837,7 @@ bool dce112_validate_bandwidth( }enum dc_status resource_map_phy_clock_resources ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -904,7 +904,7 @@ static bool dce112_validate_surface_sets( } enum dc_status dce112_validate_with_context( - const struct core_dc *dc, + struct dc *dc, const struct dc_validation_set set[], int set_count, struct validate_context *context,
@@ -948,7 +948,7 @@ enum dc_status dce112_validate_with_context( }enum dc_status dce112_validate_guaranteed ( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *stream,struct validate_context *context) {
@@ -968,7 +968,7 @@ enum dc_status dce112_validate_guaranteed(if (result ==DC_OK ) {validate_guaranteed_copy_streams ( - context, dc->public.caps.max_streams); + context, dc->caps.max_streams); result =resource_build_scaling_params_for_context (dc, context); }
@@ -997,7 +997,7 @@ static const struct resource_funcs dce112_res_pool_funcs = { .validate_plane = dce100_validate_plane }; -static void bw_calcs_data_update_from_pplib (struct core_dc *dc) +static void bw_calcs_data_update_from_pplib (struct dc *dc) {struct dm_pp_clock_levels_with_latency eng_clks = {0 };struct dm_pp_clock_levels_with_latency mem_clks = {0 };
@@ -1153,7 +1153,7 @@ const struct resource_caps *dce112_resource_cap(static bool construct (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct dce110_resource_pool *pool) {unsigned int i;
@@ -1170,9 +1170,9 @@ static bool construct(*************************************************/ pool->base.underlay_pipe_index =NO_UNDERLAY_PIPE ; pool->base.pipe_count = pool->base.res_cap->num_timing_generator; - dc->public.caps.max_downscale_ratio =200 ; - dc->public.caps.i2c_speed_in_khz =100 ; - dc->public.caps.max_cursor_size =128 ; + dc->caps.max_downscale_ratio =200 ; + dc->caps.i2c_speed_in_khz =100 ; + dc->caps.max_cursor_size =128 ;/************************************************* * Create resources *
@@ -1319,7 +1319,7 @@ static bool construct( &res_create_funcs)) goto res_create_fail; - dc->public.caps.max_planes = pool->base.pipe_count; + dc->caps.max_planes = pool->base.pipe_count;/* Create hardware sequencer */ if (!dce112_hw_sequencer_construct (dc))
@@ -1338,7 +1338,7 @@ static bool construct(struct resource_pool *dce112_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc) +struct dc *dc) {struct dce110_resource_pool *pool =dm_alloc (sizeof (struct dce110_resource_pool ));
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h +5 -5
@@ -28,27 +28,27 @@#include "core_types.h" -struct core_dc ; +struct dc ;struct resource_pool ;struct resource_pool *dce112_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);enum dc_status dce112_validate_with_context ( -const struct core_dc *dc, +struct dc *dc,const struct dc_validation_set set[],int set_count,struct validate_context *context,struct validate_context *old_context);enum dc_status dce112_validate_guaranteed ( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *dc_stream,struct validate_context *context);bool dce112_validate_bandwidth ( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context);
drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c +2 -3
@@ -25,7 +25,6 @@#include "dm_services.h" #include "dc.h" -#include "core_dc.h" #include "core_types.h" #include "dce120_hw_sequencer.h" #include "dce/dce_hwseq.h"
@@ -149,7 +148,7 @@ static void dce120_init_pte(struct dc_context *ctx, uint8_t controller_id)#endif static bool dce120_enable_display_power_gating ( -struct core_dc *dc, +struct dc *dc,uint8_t controller_id,struct dc_bios *dcb,enum pipe_gating_control power_gating)
@@ -247,7 +246,7 @@ static void dce120_update_dchub( -bool dce120_hw_sequencer_construct (struct core_dc *dc) +bool dce120_hw_sequencer_construct (struct dc *dc) {/* All registers used by dce11.2 match those in dce11 in offset and * structure
drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h +2 -2
@@ -28,9 +28,9 @@#include "core_types.h" -struct core_dc ; +struct dc ; -bool dce120_hw_sequencer_construct (struct core_dc *dc); +bool dce120_hw_sequencer_construct (struct dc *dc);#endif /* __DC_HWSS_DCE112_H__ */
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +9 -9
@@ -410,7 +410,7 @@ void dce120_clock_source_destroy(struct clock_source **clk_src) } -bool dce120_hw_sequencer_create (struct core_dc *dc) +bool dce120_hw_sequencer_create (struct dc *dc) {/* All registers used by dce11.2 match those in dce11 in offset and * structure
@@ -704,7 +704,7 @@ static const struct resource_funcs dce120_res_pool_funcs = { .validate_plane = dce100_validate_plane }; -static void bw_calcs_data_update_from_pplib (struct core_dc *dc) +static void bw_calcs_data_update_from_pplib (struct dc *dc) {struct dm_pp_clock_levels_with_latency eng_clks = {0 };struct dm_pp_clock_levels_with_latency mem_clks = {0 };
@@ -831,7 +831,7 @@ static void bw_calcs_data_update_from_pplib(struct core_dc *dc)static bool construct (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct dce110_resource_pool *pool) {unsigned int i;
@@ -847,10 +847,10 @@ static bool construct( pool->base.pipe_count = res_cap.num_timing_generator; pool->base.underlay_pipe_index =NO_UNDERLAY_PIPE ; - dc->public.caps.max_downscale_ratio =200 ; - dc->public.caps.i2c_speed_in_khz =100 ; - dc->public.caps.max_cursor_size =128 ; - dc->public.debug = debug_defaults; + dc->caps.max_downscale_ratio =200 ; + dc->caps.i2c_speed_in_khz =100 ; + dc->caps.max_cursor_size =128 ; + dc->debug = debug_defaults;/************************************************* * Create resources *
@@ -982,7 +982,7 @@ static bool construct(if (!dce120_hw_sequencer_create (dc)) goto controller_create_fail; - dc->public.caps.max_planes = pool->base.pipe_count; + dc->caps.max_planes = pool->base.pipe_count;bw_calcs_init (dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);
@@ -1003,7 +1003,7 @@ static bool construct(struct resource_pool *dce120_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc) +struct dc *dc) {struct dce110_resource_pool *pool =dm_alloc (sizeof (struct dce110_resource_pool ));
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.h +2 -2
@@ -28,12 +28,12 @@#include "core_types.h" -struct core_dc ; +struct dc ;struct resource_pool ;struct resource_pool *dce120_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);#endif /* __DC_RESOURCE_DCE120_H__ */
drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c +2 -3
@@ -25,7 +25,6 @@#include "dm_services.h" #include "dc.h" -#include "core_dc.h" #include "core_types.h" #include "dce80_hw_sequencer.h"
@@ -72,7 +71,7 @@ static const struct dce80_hw_seq_reg_offsets reg_offsets[] = {/***************************PIPE_CONTROL***********************************/ static bool dce80_enable_display_power_gating ( -struct core_dc *dc, +struct dc *dc,uint8_t controller_id,struct dc_bios *dcb,enum pipe_gating_control power_gating)
@@ -107,7 +106,7 @@ static bool dce80_enable_display_power_gating(return false; } -bool dce80_hw_sequencer_construct (struct core_dc *dc) +bool dce80_hw_sequencer_construct (struct dc *dc) {dce110_hw_sequencer_construct (dc);
drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h +2 -2
@@ -28,9 +28,9 @@#include "core_types.h" -struct core_dc ; +struct dc ; -bool dce80_hw_sequencer_construct (struct core_dc *dc); +bool dce80_hw_sequencer_construct (struct dc *dc);#endif /* __DC_HWSS_DCE80_H__ */
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +23 -23
148 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.h +4 -4
@@ -28,20 +28,20 @@#include "core_types.h" -struct core_dc ; +struct dc ;struct resource_pool ;struct resource_pool *dce80_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);struct resource_pool *dce81_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);struct resource_pool *dce83_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);#endif /* __DC_RESOURCE_DCE80_H__ */
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c +0 -1
@@ -26,7 +26,6 @@#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )#include "reg_helper.h" -#include "core_dc.h" #include "resource.h" #include "dwb.h" #include "dcn10_dwb.h"
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +54 -54
421 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +2 -2
@@ -28,9 +28,9 @@#include "core_types.h" -struct core_dc ; +struct dc ; -void dcn10_hw_sequencer_construct (struct core_dc *dc); +void dcn10_hw_sequencer_construct (struct dc *dc);extern void fill_display_configs (const struct validate_context *context,struct dm_pp_display_configuration *pp_display_cfg);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +17 -17
@@ -825,7 +825,7 @@ static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx) }static enum dc_status build_mapped_resource ( -const struct core_dc *dc, +const struct dc *dc,struct validate_context *context,struct validate_context *old_context) {
@@ -872,7 +872,7 @@ static enum dc_status build_mapped_resource( } enum dc_status dcn10_validate_with_context( - const struct core_dc *dc, + struct dc *dc, const struct dc_validation_set set[], int set_count, struct validate_context *context,
@@ -917,7 +917,7 @@ enum dc_status dcn10_validate_with_context( }enum dc_status dcn10_validate_guaranteed ( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *dc_stream,struct validate_context *context) {
@@ -937,7 +937,7 @@ enum dc_status dcn10_validate_guaranteed(if (result ==DC_OK ) {validate_guaranteed_copy_streams ( - context, dc->public.caps.max_streams); + context, dc->caps.max_streams); result =resource_build_scaling_params_for_context (dc, context); }if (result ==DC_OK && !dcn_validate_bandwidth (dc, context))
@@ -1221,7 +1221,7 @@ static struct resource_funcs dcn10_res_pool_funcs = {static bool construct (uint8_t num_virtual_links, -struct core_dc *dc, +struct dc *dc,struct dcn10_resource_pool *pool) {int i;
@@ -1244,16 +1244,16 @@ static bool construct(/* TODO: Hardcode to correct number of functional controllers */ pool->base.pipe_count =4 ; - dc->public.caps.max_downscale_ratio =200 ; - dc->public.caps.i2c_speed_in_khz =100 ; - dc->public.caps.max_cursor_size =256 ; + dc->caps.max_downscale_ratio =200 ; + dc->caps.i2c_speed_in_khz =100 ; + dc->caps.max_cursor_size =256 ; - dc->public.caps.max_slave_planes =1 ; + dc->caps.max_slave_planes =1 ;if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) - dc->public.debug = debug_defaults_drv; + dc->debug = debug_defaults_drv;else - dc->public.debug = debug_defaults_diags; + dc->debug = debug_defaults_diags;/************************************************* * Create resources *
@@ -1327,7 +1327,7 @@ static bool construct(if (ASICREV_IS_RV1_F0 (dc->ctx->asic_id.hw_internal_rev)) { dc->dcn_soc->urgent_latency =3 ; - dc->public.debug.disable_dmcu = true; + dc->debug.disable_dmcu = true; dc->dcn_soc->fabric_and_dram_bandwidth_vmax0p9 =41.60f ; }
@@ -1347,10 +1347,10 @@ static bool construct( } } -if (!dc->public.debug.disable_pplib_clock_request) +if (!dc->debug.disable_pplib_clock_request)dcn_bw_update_from_pplib (dc);dcn_bw_sync_calcs_and_dml (dc); -if (!dc->public.debug.disable_pplib_wm_range) +if (!dc->debug.disable_pplib_wm_range)dcn_bw_notify_pplib_of_wm_ranges (dc); {
@@ -1424,9 +1424,9 @@ static bool construct( goto res_create_fail;dcn10_hw_sequencer_construct (dc); - dc->public.caps.max_planes = pool->base.pipe_count; + dc->caps.max_planes = pool->base.pipe_count; - dc->public.cap_funcs = cap_funcs; + dc->cap_funcs = cap_funcs;return true;
@@ -1449,7 +1449,7 @@ static bool construct(struct resource_pool *dcn10_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc) +struct dc *dc) {struct dcn10_resource_pool *pool =dm_alloc (sizeof (struct dcn10_resource_pool ));
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h +2 -2
@@ -31,7 +31,7 @@#define TO_DCN10_RES_POOL (pool)\ container_of(pool, struct dcn10_resource_pool, base) -struct core_dc ; +struct dc ;struct resource_pool ;struct _vcs_dpi_display_pipe_params_st ;
@@ -40,7 +40,7 @@ struct dcn10_resource_pool { };struct resource_pool *dcn10_create_resource_pool (uint8_t num_virtual_links, -struct core_dc *dc); +struct dc *dc);#endif /* __DC_RESOURCE_DCN10_H__ */
drivers/gpu/drm/amd/display/dc/inc/core_dc.h deleted +0 -55
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/core_types.h +4 -4
@@ -52,7 +52,7 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state,/************ link *****************/ struct link_init_data { -const struct core_dc *dc; +const struct dc *dc;struct dc_context *ctx;/* TODO: remove 'dal' when DC is complete. */ uint32_t connector_index;/* this will be mapped to the HPD pins */ uint32_t link_index;/* this is mapped to DAL display_index
@@ -87,19 +87,19 @@ struct resource_funcs {struct link_encoder *(*link_enc_create)(const struct encoder_init_data *init);enum dc_status (*validate_with_context)( -const struct core_dc *dc, +struct dc *dc,const struct dc_validation_set set[],int set_count,struct validate_context *context,struct validate_context *old_context);enum dc_status (*validate_guaranteed)( -const struct core_dc *dc, +struct dc *dc,struct dc_stream_state *stream,struct validate_context *context);bool (*validate_bandwidth)( -const struct core_dc *dc, +struct dc *dc,struct validate_context *context); struct pipe_ctx *(*acquire_idle_pipe_for_layer)(
drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h +1 -1
@@ -33,7 +33,7 @@#include "bw_fixed.h" struct pipe_ctx ; -struct core_dc ; +struct dc ;struct validate_context ;struct dce_bw_output ;
drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h +6 -6
@@ -34,7 +34,7 @@#include "display_clock.h" #include "../dml/display_mode_lib.h" -struct core_dc ; +struct dc ;struct validate_context ;/*******************************************************************************
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +29 -21
50 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/resource.h +7 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c +0 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/include/logger_interface.h +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +5 -6
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Part of the diff is not shown here. View the raw message.
PATCH 10/77 drm/amd/display: Use MAX_PIPES for DTO reg arrays
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h +3 -3
@@ -107,9 +107,9 @@ struct dce110_clk_src_regs {/* below are for DTO. * todo: should probably use different struct to not waste space */ -uint32_t PHASE [4 ]; -uint32_t MODULO [4 ]; -uint32_t PIXEL_RATE_CNTL [4 ]; +uint32_t PHASE [MAX_PIPES ]; +uint32_t MODULO [MAX_PIPES ]; +uint32_t PIXEL_RATE_CNTL [MAX_PIPES ]; };struct dce110_clk_src {
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/77 drm/amd/display: blank otg before power gate front end.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -1
@@ -2298,8 +2298,10 @@ static void dcn10_apply_ctx_for_surface(struct pipe_ctx *old_pipe_ctx = &dc->current_context->res_ctx.pipe_ctx[i]; -if (old_pipe_ctx->stream_res.tg && old_pipe_ctx->stream_res.tg->inst == be_idx) +if (old_pipe_ctx->stream_res.tg && old_pipe_ctx->stream_res.tg->inst == be_idx) { + old_pipe_ctx->stream_res.tg->funcs->set_blank (old_pipe_ctx->stream_res.tg, true);dcn10_power_down_fe (dc, old_pipe_ctx->pipe_idx); + } }return ; }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/77 drm/amd/display: eDP power sequence T9 fail
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 23 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +23 -0
@@ -110,6 +110,28 @@ void dp_enable_link_phy(dp_receiver_power_ctrl (link, true); } +bool edp_receiver_ready_T9 (struct dc_link *link) +{ +unsigned int tries =0 ; +unsigned char sinkstatus =0 ; +unsigned char edpRev =0 ; +enum dc_status result =DC_OK ; + result =core_link_read_dpcd (link,DP_EDP_DPCD_REV , &edpRev,sizeof (edpRev)); +if (edpRev <DP_EDP_12 ) +return true; +/* start from eDP version 1.2, SINK_STAUS indicate the sink is ready.*/ +do { + sinkstatus =1 ; + result =core_link_read_dpcd (link,DP_SINK_STATUS , &sinkstatus,sizeof (sinkstatus)); +if (sinkstatus ==0 ) +break ; +if (result !=DC_OK ) +break ; +dm_delay_in_microseconds (link->ctx,100 );//MAx T9 + }while (++tries <50 ); +return result; +} +void dp_disable_link_phy (struct dc_link *link,enum signal_type signal) {if (!link->wa_flags.dp_keep_receiver_powered)
@@ -117,6 +139,7 @@ void dp_disable_link_phy(struct dc_link *link, enum signal_type signal)if (signal ==SIGNAL_TYPE_EDP ) { link->link_enc->funcs->backlight_control (link->link_enc, false); +edp_receiver_ready_T9 (link); link->link_enc->funcs->disable_output (link->link_enc, signal); link->link_enc->funcs->power_control (link->link_enc, false); }else
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +1 -1
@@ -744,7 +744,7 @@ void dce110_link_encoder_edp_backlight_control(return ; } -if (!enable && !is_panel_powered_on (enc110)) { +if (!enable && !is_panel_backlight_on (enc110)) {dm_logger_write (ctx->logger,LOG_HW_RESUME_S3 ,"%s: panel already powered down. Do nothing.\n" , __func__);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/77 drm/amd/display: Leave DCN config guard around fpu header
In reply to a message not in the archiveSee
https://lists.freedesktop.org/archives/dri-devel/2017-August/149938.html
--- drivers/gpu/drm/amd/display/dc/dm_services.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dm_services.h +2 -0
@@ -75,7 +75,9 @@BREAK_TO_DEBUGGER (); \ } while (0) +#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )#include <asm/fpu/api.h> +#endif #define dm_alloc (size) kzalloc(size, GFP_KERNEL)#define dm_realloc (ptr, size) krealloc(ptr, size, GFP_KERNEL)
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/77 drm/amd/display: Fix FBC compilation
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
- Fixing compilation with ENABLE_FBC flag
which was broken after flattening core_dc to dc
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -35,6 +35,7 @@#include <inc/hw/opp.h> #include "inc/hw_sequencer.h" +#include "inc/compressor.h" #include "dml/display_mode_lib.h"
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/77 drm/amd/display: remove fake address reporting when blank
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -8
@@ -2666,14 +2666,6 @@ void dcn10_update_pending_status(struct pipe_ctx *pipe_ctx) pipe_ctx->plane_res.mi->funcs->mem_input_is_flip_pending ( pipe_ctx->plane_res.mi); -/* DCN we read INUSE address in MI, do we still need this wa? */ -if (plane_state->status.is_flip_pending && - !plane_state->visible) { - pipe_ctx->plane_res.mi->current_address = - pipe_ctx->plane_res.mi->request_address; -BREAK_TO_DEBUGGER (); - } - plane_state->status.current_address = pipe_ctx->plane_res.mi->current_address;if (pipe_ctx->plane_res.mi->current_address.type ==PLN_ADDR_TYPE_GRPH_STEREO && tg->funcs->is_stereo_left_eye) {
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/77 drm/amd/display: move vm registers to hwsequencer
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 52 +++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 95 +++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 106 ++------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 41 +------- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 21 ++++ 5 files changed, 172 insertions(+), 143 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +50 -2
@@ -206,7 +206,20 @@SR (D1VGA_CONTROL ), \SR (D2VGA_CONTROL ), \SR (D3VGA_CONTROL ), \ - SR(D4VGA_CONTROL) +SR (D4VGA_CONTROL ), \ +/* todo: get these from GVM instead of reading registers ourselves */ \ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32 ),\ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32 ),\ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32 ),\ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32 ),\ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32 ),\ +MMHUB_SR (VM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32 ),\ +MMHUB_SR (VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_HI32 ),\ +MMHUB_SR (VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_LO32 ),\ +MMHUB_SR (MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_MSB ),\ +MMHUB_SR (MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_LSB ),\ +MMHUB_SR (MC_VM_SYSTEM_APERTURE_LOW_ADDR ),\ + MMHUB_SR(MC_VM_SYSTEM_APERTURE_HIGH_ADDR)#define HWSEQ_DCN1_REG_LIST ()\ HWSEQ_DCN_REG_LIST(), \
@@ -312,6 +325,19 @@ struct dce_hwseq_registers {uint32_t D2VGA_CONTROL ;uint32_t D3VGA_CONTROL ;uint32_t D4VGA_CONTROL ; +/* MMHUB registers. read only. temporary hack */ +uint32_t VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32 ; +uint32_t VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32 ; +uint32_t VM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32 ; +uint32_t VM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32 ; +uint32_t VM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32 ; +uint32_t VM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32 ; +uint32_t VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_HI32 ; +uint32_t VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_LO32 ; +uint32_t MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_MSB ; +uint32_t MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_LSB ; +uint32_t MC_VM_SYSTEM_APERTURE_LOW_ADDR ; +uint32_t MC_VM_SYSTEM_APERTURE_HIGH_ADDR ; };/* set field name */ #define HWS_SF (blk_name, reg_name, field_name, post_fix)\
@@ -432,7 +458,17 @@ struct dce_hwseq_registers { HWS_SF(, DCHUBBUB_SDPIF_AGP_BASE, SDPIF_AGP_BASE, mask_sh), \ HWS_SF(, DCHUBBUB_SDPIF_AGP_BOT, SDPIF_AGP_BOT, mask_sh), \ HWS_SF(, DCHUBBUB_SDPIF_AGP_TOP, SDPIF_AGP_TOP, mask_sh), \ - HWS_SF(DPP_TOP0_, DPP_CONTROL, DPPCLK_RATE_CONTROL, mask_sh) +HWS_SF (DPP_TOP0_, DPP_CONTROL, DPPCLK_RATE_CONTROL, mask_sh), \ +/* todo: get these from GVM instead of reading registers ourselves */ \ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, PAGE_DIRECTORY_ENTRY_HI32, mask_sh),\ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, PAGE_DIRECTORY_ENTRY_LO32, mask_sh),\ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32, LOGICAL_PAGE_NUMBER_HI4, mask_sh),\ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32, LOGICAL_PAGE_NUMBER_LO32, mask_sh),\ + HWS_SF(, VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_HI32, PHYSICAL_PAGE_ADDR_HI4, mask_sh),\ + HWS_SF(, VM_L2_PROTECTION_FAULT_DEFAULT_ADDR_LO32, PHYSICAL_PAGE_ADDR_LO32, mask_sh),\ + HWS_SF(, MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_MSB, PHYSICAL_PAGE_NUMBER_MSB, mask_sh),\ + HWS_SF(, MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_LSB, PHYSICAL_PAGE_NUMBER_LSB, mask_sh),\ + HWS_SF(, MC_VM_SYSTEM_APERTURE_LOW_ADDR, LOGICAL_ADDR, mask_sh)#define HWSEQ_REG_FIELD_LIST (type) \ type DCFE_CLOCK_ENABLE; \
@@ -451,6 +487,18 @@ struct dce_hwseq_registers {type PIXEL_RATE_SOURCE ; \type PHYPLL_PIXEL_RATE_SOURCE ; \type PIXEL_RATE_PLL_SOURCE ; \ +/* todo: get these from GVM instead of reading registers ourselves */ \ +type PAGE_DIRECTORY_ENTRY_HI32 ;\ +type PAGE_DIRECTORY_ENTRY_LO32 ;\ +type LOGICAL_PAGE_NUMBER_HI4 ;\ +type LOGICAL_PAGE_NUMBER_LO32 ;\ +type PHYSICAL_PAGE_ADDR_HI4 ;\ +type PHYSICAL_PAGE_ADDR_LO32 ;\ +type PHYSICAL_PAGE_NUMBER_MSB ;\ +type PHYSICAL_PAGE_NUMBER_LSB ;\ +type LOGICAL_ADDR ; \ +type ENABLE_L1_TLB ;\ +type SYSTEM_ACCESS_MODE ;#define HWSEQ_DCN_REG_FIELD_LIST (type) \ type VUPDATE_NO_LOCK_EVENT_CLEAR; \
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +93 -2
116 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c +6 -100
134 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h +2 -39
59 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h +21 -0
@@ -74,6 +74,19 @@ struct mem_input {struct stutter_modes stutter_mode; }; +struct vm_system_aperture_param { +PHYSICAL_ADDRESS_LOC sys_default; +PHYSICAL_ADDRESS_LOC sys_low; +PHYSICAL_ADDRESS_LOC sys_high; +}; + +struct vm_context0_param { +PHYSICAL_ADDRESS_LOC pte_base; +PHYSICAL_ADDRESS_LOC pte_start; +PHYSICAL_ADDRESS_LOC pte_end; +PHYSICAL_ADDRESS_LOC fault_default; +}; +struct mem_input_funcs { void (*mem_input_setup)( struct mem_input *mem_input,
@@ -125,6 +138,14 @@ struct mem_input_funcs {union dc_tiling_info *tiling_info, enum dc_rotation_angle rotation); +void (*mem_input_set_vm_system_aperture_settings)( +struct mem_input *mem_input, +struct vm_system_aperture_param *apt); + +void (*mem_input_set_vm_context0_settings)( +struct mem_input *mem_input, +const struct vm_context0_param *vm0); + void (*mem_input_program_surface_config)( struct mem_input *mem_input, enum surface_pixel_format format,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/77 drm/amd/display: Implement HDMI retimer settings for RV AM4 support.
In reply to a message not in the archiveFrom: Zeyu Fan <[email protected]>
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 69 ++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 420 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 - .../amd/display/include/grph_object_ctrl_defs.h | 38 ++ 5 files changed, 524 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +69 -0
@@ -993,6 +993,8 @@ static struct device_id device_type_from_device_id(uint16_t device_id)struct device_id result_device_id; + result_device_id.raw_device_tag = device_id; +switch (device_id) {case ATOM_DISPLAY_LCD1_SUPPORT : result_device_id.device_type =DEVICE_TYPE_LCD ;
@@ -1812,10 +1814,77 @@ static enum bp_result get_integrated_info_v11( info_v11->extdispconninfo.path[i].hpdlut_index; info->ext_disp_conn_info.path[i].channel_mapping.raw = info_v11->extdispconninfo.path[i].channelmapping; + info->ext_disp_conn_info.path[i].caps = +le16_to_cpu (info_v11->extdispconninfo.path[i].caps); } info->ext_disp_conn_info.checksum = info_v11->extdispconninfo.checksum; + info->dp0_ext_hdmi_slv_addr = info_v11->dp0_retimer_set.HdmiSlvAddr; + info->dp0_ext_hdmi_reg_num = info_v11->dp0_retimer_set.HdmiRegNum; +for (i =0 ; i < info->dp0_ext_hdmi_reg_num; i++) { + info->dp0_ext_hdmi_reg_settings[i].i2c_reg_index = + info_v11->dp0_retimer_set.HdmiRegSetting[i].ucI2cRegIndex; + info->dp0_ext_hdmi_reg_settings[i].i2c_reg_val = + info_v11->dp0_retimer_set.HdmiRegSetting[i].ucI2cRegVal; + } + info->dp0_ext_hdmi_6g_reg_num = info_v11->dp0_retimer_set.Hdmi6GRegNum; +for (i =0 ; i < info->dp0_ext_hdmi_6g_reg_num; i++) { + info->dp0_ext_hdmi_6g_reg_settings[i].i2c_reg_index = + info_v11->dp0_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegIndex; + info->dp0_ext_hdmi_6g_reg_settings[i].i2c_reg_val = + info_v11->dp0_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegVal; + } + + info->dp1_ext_hdmi_slv_addr = info_v11->dp1_retimer_set.HdmiSlvAddr; + info->dp1_ext_hdmi_reg_num = info_v11->dp1_retimer_set.HdmiRegNum; +for (i =0 ; i < info->dp1_ext_hdmi_reg_num; i++) { + info->dp1_ext_hdmi_reg_settings[i].i2c_reg_index = + info_v11->dp1_retimer_set.HdmiRegSetting[i].ucI2cRegIndex; + info->dp1_ext_hdmi_reg_settings[i].i2c_reg_val = + info_v11->dp1_retimer_set.HdmiRegSetting[i].ucI2cRegVal; + } + info->dp1_ext_hdmi_6g_reg_num = info_v11->dp1_retimer_set.Hdmi6GRegNum; +for (i =0 ; i < info->dp1_ext_hdmi_6g_reg_num; i++) { + info->dp1_ext_hdmi_6g_reg_settings[i].i2c_reg_index = + info_v11->dp1_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegIndex; + info->dp1_ext_hdmi_6g_reg_settings[i].i2c_reg_val = + info_v11->dp1_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegVal; + } + + info->dp2_ext_hdmi_slv_addr = info_v11->dp2_retimer_set.HdmiSlvAddr; + info->dp2_ext_hdmi_reg_num = info_v11->dp2_retimer_set.HdmiRegNum; +for (i =0 ; i < info->dp2_ext_hdmi_reg_num; i++) { + info->dp2_ext_hdmi_reg_settings[i].i2c_reg_index = + info_v11->dp2_retimer_set.HdmiRegSetting[i].ucI2cRegIndex; + info->dp2_ext_hdmi_reg_settings[i].i2c_reg_val = + info_v11->dp2_retimer_set.HdmiRegSetting[i].ucI2cRegVal; + } + info->dp2_ext_hdmi_6g_reg_num = info_v11->dp2_retimer_set.Hdmi6GRegNum; +for (i =0 ; i < info->dp2_ext_hdmi_6g_reg_num; i++) { + info->dp2_ext_hdmi_6g_reg_settings[i].i2c_reg_index = + info_v11->dp2_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegIndex; + info->dp2_ext_hdmi_6g_reg_settings[i].i2c_reg_val = + info_v11->dp2_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegVal; + } + + info->dp3_ext_hdmi_slv_addr = info_v11->dp3_retimer_set.HdmiSlvAddr; + info->dp3_ext_hdmi_reg_num = info_v11->dp3_retimer_set.HdmiRegNum; +for (i =0 ; i < info->dp3_ext_hdmi_reg_num; i++) { + info->dp3_ext_hdmi_reg_settings[i].i2c_reg_index = + info_v11->dp3_retimer_set.HdmiRegSetting[i].ucI2cRegIndex; + info->dp3_ext_hdmi_reg_settings[i].i2c_reg_val = + info_v11->dp3_retimer_set.HdmiRegSetting[i].ucI2cRegVal; + } + info->dp3_ext_hdmi_6g_reg_num = info_v11->dp3_retimer_set.Hdmi6GRegNum; +for (i =0 ; i < info->dp3_ext_hdmi_6g_reg_num; i++) { + info->dp3_ext_hdmi_6g_reg_settings[i].i2c_reg_index = + info_v11->dp3_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegIndex; + info->dp3_ext_hdmi_6g_reg_settings[i].i2c_reg_val = + info_v11->dp3_retimer_set.Hdmi6GhzRegSetting[i].ucI2cRegVal; + } + +/** TODO - review **/ #if 0 info->boot_up_engine_clock =le32_to_cpu (info_v11->ulBootUpEngineClock)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +416 -4
437 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -815,6 +815,7 @@ struct dc_link {union ddi_channel_mapping ddi_channel_mapping;struct connector_device_tag_info device_tag;struct dpcd_caps dpcd_caps; +unsigned short chip_caps;unsigned int dpcd_sink_count;enum edp_revision edp_revision;
drivers/gpu/drm/amd/display/dc/dm_helpers.h +0 -5
@@ -96,11 +96,6 @@ bool dm_helpers_submit_i2c(const struct dc_link *link, struct i2c_command *cmd); - - - - - enum dc_edid_status dm_helpers_read_local_edid( struct dc_context *ctx, struct dc_link *link,
drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h +38 -0
@@ -65,6 +65,7 @@ enum dal_device_type {struct device_id {enum dal_device_type device_type:16 ;uint32_t enum_id:16 ;/* 1 based enum */ +uint16_t raw_device_tag; };struct graphics_object_i2c_info {
@@ -264,6 +265,20 @@ struct transmitter_configuration {#define NUMBER_OF_DISP_CLK_VOLTAGE 4#define NUMBER_OF_AVAILABLE_SCLK 5 +struct i2c_reg_info { +unsigned char i2c_reg_index; +unsigned char i2c_reg_val; +}; + +struct ext_hdmi_settings { +unsigned char slv_addr; +unsigned char reg_num; +struct i2c_reg_info reg_settings[9 ]; +unsigned char reg_num_6g; +struct i2c_reg_info reg_settings_6g[3 ]; +}; + +/* V6 */ struct integrated_info { struct clock_voltage_caps {
@@ -291,6 +306,8 @@ struct integrated_info {struct graphics_object_id ext_encoder_obj_id;/* XBAR mapping of the PHY channels */ union ddi_channel_mapping channel_mapping; + +unsigned short caps; } path[MAX_NUMBER_OF_EXT_DISPLAY_PATH ];uint8_t gu_id[NUMBER_OF_UCHAR_FOR_GUID ];
@@ -357,6 +374,27 @@ struct integrated_info {uint32_t lvds_pwr_off_seq_blon_to_vary_bl_in_4ms;uint32_t lvds_reserved1;uint32_t lvds_bit_depth_control_val; +//Start from V9 +unsigned char dp0_ext_hdmi_slv_addr; +unsigned char dp0_ext_hdmi_reg_num; +struct i2c_reg_info dp0_ext_hdmi_reg_settings[9 ]; +unsigned char dp0_ext_hdmi_6g_reg_num; +struct i2c_reg_info dp0_ext_hdmi_6g_reg_settings[3 ]; +unsigned char dp1_ext_hdmi_slv_addr; +unsigned char dp1_ext_hdmi_reg_num; +struct i2c_reg_info dp1_ext_hdmi_reg_settings[9 ]; +unsigned char dp1_ext_hdmi_6g_reg_num; +struct i2c_reg_info dp1_ext_hdmi_6g_reg_settings[3 ]; +unsigned char dp2_ext_hdmi_slv_addr; +unsigned char dp2_ext_hdmi_reg_num; +struct i2c_reg_info dp2_ext_hdmi_reg_settings[9 ]; +unsigned char dp2_ext_hdmi_6g_reg_num; +struct i2c_reg_info dp2_ext_hdmi_6g_reg_settings[3 ]; +unsigned char dp3_ext_hdmi_slv_addr; +unsigned char dp3_ext_hdmi_reg_num; +struct i2c_reg_info dp3_ext_hdmi_reg_settings[9 ]; +unsigned char dp3_ext_hdmi_6g_reg_num; +struct i2c_reg_info dp3_ext_hdmi_6g_reg_settings[3 ]; };/**
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/77 drm/amd/display: refactor pplib/smu communication
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
new per SoC interface instead legacy interface with lots of un-used field that only cause confusion
model pp_smu like one of our HW objects with func_ptr interface to call into it. struct pp_smu as handle to call pp/smu
--- .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 13 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 100 ++++++++-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 19 ++- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 131 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dm_services.h | 5 +- drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + 8 files changed, 213 insertions(+), 60 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dm_pp_smu.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +5 -8
@@ -401,14 +401,6 @@ bool dm_pp_notify_wm_clock_changes(return false; } -bool dm_pp_notify_wm_clock_changes_soc15 ( -const struct dc_context *ctx, -struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges) -{ -/* TODO: to be implemented */ -return false; -} -bool dm_pp_apply_power_level_change_request (const struct dc_context *ctx,struct dm_pp_power_level_change_request *level_change_req)
@@ -433,4 +425,9 @@ bool dm_pp_get_static_clocks(return false; } +void dm_pp_get_funcs_rv ( +struct dc_context *ctx, +struct pp_smu_funcs_rv *funcs) +{} +/**** end of power component interfaces ****/
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +52 -48
119 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +18 -1
@@ -678,6 +678,17 @@ void dcn10_clock_source_destroy(struct clock_source **clk_src) *clk_src =NULL ; } +static struct pp_smu_funcs_rv *dcn10_pp_smu_create (struct dc_context *ctx) +{ +struct pp_smu_funcs_rv *pp_smu =dm_alloc (sizeof (*pp_smu)); + +if (!pp_smu) +return pp_smu; + +dm_pp_get_funcs_rv (ctx, pp_smu); +return pp_smu; +} +static void destruct (struct dcn10_resource_pool *pool) {unsigned int i;
@@ -751,6 +762,8 @@ static void destruct(struct dcn10_resource_pool *pool)if (pool->base.display_clock !=NULL )dce_disp_clk_destroy (&pool->base.display_clock); + +dm_free (pool->base.pp_smu); } static struct mem_input *dcn10_mem_input_create(
@@ -1347,11 +1360,15 @@ static bool construct( } } + pool->base.pp_smu =dcn10_pp_smu_create (ctx); +if (!dc->debug.disable_pplib_clock_request)dcn_bw_update_from_pplib (dc);dcn_bw_sync_calcs_and_dml (dc); -if (!dc->debug.disable_pplib_wm_range) +if (!dc->debug.disable_pplib_wm_range) { + dc->res_pool = &pool->base;dcn_bw_notify_pplib_of_wm_ranges (dc); + } {#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )
drivers/gpu/drm/amd/display/dc/dm_pp_smu.h new file +131 -0
131 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dm_services.h +2 -3
@@ -339,9 +339,8 @@ bool dm_pp_notify_wm_clock_changes(const struct dc_context *ctx, struct dm_pp_wm_sets_with_clock_ranges *wm_with_clock_ranges); -bool dm_pp_notify_wm_clock_changes_soc15 ( -const struct dc_context *ctx, -struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges); +void dm_pp_get_funcs_rv (struct dc_context *ctx, +struct pp_smu_funcs_rv *funcs);/* DAL calls this function to notify PP about completion of Mode Set. * For PP it means that current DCE clocks are those which were returned
drivers/gpu/drm/amd/display/dc/dm_services_types.h +2 -0
@@ -29,6 +29,8 @@#include "os_types.h" #include "dc_types.h" +#include "dm_pp_smu.h" +struct dm_pp_clock_range {int min_khz;int max_khz;
drivers/gpu/drm/amd/display/dc/inc/core_types.h +2 -0
@@ -48,6 +48,7 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state,#include "clock_source.h" #include "audio.h" #include "hw_sequencer_types.h" +#include "dm_pp_smu.h" /************ link *****************/
@@ -126,6 +127,7 @@ struct resource_pool {struct stream_encoder *stream_enc[MAX_PIPES *2 ];#ifdef CONFIG_DRM_AMD_DC_DCN1_0 struct mpc *mpc; +struct pp_smu_funcs_rv *pp_smu;#endif struct dwbc *dwbc[MAX_DWB_PIPES ];
drivers/gpu/drm/amd/display/dc/inc/resource.h +1 -0
@@ -28,6 +28,7 @@#include "core_types.h" #include "core_status.h" #include "dal_asic_id.h" +#include "dm_pp_smu.h" /* TODO unhardcode, 4 for CZ*/ #define MEMORY_TYPE_MULTIPLIER 4
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/77 drm/amd/display: Per stream validate_context build v2.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Until now new context would start as empty, then populated with exsisting pipes + new. Now we start with duplication of existing context and then add/delete from the context pipes as needed.
This allows to do a per stream resource
population, start discarding dc_validation_set
and by this brings DC closer to to DRM.
v2: Add some fixes and rebase.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 68 ++- drivers/gpu/drm/amd/display/dc/core/dc.c | 108 +---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 468 +++++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 32 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 78 +--- .../drm/amd/display/dc/dce110/dce110_resource.c | 86 +--- .../drm/amd/display/dc/dce112/dce112_resource.c | 143 +++---- .../drm/amd/display/dc/dce112/dce112_resource.h | 5 + .../drm/amd/display/dc/dce120/dce120_resource.c | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 79 +--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 85 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 19 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 6 +- 13 files changed, 577 insertions(+), 604 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +57 -11
@@ -25,6 +25,7 @@#include "dm_services_types.h" #include "dc.h" +#include "dc/inc/core_types.h" #include "vid.h" #include "amdgpu.h"
@@ -690,13 +691,33 @@ struct drm_atomic_state * dm_atomic_state_alloc(struct drm_device *dev) {struct dm_atomic_state *state =kzalloc (sizeof (*state),GFP_KERNEL ); +struct validate_context *new_ctx; +struct amdgpu_device *adev = dev->dev_private; +struct dc *dc = adev->dm.dc; -if (!state ||drm_atomic_state_init (dev, &state->base) <0 ) { -kfree (state); +if (!state)return NULL ; - } + +if (drm_atomic_state_init (dev, &state->base) <0 ) + goto fail; + +/* copy existing configuration */ + new_ctx =dm_alloc (sizeof (*new_ctx)); + +if (!new_ctx) + goto fail; + +atomic_inc (&new_ctx->ref_count); + +dc_resource_validate_ctx_copy_construct_current (dc, new_ctx); + + state->context = new_ctx;return &state->base; + +fail: +kfree (state); +return NULL ; } static void
@@ -4518,7 +4539,6 @@ static int do_aquire_global_lock(int amdgpu_dm_atomic_check (struct drm_device *dev,struct drm_atomic_state *state) { -struct dm_atomic_state *dm_state;struct drm_crtc *crtc;struct drm_crtc_state *crtc_state;struct drm_plane *plane;
@@ -4532,6 +4552,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,int set_count;struct dc_validation_set set[MAX_STREAMS ] = { {0 } };struct dm_crtc_state *old_acrtc_state, *new_acrtc_state; +struct dm_atomic_state *dm_state =to_dm_atomic_state (state);/* * This bool will be set for true for any modeset/reset
@@ -4546,8 +4567,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,return ret; } - dm_state =to_dm_atomic_state (state); -/* copy existing configuration */ set_count =0 ;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {
@@ -4590,8 +4609,17 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,if (modereset_required (crtc_state)) { -/* i.e. reset mode */ +/* i.e. reset mode */ if (new_acrtc_state->stream) { + +if (!dc_remove_stream_from_ctx ( + dc, + dm_state->context, + new_acrtc_state->stream)) { + ret = -EINVAL ; + goto fail; + } + set_count = remove_from_val_sets( set, set_count,
@@ -4639,8 +4667,19 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,if (modeset_required (crtc_state, new_stream, old_acrtc_state->stream)) { -if (new_acrtc_state->stream) +if (new_acrtc_state->stream) { + +if (!dc_remove_stream_from_ctx ( + dc, + dm_state->context, + new_acrtc_state->stream)) { + ret = -EINVAL ; + goto fail; + } + +dc_stream_release (new_acrtc_state->stream); + } new_acrtc_state->stream = new_stream;
@@ -4651,6 +4690,14 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, new_acrtc_state->stream, crtc); +if (!dc_add_stream_to_ctx ( + dc, + dm_state->context, + new_acrtc_state->stream)) { + ret = -EINVAL ; + goto fail; + } + lock_and_validation_needed = true; }else {/*
@@ -4767,9 +4814,8 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, ret =do_aquire_global_lock (dev, state);if (ret) goto fail; -WARN_ON (dm_state->context); - dm_state->context =dc_get_validate_context (dc, set, set_count); -if (!dm_state->context) { + +if (!dc_validate_global_state (dc, set, set_count, dm_state->context)) { ret = -EINVAL ; goto fail; }
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -95
154 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +330 -138
560 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +24 -8
@@ -618,6 +618,16 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,uint32_t *h_position, uint32_t *v_position); +bool dc_remove_stream_from_ctx ( +struct dc *dc, +struct validate_context *new_ctx, +struct dc_stream_state *stream); + +bool dc_add_stream_to_ctx ( +struct dc *dc, +struct validate_context *new_ctx, +struct dc_stream_state *stream); +/* * Structure to store surface/stream associations for validation */
@@ -630,16 +640,18 @@ struct dc_validation_set {bool dc_validate_stream (struct dc *dc,struct dc_stream_state *stream);bool dc_validate_plane (struct dc *dc,const struct dc_plane_state *plane_state); -/* -* This function takes a set of resources and checks that they are cofunctional. -* -* After this call: -* No hardware is programmed for call. Only validation is done. -*/ -struct validate_context *dc_get_validate_context ( + +bool dc_validate_with_context (struct dc *dc,const struct dc_validation_set set[], -uint8_t set_count); +int set_count, +struct validate_context *context); + +bool dc_validate_global_state ( +struct dc *dc, +const struct dc_validation_set set[], +int set_count, +struct validate_context *new_ctx); bool dc_validate_resources( struct dc *dc,
@@ -662,6 +674,10 @@ void dc_resource_validate_ctx_copy_construct(const struct validate_context *src_ctx, struct validate_context *dst_ctx); +void dc_resource_validate_ctx_copy_construct_current ( +const struct dc *dc, +struct validate_context *dst_ctx); +void dc_resource_validate_ctx_destruct (struct validate_context *context);/*
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +16 -62
122 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +20 -66
132 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +52 -91
207 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h +5 -0
@@ -51,6 +51,11 @@ bool dce112_validate_bandwidth(struct dc *dc, struct validate_context *context); +enum dc_status dce112_add_stream_to_ctx ( +struct dc *dc, +struct validate_context *new_ctx, +struct dc_stream_state *dc_stream); +#endif /* __DC_RESOURCE_DCE112_H__ */
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +2 -2
@@ -698,10 +698,10 @@ static void dce120_destroy_resource_pool(struct resource_pool **pool)static const struct resource_funcs dce120_res_pool_funcs = { .destroy = dce120_destroy_resource_pool, .link_enc_create = dce120_link_encoder_create, - .validate_with_context = dce112_validate_with_context, .validate_guaranteed = dce112_validate_guaranteed, .validate_bandwidth = dce112_validate_bandwidth, - .validate_plane = dce100_validate_plane + .validate_plane = dce100_validate_plane, + .add_stream_to_ctx = dce112_add_stream_to_ctx };static void bw_calcs_data_update_from_pplib (struct dc *dc)
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +17 -62
122 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +25 -60
139 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/core_types.h +13 -6
@@ -87,12 +87,6 @@ struct resource_funcs {void (*destroy)(struct resource_pool **pool);struct link_encoder *(*link_enc_create)(const struct encoder_init_data *init); -enum dc_status (*validate_with_context)( -struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *context, -struct validate_context *old_context); enum dc_status (*validate_guaranteed)( struct dc *dc,
@@ -103,11 +97,24 @@ struct resource_funcs {struct dc *dc, struct validate_context *context); +enum dc_status (*validate_global)( +struct dc *dc, +const struct dc_validation_set set[], +int set_count, +struct validate_context *old_context, +struct validate_context *context); +struct pipe_ctx *(*acquire_idle_pipe_for_layer)(struct validate_context *context,const struct resource_pool *pool,struct dc_stream_state *stream); +enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state); + +enum dc_status (*add_stream_to_ctx)( +struct dc *dc, +struct validate_context *new_ctx, +struct dc_stream_state *dc_stream); };struct audio_support {
drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -3
@@ -82,7 +82,7 @@ void dc_destroy_resource_pool(struct dc *dc);enum dc_status resource_map_pool_resources (const struct dc *dc,struct validate_context *context, -struct validate_context *old_context); +struct dc_stream_state *stream);bool resource_build_scaling_params (struct pipe_ctx *pipe_ctx);
@@ -150,12 +150,12 @@ void resource_validate_ctx_update_pointer_after_copy(enum dc_status resource_map_clock_resources (const struct dc *dc,struct validate_context *context, -struct validate_context *old_context); +struct dc_stream_state *stream);enum dc_status resource_map_phy_clock_resources (const struct dc *dc,struct validate_context *context, -struct validate_context *old_context); +struct dc_stream_state *stream); bool pipe_need_reprogram( struct pipe_ctx *pipe_ctx_old,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/77 drm/amd/display: increase polling interval for fbc status update
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
1.Fixing error message:
"wait counter exceeded, changes to HW not applied"
2. Added "FBC status changed to 0/1" logs
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +7 -1
@@ -115,7 +115,7 @@ static void wait_for_fbc_state_changed(FBC_STATUS , FBC_ENABLE_STATUS) == enabled) break; -udelay (10 ); +msleep (10 ); counter++; }
@@ -124,7 +124,13 @@ static void wait_for_fbc_state_changed( cp110->base.ctx->logger,LOG_WARNING ,"%s: wait counter exceeded, changes to HW not applied" , __func__); + }else { +dm_logger_write ( + cp110->base.ctx->logger,LOG_SYNC , +"FBC status changed to %d" , enabled); } + + }void dce110_compressor_power_up_fbc (struct compressor *compressor)
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/77 drm/amd/display: fix not enter/exit PSR with latest driver/SBIOS
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -1975,7 +1975,7 @@ bool dc_link_setup_psr(struct dc_link *link,#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )/*skip power down the single pipe since it blocks the cstate*/ if (ASIC_REV_IS_RAVEN (link->ctx->asic_id.hw_internal_rev)) - psr_context->psr_level.bits.SKIP_SINGLE_OTG_DISABLE = true; + psr_context->psr_level.bits.SKIP_SINGLE_OTG_DISABLE = false;#endif /* SMU will perform additional powerdown sequence.
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +2 -1
@@ -417,9 +417,10 @@ static int dce112_set_clock( bp->funcs->set_dce_clock (bp, &dce_clk_params); -if (abm->funcs->is_dmcu_initialized (abm)) +if (abm->funcs->is_dmcu_initialized (abm) && clk_dce->dfs_bypass_disp_clk != actual_clock) dmcu->funcs->set_psr_wait_loop (dmcu, actual_clock /1000 /7 ); + clk_dce->dfs_bypass_disp_clk = actual_clock;return actual_clock; }
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +4 -1
@@ -260,6 +260,8 @@ static void dce_psr_wait_loop( {struct dce_dmcu *dmcu_dce =TO_DCE_DMCU (dmcu);union dce_dmcu_psr_config_data_wait_loop_reg1 masterCmdData1; +if (cached_wait_loop_number == wait_loop_number) +return ;/* waitDMCUReadyForCmd */ REG_WAIT (MASTER_COMM_CNTL_REG ,MASTER_COMM_INTERRUPT ,0 ,1 ,10000 );
@@ -500,7 +502,7 @@ static void dcn10_psr_wait_loop( {struct dce_dmcu *dmcu_dce =TO_DCE_DMCU (dmcu);union dce_dmcu_psr_config_data_wait_loop_reg1 masterCmdData1; - +if (wait_loop_number !=0 ) {/* waitDMCUReadyForCmd */ REG_WAIT (MASTER_COMM_CNTL_REG ,MASTER_COMM_INTERRUPT ,0 ,1 ,10000 );
@@ -514,6 +516,7 @@ static void dcn10_psr_wait_loop(/* notifyDMCUMsg */ REG_UPDATE (MASTER_COMM_CNTL_REG ,MASTER_COMM_INTERRUPT ,1 ); + } }static void dcn10_get_psr_wait_loop (unsigned int *psr_wait_loop_number)
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/77 drm/amd/display: Log OTG registers with dcn10 hw state
In reply to a message not in the archiveFrom: Corbin McElhanney <[email protected]>
--- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 33 +++++++++++++++++ .../amd/display/dc/dcn10/dcn10_timing_generator.c | 42 ++++++++++++++++++++++ .../amd/display/dc/dcn10/dcn10_timing_generator.h | 25 +++++++++++++ 3 files changed, 100 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +33 -0
@@ -32,6 +32,7 @@#include "dce/dce_hwseq.h" #include "abm.h" #include "dcn10/dcn10_mem_input.h" +#include "dcn10/dcn10_timing_generator.h" #include "dcn10/dcn10_dpp.h" #include "dcn10/dcn10_mpc.h" #include "timing_generator.h"
@@ -200,6 +201,38 @@ static void dcn10_log_hw_state(struct dc *dc) }DTN_INFO ("\n" ); +DTN_INFO ("OTG:\t v_bs \t v_be \t v_ss \t v_se \t vpol \t vmax \t vmin \t " +"h_bs \t h_be \t h_ss \t h_se \t hpol \t htot \t vtot \t underflow\n" ); + +for (i =0 ; i < pool->pipe_count; i++) { +struct timing_generator *tg = pool->timing_generators[i]; +struct dcn_otg_state s; + +tgn10_read_otg_state (DCN10TG_FROM_TG (tg), &s); + +DTN_INFO ("[%d]:\t %d \t %d \t %d \t %d \t " +"%d \t %d \t %d \t %d \t %d \t %d \t " +"%d \t %d \t %d \t %d \t %d \t " , + i, + s.v_blank_start, + s.v_blank_end, + s.v_sync_a_start, + s.v_sync_a_end, + s.v_sync_a_pol, + s.v_total_max, + s.v_total_min, + s.h_blank_start, + s.h_blank_end, + s.h_sync_a_start, + s.h_sync_a_end, + s.h_sync_a_pol, + s.h_total, + s.v_total, + s.underflow_occurred_status); +DTN_INFO ("\n" ); + } +DTN_INFO ("\n" ); +log_mpc_crc (dc);DTN_INFO_END ();
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +42 -0
48 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h +25 -0
@@ -67,6 +67,7 @@SRI (OTG_CLOCK_CONTROL ,OTG , inst),\SRI (OPTC_INPUT_CLOCK_CONTROL ,ODM , inst),\SRI (OPTC_DATA_SOURCE_SELECT ,ODM , inst),\ +SRI (OPTC_INPUT_GLOBAL_CONTROL ,ODM , inst),\SRI (OPPBUF_CONTROL ,OPPBUF , inst),\SRI (OPPBUF_3D_PARAMETERS_0 ,OPPBUF , inst),\ SRI(CONTROL, VTG, inst),\
@@ -121,6 +122,7 @@ struct dcn_tg_registers {uint32_t OTG_CLOCK_CONTROL ;uint32_t OPTC_INPUT_CLOCK_CONTROL ;uint32_t OPTC_DATA_SOURCE_SELECT ; +uint32_t OPTC_INPUT_GLOBAL_CONTROL ;uint32_t OPPBUF_CONTROL ;uint32_t OPPBUF_3D_PARAMETERS_0 ;uint32_t CONTROL ;
@@ -204,6 +206,7 @@ struct dcn_tg_registers {SF (ODM0_OPTC_INPUT_CLOCK_CONTROL ,OPTC_INPUT_CLK_EN , mask_sh),\SF (ODM0_OPTC_INPUT_CLOCK_CONTROL ,OPTC_INPUT_CLK_ON , mask_sh),\SF (ODM0_OPTC_INPUT_CLOCK_CONTROL ,OPTC_INPUT_CLK_GATE_DIS , mask_sh),\ +SF (ODM0_OPTC_INPUT_GLOBAL_CONTROL ,OPTC_UNDERFLOW_OCCURRED_STATUS , mask_sh),\SF (OPPBUF0_OPPBUF_CONTROL ,OPPBUF_ACTIVE_WIDTH , mask_sh),\SF (OPPBUF0_OPPBUF_3D_PARAMETERS_0 ,OPPBUF_3D_VACT_SPACE1_SIZE , mask_sh),\ SF(VTG0_CONTROL, VTG0_ENABLE, mask_sh),\
@@ -310,6 +313,7 @@ struct dcn_tg_registers {type OPTC_INPUT_CLK_GATE_DIS ;\type OPTC_SRC_SEL ;\type OPTC_SEG0_SRC_SEL ;\ +type OPTC_UNDERFLOW_OCCURRED_STATUS ;\type OPPBUF_ACTIVE_WIDTH ;\type OPPBUF_3D_VACT_SPACE1_SIZE ;\type VTG0_ENABLE ;\
@@ -346,4 +350,25 @@ struct dcn10_timing_generator {void dcn10_timing_generator_init (struct dcn10_timing_generator *tg); +struct dcn_otg_state { +uint32_t v_blank_start; +uint32_t v_blank_end; +uint32_t v_sync_a_pol; +uint32_t v_total; +uint32_t v_total_max; +uint32_t v_total_min; +uint32_t v_sync_a_start; +uint32_t v_sync_a_end; +uint32_t h_blank_start; +uint32_t h_blank_end; +uint32_t h_sync_a_start; +uint32_t h_sync_a_end; +uint32_t h_sync_a_pol; +uint32_t h_total; +uint32_t underflow_occurred_status; +}; + +void tgn10_read_otg_state (struct dcn10_timing_generator *tgn10, +struct dcn_otg_state *s); +#endif /* __DC_TIMING_GENERATOR_DCN10_H__ */
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/77 drm/amd/display: Fix FBC disable for stereo
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Removed FBC disable from dc_enable_stereo().
It should be implemented in stereo_setup callback, which is not implemented yet. Otherwise it always disable FBC regardless if stereo supported or not.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -11
@@ -883,10 +883,6 @@ bool dc_enable_stereo(struct pipe_ctx *pipe;struct dc *core_dc = dc; -#ifdef ENABLE_FBC -struct compressor *fbc_compressor = core_dc->fbc_compressor; -#endif -for (i =0 ; i <MAX_PIPES ; i++) {if (context !=NULL ) pipe = &context->res_ctx.pipe_ctx[i];
@@ -899,13 +895,6 @@ bool dc_enable_stereo( } } -#ifdef ENABLE_FBC -if (fbc_compressor !=NULL && - fbc_compressor->funcs->is_fbc_enabled_in_hw (core_dc->fbc_compressor, -NULL )) - fbc_compressor->funcs->disable_fbc (fbc_compressor); - -#endif return ret; }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/77 drm/amd/display: separate scl functions out from dcn10_dpp
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 650 +----------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 5 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 762 +++++++++++++++++++++ 4 files changed, 770 insertions(+), 650 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +2 -1
@@ -3,7 +3,8 @@ DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ dcn10_dpp.o dcn10_opp.o dcn10_timing_generator.o \ - dcn10_mem_input.o dcn10_mpc.o dcn10_dwb.o + dcn10_mem_input.o dcn10_mpc.o dcn10_dwb.o \ + dcn10_dpp_dscl.o AMD_DAL_DCN10 = $(addprefix $(AMDDALPATH)/dc/dcn10/,$(DCN10))
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +1 -649
668 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +5 -0
@@ -1386,6 +1386,11 @@ struct dcn10_dpp {int lb_bits_per_entry;bool is_write_to_ram_a_safe; }; + +void dcn10_dpp_set_scaler_manual_scale ( +struct transform *xfm_base, +const struct scaler_data *scl_data); + bool dcn10_dpp_construct(struct dcn10_dpp *xfm110, struct dc_context *ctx, uint32_t inst,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c new file +762 -0
762 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/77 drm/amd/display: Cache edp config in dc link
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -0
@@ -2258,6 +2258,8 @@ static void retrieve_link_cap(struct dc_link *link) DP_EDP_CONFIGURATION_CAP - DP_DPCD_REV]; link->dpcd_caps.panel_mode_edp = edp_config_cap.bits.ALT_SCRAMBLER_RESET; + link->dpcd_caps.dpcd_display_control_capable = + edp_config_cap.bits.DPCD_DISPLAY_CONTROL_CAPABLE; link->test_pattern_enabled = false; link->compliance_test_state.raw =0 ;
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -759,6 +759,7 @@ struct dpcd_caps {bool allow_invalid_MSA_timing_param;bool panel_mode_edp; +bool dpcd_display_control_capable; };struct dc_link_status {
@@ -833,7 +834,6 @@ struct dc_link {struct dpcd_caps dpcd_caps;unsigned short chip_caps;unsigned int dpcd_sink_count; -enum edp_revision edp_revision;bool psr_enabled;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/77 drm/amd/display: re-enable audio after LT test
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
[Description]
Audio should be attached to the same pipe once it is attached. We will not remove audio endpoint in disable stream. We will reeanble the audio after automated link training test
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 14 ++++++++++++++ .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +14 -0
@@ -310,6 +310,20 @@ void dp_retrain_link_dp_test(struct dc_link *link, link->dc->hwss.unblank_stream (&pipes[i], link_setting); + +if (pipes[i].stream_res.audio) { +/* notify audio driver for +* audio modes of monitor */ + pipes[i].stream_res.audio->funcs->az_enable ( + pipes[i].stream_res.audio); + +/* un-mute audio */ +/* TODO: audio should be per stream rather than +* per link */ + pipes[i].stream_res.stream_enc->funcs-> +audio_mute_control ( + pipes[i].stream_res.stream_enc, false); + } } } }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -2
@@ -758,8 +758,6 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx) pipe_ctx->stream_res.stream_enc->funcs->hdmi_audio_disable ( pipe_ctx->stream_res.stream_enc); - pipe_ctx->stream_res.audio =NULL ; -/* TODO: notify audio driver for if audio modes list changed * add audio mode list change flag */ /* dal_audio_disable_azalia_audio_jack_presence(stream->audio,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/77 drm/amd/display: separate cm functions out from dcn10_dpp
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 662 ------------------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 34 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 776 +++++++++++++++++++++ 4 files changed, 811 insertions(+), 663 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
@@ -4,7 +4,7 @@ DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ dcn10_dpp.o dcn10_opp.o dcn10_timing_generator.o \ dcn10_mem_input.o dcn10_mpc.o dcn10_dwb.o \ - dcn10_dpp_dscl.o + dcn10_dpp_dscl.o dcn10_dpp_cm.o AMD_DAL_DCN10 = $(addprefix $(AMDDALPATH)/dc/dcn10/,$(DCN10))
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +0 -662
669 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +34 -0
@@ -1387,6 +1387,40 @@ struct dcn10_dpp {bool is_write_to_ram_a_safe; }; +void opp_program_regamma_lut ( +struct transform *xfm_base, +const struct pwl_result_data *rgb, +uint32_t num); + +void oppn10_power_on_regamma_lut ( +struct transform *xfm_base, +bool power_on); + +void opp_configure_regamma_lut ( +struct transform *xfm_base, +bool is_ram_a); + +/*program re gamma RAM A*/ +void opp_program_regamma_luta_settings ( +struct transform *xfm_base, +const struct pwl_params *params); + +/*program re gamma RAM B*/ +void opp_program_regamma_lutb_settings ( +struct transform *xfm_base, +const struct pwl_params *params); +void oppn10_set_output_csc_adjustment ( +struct transform *xfm_base, +const struct out_csc_color_matrix *tbl_entry); + +void oppn10_set_output_csc_default ( +struct transform *xfm_base, +const struct default_adjustment *default_adjust); + +void dcn_dpp_set_gamut_remap ( +struct transform *xfm, +const struct xfm_grph_csc_adjustment *adjust); +void dcn10_dpp_set_scaler_manual_scale (struct transform *xfm_base,const struct scaler_data *scl_data);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c new file +776 -0
776 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 28/77 drm/amd/display: Fix two MST not light up regressions
In reply to a message not in the archiveFrom: Jerry Zuo <[email protected]>
1. Change 100104: Move verify link cap after read edid causes MST link_cap struct not being set. It leads to zero denominator pbn_per_slot value, leading to the crash at dal_fixed31_32_div(). Skip MST link training for now and will need to add MST specific link traning routine later.
2. Change 98822: Adding edp supports changes link setting condition from max_link to verified_link. It leads to MST is getting wrong link settings.
e.g. LINK_SPREAD_05_DOWNSPREAD_30KHZ not set in MST case
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 +++++++++------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++++++ 2 files changed, 17 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +9 -7
@@ -607,6 +607,12 @@ bool dc_link_detect(struct dc_link *link, bool boot)if (link->type == dc_connection_mst_branch) {LINK_INFO ("link=%d, mst branch is now Connected\n" , link->link_index); +/* Need to setup mst link_cap struct here +* otherwise dc_link_detect() will leave mst link_cap +* empty which leads to allocate_mst_payload() has "0" +* pbn_per_slot value leading to exception on dal_fixed31_32_div() +*/ + link->verified_link_cap = link->reported_link_cap;return false; }
@@ -672,13 +678,9 @@ bool dc_link_detect(struct dc_link *link, bool boot)* TODO debug why Dell 2413 doesn't like * two link trainings */ -if (is_mst_supported (link)) { - link->verified_link_cap = - link->reported_link_cap; - }else { -dp_hbr_verify_link_cap (link, - &link->reported_link_cap); - } + +/* deal with non-mst cases */ +dp_hbr_verify_link_cap (link, &link->reported_link_cap); }/* HDMI-DVI Dongle */
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +8 -0
@@ -1459,6 +1459,14 @@ void decide_link_settings(struct dc_stream_state *stream,return ; } +/* MST doesn't perform link training for now +* TODO: add MST specific link training routine +*/ +if (is_mst_supported (link)) { + *link_setting = link->verified_link_cap; +return ; + } +/* search for the minimum link setting that: * 1. is supported according to the link training result * 2. could support the b/w requested by the timing
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 29/77 drm/amd/display: Disable stutter for Raven
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
@@ -1398,6 +1398,10 @@ int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)DRM_ERROR ("DM: Failed to initialize IRQ\n" ); goto fail_free_encoder; } +/* +* Temporary disable until pplib/smu interaction is implemented +*/ + dm->dc->debug.disable_stutter = true;break ;#endif default :
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 30/77 drm/amd/display: Remove unnecessary assignemnt
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +0 -1
@@ -41,7 +41,6 @@ static bool construct(struct dc_stream_state *stream, stream->sink = dc_sink_data; stream->ctx = stream->sink->ctx; - stream->sink = dc_sink_data;dc_sink_retain (dc_sink_data);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 31/77 drm/amd/display: fix hubp mpcc and opp tracking
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
This should be handled by mi and mpc only
--- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +2 -0
@@ -686,6 +686,8 @@ void dce_mem_input_construct( dce_mi->shifts = mi_shift; dce_mi->masks = mi_mask; + dce_mi->base.mpcc_id =0xf ; + dce_mi->base.opp_id =0xf ; } void dce112_mem_input_construct(
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -4
@@ -1066,9 +1066,6 @@ static void plane_atomic_disable(struct dc *dc,fe_idx);*/ mi->funcs->set_blank (mi, true); -/*todo: unhack this*/ - mi->opp_id =0xf ; - mi->mpcc_id =0xf ;if (dc->debug.sanity_checks)verify_allow_pstate_change_high (dc->hwseq);
@@ -2304,7 +2301,8 @@ static void update_dchubp_dpp( &plane_state->dcc, plane_state->horizontal_mirror); - mi->funcs->set_blank (mi, !is_pipe_tree_visible (pipe_ctx)); +if (is_pipe_tree_visible (pipe_ctx)) + mi->funcs->set_blank (mi, false); }
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c +1 -2
@@ -51,9 +51,8 @@ static void min10_set_blank(struct mem_input *mem_input, bool blank)REG_WAIT (DCHUBP_CNTL ,HUBP_NO_OUTSTANDING_REQ ,1 ,1 ,200 ); -/*todo: unhack this mem_input->mpcc_id =0xf ; -mem_input->opp_id = 0xf;*/ + mem_input->opp_id =0xf ; } }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 32/77 drm/amd/display: Fixed mpc add, enable always scaler for video surface.
In reply to a message not in the archiveFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +3 -3
@@ -229,9 +229,9 @@ static void mpc10_mpcc_add(struct mpc *mpc, struct mpcc_cfg *cfg)mpc10_set_bg_color (mpc10, &cfg->black_color, mpcc_id); mpc10->mpcc_in_use_mask |=1 << mpcc_id; -for (z_idx = cfg->z_index; z_idx < cfg->opp->mpc_tree.num_pipes; z_idx++) { - cfg->opp->mpc_tree.dpp[z_idx +1 ] = cfg->opp->mpc_tree.dpp[z_idx]; - cfg->opp->mpc_tree.mpcc[z_idx +1 ] = cfg->opp->mpc_tree.mpcc[z_idx]; +for (z_idx = cfg->opp->mpc_tree.num_pipes; z_idx > cfg->z_index; z_idx--) { + cfg->opp->mpc_tree.dpp[z_idx] = cfg->opp->mpc_tree.dpp[z_idx -1 ]; + cfg->opp->mpc_tree.mpcc[z_idx] = cfg->opp->mpc_tree.mpcc[z_idx -1 ]; } cfg->opp->mpc_tree.dpp[cfg->z_index] = cfg->mi->inst; cfg->opp->mpc_tree.mpcc[cfg->z_index] = mpcc_id;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +4 -0
@@ -422,6 +422,10 @@ static const struct dc_debug debug_defaults_drv = { .force_abm_enable = false, .timing_trace = false, .clock_trace = true, + /* spread sheet doesn't handle taps_c is one properly, + * need to enable scaler for video surface to pass + * bandwidth validation.*/ + .always_scale = true, .disable_pplib_clock_request = true, .disable_pplib_wm_range = false,#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 33/77 drm/amd/display: cleanup naming of DCN DPP functions
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 41 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 25 ++++++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 20 +++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 2 +- 4 files changed, 48 insertions(+), 40 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +21 -20
@@ -123,7 +123,7 @@ void dpp_set_gamut_remap_bypass(struct dcn10_dpp *xfm)#define IDENTITY_RATIO (ratio) (dal_fixed31_32_u2d19(ratio) == (1 << 19)) -static bool dpp_get_optimal_number_of_taps ( +bool dpp_get_optimal_number_of_taps (struct transform *xfm,struct scaler_data *scl_data,const struct scaling_taps *in_taps)
@@ -182,7 +182,7 @@ static bool dpp_get_optimal_number_of_taps(return true; } -static void dpp_reset (struct transform *xfm_base) +void dpp_reset (struct transform *xfm_base) {struct dcn10_dpp *xfm =TO_DCN10_DPP (xfm_base);
@@ -197,26 +197,26 @@ static void dpp_reset(struct transform *xfm_base) -static bool oppn10_set_regamma_pwl ( +static bool dcn10_dpp_cm_set_regamma_pwl (struct transform *xfm_base,const struct pwl_params *params) {struct dcn10_dpp *xfm =TO_DCN10_DPP (xfm_base); -oppn10_power_on_regamma_lut (xfm_base, true); -opp_configure_regamma_lut (xfm_base, xfm->is_write_to_ram_a_safe); +dcn10_dpp_cm_power_on_regamma_lut (xfm_base, true); +dcn10_dpp_cm_configure_regamma_lut (xfm_base, xfm->is_write_to_ram_a_safe);if (xfm->is_write_to_ram_a_safe) -opp_program_regamma_luta_settings (xfm_base, params); +dcn10_dpp_cm_program_regamma_luta_settings (xfm_base, params);else -opp_program_regamma_lutb_settings (xfm_base, params); +dcn10_dpp_cm_program_regamma_lutb_settings (xfm_base, params); -opp_program_regamma_lut ( +dcn10_dpp_cm_program_regamma_lut ( xfm_base, params->rgb_resulted, params->hw_points_num);return true; } -static void oppn10_set_regamma_mode ( +static void dcn10_dpp_cm_set_regamma_mode (struct transform *xfm_base,enum opp_regamma mode) {
@@ -251,20 +251,21 @@ static void oppn10_set_regamma_mode(static struct transform_funcs dcn10_dpp_funcs = { .transform_reset = dpp_reset, - .transform_set_scaler = dcn10_dpp_set_scaler_manual_scale, + .transform_set_scaler = dcn10_dpp_dscl_set_scaler_manual_scale, .transform_get_optimal_number_of_taps = dpp_get_optimal_number_of_taps, - .transform_set_gamut_remap = dcn_dpp_set_gamut_remap, - .opp_set_csc_adjustment = oppn10_set_output_csc_adjustment, - .opp_set_csc_default = oppn10_set_output_csc_default, - .opp_power_on_regamma_lut = oppn10_power_on_regamma_lut, - .opp_program_regamma_lut = opp_program_regamma_lut, - .opp_configure_regamma_lut = opp_configure_regamma_lut, - .opp_program_regamma_lutb_settings = opp_program_regamma_lutb_settings, - .opp_program_regamma_luta_settings = opp_program_regamma_luta_settings, - .opp_program_regamma_pwl = oppn10_set_regamma_pwl, - .opp_set_regamma_mode = oppn10_set_regamma_mode, + .transform_set_gamut_remap = dcn10_dpp_cm_set_gamut_remap, + .opp_set_csc_adjustment = dcn10_dpp_cm_set_output_csc_adjustment, + .opp_set_csc_default = dcn10_dpp_cm_set_output_csc_default, + .opp_power_on_regamma_lut = dcn10_dpp_cm_power_on_regamma_lut, + .opp_program_regamma_lut = dcn10_dpp_cm_program_regamma_lut, + .opp_configure_regamma_lut = dcn10_dpp_cm_configure_regamma_lut, + .opp_program_regamma_lutb_settings = dcn10_dpp_cm_program_regamma_lutb_settings, + .opp_program_regamma_luta_settings = dcn10_dpp_cm_program_regamma_luta_settings, + .opp_program_regamma_pwl = dcn10_dpp_cm_set_regamma_pwl, + .opp_set_regamma_mode = dcn10_dpp_cm_set_regamma_mode, }; +/*****************************************/ /* Constructor, Destructor */ /*****************************************/
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +16 -9
@@ -1387,41 +1387,48 @@ struct dcn10_dpp {bool is_write_to_ram_a_safe; }; -void opp_program_regamma_lut ( +bool dpp_get_optimal_number_of_taps ( +struct transform *xfm, +struct scaler_data *scl_data, +const struct scaling_taps *in_taps); + +void dpp_reset (struct transform *xfm_base); + +void dcn10_dpp_cm_program_regamma_lut (struct transform *xfm_base,const struct pwl_result_data *rgb,uint32_t num); -void oppn10_power_on_regamma_lut ( +void dcn10_dpp_cm_power_on_regamma_lut (struct transform *xfm_base,bool power_on); -void opp_configure_regamma_lut ( +void dcn10_dpp_cm_configure_regamma_lut (struct transform *xfm_base,bool is_ram_a);/*program re gamma RAM A*/ -void opp_program_regamma_luta_settings ( +void dcn10_dpp_cm_program_regamma_luta_settings (struct transform *xfm_base,const struct pwl_params *params);/*program re gamma RAM B*/ -void opp_program_regamma_lutb_settings ( +void dcn10_dpp_cm_program_regamma_lutb_settings (struct transform *xfm_base,const struct pwl_params *params); -void oppn10_set_output_csc_adjustment ( +void dcn10_dpp_cm_set_output_csc_adjustment (struct transform *xfm_base,const struct out_csc_color_matrix *tbl_entry); -void oppn10_set_output_csc_default ( +void dcn10_dpp_cm_set_output_csc_default (struct transform *xfm_base,const struct default_adjustment *default_adjust); -void dcn_dpp_set_gamut_remap ( +void dcn10_dpp_cm_set_gamut_remap (struct transform *xfm,const struct xfm_grph_csc_adjustment *adjust); -void dcn10_dpp_set_scaler_manual_scale ( +void dcn10_dpp_dscl_set_scaler_manual_scale (struct transform *xfm_base,const struct scaler_data *scl_data);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +10 -10
@@ -221,7 +221,7 @@ static void program_gamut_remap( } -void dcn_dpp_set_gamut_remap ( +void dcn10_dpp_cm_set_gamut_remap (struct transform *xfm,const struct xfm_grph_csc_adjustment *adjust) {
@@ -256,7 +256,7 @@ void dcn_dpp_set_gamut_remap( } } -void oppn10_set_output_csc_default ( +void dcn10_dpp_cm_set_output_csc_default (struct transform *xfm_base,const struct default_adjustment *default_adjust) {
@@ -293,7 +293,7 @@ void oppn10_set_output_csc_default( } -static void oppn10_program_color_matrix ( +static void dcn10_dpp_cm_program_color_matrix (struct dcn10_dpp *xfm,const struct out_csc_color_matrix *tbl_entry) {
@@ -363,7 +363,7 @@ static void oppn10_program_color_matrix( } } -void oppn10_set_output_csc_adjustment ( +void dcn10_dpp_cm_set_output_csc_adjustment (struct transform *xfm_base,const struct out_csc_color_matrix *tbl_entry) {
@@ -399,10 +399,10 @@ void oppn10_set_output_csc_adjustment(*/ REG_SET (CM_OCSC_CONTROL ,0 ,CM_OCSC_MODE , ocsc_mode); -oppn10_program_color_matrix (xfm, tbl_entry); +dcn10_dpp_cm_program_color_matrix (xfm, tbl_entry); } -void oppn10_power_on_regamma_lut ( +void dcn10_dpp_cm_power_on_regamma_lut (struct transform *xfm_base,bool power_on) {
@@ -412,7 +412,7 @@ void oppn10_power_on_regamma_lut( } -void opp_program_regamma_lut ( +void dcn10_dpp_cm_program_regamma_lut (struct transform *xfm_base,const struct pwl_result_data *rgb,uint32_t num)
@@ -435,7 +435,7 @@ void opp_program_regamma_lut( } -void opp_configure_regamma_lut ( +void dcn10_dpp_cm_configure_regamma_lut (struct transform *xfm_base,bool is_ram_a) {
@@ -449,7 +449,7 @@ void opp_configure_regamma_lut( }/*program re gamma RAM A*/ -void opp_program_regamma_luta_settings ( +void dcn10_dpp_cm_program_regamma_luta_settings (struct transform *xfm_base,const struct pwl_params *params) {
@@ -612,7 +612,7 @@ void opp_program_regamma_luta_settings( }/*program re gamma RAM B*/ -void opp_program_regamma_lutb_settings ( +void dcn10_dpp_cm_program_regamma_lutb_settings (struct transform *xfm_base,const struct pwl_params *params) {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +1 -1
@@ -636,7 +636,7 @@ static void dpp_set_recout( }/* Main function to program scaler and line buffer in manual scaling mode */ -void dcn10_dpp_set_scaler_manual_scale ( +void dcn10_dpp_dscl_set_scaler_manual_scale (struct transform *xfm_base,const struct scaler_data *scl_data) {
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 34/77 drm/amd/display: memory leak dwb
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +5 -0
@@ -747,6 +747,11 @@ static void destruct(struct dcn10_resource_pool *pool)dce_aud_destroy (&pool->base.audios[i]); } +for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +dm_free (pool->base.dwbc[i]); + pool->base.dwbc[i] =NULL ; + } +for (i =0 ; i < pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] !=NULL ) {dcn10_clock_source_destroy (&pool->base.clock_sources[i]);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 35/77 drm/amd/display: dc: Remove unneeded includes in DCN
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -3
@@ -39,9 +39,6 @@#include "opp.h" #include "ipp.h" #include "mpc.h" -#include "raven1/DCN/dcn_1_0_offset.h" -#include "raven1/DCN/dcn_1_0_sh_mask.h" -#include "vega10/soc15ip.h" #include "reg_helper.h" #define CTX \
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 36/77 drm/amd/display: Enable double buffer when unblank crtc.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +3 -0
@@ -289,6 +289,9 @@ static void tgn10_unblank_crtc(struct timing_generator *tg) {struct dcn10_timing_generator *tgn10 =DCN10TG_FROM_TG (tg); +REG_UPDATE (OTG_DOUBLE_BUFFER_CONTROL , +OTG_BLANK_DATA_DOUBLE_BUFFER_EN ,1 ); +REG_UPDATE_2 (OTG_BLANK_CONTROL ,OTG_BLANK_DATA_EN ,0 ,OTG_BLANK_DE_MODE ,0 );
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 37/77 drm/amd/display: version 3.1.01
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
@@ -48,6 +48,9 @@#include "dm_helpers.h" #include "mem_input.h" + +char dc_ver[] =DC_VER ; +/******************************************************************************* * Private functions ******************************************************************************/
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -38,7 +38,7 @@#include "inc/compressor.h" #include "dml/display_mode_lib.h" - +#define DC_VER "3.1.01"#define MAX_SURFACES 3#define MAX_STREAMS 6
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 38/77 drm/amd/display: write dpcd 0x600 to 2 for DP/eDP when powerdown
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -1977,7 +1977,7 @@ bool dc_link_setup_psr(struct dc_link *link,#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )/*skip power down the single pipe since it blocks the cstate*/ if (ASIC_REV_IS_RAVEN (link->ctx->asic_id.hw_internal_rev)) - psr_context->psr_level.bits.SKIP_SINGLE_OTG_DISABLE = false; + psr_context->psr_level.bits.SKIP_CRTC_DISABLE = true;#endif /* SMU will perform additional powerdown sequence.
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +9 -1
@@ -1147,8 +1147,16 @@ static enum dc_status apply_single_controller_ctx_to_hw(static void power_down_encoders (struct dc *dc) {int i; - +enum connector_id connector_id;for (i =0 ; i < dc->link_count; i++) { + connector_id =dal_graphics_object_id_get_connector_id (dc->links[i]->link_id); +if ((connector_id ==CONNECTOR_ID_DISPLAY_PORT ) || + (connector_id ==CONNECTOR_ID_EDP )) { + +if (!dc->links[i]->wa_flags.dp_keep_receiver_powered) +dp_receiver_power_ctrl (dc->links[i], false); + } + dc->links[i]->link_enc->funcs->disable_output ( dc->links[i]->link_enc,SIGNAL_TYPE_NONE ); }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +1 -0
@@ -67,5 +67,6 @@ void dce110_fill_display_configs(uint32_t dce110_get_min_vblank_time_us (const struct validate_context *context); +void dp_receiver_power_ctrl (struct dc_link *link,bool on);#endif /* __DC_HWSS_DCE110_H__ */
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 39/77 drm/amd/display: retire dm_pp_apply_clock_for_voltage_request
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
set dcfclk and fclk req with pp_smu_display_requirement_rv
--- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 26 +++++++++++++--------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 8 ++----- 2 files changed, 17 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +15 -11
@@ -2550,7 +2550,10 @@ static void dcn10_set_bandwidth( struct validate_context *context, bool decrease_allowed) { -struct dm_pp_clock_for_voltage_req clock; +struct pp_smu_display_requirement_rv *smu_req_cur = + &dc->res_pool->pp_smu_req; +struct pp_smu_display_requirement_rv smu_req = *smu_req_cur; +struct pp_smu_funcs_rv *pp_smu = dc->res_pool->pp_smu;if (dc->debug.sanity_checks) {verify_allow_pstate_change_high (dc->hwseq);
@@ -2569,19 +2572,12 @@ static void dcn10_set_bandwidth( }if (decrease_allowed || context->bw.dcn.calc_clk.dcfclk_khz > dc->current_context->bw.dcn.cur_clk.dcfclk_khz) { - clock.clk_type =DM_PP_CLOCK_TYPE_DCFCLK ; - clock.clocks_in_khz = context->bw.dcn.calc_clk.dcfclk_khz; -dm_pp_apply_clock_for_voltage_request (dc->ctx, &clock); - dc->current_context->bw.dcn.cur_clk.dcfclk_khz = clock.clocks_in_khz; - context->bw.dcn.cur_clk.dcfclk_khz = clock.clocks_in_khz; + smu_req.hard_min_dcefclk_khz = + context->bw.dcn.calc_clk.dcfclk_khz; }if (decrease_allowed || context->bw.dcn.calc_clk.fclk_khz > dc->current_context->bw.dcn.cur_clk.fclk_khz) { - clock.clk_type =DM_PP_CLOCK_TYPE_FCLK ; - clock.clocks_in_khz = context->bw.dcn.calc_clk.fclk_khz; -dm_pp_apply_clock_for_voltage_request (dc->ctx, &clock); - dc->current_context->bw.dcn.calc_clk.fclk_khz = clock.clocks_in_khz; - context->bw.dcn.cur_clk.fclk_khz = clock.clocks_in_khz; + smu_req.hard_min_fclk_khz = context->bw.dcn.calc_clk.fclk_khz; }if (decrease_allowed || context->bw.dcn.calc_clk.dcfclk_deep_sleep_khz > dc->current_context->bw.dcn.cur_clk.dcfclk_deep_sleep_khz) {
@@ -2590,6 +2586,14 @@ static void dcn10_set_bandwidth( context->bw.dcn.cur_clk.dcfclk_deep_sleep_khz = context->bw.dcn.calc_clk.dcfclk_deep_sleep_khz; } + + smu_req.display_count = context->stream_count; + +if (pp_smu->set_display_requirement) + pp_smu->set_display_requirement (&pp_smu->pp_smu, &smu_req); + + *smu_req_cur = smu_req; +/* Decrease in freq is increase in period so opposite comparison for dram_ccm */ if (decrease_allowed || context->bw.dcn.calc_clk.dram_ccm_us < dc->current_context->bw.dcn.cur_clk.dram_ccm_us) {
drivers/gpu/drm/amd/display/dc/inc/core_types.h +2 -6
@@ -132,10 +132,10 @@ struct resource_pool {struct output_pixel_processor *opps[MAX_PIPES ];struct timing_generator *timing_generators[MAX_PIPES ];struct stream_encoder *stream_enc[MAX_PIPES *2 ]; -#ifdef CONFIG_DRM_AMD_DC_DCN1_0 +struct mpc *mpc;struct pp_smu_funcs_rv *pp_smu; -#endif +struct pp_smu_display_requirement_rv pp_smu_req;struct dwbc *dwbc[MAX_DWB_PIPES ];
@@ -234,7 +234,6 @@ struct dce_bw_output {int blackout_recovery_time_us; }; -#ifdef CONFIG_DRM_AMD_DC_DCN1_0struct dcn_bw_clocks {int dispclk_khz;bool dppclk_div;
@@ -250,12 +249,9 @@ struct dcn_bw_output {struct dcn_bw_clocks calc_clk;struct dcn_watermark_set watermarks; }; -#endif union bw_context { -#ifdef CONFIG_DRM_AMD_DC_DCN1_0 struct dcn_bw_output dcn; -#endif struct dce_bw_output dce; };
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 40/77 drm/amd/display: Change log level for DCN powergatting
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Change log level from LOG_DC to LOG_DEBUGLOG_DC spams dmesg on linux when hotpluging
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -6
@@ -772,7 +772,7 @@ static void power_on_plane(hubp_pg_control (hws, plane_id, true);REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); -dm_logger_write (hws->ctx->logger,LOG_DC , +dm_logger_write (hws->ctx->logger,LOG_DEBUG ,"Un-gated front end for pipe %d\n" , plane_id); }
@@ -1003,7 +1003,7 @@ static void reset_back_end_for_pipe(return ; pipe_ctx->stream =NULL ; -dm_logger_write (dc->ctx->logger,LOG_DC , +dm_logger_write (dc->ctx->logger,LOG_DEBUG ,"Reset back end for pipe %d, tg:%d\n" , pipe_ctx->pipe_idx, pipe_ctx->stream_res.tg->inst); }
@@ -1096,7 +1096,7 @@ static void plane_atomic_power_down(struct dc *dc, int fe_idx) xfm->funcs->transform_reset (xfm);REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); -dm_logger_write (dc->ctx->logger,LOG_DC , +dm_logger_write (dc->ctx->logger,LOG_DEBUG ,"Power gated front end %d\n" , fe_idx);if (dc->debug.sanity_checks)
@@ -1153,7 +1153,7 @@ static void dcn10_power_down_fe(struct dc *dc, int fe_idx) xfm->funcs->transform_reset (xfm);REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); -dm_logger_write (dc->ctx->logger,LOG_DC , +dm_logger_write (dc->ctx->logger,LOG_DEBUG ,"Power gated front end %d\n" , fe_idx);if (dc->debug.sanity_checks)
@@ -1921,7 +1921,7 @@ static void dcn10_power_on_fe(/*TODO: REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_WDIVIDER, 0x1f);*/ if (plane_state) { -dm_logger_write (dc->ctx->logger,LOG_DC , +dm_logger_write (dc->ctx->logger,LOG_DEBUG ,"Pipe:%d 0x%x: addr hi:0x%x, " "addr low:0x%x, " "src: %d, %d, %d,"
@@ -1939,7 +1939,7 @@ static void dcn10_power_on_fe( plane_state->dst_rect.width, plane_state->dst_rect.height); - dm_logger_write(dc->ctx->logger, LOG_HW_SET_MODE, + dm_logger_write(dc->ctx->logger, LOG_DEBUG, "Pipe %d: width, height, x, y\n" "viewport:%d, %d, %d, %d\n" "recout: %d, %d, %d, %d\n",
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 41/77 drm/amd/display: retry LT on failing LT in automated request
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
[Description]
Link training is not retried in automated link training request. In case link training is occasionally failing, there is not way to retry so the requested lane settings will not set.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +3 -2
@@ -299,10 +299,11 @@ void dp_retrain_link_dp_test(struct dc_link *link,dp_receiver_power_ctrl (link, true); -dc_link_dp_perform_link_training ( +perform_link_training_with_retries ( link, link_setting, - skip_video_pattern); + skip_video_pattern, +LINK_TRAINING_ATTEMPTS ); link->cur_link_settings = *link_setting;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 42/77 drm/amd/display: Remove unneeded code
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 145 ---------------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 73 ----------- drivers/gpu/drm/amd/display/dc/dc.h | 71 ----------- 3 files changed, 289 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -145
@@ -672,67 +672,6 @@ void dc_destroy(struct dc **dc) *dc =NULL ; } -static bool validate_streams ( -struct dc *dc, -const struct dc_validation_set set[], -int set_count) -{ -int i; - -for (i =0 ; i < set_count; i++) -if (!dc_validate_stream (dc, set[i].stream)) -return false; - -return true; -} - -static bool validate_surfaces ( -struct dc *dc, -const struct dc_validation_set set[], -int set_count) -{ -int i, j; - -for (i =0 ; i < set_count; i++) -for (j =0 ; j < set[i].plane_count; j++) -if (!dc_validate_plane (dc, set[i].plane_states[j])) -return false; - -return true; -} - -bool dc_validate_resources ( -struct dc *dc, -const struct dc_validation_set set[], -uint8_t set_count) -{ -bool result = false; -struct validate_context *context; - -if (!validate_streams (dc, set, set_count)) -return false; - -if (!validate_surfaces (dc, set, set_count)) -return false; - - context =dm_alloc (sizeof (struct validate_context )); -if (context ==NULL ) - goto context_alloc_fail; - -atomic_inc (&context->ref_count); - -dc_resource_validate_ctx_copy_construct_current (dc, context); - - result =dc_validate_with_context ( - dc, set, set_count, context); - -context_alloc_fail: -dc_release_validate_context (context); - context =NULL ; - -return result; -} -bool dc_validate_guaranteed (struct dc *dc,struct dc_stream_state *stream)
@@ -857,24 +796,6 @@ static bool context_changed(return false; } -static bool streams_changed ( -struct dc *dc, -struct dc_stream_state *streams[], -uint8_t stream_count) -{ -uint8_t i; - -if (stream_count != dc->current_context->stream_count) -return true; - -for (i =0 ; i < dc->current_context->stream_count; i++) { -if (dc->current_context->streams[i] != streams[i]) -return true; - } - -return false; -} - bool dc_enable_stereo( struct dc *dc, struct validate_context *context,
@@ -999,72 +920,6 @@ bool dc_commit_context(struct dc *dc, struct validate_context *context) } -bool dc_commit_streams ( -struct dc *dc, -struct dc_stream_state *streams[], -uint8_t stream_count) -{ -struct dc *core_dc = dc; -bool result = false; -struct validate_context *context; -struct dc_validation_set set[MAX_STREAMS ] = { {0 , {0 } } }; -int i; - -if (false ==streams_changed (core_dc, streams, stream_count)) -return DC_OK ; - -dm_logger_write (core_dc->ctx->logger,LOG_DC ,"%s: %d streams\n" , - __func__, stream_count); - -for (i =0 ; i < stream_count; i++) { -struct dc_stream_state *stream = streams[i]; -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; - -if (status) { - set[i].plane_count = status->plane_count; -for (j =0 ; j < status->plane_count; j++) - set[i].plane_states[j] = status->plane_states[j]; - } - - } - -if (!validate_streams (dc, set, stream_count)) -return false; - -if (!validate_surfaces (dc, set, stream_count)) -return false; - - context =dm_alloc (sizeof (struct validate_context )); -if (context ==NULL ) - goto context_alloc_fail; - -atomic_inc (&context->ref_count); - -dc_resource_validate_ctx_copy_construct_current (dc, context); - - result =dc_validate_with_context ( - dc, set, stream_count, context); -if (!result) { -BREAK_TO_DEBUGGER (); - goto fail; - } - - result =dc_commit_context_no_check (dc, context); - -fail: -dc_release_validate_context (context); - -context_alloc_fail: -return result; -} -bool dc_post_update_surfaces_to_stream (struct dc *dc) {int i;
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -73
79 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +0 -71
129 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 43/77 drm/amd/display: Remove old, misleading comment
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c +0 -1
@@ -31,7 +31,6 @@#include "dce110/dce110_hw_sequencer.h" -/* include DCE12.0 register header files */ #include "vega10/DC/dce_12_0_offset.h" #include "vega10/DC/dce_12_0_sh_mask.h" #include "vega10/soc15ip.h"
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 44/77 drm/amd/display: Stop including atomfimrwareid.h directly
In reply to a message not in the archiveIt's already included in atomfirmware.h
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 1 - drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 1 - drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +0 -1
@@ -29,7 +29,6 @@#include "ObjectID.h" #include "atomfirmware.h" -#include "atomfirmwareid.h" #include "dc_bios_types.h" #include "include/grph_object_ctrl_defs.h"
drivers/gpu/drm/amd/display/dc/bios/command_table2.c +0 -1
@@ -27,7 +27,6 @@#include "ObjectID.h" #include "atomfirmware.h" -#include "atomfirmwareid.h" #include "include/bios_parser_interface.h"
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +0 -1
@@ -27,7 +27,6 @@#include "ObjectID.h" #include "atomfirmware.h" -#include "atomfirmwareid.h" #include "include/bios_parser_types.h"
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 45/77 drm/amd/display: Fix return value from rx irq handler on up request
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +4 -4
@@ -1964,11 +1964,11 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd* so do not handle as a normal sink status change interrupt. */ +if (hpd_irq_dpcd_data.bytes.device_service_irq.bits.UP_REQ_MSG_RDY) +return true; +/* check if we have MST msg and return since we poll for it */ -if (hpd_irq_dpcd_data.bytes.device_service_irq. - bits.DOWN_REP_MSG_RDY || - hpd_irq_dpcd_data.bytes.device_service_irq. - bits.UP_REQ_MSG_RDY) +if (hpd_irq_dpcd_data.bytes.device_service_irq.bits.DOWN_REP_MSG_RDY)return false;/* For now we only handle 'Downstream port status' case.
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 46/77 drm/amd/display: Safe stream encoder id in stream_status
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -0
@@ -1599,6 +1599,7 @@ enum dc_status resource_map_pool_resources(for (i =0 ; i < context->stream_count; i++)if (context->streams[i] == stream) { context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst; + context->stream_status[i].stream_enc_inst = pipe_ctx->stream_res.stream_enc->id;return DC_OK ; }
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -510,6 +510,7 @@ enum surface_update_type {struct dc_stream_status {int primary_otg_inst; +int stream_enc_inst;int plane_count;struct dc_plane_state *plane_states[MAX_SURFACE_NUM ];
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 47/77 drm/amd/display: Block 6Ghz timing if SBIOS set HDMI_6G_en to 0
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 + 3 files changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +1 -0
@@ -1853,6 +1853,7 @@ static enum bp_result bios_parser_get_encoder_cap_info( info->DP_HBR2_EN = record->usHBR2En; info->DP_HBR3_EN = record->usHBR3En; + info->HDMI_6GB_EN = record->usHDMI6GEn;return BP_RESULT_OK ; }
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +4 -0
@@ -887,6 +887,9 @@ static bool dce110_link_encoder_validate_hdmi_output( crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)return false; +if (!enc110->base.features.flags.bits.HDMI_6GB_EN && + adjusted_pix_clk_khz >=300000 ) +return false;return true; }
@@ -1008,6 +1011,7 @@ bool dce110_link_encoder_construct( bp_cap_info.DP_HBR2_EN; enc110->base.features.flags.bits.IS_HBR3_CAPABLE = bp_cap_info.DP_HBR3_EN; + enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN; }return true;
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +1 -0
@@ -37,6 +37,7 @@ struct encoder_feature_support { uint32_t IS_TPS3_CAPABLE:1; uint32_t IS_TPS4_CAPABLE:1; uint32_t IS_YCBCR_CAPABLE:1; + uint32_t HDMI_6GB_EN:1; } bits;uint32_t raw; } flags;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 48/77 drm/amd/display: Per plane validation context build.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Introduce add/remove plane to/from context.
Make DC wrapper to use them in WIndows/Diags.
Use them in dc_update_surface_to_stream.
Call add/remove plane from Linux DM.
Remove dc_validation_set from dc_validate_global_state interface and by this remove clean Linux DM from using it.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 165 ++++------ drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 362 +++++++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 37 ++- .../drm/amd/display/dc/dce100/dce100_resource.c | 16 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 26 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 16 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 16 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 - 9 files changed, 353 insertions(+), 300 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +58 -107
@@ -4419,77 +4419,6 @@ void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connectordm_force_atomic_commit (&aconnector->base); } -static uint32_t add_val_sets_plane ( -struct dc_validation_set *val_sets, -uint32_t set_count, -const struct dc_stream_state *stream, -struct dc_plane_state *plane_state) -{ -uint32_t i =0 , j =0 ; - -while (i < set_count) { -if (val_sets[i].stream == stream) { -while (val_sets[i].plane_states[j]) - j++; -break ; - } - ++i; - } - - val_sets[i].plane_states[j] = plane_state; - val_sets[i].plane_count++; - -return val_sets[i].plane_count; -} - -static uint32_t update_in_val_sets_stream ( -struct dc_validation_set *val_sets, -uint32_t set_count, -struct dc_stream_state *old_stream, -struct dc_stream_state *new_stream, -struct drm_crtc *crtc) -{ -uint32_t i =0 ; - -while (i < set_count) { -if (val_sets[i].stream == old_stream) -break ; - ++i; - } - - val_sets[i].stream = new_stream; - -if (i == set_count) -/* nothing found. add new one to the end */ -return set_count +1 ; - -return set_count; -} - -static uint32_t remove_from_val_sets ( -struct dc_validation_set *val_sets, -uint32_t set_count, -const struct dc_stream_state *stream) -{ -int i; - -for (i =0 ; i < set_count; i++) -if (val_sets[i].stream == stream) -break ; - -if (i == set_count) { -/* nothing found */ -return set_count; - } - - set_count--; - -for (; i < set_count; i++) - val_sets[i] = val_sets[i +1 ]; - -return set_count; -} -/*` * Grabs all modesetting locks to serialize against any blocking commits, * Waits for completion of all non blocking commits.
@@ -4553,10 +4482,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,struct dc *dc = adev->dm.dc;struct drm_connector *connector;struct drm_connector_state *conn_state; -int set_count; -struct dc_validation_set set[MAX_STREAMS ] = { {0 } };struct dm_crtc_state *old_acrtc_state, *new_acrtc_state;struct dm_atomic_state *dm_state =to_dm_atomic_state (state); +bool pflip_needed = !state->allow_modeset;/* * This bool will be set for true for any modeset/reset
@@ -4571,16 +4499,44 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,return ret; } -/* copy existing configuration */ - set_count =0 ; -list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { +/* Remove exiting planes if they are disabled or their CRTC is updated */ +for_each_crtc_in_state (state, crtc, crtc_state, i) { + new_acrtc_state =to_dm_crtc_state (crtc_state); - old_acrtc_state =to_dm_crtc_state (crtc->state); +if (pflip_needed) +continue ; -if (old_acrtc_state->stream) { -dc_stream_retain (old_acrtc_state->stream); - set[set_count].stream = old_acrtc_state->stream; - ++set_count; +for_each_plane_in_state (state, plane, plane_state, j) { +struct drm_crtc *plane_crtc = plane_state->crtc; +struct dm_plane_state *dm_plane_state =to_dm_plane_state (plane_state); + +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; + +if (crtc != plane_crtc || !dm_plane_state->dc_state) +continue ; + +WARN_ON (!new_acrtc_state->stream); + +if (drm_atomic_plane_disabling (plane->state, plane_state) || +drm_atomic_crtc_needs_modeset (crtc_state)) { +if (!dc_remove_plane_from_context ( + dc, + new_acrtc_state->stream, + dm_plane_state->dc_state, + dm_state->context)) { + + ret =EINVAL ; + goto fail; + } + + } + +dc_plane_state_release (dm_plane_state->dc_state); + dm_plane_state->dc_state =NULL ; + +DRM_DEBUG_KMS ("Disabling DRM plane: %d on DRM crtc %d\n" , + plane->base.id, crtc->base.id); } }
@@ -4624,11 +4580,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, goto fail; } - set_count =remove_from_val_sets ( - set, - set_count, - new_acrtc_state->stream); -dc_stream_release (new_acrtc_state->stream); new_acrtc_state->stream =NULL ;
@@ -4687,13 +4638,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, new_acrtc_state->stream = new_stream; - set_count =update_in_val_sets_stream ( - set, - set_count, - old_acrtc_state->stream, - new_acrtc_state->stream, - crtc); - if (!dc_add_stream_to_ctx( dc, dm_state->context,
@@ -4750,32 +4694,32 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, lock_and_validation_needed = true; } +/* Add new planes */ for_each_crtc_in_state (state, crtc, crtc_state, i) { new_acrtc_state =to_dm_crtc_state (crtc_state); +if (pflip_needed) +continue ; +for_each_plane_in_state (state, plane, plane_state, j) {struct drm_crtc *plane_crtc = plane_state->crtc; -struct drm_framebuffer *fb = plane_state->fb; -bool pflip_needed;struct dm_plane_state *dm_plane_state =to_dm_plane_state (plane_state);/*TODO Implement atomic check for cursor plane */ if (plane->type ==DRM_PLANE_TYPE_CURSOR )continue ; -if (!fb || !plane_crtc || crtc != plane_crtc || !crtc_state->active) +if (crtc != plane_crtc)continue ; -WARN_ON (!new_acrtc_state->stream); - - pflip_needed = !state->allow_modeset; -if (!pflip_needed) { +if (!drm_atomic_plane_disabling (plane->state, plane_state)) {struct dc_plane_state *dc_plane_state; +WARN_ON (!new_acrtc_state->stream); + dc_plane_state =dc_create_plane_state (dc); -if (dm_plane_state->dc_state) -dc_plane_state_release (dm_plane_state->dc_state); +WARN_ON (dm_plane_state->dc_state); dm_plane_state->dc_state = dc_plane_state;
@@ -4788,10 +4732,17 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,if (ret) goto fail; -add_val_sets_plane (set, - set_count, - new_acrtc_state->stream, - dc_plane_state); + +if (!dc_add_plane_to_context ( + dc, + new_acrtc_state->stream, + dc_plane_state, + dm_state->context)) { + + ret =EINVAL ; + goto fail; + } + lock_and_validation_needed = true; }
@@ -4819,7 +4770,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,if (ret) goto fail; -if (!dc_validate_global_state (dc, set, set_count, dm_state->context)) { +if (!dc_validate_global_state (dc, dm_state->context)) { ret = -EINVAL ; goto fail; }
drivers/gpu/drm/amd/display/dc/core/dc.c +9 -3
@@ -1298,10 +1298,16 @@ void dc_update_planes_and_stream(struct dc *dc,dc_resource_validate_ctx_copy_construct ( core_dc->current_context, context); +/*remove old surfaces from context */ +if (!dc_rem_all_planes_for_stream (dc, stream, context)) { + +BREAK_TO_DEBUGGER (); + goto fail; + } +/* add surface to context */ -if (!resource_attach_surfaces_to_context ( - new_planes, surface_count, stream, - context, core_dc->res_pool)) { +if (!dc_add_all_planes_for_stream (dc, stream, new_planes, surface_count, context)) { +BREAK_TO_DEBUGGER (); goto fail; }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +227 -135
464 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +30 -7
@@ -619,15 +619,40 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,uint32_t *h_position, uint32_t *v_position); -bool dc_remove_stream_from_ctx ( +bool dc_add_stream_to_ctx (struct dc *dc, +struct validate_context *new_ctx, +struct dc_stream_state *stream); + +bool dc_remove_stream_from_ctx ( +struct dc *dc,struct validate_context *new_ctx,struct dc_stream_state *stream); -bool dc_add_stream_to_ctx ( -struct dc *dc, -struct validate_context *new_ctx, -struct dc_stream_state *stream); + +bool dc_add_plane_to_context ( +const struct dc *dc, +struct dc_stream_state *stream, +struct dc_plane_state *plane_state, +struct validate_context *context); + +bool dc_remove_plane_from_context ( +const struct dc *dc, +struct dc_stream_state *stream, +struct dc_plane_state *plane_state, +struct validate_context *context); + +bool dc_rem_all_planes_for_stream ( +const struct dc *dc, +struct dc_stream_state *stream, +struct validate_context *context); + +bool dc_add_all_planes_for_stream ( +const struct dc *dc, +struct dc_stream_state *stream, +struct dc_plane_state *const *plane_states, +int plane_count, +struct validate_context *context);/* * Structure to store surface/stream associations for validation
@@ -644,8 +669,6 @@ bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);bool dc_validate_global_state (struct dc *dc, -const struct dc_validation_set set[], -int set_count,struct validate_context *new_ctx);/*
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +6 -10
@@ -684,19 +684,18 @@ bool dce100_validate_bandwidth( }static bool dce100_validate_surface_sets ( -const struct dc_validation_set set[], -int set_count) +struct validate_context *context) {int i; -for (i =0 ; i < set_count; i++) { -if (set[i].plane_count ==0 ) +for (i =0 ; i < context->stream_count; i++) { +if (context->stream_status[i].plane_count ==0 )continue ; -if (set[i].plane_count >1 ) +if (context->stream_status[i].plane_count >1 )return false; -if (set[i].plane_states[0 ]->format +if (context->stream_status[i].plane_states[0 ]->format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return false; }
@@ -706,12 +705,9 @@ static bool dce100_validate_surface_sets(enum dc_status dce100_validate_global (struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *old_context,struct validate_context *context) { -if (!dce100_validate_surface_sets (set, set_count)) +if (!dce100_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;return DC_OK ;
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +11 -15
@@ -880,31 +880,30 @@ static bool dce110_validate_bandwidth( }static bool dce110_validate_surface_sets ( -const struct dc_validation_set set[], -int set_count) +struct validate_context *context) {int i; -for (i =0 ; i < set_count; i++) { -if (set[i].plane_count ==0 ) +for (i =0 ; i < context->stream_count; i++) { +if (context->stream_status[i].plane_count ==0 )continue ; -if (set[i].plane_count >2 ) +if (context->stream_status[i].plane_count >2 )return false; -if (set[i].plane_states[0 ]->format +if (context->stream_status[i].plane_states[0 ]->format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return false; -if (set[i].plane_count ==2 ) { -if (set[i].plane_states[1 ]->format +if (context->stream_status[i].plane_count ==2 ) { +if (context->stream_status[i].plane_states[1 ]->format <SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return false; -if (set[i].plane_states[1 ]->src_rect.width >1920 - || set[i].plane_states[1 ]->src_rect.height >1080 ) +if (context->stream_status[i].plane_states[1 ]->src_rect.width >1920 + || context->stream_status[i].plane_states[1 ]->src_rect.height >1080 )return false; -if (set[i].stream->timing.pixel_encoding !=PIXEL_ENCODING_RGB ) +if (context->streams[i]->timing.pixel_encoding !=PIXEL_ENCODING_RGB )return false; } }
@@ -914,12 +913,9 @@ static bool dce110_validate_surface_sets(enum dc_status dce110_validate_global (struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *old_context,struct validate_context *context) { -if (!dce110_validate_surface_sets (set, set_count)) +if (!dce110_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;return DC_OK ;
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +6 -10
@@ -855,19 +855,18 @@ enum dc_status resource_map_phy_clock_resources( }static bool dce112_validate_surface_sets ( -const struct dc_validation_set set[], -int set_count) +struct validate_context *context) {int i; -for (i =0 ; i < set_count; i++) { -if (set[i].plane_count ==0 ) +for (i =0 ; i < context->stream_count; i++) { +if (context->stream_status[i].plane_count ==0 )continue ; -if (set[i].plane_count >1 ) +if (context->stream_status[i].plane_count >1 )return false; -if (set[i].plane_states[0 ]->format +if (context->stream_status[i].plane_states[0 ]->format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return false; }
@@ -928,12 +927,9 @@ enum dc_status dce112_validate_guaranteed(enum dc_status dce112_validate_global (struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *old_context,struct validate_context *context) { -if (!dce112_validate_surface_sets (set, set_count)) +if (!dce112_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;return DC_OK ;
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +6 -10
@@ -716,19 +716,18 @@ bool dce80_validate_bandwidth( }static bool dce80_validate_surface_sets ( -const struct dc_validation_set set[], -int set_count) +struct validate_context *context) {int i; -for (i =0 ; i < set_count; i++) { -if (set[i].plane_count ==0 ) +for (i =0 ; i < context->stream_count; i++) { +if (context->stream_status[i].plane_count ==0 )continue ; -if (set[i].plane_count >1 ) +if (context->stream_status[i].plane_count >1 )return false; -if (set[i].plane_states[0 ]->format +if (context->stream_status[i].plane_states[0 ]->format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return false; }
@@ -738,12 +737,9 @@ static bool dce80_validate_surface_sets(enum dc_status dce80_validate_global (struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *old_context,struct validate_context *context) { -if (!dce80_validate_surface_sets (set, set_count)) +if (!dce80_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;return DC_OK ;
drivers/gpu/drm/amd/display/dc/inc/core_types.h +0 -3
@@ -99,9 +99,6 @@ struct resource_funcs {enum dc_status (*validate_global)(struct dc *dc, -const struct dc_validation_set set[], -int set_count, -struct validate_context *old_context,struct validate_context *context); struct pipe_ctx *(*acquire_idle_pipe_for_layer)(
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 49/77 drm/amd/display: Refactor atomic check.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Split into update crtcs and update plane functions.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 453 ++++++++++++---------- 1 file changed, 257 insertions(+), 196 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +257 -196
@@ -1660,12 +1660,6 @@ static bool modeset_required(struct drm_crtc_state *crtc_state, struct dc_stream_state *new_stream, struct dc_stream_state *old_stream) { - if (dc_is_stream_unchanged(new_stream, old_stream)) { - crtc_state->mode_changed = false; -DRM_DEBUG_KMS ("Mode change not required, setting mode_changed to %d" , - crtc_state->mode_changed); - } -if (!drm_atomic_crtc_needs_modeset (crtc_state))return false;
@@ -3990,9 +3984,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,continue ; } -if (!fb || !crtc || pcrtc != crtc || !crtc->state->active || - (!crtc->state->planes_changed && - !pcrtc->state->color_mgmt_changed)) +if (!fb || !crtc || pcrtc != crtc || !crtc->state->active)continue ; pflip_needed = !state->allow_modeset;
@@ -4469,91 +4461,77 @@ static int do_aquire_global_lock(return ret <0 ? ret :0 ; } -int amdgpu_dm_atomic_check (struct drm_device *dev, -struct drm_atomic_state *state) +static int dm_update_crtcs_state ( +struct dc *dc, +struct drm_atomic_state *state, +bool enable, +bool *lock_and_validation_needed) {struct drm_crtc *crtc;struct drm_crtc_state *crtc_state; -struct drm_plane *plane; -struct drm_plane_state *plane_state; -int i, j; -int ret; -struct amdgpu_device *adev = dev->dev_private; -struct dc *dc = adev->dm.dc; -struct drm_connector *connector; -struct drm_connector_state *conn_state; +int i;struct dm_crtc_state *old_acrtc_state, *new_acrtc_state;struct dm_atomic_state *dm_state =to_dm_atomic_state (state); -bool pflip_needed = !state->allow_modeset; - -/* -* This bool will be set for true for any modeset/reset -* or plane update which implies non fast surface update. -*/ -bool lock_and_validation_needed = false; +int ret =0 ; - ret =drm_atomic_helper_check_modeset (dev, state); +/*TODO Move this code into dm_crtc_atomic_check once we get rid of dc_validation_set */ +/* update changed items */ +for_each_crtc_in_state (state, crtc, crtc_state, i) { +struct amdgpu_crtc *acrtc =NULL ; +struct amdgpu_connector *aconnector =NULL ; +struct dc_stream_state *new_stream =NULL ; +struct drm_connector_state *conn_state =NULL ; +struct dm_connector_state *dm_conn_state =NULL ; -if (ret) { -DRM_ERROR ("Atomic state validation failed with error :%d !\n" , ret); -return ret; - } -/* Remove exiting planes if they are disabled or their CRTC is updated */ -for_each_crtc_in_state (state, crtc, crtc_state, i) { + old_acrtc_state =to_dm_crtc_state (crtc->state); new_acrtc_state =to_dm_crtc_state (crtc_state); + acrtc =to_amdgpu_crtc (crtc); -if (pflip_needed) -continue ; + aconnector =amdgpu_dm_find_first_crct_matching_connector (state, crtc, true); -for_each_plane_in_state (state, plane, plane_state, j) { -struct drm_crtc *plane_crtc = plane_state->crtc; -struct dm_plane_state *dm_plane_state =to_dm_plane_state (plane_state); +/* TODO This hack should go away */ +if (aconnector && aconnector->dc_sink) { + conn_state =drm_atomic_get_connector_state (state, + &aconnector->base); -if (plane->type ==DRM_PLANE_TYPE_CURSOR ) -continue ; - -if (crtc != plane_crtc || !dm_plane_state->dc_state) -continue ; +if (IS_ERR (conn_state)) { + ret =PTR_ERR_OR_ZERO (conn_state); +break ; + } -WARN_ON (!new_acrtc_state->stream); + dm_conn_state =to_dm_connector_state (conn_state); -if (drm_atomic_plane_disabling (plane->state, plane_state) || -drm_atomic_crtc_needs_modeset (crtc_state)) { -if (!dc_remove_plane_from_context ( - dc, - new_acrtc_state->stream, - dm_plane_state->dc_state, - dm_state->context)) { + new_stream =create_stream_for_sink (aconnector, + &crtc_state->mode, + dm_conn_state); - ret =EINVAL ; - goto fail; - } +/* +* we can have no stream on ACTION_SET if a display +* was disconnected during S3, in this case it not and +* error, the OS will be updated after detection, and +* do the right thing on next atomic commit +*/ +if (!new_stream) { +DRM_DEBUG_KMS ("%s: Failed to create new stream for crtc %d\n" , + __func__, acrtc->base.base.id); +break ; } + } -dc_plane_state_release (dm_plane_state->dc_state); - dm_plane_state->dc_state =NULL ; +if (dc_is_stream_unchanged (new_stream, + old_acrtc_state->stream)) { -DRM_DEBUG_KMS ("Disabling DRM plane: %d on DRM crtc %d\n" , - plane->base.id, crtc->base.id); - } - } + crtc_state->mode_changed = false; -/*TODO Move this code into dm_crtc_atomic_check once we get rid of dc_validation_set */ -/* update changed items */ -for_each_crtc_in_state (state, crtc, crtc_state, i) { -struct amdgpu_crtc *acrtc =NULL ; -struct amdgpu_connector *aconnector =NULL ; -struct dc_stream_state *new_stream =NULL ; -struct drm_connector_state *conn_state =NULL ; -struct dm_connector_state *dm_conn_state =NULL ; +DRM_DEBUG_KMS ("Mode change not required, setting mode_changed to %d" , + crtc_state->mode_changed); + } - old_acrtc_state =to_dm_crtc_state (crtc->state); - new_acrtc_state =to_dm_crtc_state (crtc_state); - acrtc =to_amdgpu_crtc (crtc); - aconnector =amdgpu_dm_find_first_crct_matching_connector (state, crtc, true); +if (!drm_atomic_crtc_needs_modeset (crtc_state)) +continue ;DRM_DEBUG_KMS ( "amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
@@ -4567,109 +4545,252 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, crtc_state->active_changed, crtc_state->connectors_changed); -if (modereset_required (crtc_state)) { +/* Remove stream for any changed/disabled CRTC */ +if (!enable) { + +if (!old_acrtc_state->stream) +continue ; + +DRM_DEBUG_KMS ("Disabling DRM crtc: %d\n" , + crtc->base.id);/* i.e. reset mode */ -if (new_acrtc_state->stream) { +if (!dc_remove_stream_from_ctx ( + dc, + dm_state->context, + old_acrtc_state->stream)) { + ret = -EINVAL ; +break ; + } + +dc_stream_release (old_acrtc_state->stream); + new_acrtc_state->stream =NULL ; + + *lock_and_validation_needed = true; + + }else {/* Add stream for any updated/enabled CRTC */ + +if (modereset_required (crtc_state)) +continue ; + +if (modeset_required (crtc_state, new_stream, + old_acrtc_state->stream)) { + +WARN_ON (new_acrtc_state->stream); + + new_acrtc_state->stream = new_stream; +dc_stream_retain (new_stream); + +DRM_DEBUG_KMS ("Enabling DRM crtc: %d\n" , + crtc->base.id); -if (!dc_remove_stream_from_ctx ( +if (!dc_add_stream_to_ctx ( dc, dm_state->context, new_acrtc_state->stream)) { ret = -EINVAL ; - goto fail; +break ; } -dc_stream_release (new_acrtc_state->stream); - new_acrtc_state->stream =NULL ; - - lock_and_validation_needed = true; + *lock_and_validation_needed = true; } + } - }else { +/* Release extra reference */ +if (new_stream) +dc_stream_release (new_stream); + } -if (aconnector) { - conn_state =drm_atomic_get_connector_state (state, - &aconnector->base); +return ret; +} -if (IS_ERR (conn_state)) { - ret =PTR_ERR_OR_ZERO (conn_state); - goto fail; - } +static int dm_update_planes_state ( +struct dc *dc, +struct drm_atomic_state *state, +bool enable, +bool *lock_and_validation_needed) +{ +struct drm_crtc *new_plane_crtc, *old_plane_crtc; +struct drm_crtc_state *new_crtc_state; +struct drm_plane *plane; +struct drm_plane_state *old_plane_state, *new_plane_state; +struct dm_crtc_state *new_acrtc_state, *old_acrtc_state; +struct dm_atomic_state *dm_state =to_dm_atomic_state (state); +struct dm_plane_state *new_dm_plane_state, *old_dm_plane_state; +int i ; +/* TODO return page_flip_needed() function */ +bool pflip_needed = !state->allow_modeset; +int ret =0 ; - dm_conn_state =to_dm_connector_state (conn_state); +if (pflip_needed) +return ret; - new_stream =create_stream_for_sink (aconnector, - &crtc_state->mode, - dm_conn_state); +/* Add new planes */ +for_each_oldnew_plane_in_state (state, plane, old_plane_state, new_plane_state, i) { + new_plane_crtc = new_plane_state->crtc; + old_plane_crtc = old_plane_state->crtc; + new_dm_plane_state =to_dm_plane_state (new_plane_state); + old_dm_plane_state =to_dm_plane_state (old_plane_state); + +/*TODO Implement atomic check for cursor plane */ +if (plane->type ==DRM_PLANE_TYPE_CURSOR ) +continue ; -/* -* we can have no stream on ACTION_SET if a display -* was disconnected during S3, in this case it not and -* error, the OS will be updated after detection, and -* do the right thing on next atomic commit -*/ +/* Remove any changed/removed planes */ +if (!enable) { -if (!new_stream) { -DRM_DEBUG_KMS ("%s: Failed to create new stream for crtc %d\n" , - __func__, acrtc->base.base.id); -break ; - } +if (!old_plane_crtc) +continue ; + + old_acrtc_state =to_dm_crtc_state ( +drm_atomic_get_old_crtc_state ( + state, + old_plane_crtc)); + +if (!old_acrtc_state->stream) +continue ; + +DRM_DEBUG_KMS ("Disabling DRM plane: %d on DRM crtc %d\n" , + plane->base.id, old_plane_crtc->base.id); +if (!dc_remove_plane_from_context ( + dc, + old_acrtc_state->stream, + old_dm_plane_state->dc_state, + dm_state->context)) { + ret =EINVAL ; +return ret; } -if (modeset_required (crtc_state, new_stream, - old_acrtc_state->stream)) { -if (new_acrtc_state->stream) { +dc_plane_state_release (old_dm_plane_state->dc_state); + new_dm_plane_state->dc_state =NULL ; -if (!dc_remove_stream_from_ctx ( - dc, - dm_state->context, - new_acrtc_state->stream)) { - ret = -EINVAL ; - goto fail; - } + *lock_and_validation_needed = true; + }else {/* Add new planes */ -dc_stream_release (new_acrtc_state->stream); - } +if (drm_atomic_plane_disabling (plane->state, new_plane_state)) +continue ; - new_acrtc_state->stream = new_stream; +if (!new_plane_crtc) +continue ; -if (!dc_add_stream_to_ctx ( - dc, - dm_state->context, - new_acrtc_state->stream)) { - ret = -EINVAL ; - goto fail; - } + new_crtc_state =drm_atomic_get_new_crtc_state (state, new_plane_crtc); + new_acrtc_state =to_dm_crtc_state (new_crtc_state); - lock_and_validation_needed = true; - }else { -/* -* The new stream is unused, so we release it -*/ -if (new_stream) -dc_stream_release (new_stream); +if (!new_acrtc_state->stream) +continue ; + + +WARN_ON (new_dm_plane_state->dc_state); + + new_dm_plane_state->dc_state =dc_create_plane_state (dc); + +DRM_DEBUG_KMS ("Enabling DRM plane: %d on DRM crtc %d\n" , + plane->base.id, new_plane_crtc->base.id); + +if (!new_dm_plane_state->dc_state) { + ret = -EINVAL ; +return ret; + } + + ret =fill_plane_attributes ( + new_plane_crtc->dev->dev_private, + new_dm_plane_state->dc_state, + new_plane_state, + new_crtc_state, + false); +if (ret) +return ret; + + +if (!dc_add_plane_to_context ( + dc, + new_acrtc_state->stream, + new_dm_plane_state->dc_state, + dm_state->context)) { + ret = -EINVAL ; +return ret; } + + *lock_and_validation_needed = true; } + } -/* -* Hack: Commit needs planes right now, specifically for gamma -* TODO rework commit to check CRTC for gamma change -*/ -if (crtc_state->color_mgmt_changed) { +return ret; +} + +int amdgpu_dm_atomic_check (struct drm_device *dev, +struct drm_atomic_state *state) +{ +int i; +int ret; +struct amdgpu_device *adev = dev->dev_private; +struct dc *dc = adev->dm.dc; +struct dm_atomic_state *dm_state =to_dm_atomic_state (state); +struct drm_connector *connector; +struct drm_connector_state *conn_state; +struct drm_crtc *crtc; +struct drm_crtc_state *crtc_state; + +/* +* This bool will be set for true for any modeset/reset +* or plane update which implies non fast surface update. +*/ +bool lock_and_validation_needed = false; + + ret =drm_atomic_helper_check_modeset (dev, state); +if (ret) { +DRM_ERROR ("Atomic state validation failed with error :%d !\n" , ret); +return ret; + } + +/* +* Hack: Commit needs planes right now, specifically for gamma +* TODO rework commit to check CRTC for gamma change +*/ +for_each_crtc_in_state (state, crtc, crtc_state, i) { +if (crtc_state->color_mgmt_changed) { ret =drm_atomic_add_affected_planes (state, crtc);if (ret) goto fail; } } +/* Remove exiting planes if they are modified */ + ret =dm_update_planes_state (dc, state, false, &lock_and_validation_needed); +if (ret) { + goto fail; + } + +/* Disable all crtcs which require disable */ + ret =dm_update_crtcs_state (dc, state, false, &lock_and_validation_needed); +if (ret) { + goto fail; + } + +/* Enable all crtcs which require enable */ + ret =dm_update_crtcs_state (dc, state, true, &lock_and_validation_needed); +if (ret) { + goto fail; + } + +/* Add new/modified planes */ + ret =dm_update_planes_state (dc, state, true, &lock_and_validation_needed); +if (ret) { + goto fail; + } + +/* Run this here since we want to validate the streams we created */ + ret =drm_atomic_helper_check_planes (dev, state); +if (ret) + goto fail; +/* Check scaling and undersacn changes*/ /*TODO Removed scaling changes validation due to inability to commit * new stream into context w\o causing full reset. Need to
@@ -4694,66 +4815,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, lock_and_validation_needed = true; } -/* Add new planes */ -for_each_crtc_in_state (state, crtc, crtc_state, i) { - new_acrtc_state =to_dm_crtc_state (crtc_state); - -if (pflip_needed) -continue ; - -for_each_plane_in_state (state, plane, plane_state, j) { -struct drm_crtc *plane_crtc = plane_state->crtc; -struct dm_plane_state *dm_plane_state =to_dm_plane_state (plane_state); - -/*TODO Implement atomic check for cursor plane */ -if (plane->type ==DRM_PLANE_TYPE_CURSOR ) -continue ; - -if (crtc != plane_crtc) -continue ; - -if (!drm_atomic_plane_disabling (plane->state, plane_state)) { -struct dc_plane_state *dc_plane_state; - -WARN_ON (!new_acrtc_state->stream); - - dc_plane_state =dc_create_plane_state (dc); - -WARN_ON (dm_plane_state->dc_state); - - dm_plane_state->dc_state = dc_plane_state; - - ret =fill_plane_attributes ( - plane_crtc->dev->dev_private, - dc_plane_state, - plane_state, - crtc_state, - false); -if (ret) - goto fail; - - -if (!dc_add_plane_to_context ( - dc, - new_acrtc_state->stream, - dc_plane_state, - dm_state->context)) { - - ret =EINVAL ; - goto fail; - } - - - lock_and_validation_needed = true; - } - } - } - -/* Run this here since we want to validate the streams we created */ - ret =drm_atomic_helper_check_planes (dev, state); -if (ret) - goto fail; -/* * For full updates case when * removing/adding/updating streams on once CRTC while flipping
@@ -4786,7 +4847,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,else if (ret == -EINTR || ret == -EAGAIN || ret == -ERESTARTSYS )DRM_DEBUG_KMS ("Atomic check stopped due to to signal.\n" );else -DRM_ERROR ("Atomic check failed with err: %d .\n" , ret); +DRM_ERROR ("Atomic check failed with err: %d \n" , ret);return ret; }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 50/77 drm/amd/display: Clean up flattening core_dc to dc
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Clean up some code related to flattening core_dc commit (Remove redundent dc = dc, which was the result of removing DC_TO_CORE() macro)
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 335 +++++++++------------ .../drm/amd/display/modules/freesync/freesync.c | 19 +- 3 files changed, 164 insertions(+), 202 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +5 -7
@@ -983,15 +983,14 @@ bool dcn_validate_bandwidth(if (v->voltage_level ==0 && (dc->debug.sr_exit_time_dpm0_ns || dc->debug.sr_enter_plus_exit_time_dpm0_ns)) { -struct dc *dc_core = dc;if (dc->debug.sr_enter_plus_exit_time_dpm0_ns) v->sr_enter_plus_exit_time = dc->debug.sr_enter_plus_exit_time_dpm0_ns /1000.0f ;if (dc->debug.sr_exit_time_dpm0_ns) v->sr_exit_time = dc->debug.sr_exit_time_dpm0_ns /1000.0f ; - dc_core->dml.soc.sr_enter_plus_exit_time_us = v->sr_enter_plus_exit_time; - dc_core->dml.soc.sr_exit_time_us = v->sr_exit_time; + dc->dml.soc.sr_enter_plus_exit_time_us = v->sr_enter_plus_exit_time; + dc->dml.soc.sr_exit_time_us = v->sr_exit_time;mode_support_and_system_configuration (v); }
@@ -1114,11 +1113,10 @@ bool dcn_validate_bandwidth( }if (v->voltage_level ==0 ) { -struct dc *dc_core = dc; - dc_core->dml.soc.sr_enter_plus_exit_time_us = - dc_core->dcn_soc->sr_enter_plus_exit_time; - dc_core->dml.soc.sr_exit_time_us = dc_core->dcn_soc->sr_exit_time; + dc->dml.soc.sr_enter_plus_exit_time_us = + dc->dcn_soc->sr_enter_plus_exit_time; + dc->dml.soc.sr_exit_time_us = dc->dcn_soc->sr_exit_time; }/*
drivers/gpu/drm/amd/display/dc/core/dc.c +150 -185
887 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +9 -10
@@ -145,7 +145,6 @@ struct mod_freesync *mod_freesync_create(struct dc *dc)struct core_freesync *core_freesync =dm_alloc (sizeof (struct core_freesync )); -struct dc *core_dc = dc;struct persistent_data_flag flag;
@@ -176,19 +175,19 @@ struct mod_freesync *mod_freesync_create(struct dc *dc)/* Create initial module folder in registry for freesync enable data */ flag.save_per_edid = true; flag.save_per_link = false; -dm_write_persistent_data (core_dc->ctx,NULL ,FREESYNC_REGISTRY_NAME , +dm_write_persistent_data (dc->ctx,NULL ,FREESYNC_REGISTRY_NAME ,NULL ,NULL ,0 , &flag); flag.save_per_edid = false; flag.save_per_link = false; -if (dm_read_persistent_data (core_dc->ctx,NULL ,NULL , +if (dm_read_persistent_data (dc->ctx,NULL ,NULL ,FREESYNC_NO_STATIC_FOR_INTERNAL_REGKEY , &data,sizeof (data), &flag)) { core_freesync->opts.drr_internal_supported = (data &1 ) ? false : true; } -if (dm_read_persistent_data (core_dc->ctx,NULL ,NULL , +if (dm_read_persistent_data (dc->ctx,NULL ,NULL ,FREESYNC_NO_STATIC_FOR_EXTERNAL_DP_REGKEY , &data,sizeof (data), &flag)) { core_freesync->opts.drr_external_supported =
@@ -245,7 +244,7 @@ static unsigned int map_index_from_stream(struct core_freesync *core_freesync,bool mod_freesync_add_stream (struct mod_freesync *mod_freesync,struct dc_stream_state *stream,struct mod_freesync_caps *caps) { -struct dc *core_dc =NULL ; +struct dc *dc =NULL ;struct core_freesync *core_freesync =NULL ;int persistent_freesync_enable =0 ;struct persistent_data_flag flag;
@@ -256,7 +255,7 @@ bool mod_freesync_add_stream(struct mod_freesync *mod_freesync,return false; core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); - core_dc = core_freesync->dc; + dc = core_freesync->dc; flag.save_per_edid = true; flag.save_per_link = false;
@@ -287,7 +286,7 @@ bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, static_ramp.ramp_is_active = false;/* get persistent data from registry */ -if (dm_read_persistent_data (core_dc->ctx, stream->sink, +if (dm_read_persistent_data (dc->ctx, stream->sink,FREESYNC_REGISTRY_NAME ,"userenable" , &persistent_freesync_enable,sizeof (int ), &flag)) {
@@ -970,14 +969,14 @@ bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync,unsigned int stream_index, map_index;int persistent_data =0 ;struct persistent_data_flag flag; -struct dc *core_dc =NULL ; +struct dc *dc =NULL ;struct core_freesync *core_freesync =NULL ;if (mod_freesync ==NULL )return false; core_freesync =MOD_FREESYNC_TO_CORE (mod_freesync); - core_dc = core_freesync->dc; + dc = core_freesync->dc; flag.save_per_edid = true; flag.save_per_link = false;
@@ -1001,7 +1000,7 @@ bool mod_freesync_set_user_enable(struct mod_freesync *mod_freesync, enable_for_video) persistent_data = persistent_data |4 ; - dm_write_persistent_data(core_dc->ctx, + dm_write_persistent_data(dc->ctx, streams[stream_index]->sink, FREESYNC_REGISTRY_NAME, "userenable",
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 51/77 drm/amd/display: do not reset lane count in EQ fallback
In reply to a message not in the archiveFrom: Wenjing Liu <[email protected]>
[Description]
According to DP1.4 specs we should not reset lane count back when falling back in failing EQ training.
This causes PHY test pattern compliance to fail as infinite LT when LT fails EQ to 4 RBR and fails CR in a loop.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +0 -2
@@ -1302,8 +1302,6 @@ bool decide_fallback_link_setting( current_link_setting->lane_count); }else if (!reached_minimum_link_rate (current_link_setting->link_rate)) { - current_link_setting->lane_count = - initial_link_settings.lane_count; current_link_setting->link_rate =reduce_link_rate ( current_link_setting->link_rate);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 52/77 drm/amd/display: work around for 8k sleep crash
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +1 -0
@@ -581,6 +581,7 @@ static void split_stream_across_pipes( secondary_pipe->plane_res.ipp = pool->ipps[secondary_pipe->pipe_idx]; secondary_pipe->plane_res.xfm = pool->transforms[secondary_pipe->pipe_idx];if (primary_pipe->bottom_pipe) { +ASSERT (primary_pipe->bottom_pipe != secondary_pipe); secondary_pipe->bottom_pipe = primary_pipe->bottom_pipe; secondary_pipe->bottom_pipe->top_pipe = secondary_pipe; }
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -1
@@ -2358,7 +2358,7 @@ static void program_all_pipe_in_tree(verify_allow_pstate_change_high (dc->hwseq); } -if (pipe_ctx->bottom_pipe !=NULL ) +if (pipe_ctx->bottom_pipe !=NULL && pipe_ctx->bottom_pipe != pipe_ctx)program_all_pipe_in_tree (dc, pipe_ctx->bottom_pipe, context); }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 53/77 drm/amd/display: Use DRM provided page flip flag.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
Starting with 4.12 kernel DRM provides page flip flags so we don't need to have our own copy.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -7
@@ -3882,7 +3882,7 @@ static void amdgpu_dm_do_flip(struct amdgpu_framebuffer *afb =to_amdgpu_framebuffer (fb);struct amdgpu_bo *abo =gem_to_amdgpu_bo (afb->obj);struct amdgpu_device *adev = crtc->dev->dev_private; -bool async_flip = (acrtc->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ; +bool async_flip = (crtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ;struct dc_flip_addrs addr = { {0 } };/* TODO eliminate or rename surface_update */ struct dc_surface_update surface_updates[1 ] = { {0 } };
@@ -4014,7 +4014,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,* TODO Check if it's correct */ *wait_for_vblank = - acrtc_attach->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? + pcrtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? false : true;/* TODO: Needs rework for multiplane flip */
@@ -4025,11 +4025,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, crtc, fb, drm_crtc_vblank_count(crtc) + *wait_for_vblank); - -/*TODO BUG remove ASAP in 4.12 to avoid race between worker and flip IOCTL */ - -/*clean up the flags for next usage*/ - acrtc_attach->flip_flags =0 ; } }
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170831180912.5898-54-harry.wentland-5C7GfCeVMHo@public.gmane.org
Michel Dänzer
Reviewed-byRe: [PATCH 53/77] drm/amd/display: Use DRM provided page flip flag.
Quoted 37 lines · Harry Wentland
From: Andrey Grodzovsky <[email protected]>
Starting with 4.12 kernel DRM provides page flip flags so we don't need to have our own copy.
Change-Id I15d8db215001f887c47d16be82df04216f9265c3Signed-off-by Andrey Grodzovsky <[email protected]>Reviewed-by Harry Wentland <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-2@@ -3882,7 +3882,7 @@ static void amdgpu_dm_do_flip(struct amdgpu_framebuffer *afb =to_amdgpu_framebuffer (fb);struct amdgpu_bo *abo =gem_to_amdgpu_bo (afb->obj);struct amdgpu_device *adev = crtc->dev->dev_private; -bool async_flip = (acrtc->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ; +bool async_flip = (crtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ;struct dc_flip_addrs addr = { {0 } };/* TODO eliminate or rename surface_update */ struct dc_surface_update surface_updates[1 ] = { {0 } };@@ -4014,7 +4014,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,* TODO Check if it's correct */ *wait_for_vblank = - acrtc_attach->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? + pcrtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? false : true;/* TODO: Needs rework for multiplane flip */ @@ -4025,11 +4025,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, crtc,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, · line 4030
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-5fb, drm_crtc_vblank_count(crtc) + *wait_for_vblank); - -/*TODO BUG remove ASAP in 4.12 to avoid race between worker and flip IOCTL */ - -/*clean up the flags for next usage*/ - acrtc_attach->flip_flags =0 ; } }
Can the acrtc->flip_flags field be removed now? If so, with that,
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ 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): 864031f9-1d5a-f54a-ad3e-4725008ac6e7-otUistvHUpPR7s880joybQ@public.gmane.org
Re: [PATCH 53/77] drm/amd/display: Use DRM provided page flip flag.
Quoted 46 lines · Michel Dänzer
Quoted 45 lines · Harry Wentland
From: Andrey Grodzovsky <[email protected]>
Starting with 4.12 kernel DRM provides page flip flags so we don't need to have our own copy.
Change-Id I15d8db215001f887c47d16be82df04216f9265c3Signed-off-by Andrey Grodzovsky <[email protected]>Reviewed-by Harry Wentland <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-7@@ -3882,7 +3882,7 @@ static void amdgpu_dm_do_flip(struct amdgpu_framebuffer *afb =to_amdgpu_framebuffer (fb);struct amdgpu_bo *abo =gem_to_amdgpu_bo (afb->obj);struct amdgpu_device *adev = crtc->dev->dev_private; -bool async_flip = (acrtc->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ; +bool async_flip = (crtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ;struct dc_flip_addrs addr = { {0 } };/* TODO eliminate or rename surface_update */ struct dc_surface_update surface_updates[1 ] = { {0 } };@@ -4014,7 +4014,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,* TODO Check if it's correct */ *wait_for_vblank = - acrtc_attach->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? + pcrtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ? false : true;/* TODO: Needs rework for multiplane flip */ @@ -4025,11 +4025,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, crtc, fb, drm_crtc_vblank_count(crtc) + *wait_for_vblank); - -/*TODO BUG remove ASAP in 4.12 to avoid race between worker and flip IOCTL */ - -/*clean up the flags for next usage*/ - acrtc_attach->flip_flags =0 ; }
Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, · line 4030
Quoted 2 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0}Can the
acrtc->flip_flagsfield be removed now? If so, with that,
It was, I guess we missed that change on our private kernel branch, Harry can you please check in emails to see a patch about that
Quoted 4 lines
Reviewed-by Michel Dänzer <[email protected]>
_______________________________________________
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): 3ca8c64d-2781-1652-c244-b478c7f4899b-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 53/77] drm/amd/display: Use DRM provided page flip flag.
Patch incoming.
Harry
Quoted 58 lines · andrey
Quoted 46 lines · Michel Dänzer
Quoted 45 lines · Harry Wentland
From: Andrey Grodzovsky <[email protected]>
Starting with 4.12 kernel DRM provides page flip flags so we don't need to have our own copy.
Change-Id I15d8db215001f887c47d16be82df04216f9265c3Signed-off-by Andrey Grodzovsky <[email protected]>Reviewed-by Harry Wentland <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -3882,7 +3882,7 @@ static void amdgpu_dm_do_flip(struct amdgpu_framebuffer *afb =to_amdgpu_framebuffer (fb);struct amdgpu_bo *abo =gem_to_amdgpu_bo (afb->obj);struct amdgpu_device *adev = crtc->dev->dev_private; -bool async_flip = (acrtc->flip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) != 0; +bool async_flip = (crtc->state->pageflip_flags &DRM_MODE_PAGE_FLIP_ASYNC ) !=0 ;struct dc_flip_addrs addr = { {0 } };/* TODO eliminate or rename surface_update */ struct dc_surface_update surface_updates[1] = { {0} };drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -4014,7 +4014,7 @@ static void amdgpu_dm_commit_planes(structdrm_atomic_state *state, * TODO Check if it's correct */ *wait_for_vblank = - acrtc_attach->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC ? + pcrtc->state->pageflip_flags &
DRM_MODE_PAGE_FLIP_ASYNC?false : true; /* TODO: Needs rework for multiplane flip */drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-2@@ -4025,11 +4025,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, crtc, fb, drm_crtc_vblank_count(crtc) + *wait_for_vblank); - -/*TODO BUG remove ASAP in 4.12 to avoid race between Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, · line 4030
Quoted 7 lines
worker and flip IOCTL */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-3- -/*clean up the flags for next usage*/ - acrtc_attach->flip_flags =0 ; } }Can the
acrtc->flip_flagsfield be removed now? If so, with that,
Quoted 7 lines
It was, I guess we missed that change on our private kernel branch, Harry can you please check in emails to see a patch about that
Quoted 4 lines
Reviewed-by Michel Dänzer <[email protected]>
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 54/77 drm/amd/display: Fix MST downstream display not light up regression
In reply to a message not in the archiveFrom: Jerry Zuo <[email protected]>
The fix is for the scenario: MST+SST chain together, and hook up to the card.
Regression: Per stream validate_context build v2
Before dc_add_stream_to_ctx(), need to update/reset stream signal type to SIGNAL_TYPE_DISPLAY_PORT_MST. Otherwise, downstream device cannot be added to ctx due to the lack of signal type info (SIGNAL_TYPE_NONE).update_stream_signal() needs to be done after stream is created.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 25 ----------------------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 24 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -25
@@ -1323,7 +1323,6 @@ bool dc_is_stream_unchanged(/* Maximum TMDS single link pixel clock 165MHz */ #define TMDS_MAX_PIXEL_CLOCK_IN_KHZ 165000 -#define TMDS_MAX_PIXEL_CLOCK_IN_KHZ_UPMOST 297000 static void update_stream_engine_usage( struct resource_context *res_ctx,
@@ -1434,28 +1433,6 @@ static struct audio *find_first_free_audio(return 0 ; } -static void update_stream_signal (struct dc_stream_state *stream) -{ -if (stream->output_signal ==SIGNAL_TYPE_NONE ) { -struct dc_sink *dc_sink = stream->sink; - -if (dc_sink->sink_signal ==SIGNAL_TYPE_NONE ) - stream->signal = stream->sink->link->connector_signal; -else - stream->signal = dc_sink->sink_signal; - }else { - stream->signal = stream->output_signal; - } - -if (dc_is_dvi_signal (stream->signal)) { -if (stream->timing.pix_clk_khz >TMDS_MAX_PIXEL_CLOCK_IN_KHZ_UPMOST && - stream->sink->sink_signal !=SIGNAL_TYPE_DVI_SINGLE_LINK ) - stream->signal =SIGNAL_TYPE_DVI_DUAL_LINK ; -else - stream->signal =SIGNAL_TYPE_DVI_SINGLE_LINK ; - } -} -bool resource_is_stream_unchanged (struct validate_context *old_context,struct dc_stream_state *stream) {
@@ -1627,8 +1604,6 @@ static int get_norm_pix_clk(const struct dc_crtc_timing *timing)static void calculate_phy_pix_clks (struct dc_stream_state *stream) { -update_stream_signal (stream); -/* update actual pixel clock on all streams */ if (dc_is_hdmi_signal (stream->signal)) stream->phy_pix_clk = get_norm_pix_clk(
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +24 -0
@@ -33,6 +33,28 @@/******************************************************************************* * Private functions ******************************************************************************/ +#define TMDS_MAX_PIXEL_CLOCK_IN_KHZ_UPMOST 297000 +static void update_stream_signal (struct dc_stream_state *stream) +{ +if (stream->output_signal ==SIGNAL_TYPE_NONE ) { +struct dc_sink *dc_sink = stream->sink; + +if (dc_sink->sink_signal ==SIGNAL_TYPE_NONE ) + stream->signal = stream->sink->link->connector_signal; +else + stream->signal = dc_sink->sink_signal; + }else { + stream->signal = stream->output_signal; + } + +if (dc_is_dvi_signal (stream->signal)) { +if (stream->timing.pix_clk_khz >TMDS_MAX_PIXEL_CLOCK_IN_KHZ_UPMOST && + stream->sink->sink_signal !=SIGNAL_TYPE_DVI_SINGLE_LINK ) + stream->signal =SIGNAL_TYPE_DVI_DUAL_LINK ; +else + stream->signal =SIGNAL_TYPE_DVI_SINGLE_LINK ; + } +}static bool construct (struct dc_stream_state *stream,struct dc_sink *dc_sink_data)
@@ -80,6 +102,8 @@ static bool construct(struct dc_stream_state *stream, stream->timing.flags.LTE_340MCSC_SCRAMBLE = dc_sink_data->edid_caps.lte_340mcsc_scramble; stream->status.link = stream->sink->link; + +update_stream_signal (stream);return true; }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 55/77 drm/amd/display: Update DSCL
In reply to a message not in the archiveFrom: Eric Bernstein <[email protected]>
--- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 101 ++++++--------------- 1 file changed, 29 insertions(+), 72 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +29 -72
@@ -215,14 +215,18 @@ static void dpp_set_lb( {uint32_t pixel_depth =get_pixel_depth_val (lb_params->depth);uint32_t dyn_pix_depth = lb_params->dynamic_pixel_depth; -REG_SET_7 (LB_DATA_FORMAT ,0 , -PIXEL_DEPTH , pixel_depth,/* Pixel depth stored in LB */ -PIXEL_EXPAN_MODE , lb_params->pixel_expan_mode,/* Pixel expansion mode */ -PIXEL_REDUCE_MODE ,1 ,/* Pixel reduction mode: Rounding */ -DYNAMIC_PIXEL_DEPTH , dyn_pix_depth,/* Dynamic expansion pixel depth */ -DITHER_EN ,0 ,/* Dithering enable: Disabled */ -INTERLEAVE_EN , lb_params->interleave_en,/* Interleave source enable */ -ALPHA_EN , lb_params->alpha_en);/* Alpha enable */ + +/* LB */ +if (xfm->tf_mask->PIXEL_DEPTH) { +REG_SET_7 (LB_DATA_FORMAT ,0 , +PIXEL_DEPTH , pixel_depth,/* Pixel depth stored in LB */ +PIXEL_EXPAN_MODE , lb_params->pixel_expan_mode,/* Pixel expansion mode */ +PIXEL_REDUCE_MODE ,1 ,/* Pixel reduction mode: Rounding */ +DYNAMIC_PIXEL_DEPTH , dyn_pix_depth,/* Dynamic expansion pixel depth */ +DITHER_EN ,0 ,/* Dithering enable: Disabled */ +INTERLEAVE_EN , lb_params->interleave_en,/* Interleave source enable */ +ALPHA_EN , lb_params->alpha_en);/* Alpha enable */ + } REG_SET_2(LB_MEMORY_CTRL, 0, MEMORY_CONFIG, mem_size_config,
@@ -462,7 +466,8 @@ static bool is_lb_conf_valid(int ceil_vratio, int num_partitions, int vtaps) }/*find first match configuration which meets the min required lb size*/ -static enum lb_memory_config find_lb_memory_config (const struct scaler_data *scl_data) +static enum lb_memory_config dpp10_find_lb_memory_config ( +const struct scaler_data *scl_data) {int num_part_y, num_part_c;int vtaps = scl_data->taps.v_taps;
@@ -504,6 +509,18 @@ static enum lb_memory_config find_lb_memory_config(const struct scaler_data *sclreturn LB_MEMORY_CONFIG_0 ; } +/*find first match configuration which meets the min required lb size*/ +static enum lb_memory_config find_lb_memory_config (struct dcn10_dpp *xfm, +const struct scaler_data *scl_data) +{ +enum lb_memory_config mem_cfg =LB_MEMORY_CONFIG_0 ; + +if (xfm->tf_mask->PIXEL_DEPTH) { + mem_cfg =dpp10_find_lb_memory_config (scl_data); + } +return mem_cfg; +} +void dpp_set_scaler_auto_scale (struct transform *xfm_base,const struct scaler_data *scl_data)
@@ -524,7 +541,7 @@ void dpp_set_scaler_auto_scale(if (dscl_mode ==DSCL_MODE_DSCL_BYPASS )return ; - lb_config =find_lb_memory_config (scl_data); + lb_config =find_lb_memory_config (xfm, scl_data);dpp_set_lb (xfm, &scl_data->lb_params, lb_config);if (dscl_mode ==DSCL_MODE_SCALING_444_BYPASS )
@@ -662,8 +679,9 @@ void dcn10_dpp_dscl_set_scaler_manual_scale(if (dscl_mode ==DSCL_MODE_DSCL_BYPASS )return ; +/* LB */ - lb_config =find_lb_memory_config (scl_data); + lb_config =find_lb_memory_config (xfm, scl_data);dpp_set_lb (xfm, &scl_data->lb_params, lb_config);if (dscl_mode ==DSCL_MODE_SCALING_444_BYPASS )
@@ -699,64 +717,3 @@ void dcn10_dpp_dscl_set_scaler_manual_scale(dpp_set_scl_filter (xfm, scl_data, ycbcr); } - -#if 0 -bool dpp_set_pixel_storage_depth ( -struct dpp *xfm, -enum lb_pixel_depth depth, -const struct bit_depth_reduction_params *bit_depth_params) -{ -struct dcn10_dpp *xfm110 =TO_DCN10_DPP (xfm); -bool ret = true; -uint32_t value; -enum dc_color_depth color_depth; - - value =dm_read_reg (xfm->ctx,LB_REG (mmLB_DATA_FORMAT)); -switch (depth) { -case LB_PIXEL_DEPTH_18BPP : - color_depth =COLOR_DEPTH_666 ; -set_reg_field_value (value,2 ,LB_DATA_FORMAT ,PIXEL_DEPTH ); -set_reg_field_value (value,1 ,LB_DATA_FORMAT ,PIXEL_EXPAN_MODE ); -break ; -case LB_PIXEL_DEPTH_24BPP : - color_depth =COLOR_DEPTH_888 ; -set_reg_field_value (value,1 ,LB_DATA_FORMAT ,PIXEL_DEPTH ); -set_reg_field_value (value,1 ,LB_DATA_FORMAT ,PIXEL_EXPAN_MODE ); -break ; -case LB_PIXEL_DEPTH_30BPP : - color_depth =COLOR_DEPTH_101010 ; -set_reg_field_value (value,0 ,LB_DATA_FORMAT ,PIXEL_DEPTH ); -set_reg_field_value (value,1 ,LB_DATA_FORMAT ,PIXEL_EXPAN_MODE ); -break ; -case LB_PIXEL_DEPTH_36BPP : - color_depth =COLOR_DEPTH_121212 ; -set_reg_field_value (value,3 ,LB_DATA_FORMAT ,PIXEL_DEPTH ); -set_reg_field_value (value,0 ,LB_DATA_FORMAT ,PIXEL_EXPAN_MODE ); -break ; -default : - ret = false; -break ; - } - -if (ret == true) { -set_denormalization (xfm110, color_depth); - ret =program_bit_depth_reduction (xfm110, color_depth, - bit_depth_params); - -set_reg_field_value (value,0 ,LB_DATA_FORMAT ,ALPHA_EN ); -dm_write_reg (xfm->ctx,LB_REG (mmLB_DATA_FORMAT), value); -if (!(xfm110->lb_pixel_depth_supported & depth)) { -/* We should use unsupported capabilities -* unless it is required by w/a -*/ -dm_logger_write (xfm->ctx->logger,LOG_WARNING , -"%s: Capability not supported" , - __func__); - } - } - -return ret; -} -#endif - -
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 56/77 drm/amd/display: move cm registers from ipp to dpp_cm
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 150 +++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 489 ++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 555 +++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 676 +-------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 416 ------------- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 17 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 20 + 10 files changed, 1239 insertions(+), 1125 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +150 -0
@@ -52,6 +52,12 @@#define FN (reg_name, field_name) \ xfm->tf_shift->field_name, xfm->tf_mask->field_name +enum pixel_format_description { +PIXEL_FORMAT_FIXED =0 , +PIXEL_FORMAT_FIXED16 , +PIXEL_FORMAT_FLOAT + +};enum dcn10_coef_filter_type_sel {SCL_COEF_LUMA_VERT_FILTER =0 ,
@@ -249,6 +255,145 @@ static void dcn10_dpp_cm_set_regamma_mode( OBUF_H_2X_UPSCALE_EN, obuf_hupscale); } +static void ippn10_setup_format_flags (enum surface_pixel_format input_format,\ +enum pixel_format_description *fmt) +{ + +if (input_format ==SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F || + input_format ==SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F ) + *fmt =PIXEL_FORMAT_FLOAT ; +else if (input_format ==SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ) + *fmt =PIXEL_FORMAT_FIXED16 ; +else + *fmt =PIXEL_FORMAT_FIXED ; +} + +static void ippn10_set_degamma_format_float ( +struct transform *xfm_base, +bool is_float) +{ +struct dcn10_dpp *xfm =TO_DCN10_DPP (xfm_base); + +if (is_float) { +REG_UPDATE (CM_IGAM_CONTROL ,CM_IGAM_INPUT_FORMAT ,3 ); +REG_UPDATE (CM_IGAM_CONTROL ,CM_IGAM_LUT_MODE ,1 ); + }else { +REG_UPDATE (CM_IGAM_CONTROL ,CM_IGAM_INPUT_FORMAT ,2 ); +REG_UPDATE (CM_IGAM_CONTROL ,CM_IGAM_LUT_MODE ,0 ); + } +} + +void ippn10_cnv_setup ( +struct transform *xfm_base, +enum surface_pixel_format input_format, +enum expansion_mode mode, +enum ipp_output_format cnv_out_format) +{ +uint32_t pixel_format; +uint32_t alpha_en; +enum pixel_format_description fmt ; +enum dc_color_space color_space; +enum dcn10_input_csc_select select; +bool is_float; +struct dcn10_dpp *xfm =TO_DCN10_DPP (xfm_base); +bool force_disable_cursor = false; + +ippn10_setup_format_flags (input_format, &fmt); + alpha_en =1 ; + pixel_format =0 ; + color_space =COLOR_SPACE_SRGB ; + select =INPUT_CSC_SELECT_BYPASS ; + is_float = false; + +switch (fmt) { +case PIXEL_FORMAT_FIXED : +case PIXEL_FORMAT_FIXED16 : +/*when output is float then FORMAT_CONTROL__OUTPUT_FP=1*/ +REG_SET_3 (FORMAT_CONTROL ,0 , +CNVC_BYPASS ,0 , +FORMAT_EXPANSION_MODE , mode, +OUTPUT_FP ,0 ); +break ; +case PIXEL_FORMAT_FLOAT : +REG_SET_3 (FORMAT_CONTROL ,0 , +CNVC_BYPASS ,0 , +FORMAT_EXPANSION_MODE , mode, +OUTPUT_FP ,1 ); + is_float = true; +break ; +default : + +break ; + } + +ippn10_set_degamma_format_float (xfm_base, is_float); + +switch (input_format) { +case SURFACE_PIXEL_FORMAT_GRPH_ARGB1555 : + pixel_format =1 ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_RGB565 : + pixel_format =3 ; + alpha_en =0 ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : + pixel_format =8 ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010 : +case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010 : + pixel_format =10 ; +break ; +case SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr: + force_disable_cursor = false; + pixel_format =65 ; + color_space =COLOR_SPACE_YCBCR709 ; + select =INPUT_CSC_SELECT_ICSC ; +break ; +case SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb: + force_disable_cursor = true; + pixel_format =64 ; + color_space =COLOR_SPACE_YCBCR709 ; + select =INPUT_CSC_SELECT_ICSC ; +break ; +case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr: + force_disable_cursor = true; + pixel_format =67 ; + color_space =COLOR_SPACE_YCBCR709 ; + select =INPUT_CSC_SELECT_ICSC ; +break ; +case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb: + force_disable_cursor = true; + pixel_format =66 ; + color_space =COLOR_SPACE_YCBCR709 ; + select =INPUT_CSC_SELECT_ICSC ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 : + pixel_format =22 ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F : + pixel_format =24 ; +break ; +case SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F : + pixel_format =25 ; +break ; +default : +break ; + } +REG_SET (CNVC_SURFACE_PIXEL_FORMAT ,0 , +CNVC_SURFACE_PIXEL_FORMAT , pixel_format); +REG_UPDATE (FORMAT_CONTROL ,FORMAT_CONTROL__ALPHA_EN , alpha_en); + +ippn10_program_input_csc (xfm_base, color_space, select); + +if (force_disable_cursor) { +REG_UPDATE (CURSOR_CONTROL , +CURSOR_ENABLE ,0 ); +REG_UPDATE (CURSOR0_CONTROL , +CUR0_ENABLE ,0 ); + } +} +static struct transform_funcs dcn10_dpp_funcs = { .transform_reset = dpp_reset, .transform_set_scaler = dcn10_dpp_dscl_set_scaler_manual_scale,
@@ -263,6 +408,11 @@ static struct transform_funcs dcn10_dpp_funcs = { .opp_program_regamma_luta_settings = dcn10_dpp_cm_program_regamma_luta_settings, .opp_program_regamma_pwl = dcn10_dpp_cm_set_regamma_pwl, .opp_set_regamma_mode = dcn10_dpp_cm_set_regamma_mode, + .ipp_set_degamma = ippn10_set_degamma, + .ipp_program_input_lut = ippn10_program_input_lut, + .ipp_program_degamma_pwl = ippn10_set_degamma_pwl, + .ipp_setup = ippn10_cnv_setup, + .ipp_full_bypass = ippn10_full_bypass, };
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +479 -10
555 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +555 -0
570 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +1 -2
@@ -225,7 +225,7 @@ static void dpp_set_lb(DYNAMIC_PIXEL_DEPTH , dyn_pix_depth,/* Dynamic expansion pixel depth */ DITHER_EN ,0 ,/* Dithering enable: Disabled */ INTERLEAVE_EN , lb_params->interleave_en,/* Interleave source enable */ - ALPHA_EN, lb_params->alpha_en); /* Alpha enable */ + LB_DATA_FORMAT__ALPHA_EN, lb_params->alpha_en); /* Alpha enable */ } REG_SET_2(LB_MEMORY_CTRL, 0,
@@ -716,4 +716,3 @@ void dcn10_dpp_dscl_set_scaler_manual_scale(dpp_set_scl_filter (xfm, scl_data, ycbcr); } -
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +10 -10
@@ -1294,34 +1294,34 @@ static void dcn10_update_plane_addr(const struct dc *dc, struct pipe_ctx *pipe_cstatic bool dcn10_set_input_transfer_func (struct pipe_ctx *pipe_ctx,const struct dc_plane_state *plane_state) { -struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp; +struct transform *xfm_base = pipe_ctx->plane_res.xfm;const struct dc_transfer_func *tf =NULL ;bool result = true; -if (ipp ==NULL ) +if (xfm_base ==NULL )return false;if (plane_state->in_transfer_func) tf = plane_state->in_transfer_func;if (plane_state->gamma_correction &&dce_use_lut (plane_state)) - ipp->funcs->ipp_program_input_lut (ipp, + xfm_base->funcs->ipp_program_input_lut (xfm_base, plane_state->gamma_correction);if (tf ==NULL ) - ipp->funcs->ipp_set_degamma (ipp,IPP_DEGAMMA_MODE_BYPASS ); + xfm_base->funcs->ipp_set_degamma (xfm_base,IPP_DEGAMMA_MODE_BYPASS );else if (tf->type ==TF_TYPE_PREDEFINED ) {switch (tf->tf) {case TRANSFER_FUNCTION_SRGB : - ipp->funcs->ipp_set_degamma (ipp, + xfm_base->funcs->ipp_set_degamma (xfm_base, IPP_DEGAMMA_MODE_HW_sRGB);break ;case TRANSFER_FUNCTION_BT709 : - ipp->funcs->ipp_set_degamma (ipp, + xfm_base->funcs->ipp_set_degamma (xfm_base, IPP_DEGAMMA_MODE_HW_xvYCC);break ;case TRANSFER_FUNCTION_LINEAR : - ipp->funcs->ipp_set_degamma (ipp, + xfm_base->funcs->ipp_set_degamma (xfm_base,IPP_DEGAMMA_MODE_BYPASS );break ;case TRANSFER_FUNCTION_PQ :
@@ -1332,7 +1332,7 @@ static bool dcn10_set_input_transfer_func(break ; } }else if (tf->type ==TF_TYPE_BYPASS ) { - ipp->funcs->ipp_set_degamma (ipp,IPP_DEGAMMA_MODE_BYPASS ); + xfm_base->funcs->ipp_set_degamma (xfm_base,IPP_DEGAMMA_MODE_BYPASS ); }else {/*TF_TYPE_DISTRIBUTED_POINTS*/ result = false;
@@ -2204,7 +2204,7 @@ static void update_dchubp_dpp( {struct dce_hwseq *hws = dc->hwseq;struct mem_input *mi = pipe_ctx->plane_res.mi; -struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp; +struct transform *xfm = pipe_ctx->plane_res.xfm;struct dc_plane_state *plane_state = pipe_ctx->plane_state;union plane_size size = plane_state->plane_size;struct default_adjustment ocsc = {0 };
@@ -2249,7 +2249,7 @@ static void update_dchubp_dpp(hws ); - ipp->funcs->ipp_setup (ipp, + xfm->funcs->ipp_setup (xfm, plane_state->format,1 ,IPP_OUTPUT_FORMAT_12_BIT_FIX );
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c +5 -671
695 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h +0 -416
469 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +18 -0
@@ -98,6 +98,24 @@ enum graphics_csc_adjust_type {GRAPHICS_CSC_ADJUST_TYPE_SW /*use adjustments */ }; +enum ipp_degamma_mode { +IPP_DEGAMMA_MODE_BYPASS , + IPP_DEGAMMA_MODE_HW_sRGB, + IPP_DEGAMMA_MODE_HW_xvYCC, +IPP_DEGAMMA_MODE_USER_PWL +}; + +enum ipp_output_format { +IPP_OUTPUT_FORMAT_12_BIT_FIX , +IPP_OUTPUT_FORMAT_16_BIT_BYPASS , +IPP_OUTPUT_FORMAT_FLOAT +}; + +enum expansion_mode { +EXPANSION_MODE_DYNAMIC , +EXPANSION_MODE_ZERO +}; +struct default_adjustment {enum lb_pixel_depth lb_color_depth;enum dc_color_space out_color_space;
drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h +1 -16
@@ -54,12 +54,7 @@ struct ipp_prescale_params {uint16_t scale; }; -enum ipp_degamma_mode { -IPP_DEGAMMA_MODE_BYPASS , - IPP_DEGAMMA_MODE_HW_sRGB, - IPP_DEGAMMA_MODE_HW_xvYCC, -IPP_DEGAMMA_MODE_USER_PWL -}; +enum ovl_color_space {OVL_COLOR_SPACE_UNKNOWN =0 ,
@@ -68,16 +63,6 @@ enum ovl_color_space {OVL_COLOR_SPACE_YUV709 }; -enum expansion_mode { -EXPANSION_MODE_DYNAMIC , -EXPANSION_MODE_ZERO -}; - -enum ipp_output_format { -IPP_OUTPUT_FORMAT_12_BIT_FIX , -IPP_OUTPUT_FORMAT_16_BIT_BYPASS , -IPP_OUTPUT_FORMAT_FLOAT -};struct ipp_funcs {
drivers/gpu/drm/amd/display/dc/inc/hw/transform.h +20 -0
@@ -219,6 +219,26 @@ struct transform_funcs {void (*opp_set_regamma_mode)(struct transform *xfm_base,enum opp_regamma mode); + +void (*ipp_set_degamma)( +struct transform *xfm_base, +enum ipp_degamma_mode mode); + +void (*ipp_program_input_lut)( +struct transform *xfm_base, +const struct dc_gamma *gamma); + +void (*ipp_program_degamma_pwl)(struct transform *xfm_base, +const struct pwl_params *params); + +void (*ipp_setup)( +struct transform *xfm_base, +enum surface_pixel_format input_format, +enum expansion_mode mode, +enum ipp_output_format cnv_out_format); + +void (*ipp_full_bypass)(struct transform *xfm_base); + };extern const uint16_t filter_2tap_16p[18 ];
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 57/77 drm/amd/display: DF C-state entry blocked when DPMS
In reply to a message not in the archiveFrom: Hersen Wu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 48 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 9 ++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 ++ 7 files changed, 74 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
@@ -832,6 +832,8 @@ static bool dc_commit_context_no_check(struct dc *dc, struct validate_context *cif (!dcb->funcs->is_accelerated_mode (dcb)) dc->hwss.enable_accelerated_mode (dc); + dc->hwss.ready_shared_resources (dc); +for (i =0 ; i < dc->res_pool->pipe_count; i++) { pipe = &context->res_ctx.pipe_ctx[i]; dc->hwss.wait_for_mpcc_disconnect (dc, dc->res_pool, pipe);
@@ -881,6 +883,8 @@ static bool dc_commit_context_no_check(struct dc *dc, struct validate_context *cdc_retain_validate_context (dc->current_context); + dc->hwss.optimize_shared_resources (dc); +return (result ==DC_OK ); }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +8 -1
@@ -2697,6 +2697,10 @@ static void program_csc_matrix(struct pipe_ctx *pipe_ctx, } } +static void ready_shared_resources (struct dc *dc) {} + +static void optimize_shared_resources (struct dc *dc) {} +static const struct hw_sequencer_funcs dce110_funcs = { .program_gamut_remap = program_gamut_remap, .program_csc_matrix = program_csc_matrix,
@@ -2727,7 +2731,10 @@ static const struct hw_sequencer_funcs dce110_funcs = { .prog_pixclk_crtc_otg = dce110_prog_pixclk_crtc_otg, .setup_stereo = NULL, .set_avmute = dce110_set_avmute, - .wait_for_mpcc_disconnect = dce110_wait_for_mpcc_disconnect + .wait_for_mpcc_disconnect = dce110_wait_for_mpcc_disconnect, + .ready_shared_resources = ready_shared_resources, + .optimize_shared_resources = optimize_shared_resources, + };bool dce110_hw_sequencer_construct (struct dc *dc)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +47 -1
60 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c +9 -0
@@ -56,6 +56,14 @@ static void min10_set_blank(struct mem_input *mem_input, bool blank) } } +static void min10_set_hubp_blank_en (struct mem_input *mem_input,bool blank) +{ +struct dcn10_mem_input *mi =TO_DCN10_MEM_INPUT (mem_input); +uint32_t blank_en = blank ?1 :0 ; + +REG_UPDATE (DCHUBP_CNTL ,HUBP_BLANK_EN , blank_en); +} +static void min10_vready_workaround (struct mem_input *mem_input,struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest) {
@@ -771,6 +779,7 @@ static struct mem_input_funcs dcn10_mem_input_funcs = { .set_blank = min10_set_blank, .dcc_control = min10_dcc_control, .mem_program_viewport = min_set_viewport, + .set_hubp_blank_en = min10_set_hubp_blank_en, };/*****************************************/
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +1 -0
@@ -439,6 +439,7 @@ static const struct dc_debug debug_defaults_diags = { .force_abm_enable = false, .timing_trace = true, .clock_trace = true, + .disable_stutter = true,#if defined(CONFIG_DRM_AMD_DC_DCN1_0 ) .disable_pplib_clock_request = true, .disable_pplib_wm_range = true,
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h +2 -0
@@ -161,6 +161,8 @@ struct mem_input_funcs { struct dchub_init_data *dh_data);void (*set_blank)(struct mem_input *mi,bool blank); + void (*set_hubp_blank_en)(struct mem_input *mi, bool blank); + };#endif
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +3 -0
@@ -173,6 +173,9 @@ struct hw_sequencer_funcs {void (*wait_for_mpcc_disconnect)(struct dc *dc,struct resource_pool *res_pool,struct pipe_ctx *pipe_ctx); + +void (*ready_shared_resources)(struct dc *dc); +void (*optimize_shared_resources)(struct dc *dc); }; void color_space_to_black_color(
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 58/77 drm/amd/display: Remove mpc from bios left over, keep double buffer disabled.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +9 -1
@@ -127,10 +127,18 @@ static void mpc10_mpcc_remove(for (z_idx =0 ; z_idx < opp->mpc_tree.num_pipes; z_idx++)if (opp->mpc_tree.dpp[z_idx] == dpp_id)break ; +if (z_idx == opp->mpc_tree.num_pipes) { -ASSERT (0 ); +/* In case of resume from S3/S4, remove mpcc from bios left over */ +REG_SET (MPCC_OPP_ID [dpp_id],0 , +MPCC_OPP_ID ,0xf ); +REG_SET (MPCC_TOP_SEL [dpp_id],0 , +MPCC_TOP_SEL ,0xf ); +REG_SET (MPCC_BOT_SEL [dpp_id],0 , +MPCC_BOT_SEL ,0xf );return ; } + mpcc_id = opp->mpc_tree.mpcc[z_idx]; REG_SET(MPCC_OPP_ID[mpcc_id], 0,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +0 -3
@@ -289,9 +289,6 @@ static void tgn10_unblank_crtc(struct timing_generator *tg) {struct dcn10_timing_generator *tgn10 =DCN10TG_FROM_TG (tg); -REG_UPDATE (OTG_DOUBLE_BUFFER_CONTROL , -OTG_BLANK_DATA_DOUBLE_BUFFER_EN ,1 ); -REG_UPDATE_2 (OTG_BLANK_CONTROL ,OTG_BLANK_DATA_EN ,0 ,OTG_BLANK_DE_MODE ,0 );
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 59/77 drm/amd/display: clean up header file includes
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 20 ----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 20 ----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 8 ----- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 41 ---------------------- 4 files changed, 89 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +0 -20
@@ -27,10 +27,6 @@#include "core_types.h" -#include "include/grph_object_id.h" -#include "include/fixed31_32.h" -#include "include/logger_interface.h" -#include "reg_helper.h" #include "dcn10_dpp.h" #include "basics/conversion.h"
@@ -68,22 +64,6 @@ enum dcn10_coef_filter_type_sel {SCL_COEF_ALPHA_HORZ_FILTER =5 }; -enum lb_memory_config { -/* Enable all 3 pieces of memory */ -LB_MEMORY_CONFIG_0 =0 , - -/* Enable only the first piece of memory */ -LB_MEMORY_CONFIG_1 =1 , - -/* Enable only the second piece of memory */ -LB_MEMORY_CONFIG_2 =2 , - -/* Only applicable in 4:2:0 mode, enable all 3 pieces of memory and the -* last piece of chroma memory used for the luma storage -*/ -LB_MEMORY_CONFIG_3 =3 -}; -enum dscl_autocal_mode {AUTOCAL_MODE_OFF =0 ,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +0 -20
@@ -27,10 +27,6 @@#include "core_types.h" -#include "include/grph_object_id.h" -#include "include/fixed31_32.h" -#include "include/logger_interface.h" -#include "reg_helper.h" #include "dcn10_dpp.h" #include "basics/conversion.h"
@@ -66,22 +62,6 @@ enum dcn10_coef_filter_type_sel {SCL_COEF_ALPHA_HORZ_FILTER =5 }; -enum lb_memory_config { -/* Enable all 3 pieces of memory */ -LB_MEMORY_CONFIG_0 =0 , - -/* Enable only the first piece of memory */ -LB_MEMORY_CONFIG_1 =1 , - -/* Enable only the second piece of memory */ -LB_MEMORY_CONFIG_2 =2 , - -/* Only applicable in 4:2:0 mode, enable all 3 pieces of memory and the -* last piece of chroma memory used for the luma storage -*/ -LB_MEMORY_CONFIG_3 =3 -}; -enum dscl_autocal_mode {AUTOCAL_MODE_OFF =0 ,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +0 -8
@@ -100,14 +100,6 @@ enum dscl_mode_sel { DSCL_MODE_DSCL_BYPASS = 6 }; -enum gamut_remap_select { -GAMUT_REMAP_BYPASS =0 , -GAMUT_REMAP_COEFF , -GAMUT_REMAP_COMA_COEFF , -GAMUT_REMAP_COMB_COEFF -}; - -static void dpp_set_overscan (struct dcn10_dpp *xfm,const struct scaler_data *data)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c +0 -41
53 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 60/77 drm/amd/display: Rename dc validate_context and current_context
In reply to a message not in the archiveFrom: Jerry Zuo <[email protected]>
Rename all the dc validate_context to dc_state and dc current_context to current_state.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 106 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 40 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 15 ++- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 36 +++---- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 +- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 8 +- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 10 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 70 +++++++------- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 12 +-- .../drm/amd/display/dc/dce110/dce110_resource.c | 16 ++-- .../drm/amd/display/dc/dce112/dce112_resource.c | 16 ++-- .../drm/amd/display/dc/dce112/dce112_resource.h | 10 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 10 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 62 ++++++------ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 14 +-- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 14 +-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 22 ++--- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 2 +- .../gpu/drm/amd/display/include/logger_interface.h | 4 +- 32 files changed, 262 insertions(+), 263 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -691,7 +691,7 @@ struct drm_atomic_state * dm_atomic_state_alloc(struct drm_device *dev) {struct dm_atomic_state *state =kzalloc (sizeof (*state),GFP_KERNEL ); -struct validate_context *new_ctx; +struct dc_state *new_ctx;struct amdgpu_device *adev = dev->dev_private;struct dc *dc = adev->dm.dc;
@@ -726,7 +726,7 @@ dm_atomic_state_clear(struct drm_atomic_state *state)struct dm_atomic_state *dm_state =to_dm_atomic_state (state);if (dm_state->context) { -dc_release_validate_context (dm_state->context); +dc_release_state (dm_state->context); dm_state->context =NULL ; }
@@ -4213,7 +4213,7 @@ void amdgpu_dm_atomic_commit_tail( }if (dm_state->context) -WARN_ON (!dc_commit_context (dm->dc, dm_state->context)); +WARN_ON (!dc_commit_state (dm->dc, dm_state->context));list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -209,7 +209,7 @@ struct dm_crtc_state {struct dm_atomic_state {struct drm_atomic_state base; -struct validate_context *context; +struct dc_state *context; };#define to_dm_atomic_state (x) container_of(x, struct dm_atomic_state, base)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +3 -3
@@ -476,7 +476,7 @@ static void dcn_bw_calc_rq_dlg_ttu(static void dcn_dml_wm_override (const struct dcn_bw_internal_vars *v,struct display_mode_lib *dml, -struct validate_context *context, +struct dc_state *context,const struct resource_pool *pool) {int i, in_idx, active_count;
@@ -593,7 +593,7 @@ static void split_stream_across_pipes( }static void calc_wm_sets_and_perf_params ( -struct validate_context *context, +struct dc_state *context,struct dcn_bw_internal_vars *v) {/* Calculate set A last to keep internal var state consistent for required config */
@@ -721,7 +721,7 @@ static bool dcn_bw_apply_registry_override(struct dc *dc)bool dcn_validate_bandwidth (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {const struct resource_pool *pool = dc->res_pool;struct dcn_bw_internal_vars *v = &context->dcn_bw_vars;
drivers/gpu/drm/amd/display/dc/core/dc.c +53 -53
327 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_debug.c +1 -1
@@ -329,7 +329,7 @@ void context_timing_trace(void context_clock_trace (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )struct dc *core_dc = dc;
drivers/gpu/drm/amd/display/dc/core/dc_link.c +4 -4
@@ -1819,14 +1819,14 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level,if (dc_is_embedded_signal (link->connector_signal)) {if (stream !=NULL ) {for (i =0 ; i <MAX_PIPES ; i++) { -if (core_dc->current_context->res_ctx. +if (core_dc->current_state->res_ctx. pipe_ctx[i].stream == stream)/* DMCU -1 for all controller id values, * therefore +1 here */ controller_id = - core_dc->current_context-> + core_dc->current_state-> res_ctx.pipe_ctx[i].stream_res.tg->inst +1 ; }
@@ -1926,13 +1926,13 @@ bool dc_link_setup_psr(struct dc_link *link, psr_context->engineId = link->link_enc->preferred_engine;for (i =0 ; i <MAX_PIPES ; i++) { -if (core_dc->current_context->res_ctx.pipe_ctx[i].stream +if (core_dc->current_state->res_ctx.pipe_ctx[i].stream == stream) {/* dmcu -1 for all controller id values, * therefore +1 here */ psr_context->controllerId = - core_dc->current_context->res_ctx. + core_dc->current_state->res_ctx. pipe_ctx[i].stream_res.tg->inst +1 ;break ; }
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -2406,7 +2406,7 @@ bool dc_link_dp_set_test_pattern(const unsigned char *p_custom_pattern, unsigned int cust_pattern_size) { - struct pipe_ctx *pipes = link->dc->current_context->res_ctx.pipe_ctx; + struct pipe_ctx *pipes = link->dc->current_state->res_ctx.pipe_ctx;struct pipe_ctx *pipe_ctx = &pipes[0 ];unsigned int lane;unsigned int i;
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +2 -2
@@ -62,7 +62,7 @@ void dp_enable_link_phy(struct link_encoder *link_enc = link->link_enc;struct pipe_ctx *pipes = - link->dc->current_context->res_ctx.pipe_ctx; + link->dc->current_state->res_ctx.pipe_ctx;struct clock_source *dp_cs = link->dc->res_pool->dp_clock_source;unsigned int i;
@@ -262,7 +262,7 @@ void dp_retrain_link_dp_test(struct dc_link *link, bool skip_video_pattern) {struct pipe_ctx *pipes = - &link->dc->current_context->res_ctx.pipe_ctx[0 ]; + &link->dc->current_state->res_ctx.pipe_ctx[0 ];unsigned int i;for (i =0 ; i <MAX_PIPES ; i++) {
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +20 -20
@@ -893,7 +893,7 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)enum dc_status resource_build_scaling_params_for_context (const struct dc *dc, -struct validate_context *context) +struct dc_state *context) {int i;
@@ -971,7 +971,7 @@ static struct pipe_ctx *resource_get_tail_pipe_for_stream(* that has no surface attached yet */ static struct pipe_ctx *acquire_free_pipe_for_stream ( -struct validate_context *context, +struct dc_state *context,const struct resource_pool *pool,struct dc_stream_state *stream) {
@@ -1048,7 +1048,7 @@ bool dc_add_plane_to_context(const struct dc *dc, struct dc_stream_state *stream, struct dc_plane_state *plane_state, - struct validate_context *context) + struct dc_state *context) { int i;struct resource_pool *pool = dc->res_pool;
@@ -1124,7 +1124,7 @@ bool dc_remove_plane_from_context(const struct dc *dc, struct dc_stream_state *stream, struct dc_plane_state *plane_state, - struct validate_context *context) + struct dc_state *context) { int i;struct dc_stream_status *stream_status =NULL ;
@@ -1199,7 +1199,7 @@ bool dc_remove_plane_from_context(bool dc_rem_all_planes_for_stream (const struct dc *dc,struct dc_stream_state *stream, -struct validate_context *context) +struct dc_state *context) {int i, old_plane_count;struct dc_stream_status *stream_status =NULL ;
@@ -1233,7 +1233,7 @@ static bool add_all_planes_for_stream(struct dc_stream_state *stream, const struct dc_validation_set set[], int set_count, - struct validate_context *context) + struct dc_state *context) { int i, j;
@@ -1258,7 +1258,7 @@ bool dc_add_all_planes_for_stream(struct dc_stream_state *stream, struct dc_plane_state * const *plane_states, int plane_count, - struct validate_context *context) + struct dc_state *context) { struct dc_validation_set set;int i;
@@ -1434,7 +1434,7 @@ static struct audio *find_first_free_audio( }bool resource_is_stream_unchanged ( -struct validate_context *old_context,struct dc_stream_state *stream) +struct dc_state *old_context,struct dc_stream_state *stream) {int i;
@@ -1450,7 +1450,7 @@ bool resource_is_stream_unchanged(bool dc_add_stream_to_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *stream) {struct dc_context *dc_ctx = dc->ctx;
@@ -1474,7 +1474,7 @@ bool dc_add_stream_to_ctx(bool dc_remove_stream_from_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *stream) {int i;
@@ -1553,7 +1553,7 @@ static void copy_pipe_ctx(static struct dc_stream_state *find_pll_sharable_stream (struct dc_stream_state *stream_needs_pll, -struct validate_context *context) +struct dc_state *context) {int i;
@@ -1615,7 +1615,7 @@ static void calculate_phy_pix_clks(struct dc_stream_state *stream)enum dc_status resource_map_pool_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {const struct resource_pool *pool = dc->res_pool;
@@ -1689,7 +1689,7 @@ enum dc_status resource_map_pool_resources(/* first stream in the context is used to populate the rest */ void validate_guaranteed_copy_streams ( -struct validate_context *context, +struct dc_state *context,int max_streams) {int i;
@@ -1709,14 +1709,14 @@ void validate_guaranteed_copy_streams(void dc_resource_validate_ctx_copy_construct_current (const struct dc *dc, -struct validate_context *dst_ctx) +struct dc_state *dst_ctx) { -dc_resource_validate_ctx_copy_construct (dc->current_context, dst_ctx); +dc_resource_validate_ctx_copy_construct (dc->current_state, dst_ctx); }bool dc_validate_global_state (struct dc *dc, -struct validate_context *new_ctx) +struct dc_state *new_ctx) {enum dc_status result =DC_ERROR_UNEXPECTED ;int i, j;
@@ -2413,7 +2413,7 @@ static void set_vsc_info_packet(/*TODO: stereo 3D support and extend pixel encoding colorimetry*/ } -void dc_resource_validate_ctx_destruct (struct validate_context *context) +void dc_resource_validate_ctx_destruct (struct dc_state *context) {int i, j;
@@ -2433,8 +2433,8 @@ void dc_resource_validate_ctx_destruct(struct validate_context *context)* by the src_ctx */ void dc_resource_validate_ctx_copy_construct ( -const struct validate_context *src_ctx, -struct validate_context *dst_ctx) +const struct dc_state *src_ctx, +struct dc_state *dst_ctx) {int i, j;atomic_t ref_count = dst_ctx->ref_count;
@@ -2518,7 +2518,7 @@ void resource_build_info_frame(struct pipe_ctx *pipe_ctx)enum dc_status resource_map_clock_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {/* acquire new resources */
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +7 -8
@@ -169,10 +169,9 @@ struct dc_stream_status *dc_stream_get_status(uint8_t i;struct dc *dc = stream->ctx->dc; -for (i =0 ; i < dc->current_context->stream_count; i++) { -if (stream == dc->current_context->streams[i]) { -return &dc->current_context->stream_status[i]; - } +for (i =0 ; i < dc->current_state->stream_count; i++) { +if (stream == dc->current_state->streams[i]) +return &dc->current_state->stream_status[i]; }return NULL ;
@@ -199,7 +198,7 @@ bool dc_stream_set_cursor_attributes( } core_dc = stream->ctx->dc; - res_ctx = &core_dc->current_context->res_ctx; + res_ctx = &core_dc->current_state->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
@@ -235,7 +234,7 @@ bool dc_stream_set_cursor_position( } core_dc = stream->ctx->dc; - res_ctx = &core_dc->current_context->res_ctx; + res_ctx = &core_dc->current_state->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
@@ -271,7 +270,7 @@ uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream)uint8_t i;struct dc *core_dc = stream->ctx->dc;struct resource_context *res_ctx = - &core_dc->current_context->res_ctx; + &core_dc->current_state->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
@@ -295,7 +294,7 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,bool ret = false;struct dc *core_dc = stream->ctx->dc;struct resource_context *res_ctx = - &core_dc->current_context->res_ctx; + &core_dc->current_state->res_ctx;for (i =0 ; i <MAX_PIPES ; i++) {struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +2 -2
@@ -104,12 +104,12 @@ const struct dc_plane_status *dc_plane_get_status( plane_status = &plane_state->status; core_dc = plane_state->ctx->dc; -if (core_dc->current_context ==NULL ) +if (core_dc->current_state ==NULL )return NULL ;for (i =0 ; i < core_dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe_ctx = - &core_dc->current_context->res_ctx.pipe_ctx[i]; + &core_dc->current_state->res_ctx.pipe_ctx[i];if (pipe_ctx->plane_state != plane_state)continue ;
drivers/gpu/drm/amd/display/dc/dc.h +18 -18
@@ -99,7 +99,7 @@ struct dc_static_screen_events {/* Forward declaration*/ struct dc ;struct dc_plane_state ; -struct validate_context ; +struct dc_state ;struct dc_cap_funcs { bool (*get_dcc_compression_cap)(const struct dc *dc,
@@ -192,7 +192,7 @@ struct dc_debug {bool disable_psr;bool force_abm_enable; }; -struct validate_context ; +struct dc_state ;struct resource_pool ;struct dce_hwseq ;struct dc {
@@ -208,7 +208,7 @@ struct dc {uint8_t link_count;struct dc_link *links[MAX_PIPES *2 ]; -struct validate_context *current_context; +struct dc_state *current_state;struct resource_pool *res_pool;/* Display Engine Clock levels */
@@ -621,12 +621,12 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,bool dc_add_stream_to_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *stream);bool dc_remove_stream_from_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *stream);
@@ -634,25 +634,25 @@ bool dc_add_plane_to_context(const struct dc *dc, struct dc_stream_state *stream, struct dc_plane_state *plane_state, - struct validate_context *context); + struct dc_state *context);bool dc_remove_plane_from_context (const struct dc *dc,struct dc_stream_state *stream,struct dc_plane_state *plane_state, -struct validate_context *context); +struct dc_state *context);bool dc_rem_all_planes_for_stream (const struct dc *dc,struct dc_stream_state *stream, -struct validate_context *context); +struct dc_state *context);bool dc_add_all_planes_for_stream (const struct dc *dc,struct dc_stream_state *stream,struct dc_plane_state *const *plane_states,int plane_count, -struct validate_context *context); +struct dc_state *context);/* * Structure to store surface/stream associations for validation
@@ -669,7 +669,7 @@ bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);bool dc_validate_global_state (struct dc *dc, -struct validate_context *new_ctx); +struct dc_state *new_ctx);/* * This function takes a stream and checks if it is guaranteed to be supported.
@@ -680,14 +680,14 @@ bool dc_validate_global_state(*/ void dc_resource_validate_ctx_copy_construct ( -const struct validate_context *src_ctx, -struct validate_context *dst_ctx); +const struct dc_state *src_ctx, +struct dc_state *dst_ctx);void dc_resource_validate_ctx_copy_construct_current (const struct dc *dc, -struct validate_context *dst_ctx); +struct dc_state *dst_ctx); -void dc_resource_validate_ctx_destruct (struct validate_context *context); +void dc_resource_validate_ctx_destruct (struct dc_state *context);/* * TODO update to make it about validation sets
@@ -698,7 +698,7 @@ void dc_resource_validate_ctx_destruct(struct validate_context *context);* Phy, Encoder, Timing Generator are programmed and enabled. * New streams are enabled with blank stream; no memory read. */ -bool dc_commit_context (struct dc *dc,struct validate_context *context); +bool dc_commit_state (struct dc *dc,struct dc_state *context);/* * Set up streams and links associated to drive sinks
@@ -714,7 +714,7 @@ bool dc_commit_context(struct dc *dc, struct validate_context *context);*/ bool dc_enable_stereo (struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *streams[],uint8_t stream_count);
@@ -737,8 +737,8 @@ enum surface_update_type dc_check_update_surfaces_for_stream( const struct dc_stream_status *stream_status); -void dc_retain_validate_context (struct validate_context *context); -void dc_release_validate_context (struct validate_context *context); +void dc_retain_state (struct dc_state *context); +void dc_release_state (struct dc_state *context);/******************************************************************************* * Link Interfaces
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +2 -2
@@ -609,7 +609,7 @@ static uint32_t dce110_get_pll_pixel_rate_in_hz( {uint32_t inst = pix_clk_params->controller_id -CONTROLLER_ID_D0 ;struct dc *dc_core = cs->ctx->dc; -struct validate_context *context = dc_core->current_context; +struct dc_state *context = dc_core->current_state;struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[inst];/* This function need separate to different DCE version, before separate, just use pixel clock */
@@ -624,7 +624,7 @@ static uint32_t dce110_get_dp_pixel_rate_from_combo_phy_pll( {uint32_t inst = pix_clk_params->controller_id -CONTROLLER_ID_D0 ;struct dc *dc_core = cs->ctx->dc; -struct validate_context *context = dc_core->current_context; +struct dc_state *context = dc_core->current_state;struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[inst];/* This function need separate to different DCE version, before separate, just use pixel clock */
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c +4 -4
@@ -107,7 +107,7 @@ static bool dce100_enable_display_power_gating(static void dce100_pplib_apply_display_requirements (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg;
@@ -127,14 +127,14 @@ static void dce100_pplib_apply_display_requirements(void dce100_set_bandwidth (struct dc *dc, -struct validate_context *context, +struct dc_state *context,bool decrease_allowed) { -if (decrease_allowed || context->bw.dce.dispclk_khz > dc->current_context->bw.dce.dispclk_khz) { +if (decrease_allowed || context->bw.dce.dispclk_khz > dc->current_state->bw.dce.dispclk_khz) { dc->res_pool->display_clock->funcs->set_clock ( dc->res_pool->display_clock, context->bw.dce.dispclk_khz *115 /100 ); - dc->current_context->bw.dce.dispclk_khz = context->bw.dce.dispclk_khz; + dc->current_state->bw.dce.dispclk_khz = context->bw.dce.dispclk_khz; }dce100_pplib_apply_display_requirements (dc, context); }
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h +2 -2
@@ -29,13 +29,13 @@#include "core_types.h" struct dc ; -struct validate_context ; +struct dc_state ;bool dce100_hw_sequencer_construct (struct dc *dc);void dce100_set_bandwidth (struct dc *dc, -struct validate_context *context, +struct dc_state *context,bool decrease_allowed);#endif /* __DC_HWSS_DCE100_H__ */
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +5 -5
@@ -653,7 +653,7 @@ static void destruct(struct dce110_resource_pool *pool)static enum dc_status build_mapped_resource (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {enum dc_status status =DC_OK ;
@@ -674,7 +674,7 @@ static enum dc_status build_mapped_resource(bool dce100_validate_bandwidth (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {/* TODO implement when needed but for now hardcode max value*/ context->bw.dce.dispclk_khz =681000 ;
@@ -684,7 +684,7 @@ bool dce100_validate_bandwidth( }static bool dce100_validate_surface_sets ( -struct validate_context *context) +struct dc_state *context) {int i;
@@ -705,7 +705,7 @@ static bool dce100_validate_surface_sets(enum dc_status dce100_validate_global (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {if (!dce100_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;
@@ -716,7 +716,7 @@ enum dc_status dce100_validate_global(enum dc_status dce100_validate_guaranteed (struct dc *dc,struct dc_stream_state *dc_stream, -struct validate_context *context) +struct dc_state *context) {enum dc_status result =DC_ERROR_UNEXPECTED ;
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +35 -35
247 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +6 -6
@@ -30,20 +30,20 @@#define GAMMA_HW_POINTS_NUM 256struct dc ; -struct validate_context ; +struct dc_state ;struct dm_pp_display_configuration ;bool dce110_hw_sequencer_construct (struct dc *dc);enum dc_status dce110_apply_ctx_to_hw (struct dc *dc, -struct validate_context *context); +struct dc_state *context); -void dce110_set_display_clock (struct validate_context *context); +void dce110_set_display_clock (struct dc_state *context);void dce110_set_displaymarks (const struct dc *dc, -struct validate_context *context); +struct dc_state *context);void dce110_enable_stream (struct pipe_ctx *pipe_ctx);
@@ -62,10 +62,10 @@ void dce110_power_down(struct dc *dc);void dce110_update_pending_status (struct pipe_ctx *pipe_ctx);void dce110_fill_display_configs ( -const struct validate_context *context, +const struct dc_state *context,struct dm_pp_display_configuration *pp_display_cfg); -uint32_t dce110_get_min_vblank_time_us (const struct validate_context *context); +uint32_t dce110_get_min_vblank_time_us (const struct dc_state *context);void dp_receiver_power_ctrl (struct dc_link *link,bool on);#endif /* __DC_HWSS_DCE110_H__ */
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +8 -8
@@ -773,7 +773,7 @@ static bool is_surface_pixel_format_supported(struct pipe_ctx *pipe_ctx, unsignestatic enum dc_status build_mapped_resource (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {enum dc_status status =DC_OK ;
@@ -800,7 +800,7 @@ static enum dc_status build_mapped_resource(static bool dce110_validate_bandwidth (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {bool result = false;
@@ -826,7 +826,7 @@ static bool dce110_validate_bandwidth( context->streams[0 ]->timing.v_addressable, context->streams[0]->timing.pix_clk_khz); -if (memcmp (&dc->current_context->bw.dce, +if (memcmp (&dc->current_state->bw.dce, &context->bw.dce,sizeof (context->bw.dce))) {struct log_entry log_entry; dm_logger_open(
@@ -880,7 +880,7 @@ static bool dce110_validate_bandwidth( }static bool dce110_validate_surface_sets ( -struct validate_context *context) +struct dc_state *context) {int i;
@@ -913,7 +913,7 @@ static bool dce110_validate_surface_sets(enum dc_status dce110_validate_global (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {if (!dce110_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;
@@ -924,7 +924,7 @@ enum dc_status dce110_validate_global(static enum dc_status dce110_validate_guaranteed (struct dc *dc,struct dc_stream_state *dc_stream, -struct validate_context *context) +struct dc_state *context) {enum dc_status result =DC_ERROR_UNEXPECTED ;
@@ -954,7 +954,7 @@ static enum dc_status dce110_validate_guaranteed( }static struct pipe_ctx *dce110_acquire_underlay ( -struct validate_context *context, +struct dc_state *context,const struct resource_pool *pool,struct dc_stream_state *stream) {
@@ -976,7 +976,7 @@ static struct pipe_ctx *dce110_acquire_underlay( pipe_ctx->stream = stream; -if (!dc->current_context->res_ctx.pipe_ctx[underlay_idx].stream) { +if (!dc->current_state->res_ctx.pipe_ctx[underlay_idx].stream) {struct tg_color black_color = {0 };struct dc_bios *dcb = dc->ctx->dc_bios;
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +8 -8
@@ -724,7 +724,7 @@ static struct clock_source *find_matching_pll(static enum dc_status build_mapped_resource (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {enum dc_status status =DC_OK ;
@@ -745,7 +745,7 @@ static enum dc_status build_mapped_resource(bool dce112_validate_bandwidth (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {bool result = false;
@@ -768,7 +768,7 @@ bool dce112_validate_bandwidth("%s: Bandwidth validation failed!" , __func__); -if (memcmp (&dc->current_context->bw.dce, +if (memcmp (&dc->current_state->bw.dce, &context->bw.dce,sizeof (context->bw.dce))) {struct log_entry log_entry; dm_logger_open(
@@ -823,7 +823,7 @@ bool dce112_validate_bandwidth(enum dc_status resource_map_phy_clock_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {
@@ -855,7 +855,7 @@ enum dc_status resource_map_phy_clock_resources( }static bool dce112_validate_surface_sets ( -struct validate_context *context) +struct dc_state *context) {int i;
@@ -876,7 +876,7 @@ static bool dce112_validate_surface_sets(enum dc_status dce112_add_stream_to_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *dc_stream) {enum dc_status result =DC_ERROR_UNEXPECTED ;
@@ -896,7 +896,7 @@ enum dc_status dce112_add_stream_to_ctx(enum dc_status dce112_validate_guaranteed (struct dc *dc,struct dc_stream_state *stream, -struct validate_context *context) +struct dc_state *context) {enum dc_status result =DC_ERROR_UNEXPECTED ;
@@ -927,7 +927,7 @@ enum dc_status dce112_validate_guaranteed(enum dc_status dce112_validate_global (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {if (!dce112_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h +5 -5
@@ -39,21 +39,21 @@ enum dc_status dce112_validate_with_context(struct dc *dc, const struct dc_validation_set set[], int set_count, - struct validate_context *context, - struct validate_context *old_context); + struct dc_state *context, + struct dc_state *old_context);enum dc_status dce112_validate_guaranteed (struct dc *dc,struct dc_stream_state *dc_stream, -struct validate_context *context); +struct dc_state *context);bool dce112_validate_bandwidth (struct dc *dc, -struct validate_context *context); +struct dc_state *context);enum dc_status dce112_add_stream_to_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *dc_stream);
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +5 -5
@@ -685,7 +685,7 @@ static void destruct(struct dce110_resource_pool *pool)static enum dc_status build_mapped_resource (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {enum dc_status status =DC_OK ;
@@ -706,7 +706,7 @@ static enum dc_status build_mapped_resource(bool dce80_validate_bandwidth (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {/* TODO implement when needed but for now hardcode max value*/ context->bw.dce.dispclk_khz =681000 ;
@@ -716,7 +716,7 @@ bool dce80_validate_bandwidth( }static bool dce80_validate_surface_sets ( -struct validate_context *context) +struct dc_state *context) {int i;
@@ -737,7 +737,7 @@ static bool dce80_validate_surface_sets(enum dc_status dce80_validate_global (struct dc *dc, -struct validate_context *context) +struct dc_state *context) {if (!dce80_validate_surface_sets (context))return DC_FAIL_SURFACE_VALIDATE ;
@@ -748,7 +748,7 @@ enum dc_status dce80_validate_global(enum dc_status dce80_validate_guaranteed (struct dc *dc,struct dc_stream_state *dc_stream, -struct validate_context *context) +struct dc_state *context) {enum dc_status result =DC_ERROR_UNEXPECTED ;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +31 -31
218 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +1 -1
@@ -32,7 +32,7 @@ struct dc;void dcn10_hw_sequencer_construct (struct dc *dc);extern void fill_display_configs ( -const struct validate_context *context, +const struct dc_state *context,struct dm_pp_display_configuration *pp_display_cfg);#endif /* __DC_HWSS_DCN10_H__ */
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +4 -4
@@ -850,7 +850,7 @@ static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx)static enum dc_status build_mapped_resource (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream) {enum dc_status status =DC_OK ;
@@ -887,7 +887,7 @@ static enum dc_status build_mapped_resource(enum dc_status dcn10_add_stream_to_ctx (struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *dc_stream) {enum dc_status result =DC_ERROR_UNEXPECTED ;
@@ -907,7 +907,7 @@ enum dc_status dcn10_add_stream_to_ctx(enum dc_status dcn10_validate_guaranteed (struct dc *dc,struct dc_stream_state *dc_stream, -struct validate_context *context) +struct dc_state *context) {enum dc_status result =DC_ERROR_UNEXPECTED ;
@@ -935,7 +935,7 @@ enum dc_status dcn10_validate_guaranteed( }static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer ( -struct validate_context *context, +struct dc_state *context,const struct resource_pool *pool,struct dc_stream_state *stream) {
drivers/gpu/drm/amd/display/dc/inc/core_types.h +7 -7
@@ -80,7 +80,7 @@ void core_link_set_avmute(struct pipe_ctx *pipe_ctx, bool enable);#include "transform.h" struct resource_pool ; -struct validate_context ; +struct dc_state ;struct resource_context ;struct resource_funcs {
@@ -91,18 +91,18 @@ struct resource_funcs {enum dc_status (*validate_guaranteed)(struct dc *dc,struct dc_stream_state *stream, -struct validate_context *context); +struct dc_state *context);bool (*validate_bandwidth)(struct dc *dc, -struct validate_context *context); +struct dc_state *context);enum dc_status (*validate_global)(struct dc *dc, -struct validate_context *context); +struct dc_state *context);struct pipe_ctx *(*acquire_idle_pipe_for_layer)( -struct validate_context *context, +struct dc_state *context,const struct resource_pool *pool,struct dc_stream_state *stream);
@@ -110,7 +110,7 @@ struct resource_funcs {enum dc_status (*add_stream_to_ctx)(struct dc *dc, -struct validate_context *new_ctx, +struct dc_state *new_ctx,struct dc_stream_state *dc_stream); };
@@ -252,7 +252,7 @@ union bw_context {struct dce_bw_output dce; }; -struct validate_context { +struct dc_state {struct dc_stream_state *streams[MAX_PIPES ];struct dc_stream_status stream_status[MAX_PIPES ];uint8_t stream_count;
drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h +1 -1
@@ -34,7 +34,7 @@struct pipe_ctx ;struct dc ; -struct validate_context ; +struct dc_state ;struct dce_bw_output ;enum bw_calcs_version {
drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h +2 -2
@@ -35,7 +35,7 @@#include "../dml/display_mode_lib.h" struct dc ; -struct validate_context ; +struct dc_state ;/******************************************************************************* * DCN data structures.
@@ -621,7 +621,7 @@ extern const struct dcn_ip_params dcn10_ip_defaults;bool dcn_validate_bandwidth (struct dc *dc, -struct validate_context *context); +struct dc_state *context); unsigned int dcn_find_dcfclk_suits_all( const struct dc *dc,
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +7 -7
@@ -49,7 +49,7 @@ struct dce_hwseq { };struct pipe_ctx ; -struct validate_context ; +struct dc_state ;struct dchub_init_data ;struct dc_static_screen_events ;struct resource_pool ;
@@ -60,16 +60,16 @@ struct hw_sequencer_funcs {void (*init_hw)(struct dc *dc);enum dc_status (*apply_ctx_to_hw)( -struct dc *dc,struct validate_context *context); +struct dc *dc,struct dc_state *context);void (*reset_hw_ctx_wrap)( -struct dc *dc,struct validate_context *context); +struct dc *dc,struct dc_state *context);void (*apply_ctx_for_surface)(struct dc *dc,const struct dc_stream_state *stream,int num_planes, -struct validate_context *context); +struct dc_state *context); void (*set_plane_config)( const struct dc *dc,
@@ -127,7 +127,7 @@ struct hw_sequencer_funcs {void (*power_on_front_end)(struct dc *dc,struct pipe_ctx *pipe, -struct validate_context *context); +struct dc_state *context);void (*update_info_frame)(struct pipe_ctx *pipe_ctx);
@@ -145,7 +145,7 @@ struct hw_sequencer_funcs {void (*set_bandwidth)(struct dc *dc, -struct validate_context *context, +struct dc_state *context,bool decrease_allowed); void (*set_drr)(struct pipe_ctx **pipe_ctx, int num_pipes,
@@ -159,7 +159,7 @@ struct hw_sequencer_funcs {enum dc_status (*prog_pixclk_crtc_otg)(struct pipe_ctx *pipe_ctx, -struct validate_context *context, +struct dc_state *context,struct dc *dc); void (*setup_stereo)(
drivers/gpu/drm/amd/display/dc/inc/resource.h +11 -11
@@ -81,14 +81,14 @@ void dc_destroy_resource_pool(struct dc *dc);enum dc_status resource_map_pool_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream);bool resource_build_scaling_params (struct pipe_ctx *pipe_ctx);enum dc_status resource_build_scaling_params_for_context (const struct dc *dc, -struct validate_context *context); +struct dc_state *context);void resource_build_info_frame (struct pipe_ctx *pipe_ctx);
@@ -122,7 +122,7 @@ bool resource_attach_surfaces_to_context(struct dc_plane_state *const *plane_state, int surface_count, struct dc_stream_state *dc_stream, - struct validate_context *context, + struct dc_state *context, const struct resource_pool *pool); struct pipe_ctx *find_idle_secondary_pipe(
@@ -130,31 +130,31 @@ struct pipe_ctx *find_idle_secondary_pipe( const struct resource_pool *pool);bool resource_is_stream_unchanged ( -struct validate_context *old_context,struct dc_stream_state *stream); +struct dc_state *old_context,struct dc_stream_state *stream);bool resource_validate_attach_surfaces (const struct dc_validation_set set[],int set_count, -const struct validate_context *old_context, -struct validate_context *context, +const struct dc_state *old_context, +struct dc_state *context,const struct resource_pool *pool);void validate_guaranteed_copy_streams ( -struct validate_context *context, +struct dc_state *context,int max_streams);void resource_validate_ctx_update_pointer_after_copy ( -const struct validate_context *src_ctx, -struct validate_context *dst_ctx); +const struct dc_state *src_ctx, +struct dc_state *dst_ctx);enum dc_status resource_map_clock_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream);enum dc_status resource_map_phy_clock_resources (const struct dc *dc, -struct validate_context *context, +struct dc_state *context,struct dc_stream_state *stream); bool pipe_need_reprogram(
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +1 -1
@@ -214,7 +214,7 @@ bool dce110_vblank_set(uint8_t pipe_offset = dal_irq_src -IRQ_TYPE_VBLANK ;struct timing_generator *tg = - core_dc->current_context->res_ctx.pipe_ctx[pipe_offset].stream_res.tg; + core_dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg;if (enable) {if (!tg->funcs->arm_vert_intr (tg,2 )) {
drivers/gpu/drm/amd/display/include/logger_interface.h +2 -2
@@ -32,7 +32,7 @@ struct dc_context;struct dc_link ;struct dc_surface_update ;struct resource_context ; -struct validate_context ; +struct dc_state ;/* *
@@ -93,7 +93,7 @@ void context_timing_trace(void context_clock_trace (struct dc *dc, -struct validate_context *context); +struct dc_state *context);/* Any function which is empty or have incomplete implementation should be * marked by this macro.
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 61/77 drm/amd/display: Rename dc resource_validate_ctx methods
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Rename dc_resource methods from validate_ctx to state
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dc.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -709,7 +709,7 @@ dm_atomic_state_alloc(struct drm_device *dev)atomic_inc (&new_ctx->ref_count); -dc_resource_validate_ctx_copy_construct_current (dc, new_ctx); +dc_resource_state_copy_construct_current (dc, new_ctx); state->context = new_ctx;
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -3
@@ -1013,7 +1013,7 @@ void dc_release_state(struct dc_state *context)atomic_dec (&context->ref_count);if (atomic_read (&context->ref_count) ==0 ) { -dc_resource_validate_ctx_destruct (context); +dc_resource_state_destruct (context);dm_free (context); } }
@@ -1285,7 +1285,7 @@ void dc_update_planes_and_stream(struct dc *dc,atomic_inc (&context->ref_count); -dc_resource_validate_ctx_copy_construct ( +dc_resource_state_copy_construct ( dc->current_state, context);/*remove old surfaces from context */
@@ -1628,7 +1628,7 @@ void dc_set_power_state(/* Preserve refcount */ ref_count = dc->current_state->ref_count; -dc_resource_validate_ctx_destruct (dc->current_state); +dc_resource_state_destruct (dc->current_state);memset (dc->current_state,0 ,sizeof (*dc->current_state)); dc->current_state->ref_count = ref_count;
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -4
@@ -1707,11 +1707,11 @@ void validate_guaranteed_copy_streams( } } -void dc_resource_validate_ctx_copy_construct_current ( +void dc_resource_state_copy_construct_current (const struct dc *dc,struct dc_state *dst_ctx) { -dc_resource_validate_ctx_copy_construct (dc->current_state, dst_ctx); +dc_resource_state_copy_construct (dc->current_state, dst_ctx); } bool dc_validate_global_state(
@@ -2413,7 +2413,7 @@ static void set_vsc_info_packet(/*TODO: stereo 3D support and extend pixel encoding colorimetry*/ } -void dc_resource_validate_ctx_destruct (struct dc_state *context) +void dc_resource_state_destruct (struct dc_state *context) {int i, j;
@@ -2432,7 +2432,7 @@ void dc_resource_validate_ctx_destruct(struct dc_state *context)* Copy src_ctx into dst_ctx and retain all surfaces and streams referenced * by the src_ctx */ -void dc_resource_validate_ctx_copy_construct ( +void dc_resource_state_copy_construct (const struct dc_state *src_ctx,struct dc_state *dst_ctx) {
drivers/gpu/drm/amd/display/dc/dc.h +3 -3
@@ -679,15 +679,15 @@ bool dc_validate_global_state(* No hardware is programmed for call. Only validation is done. */ -void dc_resource_validate_ctx_copy_construct ( +void dc_resource_state_copy_construct (const struct dc_state *src_ctx,struct dc_state *dst_ctx); -void dc_resource_validate_ctx_copy_construct_current ( +void dc_resource_state_copy_construct_current (const struct dc *dc,struct dc_state *dst_ctx); -void dc_resource_validate_ctx_destruct (struct dc_state *context); +void dc_resource_state_destruct (struct dc_state *context);/* * TODO update to make it about validation sets
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 62/77 drm/amd/display: Add a clock source to a sharing pipe
In reply to a message not in the archiveFrom: Mikita Lipski <[email protected]>
Fix to allow DVI displays to share the same clock source
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -2536,7 +2536,7 @@ enum dc_status resource_map_clock_resources( pipe_ctx->clock_source =NULL ;if (!dc->config.disable_disp_pll_sharing) -resource_find_used_clk_src_for_sharing ( + pipe_ctx->clock_source =resource_find_used_clk_src_for_sharing ( &context->res_ctx, pipe_ctx);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 63/77 drm/amd/display: add aux arbitration logic
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 6 +++++ drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h | 2 ++ .../display/dc/i2caux/dce110/aux_engine_dce110.c | 30 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c +6 -0
@@ -69,6 +69,12 @@ bool dal_aux_engine_acquire(struct aux_engine *aux_engine =FROM_ENGINE (engine);enum gpio_result result; +if (aux_engine->funcs->is_engine_available) { +/*check whether SW could use the engine*/ +if (!aux_engine->funcs->is_engine_available (aux_engine)) { +return false; + } + } result =dal_ddc_open (ddc,GPIO_MODE_HARDWARE ,GPIO_DDC_CONFIG_TYPE_MODE_AUX );
drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h +2 -0
@@ -86,6 +86,8 @@ struct aux_engine_funcs {enum aux_channel_operation_result (*get_channel_status)(struct aux_engine *engine,uint8_t *returned_bytes); +bool (*is_engine_available) ( +struct aux_engine *engine); };struct aux_engine {
drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c +28 -2
@@ -93,15 +93,36 @@ static void destroy( }#define SW_CAN_ACCESS_AUX 1 +#define DMCU_CAN_ACCESS_AUX 2 +static bool is_engine_available ( +struct aux_engine *engine) +{ +struct aux_engine_dce110 *aux110 =FROM_AUX_ENGINE (engine); + +uint32_t value =REG_READ (AUX_ARB_CONTROL ); +uint32_t field =get_reg_field_value ( + value, +AUX_ARB_CONTROL , +AUX_REG_RW_CNTL_STATUS ); + +return (field !=DMCU_CAN_ACCESS_AUX ); +}static bool acquire_engine (struct aux_engine *engine) {struct aux_engine_dce110 *aux110 =FROM_AUX_ENGINE (engine); +uint32_t value =REG_READ (AUX_ARB_CONTROL ); +uint32_t field =get_reg_field_value ( + value, +AUX_ARB_CONTROL , +AUX_REG_RW_CNTL_STATUS ); +if (field ==DMCU_CAN_ACCESS_AUX ) +return false;/* enable AUX before request SW to access AUX */ -uint32_t value =REG_READ (AUX_CONTROL ); -uint32_t field =get_reg_field_value (value, + value =REG_READ (AUX_CONTROL ); + field =get_reg_field_value (value,AUX_CONTROL ,AUX_EN );
@@ -395,6 +416,7 @@ static const struct aux_engine_funcs aux_engine_funcs = { .submit_channel_request = submit_channel_request, .process_channel_reply = process_channel_reply, .get_channel_status = get_channel_status, + .is_engine_available = is_engine_available, };static const struct engine_funcs engine_funcs = {
@@ -425,6 +447,10 @@ static bool construct(static void destruct (struct aux_engine_dce110 *engine) { +struct aux_engine_dce110 *aux110 = engine; +/*temp w/a, to do*/ +REG_UPDATE (AUX_ARB_CONTROL ,AUX_DMCU_DONE_USING_AUX_REG ,1 ); +REG_UPDATE (AUX_ARB_CONTROL ,AUX_SW_DONE_USING_AUX_REG ,1 );dal_aux_engine_destruct (&engine->base); }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 64/77 drm/amd/display: Move dis_clk into dc_state.
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
dis_clk is single instance across pipes.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 38 +++++++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 +++- drivers/gpu/drm/amd/display/dc/dc.h | 5 ++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 67 ++++++++++------------ .../drm/amd/display/dc/dce110/dce110_resource.c | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 7 ++- 7 files changed, 78 insertions(+), 57 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -0
@@ -575,6 +575,8 @@ static bool construct(struct dc *dc,if (!dc->res_pool) goto fail; +dc_resource_state_construct (dc, dc->current_state); +if (!create_links (dc, init_params->num_virtual_links)) goto fail;
@@ -679,6 +681,8 @@ bool dc_validate_guaranteed(if (context ==NULL ) goto context_alloc_fail; +dc_resource_state_construct (dc, dc->current_state); +atomic_inc (&context->ref_count); result = dc->res_pool->funcs->validate_guaranteed(
@@ -1615,6 +1619,8 @@ void dc_set_power_state(switch (power_state) {case DC_ACPI_CM_POWER_STATE_D0 : +dc_resource_state_construct (dc, dc->current_state); + dc->hwss.init_hw (dc);break ;default :
@@ -1631,6 +1637,7 @@ void dc_set_power_state(dc_resource_state_destruct (dc->current_state);memset (dc->current_state,0 ,sizeof (*dc->current_state)); + dc->current_state->ref_count = ref_count;break ;
drivers/gpu/drm/amd/display/dc/core/dc_link.c +23 -15
@@ -1181,7 +1181,9 @@ static void enable_stream_features(struct pipe_ctx *pipe_ctx) &downspread.raw, sizeof(downspread)); } -static enum dc_status enable_link_dp (struct pipe_ctx *pipe_ctx) +static enum dc_status enable_link_dp ( +struct dc_state *state, +struct pipe_ctx *pipe_ctx) {struct dc_stream_state *stream = pipe_ctx->stream;enum dc_status status;
@@ -1201,14 +1203,14 @@ static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx) max_link_rate =LINK_RATE_HIGH3 ;if (link_settings.link_rate == max_link_rate) { -if (pipe_ctx->dis_clk->funcs->set_min_clocks_state) { -if (pipe_ctx->dis_clk->cur_min_clks_state <DM_PP_CLOCKS_STATE_NOMINAL ) - pipe_ctx->dis_clk->funcs->set_min_clocks_state ( - pipe_ctx->dis_clk,DM_PP_CLOCKS_STATE_NOMINAL ); +if (state->dis_clk->funcs->set_min_clocks_state) { +if (state->dis_clk->cur_min_clks_state <DM_PP_CLOCKS_STATE_NOMINAL ) + state->dis_clk->funcs->set_min_clocks_state ( + state->dis_clk,DM_PP_CLOCKS_STATE_NOMINAL ); }else {uint32_t dp_phyclk_in_khz;const struct clocks_value clocks_value = - pipe_ctx->dis_clk->cur_clocks_value; + state->dis_clk->cur_clocks_value;/* 27mhz = 27000000hz= 27000khz */ dp_phyclk_in_khz = link_settings.link_rate *27000 ;
@@ -1216,8 +1218,8 @@ static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx)if (((clocks_value.max_non_dp_phyclk_in_khz !=0 ) && (dp_phyclk_in_khz > clocks_value.max_non_dp_phyclk_in_khz)) || (dp_phyclk_in_khz > clocks_value.max_dp_phyclk_in_khz)) { - pipe_ctx->dis_clk->funcs->apply_clock_voltage_request( - pipe_ctx->dis_clk, + state->dis_clk->funcs->apply_clock_voltage_request( + state->dis_clk, DM_PP_CLOCK_TYPE_DISPLAYPHYCLK, dp_phyclk_in_khz, false,
@@ -1256,7 +1258,9 @@ static enum dc_status enable_link_dp(struct pipe_ctx *pipe_ctx)return status; } -static enum dc_status enable_link_dp_mst (struct pipe_ctx *pipe_ctx) +static enum dc_status enable_link_dp_mst ( +struct dc_state *state, +struct pipe_ctx *pipe_ctx) {struct dc_link *link = pipe_ctx->stream->sink->link;
@@ -1269,7 +1273,7 @@ static enum dc_status enable_link_dp_mst(struct pipe_ctx *pipe_ctx)/* set the sink to MST mode before enabling the link */ dp_enable_mst_on_sink (link, true); -return enable_link_dp (pipe_ctx); +return enable_link_dp (state, pipe_ctx); } static bool get_ext_hdmi_settings(struct pipe_ctx *pipe_ctx,
@@ -1709,16 +1713,18 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx) }/****************************enable_link***********************************/ -static enum dc_status enable_link (struct pipe_ctx *pipe_ctx) +static enum dc_status enable_link ( +struct dc_state *state, +struct pipe_ctx *pipe_ctx) {enum dc_status status =DC_ERROR_UNEXPECTED ;switch (pipe_ctx->stream->signal) {case SIGNAL_TYPE_DISPLAY_PORT :case SIGNAL_TYPE_EDP : - status =enable_link_dp (pipe_ctx); + status =enable_link_dp (state, pipe_ctx);break ;case SIGNAL_TYPE_DISPLAY_PORT_MST : - status =enable_link_dp_mst (pipe_ctx); + status =enable_link_dp_mst (state, pipe_ctx);msleep (200 );break ;case SIGNAL_TYPE_DVI_SINGLE_LINK :
@@ -2285,11 +2291,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)return DC_OK ; } -void core_link_enable_stream (struct pipe_ctx *pipe_ctx) +void core_link_enable_stream ( +struct dc_state *state, +struct pipe_ctx *pipe_ctx) {struct dc *core_dc = pipe_ctx->stream->ctx->dc; -enum dc_status status =enable_link (pipe_ctx); +enum dc_status status =enable_link (state, pipe_ctx);if (status !=DC_OK ) { dm_logger_write(pipe_ctx->stream->ctx->logger,
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +8 -2
@@ -1033,7 +1033,6 @@ static int acquire_first_split_pipe( pipe_ctx->plane_res.ipp = pool->ipps[i]; pipe_ctx->plane_res.xfm = pool->transforms[i]; pipe_ctx->stream_res.opp = pool->opps[i]; - pipe_ctx->dis_clk = pool->display_clock; pipe_ctx->pipe_idx = i; pipe_ctx->stream = stream;
@@ -1368,7 +1367,6 @@ static int acquire_first_free_pipe( pipe_ctx->plane_res.ipp = pool->ipps[i]; pipe_ctx->plane_res.xfm = pool->transforms[i]; pipe_ctx->stream_res.opp = pool->opps[i]; - pipe_ctx->dis_clk = pool->display_clock; pipe_ctx->pipe_idx = i;
@@ -1714,6 +1712,14 @@ void dc_resource_state_copy_construct_current(dc_resource_state_copy_construct (dc->current_state, dst_ctx); } + +void dc_resource_state_construct ( +const struct dc *dc, +struct dc_state *dst_ctx) +{ + dst_ctx->dis_clk = dc->res_pool->display_clock; +} +bool dc_validate_global_state (struct dc *dc,struct dc_state *new_ctx)
drivers/gpu/drm/amd/display/dc/dc.h +5 -0
@@ -679,6 +679,11 @@ bool dc_validate_global_state(* No hardware is programmed for call. Only validation is done. */ + +void dc_resource_state_construct ( +const struct dc *dc, +struct dc_state *dst_ctx); +void dc_resource_state_copy_construct (const struct dc_state *src_ctx,struct dc_state *dst_ctx);
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +30 -37
142 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +0 -1
@@ -971,7 +971,6 @@ static struct pipe_ctx *dce110_acquire_underlay(/*pipe_ctx->plane_res.ipp = res_ctx->pool->ipps[underlay_idx];*/ pipe_ctx->plane_res.xfm = pool->transforms[underlay_idx]; pipe_ctx->stream_res.opp = pool->opps[underlay_idx]; - pipe_ctx->dis_clk = pool->display_clock; pipe_ctx->pipe_idx = underlay_idx; pipe_ctx->stream = stream;
drivers/gpu/drm/amd/display/dc/inc/core_types.h +5 -2
@@ -70,7 +70,9 @@ enum dc_status dc_link_validate_mode_timing(void core_link_resume (struct dc_link *link); -void core_link_enable_stream (struct pipe_ctx *pipe_ctx); +void core_link_enable_stream ( +struct dc_state *state, +struct pipe_ctx *pipe_ctx);void core_link_disable_stream (struct pipe_ctx *pipe_ctx);
@@ -188,7 +190,6 @@ struct pipe_ctx {struct plane_resource plane_res;struct stream_resource stream_res; -struct display_clock *dis_clk;struct clock_source *clock_source;struct pll_settings pll_settings;
@@ -268,6 +269,8 @@ struct dc_state {struct dcn_bw_internal_vars dcn_bw_vars;#endif +struct display_clock *dis_clk; +atomic_t ref_count; };
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 65/77 drm/amd/display: Fix time out on boot
In reply to a message not in the archiveFrom: Eric Yang <[email protected]>
On boot, hubp 0 is powergated during enable accel mode, so we time out when we try to blank in undo wa.
Fix: Check power gate status before set blank
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -0
@@ -780,6 +780,12 @@ static void undo_DEGVIDCN10_253_wa(struct dc *dc) {struct dce_hwseq *hws = dc->hwseq;struct mem_input *mi = dc->res_pool->mis[0 ]; +int pwr_status =0 ; + +REG_GET (DOMAIN0_PG_STATUS ,DOMAIN0_PGFSM_PWR_STATUS , &pwr_status); +/* Don't need to blank if hubp is power gated*/ +if (pwr_status ==2 ) +return ; mi->funcs->set_blank (mi, true);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 66/77 drm/amd/display: only polling VSync Phase within VSync peroroid
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 27 +++++++++++++----------- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 2 +- 5 files changed, 21 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -2
@@ -1862,13 +1862,13 @@ bool dc_link_set_abm_disable(const struct dc_link *link) } -bool dc_link_set_psr_enable (const struct dc_link *link,bool enable) +bool dc_link_set_psr_enable (const struct dc_link *link,bool enable,bool wait) {struct dc *core_dc = link->ctx->dc;struct dmcu *dmcu = core_dc->res_pool->dmcu;if (dmcu !=NULL && link->psr_enabled) - dmcu->funcs->set_psr_enable (dmcu, enable); + dmcu->funcs->set_psr_enable (dmcu, enable, wait);return true; }
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -2
@@ -1653,8 +1653,8 @@ static bool handle_hpd_irq_psr_sink(const struct dc_link *link) sizeof(psr_error_status.raw));/* PSR error, disable and re-enable PSR */ -dc_link_set_psr_enable (link, false); -dc_link_set_psr_enable (link, true); +dc_link_set_psr_enable (link, false, true); +dc_link_set_psr_enable (link, true, true);return true; } else if (psr_sink_psr_status.bits.SINK_SELF_REFRESH_STATUS ==
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -870,7 +870,7 @@ struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index);bool dc_link_set_backlight_level (const struct dc_link *dc_link,uint32_t level,uint32_t frame_ramp,const struct dc_stream_state *stream); -bool dc_link_set_psr_enable (const struct dc_link *dc_link,bool enable); +bool dc_link_set_psr_enable (const struct dc_link *dc_link,bool enable,bool wait);bool dc_link_get_psr_state (const struct dc_link *dc_link,uint32_t *psr_state);
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +15 -12
@@ -103,7 +103,7 @@ static void dce_get_dmcu_psr_state(struct dmcu *dmcu, uint32_t *psr_state)REG_UPDATE (DMCU_RAM_ACCESS_CTRL ,IRAM_HOST_ACCESS_EN ,0 ); } -static void dce_dmcu_set_psr_enable (struct dmcu *dmcu,bool enable) +static void dce_dmcu_set_psr_enable (struct dmcu *dmcu,bool enable,bool wait) {struct dce_dmcu *dmcu_dce =TO_DCE_DMCU (dmcu);unsigned int dmcu_max_retry_on_wait_reg_ready =801 ;
@@ -127,17 +127,18 @@ static void dce_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable)/* notifyDMCUMsg */ REG_UPDATE (MASTER_COMM_CNTL_REG ,MASTER_COMM_INTERRUPT ,1 ); - -for (retryCount =0 ; retryCount <=100 ; retryCount++) { -dce_get_dmcu_psr_state (dmcu, &psr_state); -if (enable) { -if (psr_state !=0 ) -break ; - }else { -if (psr_state ==0 ) -break ; +if (wait == true) { +for (retryCount =0 ; retryCount <=100 ; retryCount++) { +dce_get_dmcu_psr_state (dmcu, &psr_state); +if (enable) { +if (psr_state !=0 ) +break ; + }else { +if (psr_state ==0 ) +break ; + } +dm_delay_in_microseconds (dmcu->ctx,10 ); } -dm_delay_in_microseconds (dmcu->ctx,10 ); } }
@@ -338,7 +339,7 @@ static void dcn10_get_dmcu_psr_state(struct dmcu *dmcu, uint32_t *psr_state)REG_UPDATE (DMCU_RAM_ACCESS_CTRL ,IRAM_HOST_ACCESS_EN ,0 ); } -static void dcn10_dmcu_set_psr_enable (struct dmcu *dmcu,bool enable) +static void dcn10_dmcu_set_psr_enable (struct dmcu *dmcu,bool enable,bool wait) {struct dce_dmcu *dmcu_dce =TO_DCE_DMCU (dmcu);unsigned int dmcu_max_retry_on_wait_reg_ready =801 ;
@@ -367,6 +368,7 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable)* Exit PSR may need to wait 1-2 frames to power up. Timeout after at * least a few frames. Should never hit the max retry assert below. */ +if (wait == true) {for (retryCount =0 ; retryCount <=1000 ; retryCount++) {dcn10_get_dmcu_psr_state (dmcu, &psr_state);if (enable) {
@@ -381,6 +383,7 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable)/* assert if max retry hit */ ASSERT (retryCount <=1000 ); + } } static void dcn10_dmcu_setup_psr(struct dmcu *dmcu,
drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h +1 -1
@@ -37,7 +37,7 @@ struct dmcu_funcs {unsigned int start_offset, const char *src, unsigned int bytes); -void (*set_psr_enable)(struct dmcu *dmcu,bool enable); +void (*set_psr_enable)(struct dmcu *dmcu,bool enable,bool wait);void (*setup_psr)(struct dmcu *dmcu,struct dc_link *link,struct psr_context *psr_context);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 67/77 drm/amd/display: clean up functions in dcn10_dpp_cm
In reply to a message not in the archiveFrom: Yue Hin Lau <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 420 -------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 628 +++++---------------- 2 files changed, 140 insertions(+), 908 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +0 -420
@@ -97,12 +97,6 @@SRI (CM_DGAM_RAMB_END_CNTL1_R ,CM , id), \SRI (CM_DGAM_RAMB_END_CNTL2_R ,CM , id), \SRI (CM_DGAM_RAMB_REGION_0_1 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_2_3 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_4_5 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_6_7 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_8_9 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_10_11 ,CM , id), \ -SRI (CM_DGAM_RAMB_REGION_12_13 ,CM , id), \SRI (CM_DGAM_RAMB_REGION_14_15 ,CM , id), \SRI (CM_DGAM_RAMA_START_CNTL_B ,CM , id), \ SRI(CM_DGAM_RAMA_START_CNTL_G, CM, id), \
@@ -117,12 +111,6 @@SRI (CM_DGAM_RAMA_END_CNTL1_R ,CM , id), \SRI (CM_DGAM_RAMA_END_CNTL2_R ,CM , id), \SRI (CM_DGAM_RAMA_REGION_0_1 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_2_3 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_4_5 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_6_7 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_8_9 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_10_11 ,CM , id), \ -SRI (CM_DGAM_RAMA_REGION_12_13 ,CM , id), \SRI (CM_DGAM_RAMA_REGION_14_15 ,CM , id), \SRI (CM_MEM_PWR_CTRL ,CM , id), \ SRI(CM_DGAM_LUT_WRITE_EN_MASK, CM, id), \
@@ -174,21 +162,6 @@SRI (CM_RGAM_RAMB_END_CNTL1_R ,CM , id), \SRI (CM_RGAM_RAMB_END_CNTL2_R ,CM , id), \SRI (CM_RGAM_RAMB_REGION_0_1 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_2_3 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_4_5 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_6_7 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_8_9 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_10_11 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_12_13 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_14_15 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_16_17 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_18_19 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_20_21 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_22_23 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_24_25 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_26_27 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_28_29 ,CM , id), \ -SRI (CM_RGAM_RAMB_REGION_30_31 ,CM , id), \SRI (CM_RGAM_RAMB_REGION_32_33 ,CM , id), \SRI (CM_RGAM_RAMA_START_CNTL_B ,CM , id), \ SRI(CM_RGAM_RAMA_START_CNTL_G, CM, id), \
@@ -203,21 +176,6 @@SRI (CM_RGAM_RAMA_END_CNTL1_R ,CM , id), \SRI (CM_RGAM_RAMA_END_CNTL2_R ,CM , id), \SRI (CM_RGAM_RAMA_REGION_0_1 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_2_3 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_4_5 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_6_7 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_8_9 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_10_11 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_12_13 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_14_15 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_16_17 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_18_19 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_20_21 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_22_23 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_24_25 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_26_27 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_28_29 ,CM , id), \ -SRI (CM_RGAM_RAMA_REGION_30_31 ,CM , id), \SRI (CM_RGAM_RAMA_REGION_32_33 ,CM , id), \SRI (CM_RGAM_CONTROL ,CM , id), \ SRI(CM_IGAM_CONTROL, CM, id), \
@@ -338,30 +296,6 @@TF_SF (CM0_CM_DGAM_RAMB_REGION_0_1 ,CM_DGAM_RAMB_EXP_REGION0_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_DGAM_RAMB_REGION_0_1 ,CM_DGAM_RAMB_EXP_REGION1_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_DGAM_RAMB_REGION_0_1 ,CM_DGAM_RAMB_EXP_REGION1_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_2_3 ,CM_DGAM_RAMB_EXP_REGION2_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_2_3 ,CM_DGAM_RAMB_EXP_REGION2_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_2_3 ,CM_DGAM_RAMB_EXP_REGION3_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_2_3 ,CM_DGAM_RAMB_EXP_REGION3_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_4_5 ,CM_DGAM_RAMB_EXP_REGION4_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_4_5 ,CM_DGAM_RAMB_EXP_REGION4_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_4_5 ,CM_DGAM_RAMB_EXP_REGION5_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_4_5 ,CM_DGAM_RAMB_EXP_REGION5_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_6_7 ,CM_DGAM_RAMB_EXP_REGION6_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_6_7 ,CM_DGAM_RAMB_EXP_REGION6_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_6_7 ,CM_DGAM_RAMB_EXP_REGION7_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_6_7 ,CM_DGAM_RAMB_EXP_REGION7_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_8_9 ,CM_DGAM_RAMB_EXP_REGION8_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_8_9 ,CM_DGAM_RAMB_EXP_REGION8_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_8_9 ,CM_DGAM_RAMB_EXP_REGION9_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_8_9 ,CM_DGAM_RAMB_EXP_REGION9_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_10_11 ,CM_DGAM_RAMB_EXP_REGION10_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_10_11 ,CM_DGAM_RAMB_EXP_REGION10_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_10_11 ,CM_DGAM_RAMB_EXP_REGION11_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_10_11 ,CM_DGAM_RAMB_EXP_REGION11_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_12_13 ,CM_DGAM_RAMB_EXP_REGION12_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_12_13 ,CM_DGAM_RAMB_EXP_REGION12_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_12_13 ,CM_DGAM_RAMB_EXP_REGION13_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMB_REGION_12_13 ,CM_DGAM_RAMB_EXP_REGION13_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_DGAM_RAMB_REGION_14_15 ,CM_DGAM_RAMB_EXP_REGION14_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_DGAM_RAMB_REGION_14_15 ,CM_DGAM_RAMB_EXP_REGION14_NUM_SEGMENTS , mask_sh), \ TF_SF(CM0_CM_DGAM_RAMB_REGION_14_15, CM_DGAM_RAMB_EXP_REGION15_LUT_OFFSET, mask_sh), \
@@ -388,30 +322,6 @@TF_SF (CM0_CM_DGAM_RAMA_REGION_0_1 ,CM_DGAM_RAMA_EXP_REGION0_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_DGAM_RAMA_REGION_0_1 ,CM_DGAM_RAMA_EXP_REGION1_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_DGAM_RAMA_REGION_0_1 ,CM_DGAM_RAMA_EXP_REGION1_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_2_3 ,CM_DGAM_RAMA_EXP_REGION2_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_2_3 ,CM_DGAM_RAMA_EXP_REGION2_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_2_3 ,CM_DGAM_RAMA_EXP_REGION3_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_2_3 ,CM_DGAM_RAMA_EXP_REGION3_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_4_5 ,CM_DGAM_RAMA_EXP_REGION4_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_4_5 ,CM_DGAM_RAMA_EXP_REGION4_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_4_5 ,CM_DGAM_RAMA_EXP_REGION5_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_4_5 ,CM_DGAM_RAMA_EXP_REGION5_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_6_7 ,CM_DGAM_RAMA_EXP_REGION6_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_6_7 ,CM_DGAM_RAMA_EXP_REGION6_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_6_7 ,CM_DGAM_RAMA_EXP_REGION7_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_6_7 ,CM_DGAM_RAMA_EXP_REGION7_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_8_9 ,CM_DGAM_RAMA_EXP_REGION8_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_8_9 ,CM_DGAM_RAMA_EXP_REGION8_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_8_9 ,CM_DGAM_RAMA_EXP_REGION9_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_8_9 ,CM_DGAM_RAMA_EXP_REGION9_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_10_11 ,CM_DGAM_RAMA_EXP_REGION10_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_10_11 ,CM_DGAM_RAMA_EXP_REGION10_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_10_11 ,CM_DGAM_RAMA_EXP_REGION11_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_10_11 ,CM_DGAM_RAMA_EXP_REGION11_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_12_13 ,CM_DGAM_RAMA_EXP_REGION12_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_12_13 ,CM_DGAM_RAMA_EXP_REGION12_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_12_13 ,CM_DGAM_RAMA_EXP_REGION13_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_DGAM_RAMA_REGION_12_13 ,CM_DGAM_RAMA_EXP_REGION13_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_DGAM_RAMA_REGION_14_15 ,CM_DGAM_RAMA_EXP_REGION14_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_DGAM_RAMA_REGION_14_15 ,CM_DGAM_RAMA_EXP_REGION14_NUM_SEGMENTS , mask_sh), \ TF_SF(CM0_CM_DGAM_RAMA_REGION_14_15, CM_DGAM_RAMA_EXP_REGION15_LUT_OFFSET, mask_sh), \
@@ -501,66 +411,6 @@TF_SF (CM0_CM_RGAM_RAMB_REGION_0_1 ,CM_RGAM_RAMB_EXP_REGION0_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_RGAM_RAMB_REGION_0_1 ,CM_RGAM_RAMB_EXP_REGION1_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_RGAM_RAMB_REGION_0_1 ,CM_RGAM_RAMB_EXP_REGION1_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_2_3 ,CM_RGAM_RAMB_EXP_REGION2_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_2_3 ,CM_RGAM_RAMB_EXP_REGION2_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_2_3 ,CM_RGAM_RAMB_EXP_REGION3_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_2_3 ,CM_RGAM_RAMB_EXP_REGION3_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_4_5 ,CM_RGAM_RAMB_EXP_REGION4_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_4_5 ,CM_RGAM_RAMB_EXP_REGION4_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_4_5 ,CM_RGAM_RAMB_EXP_REGION5_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_4_5 ,CM_RGAM_RAMB_EXP_REGION5_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_6_7 ,CM_RGAM_RAMB_EXP_REGION6_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_6_7 ,CM_RGAM_RAMB_EXP_REGION6_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_6_7 ,CM_RGAM_RAMB_EXP_REGION7_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_6_7 ,CM_RGAM_RAMB_EXP_REGION7_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_8_9 ,CM_RGAM_RAMB_EXP_REGION8_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_8_9 ,CM_RGAM_RAMB_EXP_REGION8_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_8_9 ,CM_RGAM_RAMB_EXP_REGION9_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_8_9 ,CM_RGAM_RAMB_EXP_REGION9_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_10_11 ,CM_RGAM_RAMB_EXP_REGION10_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_10_11 ,CM_RGAM_RAMB_EXP_REGION10_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_10_11 ,CM_RGAM_RAMB_EXP_REGION11_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_10_11 ,CM_RGAM_RAMB_EXP_REGION11_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_12_13 ,CM_RGAM_RAMB_EXP_REGION12_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_12_13 ,CM_RGAM_RAMB_EXP_REGION12_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_12_13 ,CM_RGAM_RAMB_EXP_REGION13_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_12_13 ,CM_RGAM_RAMB_EXP_REGION13_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_14_15 ,CM_RGAM_RAMB_EXP_REGION14_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_14_15 ,CM_RGAM_RAMB_EXP_REGION14_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_14_15 ,CM_RGAM_RAMB_EXP_REGION15_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_14_15 ,CM_RGAM_RAMB_EXP_REGION15_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_16_17 ,CM_RGAM_RAMB_EXP_REGION16_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_16_17 ,CM_RGAM_RAMB_EXP_REGION16_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_16_17 ,CM_RGAM_RAMB_EXP_REGION17_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_16_17 ,CM_RGAM_RAMB_EXP_REGION17_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_18_19 ,CM_RGAM_RAMB_EXP_REGION18_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_18_19 ,CM_RGAM_RAMB_EXP_REGION18_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_18_19 ,CM_RGAM_RAMB_EXP_REGION19_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_18_19 ,CM_RGAM_RAMB_EXP_REGION19_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_20_21 ,CM_RGAM_RAMB_EXP_REGION20_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_20_21 ,CM_RGAM_RAMB_EXP_REGION20_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_20_21 ,CM_RGAM_RAMB_EXP_REGION21_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_20_21 ,CM_RGAM_RAMB_EXP_REGION21_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_22_23 ,CM_RGAM_RAMB_EXP_REGION22_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_22_23 ,CM_RGAM_RAMB_EXP_REGION22_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_22_23 ,CM_RGAM_RAMB_EXP_REGION23_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_22_23 ,CM_RGAM_RAMB_EXP_REGION23_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_24_25 ,CM_RGAM_RAMB_EXP_REGION24_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_24_25 ,CM_RGAM_RAMB_EXP_REGION24_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_24_25 ,CM_RGAM_RAMB_EXP_REGION25_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_24_25 ,CM_RGAM_RAMB_EXP_REGION25_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_26_27 ,CM_RGAM_RAMB_EXP_REGION26_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_26_27 ,CM_RGAM_RAMB_EXP_REGION26_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_26_27 ,CM_RGAM_RAMB_EXP_REGION27_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_26_27 ,CM_RGAM_RAMB_EXP_REGION27_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_28_29 ,CM_RGAM_RAMB_EXP_REGION28_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_28_29 ,CM_RGAM_RAMB_EXP_REGION28_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_28_29 ,CM_RGAM_RAMB_EXP_REGION29_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_28_29 ,CM_RGAM_RAMB_EXP_REGION29_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_30_31 ,CM_RGAM_RAMB_EXP_REGION30_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_30_31 ,CM_RGAM_RAMB_EXP_REGION30_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_30_31 ,CM_RGAM_RAMB_EXP_REGION31_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMB_REGION_30_31 ,CM_RGAM_RAMB_EXP_REGION31_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_RGAM_RAMB_REGION_32_33 ,CM_RGAM_RAMB_EXP_REGION32_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_RGAM_RAMB_REGION_32_33 ,CM_RGAM_RAMB_EXP_REGION32_NUM_SEGMENTS , mask_sh), \ TF_SF(CM0_CM_RGAM_RAMB_REGION_32_33, CM_RGAM_RAMB_EXP_REGION33_LUT_OFFSET, mask_sh), \
@@ -587,66 +437,6 @@TF_SF (CM0_CM_RGAM_RAMA_REGION_0_1 ,CM_RGAM_RAMA_EXP_REGION0_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_RGAM_RAMA_REGION_0_1 ,CM_RGAM_RAMA_EXP_REGION1_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_RGAM_RAMA_REGION_0_1 ,CM_RGAM_RAMA_EXP_REGION1_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_2_3 ,CM_RGAM_RAMA_EXP_REGION2_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_2_3 ,CM_RGAM_RAMA_EXP_REGION2_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_2_3 ,CM_RGAM_RAMA_EXP_REGION3_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_2_3 ,CM_RGAM_RAMA_EXP_REGION3_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_4_5 ,CM_RGAM_RAMA_EXP_REGION4_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_4_5 ,CM_RGAM_RAMA_EXP_REGION4_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_4_5 ,CM_RGAM_RAMA_EXP_REGION5_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_4_5 ,CM_RGAM_RAMA_EXP_REGION5_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_6_7 ,CM_RGAM_RAMA_EXP_REGION6_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_6_7 ,CM_RGAM_RAMA_EXP_REGION6_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_6_7 ,CM_RGAM_RAMA_EXP_REGION7_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_6_7 ,CM_RGAM_RAMA_EXP_REGION7_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_8_9 ,CM_RGAM_RAMA_EXP_REGION8_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_8_9 ,CM_RGAM_RAMA_EXP_REGION8_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_8_9 ,CM_RGAM_RAMA_EXP_REGION9_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_8_9 ,CM_RGAM_RAMA_EXP_REGION9_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_10_11 ,CM_RGAM_RAMA_EXP_REGION10_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_10_11 ,CM_RGAM_RAMA_EXP_REGION10_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_10_11 ,CM_RGAM_RAMA_EXP_REGION11_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_10_11 ,CM_RGAM_RAMA_EXP_REGION11_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_12_13 ,CM_RGAM_RAMA_EXP_REGION12_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_12_13 ,CM_RGAM_RAMA_EXP_REGION12_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_12_13 ,CM_RGAM_RAMA_EXP_REGION13_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_12_13 ,CM_RGAM_RAMA_EXP_REGION13_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_14_15 ,CM_RGAM_RAMA_EXP_REGION14_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_14_15 ,CM_RGAM_RAMA_EXP_REGION14_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_14_15 ,CM_RGAM_RAMA_EXP_REGION15_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_14_15 ,CM_RGAM_RAMA_EXP_REGION15_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_16_17 ,CM_RGAM_RAMA_EXP_REGION16_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_16_17 ,CM_RGAM_RAMA_EXP_REGION16_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_16_17 ,CM_RGAM_RAMA_EXP_REGION17_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_16_17 ,CM_RGAM_RAMA_EXP_REGION17_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_18_19 ,CM_RGAM_RAMA_EXP_REGION18_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_18_19 ,CM_RGAM_RAMA_EXP_REGION18_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_18_19 ,CM_RGAM_RAMA_EXP_REGION19_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_18_19 ,CM_RGAM_RAMA_EXP_REGION19_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_20_21 ,CM_RGAM_RAMA_EXP_REGION20_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_20_21 ,CM_RGAM_RAMA_EXP_REGION20_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_20_21 ,CM_RGAM_RAMA_EXP_REGION21_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_20_21 ,CM_RGAM_RAMA_EXP_REGION21_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_22_23 ,CM_RGAM_RAMA_EXP_REGION22_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_22_23 ,CM_RGAM_RAMA_EXP_REGION22_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_22_23 ,CM_RGAM_RAMA_EXP_REGION23_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_22_23 ,CM_RGAM_RAMA_EXP_REGION23_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_24_25 ,CM_RGAM_RAMA_EXP_REGION24_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_24_25 ,CM_RGAM_RAMA_EXP_REGION24_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_24_25 ,CM_RGAM_RAMA_EXP_REGION25_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_24_25 ,CM_RGAM_RAMA_EXP_REGION25_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_26_27 ,CM_RGAM_RAMA_EXP_REGION26_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_26_27 ,CM_RGAM_RAMA_EXP_REGION26_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_26_27 ,CM_RGAM_RAMA_EXP_REGION27_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_26_27 ,CM_RGAM_RAMA_EXP_REGION27_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_28_29 ,CM_RGAM_RAMA_EXP_REGION28_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_28_29 ,CM_RGAM_RAMA_EXP_REGION28_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_28_29 ,CM_RGAM_RAMA_EXP_REGION29_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_28_29 ,CM_RGAM_RAMA_EXP_REGION29_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_30_31 ,CM_RGAM_RAMA_EXP_REGION30_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_30_31 ,CM_RGAM_RAMA_EXP_REGION30_NUM_SEGMENTS , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_30_31 ,CM_RGAM_RAMA_EXP_REGION31_LUT_OFFSET , mask_sh), \ -TF_SF (CM0_CM_RGAM_RAMA_REGION_30_31 ,CM_RGAM_RAMA_EXP_REGION31_NUM_SEGMENTS , mask_sh), \TF_SF (CM0_CM_RGAM_RAMA_REGION_32_33 ,CM_RGAM_RAMA_EXP_REGION32_LUT_OFFSET , mask_sh), \TF_SF (CM0_CM_RGAM_RAMA_REGION_32_33 ,CM_RGAM_RAMA_EXP_REGION32_NUM_SEGMENTS , mask_sh), \ TF_SF(CM0_CM_RGAM_RAMA_REGION_32_33, CM_RGAM_RAMA_EXP_REGION33_LUT_OFFSET, mask_sh), \
@@ -816,66 +606,6 @@type CM_RGAM_RAMB_EXP_REGION0_NUM_SEGMENTS ; \type CM_RGAM_RAMB_EXP_REGION1_LUT_OFFSET ; \type CM_RGAM_RAMB_EXP_REGION1_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION2_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION2_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION3_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION3_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION4_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION4_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION5_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION5_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION6_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION6_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION7_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION7_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION8_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION8_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION9_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION9_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION10_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION10_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION11_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION11_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION12_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION12_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION13_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION13_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION14_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION14_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION15_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION15_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION16_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION16_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION17_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION17_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION18_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION18_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION19_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION19_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION20_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION20_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION21_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION21_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION22_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION22_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION23_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION23_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION24_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION24_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION25_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION25_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION26_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION26_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION27_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION27_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION28_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION28_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION29_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION29_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION30_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION30_NUM_SEGMENTS ; \ -type CM_RGAM_RAMB_EXP_REGION31_LUT_OFFSET ; \ -type CM_RGAM_RAMB_EXP_REGION31_NUM_SEGMENTS ; \type CM_RGAM_RAMB_EXP_REGION32_LUT_OFFSET ; \type CM_RGAM_RAMB_EXP_REGION32_NUM_SEGMENTS ; \type CM_RGAM_RAMB_EXP_REGION33_LUT_OFFSET ; \
@@ -902,66 +632,6 @@type CM_RGAM_RAMA_EXP_REGION0_NUM_SEGMENTS ; \type CM_RGAM_RAMA_EXP_REGION1_LUT_OFFSET ; \type CM_RGAM_RAMA_EXP_REGION1_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION2_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION2_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION3_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION3_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION4_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION4_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION5_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION5_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION6_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION6_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION7_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION7_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION8_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION8_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION9_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION9_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION10_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION10_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION11_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION11_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION12_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION12_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION13_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION13_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION14_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION14_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION15_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION15_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION16_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION16_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION17_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION17_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION18_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION18_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION19_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION19_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION20_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION20_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION21_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION21_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION22_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION22_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION23_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION23_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION24_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION24_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION25_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION25_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION26_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION26_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION27_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION27_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION28_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION28_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION29_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION29_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION30_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION30_NUM_SEGMENTS ; \ -type CM_RGAM_RAMA_EXP_REGION31_LUT_OFFSET ; \ -type CM_RGAM_RAMA_EXP_REGION31_NUM_SEGMENTS ; \type CM_RGAM_RAMA_EXP_REGION32_LUT_OFFSET ; \type CM_RGAM_RAMA_EXP_REGION32_NUM_SEGMENTS ; \type CM_RGAM_RAMA_EXP_REGION33_LUT_OFFSET ; \
@@ -1370,30 +1040,6 @@type CM_DGAM_RAMB_EXP_REGION0_NUM_SEGMENTS ; \type CM_DGAM_RAMB_EXP_REGION1_LUT_OFFSET ; \type CM_DGAM_RAMB_EXP_REGION1_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION2_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION2_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION3_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION3_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION4_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION4_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION5_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION5_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION6_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION6_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION7_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION7_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION8_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION8_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION9_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION9_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION10_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION10_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION11_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION11_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION12_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION12_NUM_SEGMENTS ; \ -type CM_DGAM_RAMB_EXP_REGION13_LUT_OFFSET ; \ -type CM_DGAM_RAMB_EXP_REGION13_NUM_SEGMENTS ; \type CM_DGAM_RAMB_EXP_REGION14_LUT_OFFSET ; \type CM_DGAM_RAMB_EXP_REGION14_NUM_SEGMENTS ; \type CM_DGAM_RAMB_EXP_REGION15_LUT_OFFSET ; \
@@ -1420,30 +1066,6 @@type CM_DGAM_RAMA_EXP_REGION0_NUM_SEGMENTS ; \type CM_DGAM_RAMA_EXP_REGION1_LUT_OFFSET ; \type CM_DGAM_RAMA_EXP_REGION1_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION2_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION2_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION3_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION3_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION4_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION4_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION5_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION5_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION6_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION6_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION7_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION7_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION8_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION8_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION9_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION9_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION10_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION10_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION11_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION11_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION12_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION12_NUM_SEGMENTS ; \ -type CM_DGAM_RAMA_EXP_REGION13_LUT_OFFSET ; \ -type CM_DGAM_RAMA_EXP_REGION13_NUM_SEGMENTS ; \type CM_DGAM_RAMA_EXP_REGION14_LUT_OFFSET ; \type CM_DGAM_RAMA_EXP_REGION14_NUM_SEGMENTS ; \type CM_DGAM_RAMA_EXP_REGION15_LUT_OFFSET ; \
@@ -1565,21 +1187,6 @@ struct dcn_dpp_registers {uint32_t CM_RGAM_RAMB_END_CNTL1_R ;uint32_t CM_RGAM_RAMB_END_CNTL2_R ;uint32_t CM_RGAM_RAMB_REGION_0_1 ; -uint32_t CM_RGAM_RAMB_REGION_2_3 ; -uint32_t CM_RGAM_RAMB_REGION_4_5 ; -uint32_t CM_RGAM_RAMB_REGION_6_7 ; -uint32_t CM_RGAM_RAMB_REGION_8_9 ; -uint32_t CM_RGAM_RAMB_REGION_10_11 ; -uint32_t CM_RGAM_RAMB_REGION_12_13 ; -uint32_t CM_RGAM_RAMB_REGION_14_15 ; -uint32_t CM_RGAM_RAMB_REGION_16_17 ; -uint32_t CM_RGAM_RAMB_REGION_18_19 ; -uint32_t CM_RGAM_RAMB_REGION_20_21 ; -uint32_t CM_RGAM_RAMB_REGION_22_23 ; -uint32_t CM_RGAM_RAMB_REGION_24_25 ; -uint32_t CM_RGAM_RAMB_REGION_26_27 ; -uint32_t CM_RGAM_RAMB_REGION_28_29 ; -uint32_t CM_RGAM_RAMB_REGION_30_31 ;uint32_t CM_RGAM_RAMB_REGION_32_33 ;uint32_t CM_RGAM_RAMA_START_CNTL_B ;uint32_t CM_RGAM_RAMA_START_CNTL_G ;
@@ -1594,21 +1201,6 @@ struct dcn_dpp_registers {uint32_t CM_RGAM_RAMA_END_CNTL1_R ;uint32_t CM_RGAM_RAMA_END_CNTL2_R ;uint32_t CM_RGAM_RAMA_REGION_0_1 ; -uint32_t CM_RGAM_RAMA_REGION_2_3 ; -uint32_t CM_RGAM_RAMA_REGION_4_5 ; -uint32_t CM_RGAM_RAMA_REGION_6_7 ; -uint32_t CM_RGAM_RAMA_REGION_8_9 ; -uint32_t CM_RGAM_RAMA_REGION_10_11 ; -uint32_t CM_RGAM_RAMA_REGION_12_13 ; -uint32_t CM_RGAM_RAMA_REGION_14_15 ; -uint32_t CM_RGAM_RAMA_REGION_16_17 ; -uint32_t CM_RGAM_RAMA_REGION_18_19 ; -uint32_t CM_RGAM_RAMA_REGION_20_21 ; -uint32_t CM_RGAM_RAMA_REGION_22_23 ; -uint32_t CM_RGAM_RAMA_REGION_24_25 ; -uint32_t CM_RGAM_RAMA_REGION_26_27 ; -uint32_t CM_RGAM_RAMA_REGION_28_29 ; -uint32_t CM_RGAM_RAMA_REGION_30_31 ;uint32_t CM_RGAM_RAMA_REGION_32_33 ;uint32_t CM_RGAM_CONTROL ;uint32_t OBUF_CONTROL ;
@@ -1743,12 +1335,6 @@ struct dcn_dpp_registers {uint32_t CM_DGAM_RAMB_END_CNTL1_R ;uint32_t CM_DGAM_RAMB_END_CNTL2_R ;uint32_t CM_DGAM_RAMB_REGION_0_1 ; -uint32_t CM_DGAM_RAMB_REGION_2_3 ; -uint32_t CM_DGAM_RAMB_REGION_4_5 ; -uint32_t CM_DGAM_RAMB_REGION_6_7 ; -uint32_t CM_DGAM_RAMB_REGION_8_9 ; -uint32_t CM_DGAM_RAMB_REGION_10_11 ; -uint32_t CM_DGAM_RAMB_REGION_12_13 ;uint32_t CM_DGAM_RAMB_REGION_14_15 ;uint32_t CM_DGAM_RAMA_START_CNTL_B ;uint32_t CM_DGAM_RAMA_START_CNTL_G ;
@@ -1763,12 +1349,6 @@ struct dcn_dpp_registers {uint32_t CM_DGAM_RAMA_END_CNTL1_R ;uint32_t CM_DGAM_RAMA_END_CNTL2_R ;uint32_t CM_DGAM_RAMA_REGION_0_1 ; -uint32_t CM_DGAM_RAMA_REGION_2_3 ; -uint32_t CM_DGAM_RAMA_REGION_4_5 ; -uint32_t CM_DGAM_RAMA_REGION_6_7 ; -uint32_t CM_DGAM_RAMA_REGION_8_9 ; -uint32_t CM_DGAM_RAMA_REGION_10_11 ; -uint32_t CM_DGAM_RAMA_REGION_12_13 ;uint32_t CM_DGAM_RAMA_REGION_14_15 ;uint32_t CM_DGAM_LUT_WRITE_EN_MASK ;uint32_t CM_DGAM_LUT_INDEX ;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +140 -488
683 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 68/77 drm/amd/display: not override the FMT setting set by VBIOS for eDP
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +5 -2
@@ -1082,11 +1082,14 @@ static enum dc_status apply_single_controller_ctx_to_hw(/*vbios crtc_source_selection and encoder_setup will override fmt_C*/ - pipe_ctx->stream_res.opp->funcs->opp_program_fmt ( +if (pipe_ctx->stream->signal !=SIGNAL_TYPE_EDP && + pipe_ctx->stream->signal !=SIGNAL_TYPE_LVDS ) { +/*for embedded panel, don't override VBIOS's setting*/ + pipe_ctx->stream_res.opp->funcs->opp_program_fmt ( pipe_ctx->stream_res.opp, &stream->bit_depth_params, &stream->clamping); - + }if (dc_is_dp_signal (pipe_ctx->stream->signal)) pipe_ctx->stream_res.stream_enc->funcs->dp_set_stream_attribute( pipe_ctx->stream_res.stream_enc,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 69/77 drm/amd/display: add backlight control in blankstream.
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +7 -2
@@ -778,9 +778,11 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)/* blank at encoder level */ -if (dc_is_dp_signal (pipe_ctx->stream->signal)) +if (dc_is_dp_signal (pipe_ctx->stream->signal)) { +if (pipe_ctx->stream->sink->link->connector_signal ==SIGNAL_TYPE_EDP ) + link->link_enc->funcs->backlight_control (link->link_enc, false); pipe_ctx->stream_res.stream_enc->funcs->dp_blank (pipe_ctx->stream_res.stream_enc); - + } link->link_enc->funcs->connect_dig_be_to_fe( link->link_enc, pipe_ctx->stream_res.stream_enc->id,
@@ -792,12 +794,15 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx, struct dc_link_settings *link_settings) {struct encoder_unblank_param params = { {0 } }; +struct dc_link *link = pipe_ctx->stream->sink->link;/* only 3 items below are used by unblank */ params.pixel_clk_khz = pipe_ctx->stream->timing.pix_clk_khz; params.link_settings.link_rate = link_settings->link_rate; pipe_ctx->stream_res.stream_enc->funcs->dp_unblank (pipe_ctx->stream_res.stream_enc, ¶ms); +if (link->connector_signal ==SIGNAL_TYPE_EDP ) + link->link_enc->funcs->backlight_control (link->link_enc, true); }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 70/77 drm/amd/display: program fbc for scatter/gather
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Fixing screen flickering when FBC enabled on Stoney
--- .../gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +16 -2
@@ -189,7 +189,7 @@ void dce110_compressor_enable_fbc( (!dce110_compressor_is_fbc_enabled_in_hw(compressor, NULL))) {uint32_t addr; -uint32_t value; +uint32_t value, misc_value; addr = mmFBC_CNTL;
@@ -206,9 +206,23 @@ void dce110_compressor_enable_fbc( compressor->attached_inst = params->inst; cp110->offsets = reg_offsets[params->inst]; -/*Toggle it as there is bug in HW */ +/* Toggle it as there is bug in HW */ set_reg_field_value (value,0 ,FBC_CNTL ,FBC_GRPH_COMP_EN );dm_write_reg (compressor->ctx, addr, value); + +/* FBC usage with scatter & gather for dce110 */ + misc_value =dm_read_reg (compressor->ctx, mmFBC_MISC); + +set_reg_field_value (misc_value,1 , +FBC_MISC ,FBC_INVALIDATE_ON_ERROR ); +set_reg_field_value (misc_value,1 , +FBC_MISC ,FBC_DECOMPRESS_ERROR_CLEAR ); +set_reg_field_value (misc_value,0x14 , +FBC_MISC ,FBC_SLOW_REQ_INTERVAL ); + +dm_write_reg (compressor->ctx, mmFBC_MISC, misc_value); + +/* Enable FBC */ set_reg_field_value (value,1 ,FBC_CNTL ,FBC_GRPH_COMP_EN );dm_write_reg (compressor->ctx, addr, value);
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 71/77 drm/amd/display: Program reg for vertical interrupt.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 4 ++++ 2 files changed, 14 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +10 -0
@@ -118,6 +118,7 @@ static void tgn10_program_timing(uint32_t start_point =0 ;uint32_t field_num =0 ;uint32_t h_div_2; +uint32_t vertial_line_start;struct dcn10_timing_generator *tgn10 =DCN10TG_FROM_TG (tg);
@@ -212,6 +213,12 @@ static void tgn10_program_timing(OTG_V_BLANK_START , asic_blank_start, OTG_V_BLANK_END, asic_blank_end); +/* Use OTG_VERTICAL_INTERRUPT2 replace VUPDATE interrupt, +* program the reg for interrupt postition. +*/ + vertial_line_start = asic_blank_end - tg->dlg_otg_param.vstartup_start +1 ; +REG_SET (OTG_VERTICAL_INTERRUPT2_POSITION ,0 , +OTG_VERTICAL_INTERRUPT2_LINE_START , vertial_line_start);/* v_sync polarity */ v_sync_polarity = patched_crtc_timing.flags.VSYNC_POSITIVE_POLARITY ?
@@ -289,6 +296,9 @@ static void tgn10_unblank_crtc(struct timing_generator *tg) {struct dcn10_timing_generator *tgn10 =DCN10TG_FROM_TG (tg); +REG_UPDATE (OTG_DOUBLE_BUFFER_CONTROL , +OTG_BLANK_DATA_DOUBLE_BUFFER_EN ,1 ); +REG_UPDATE_2 (OTG_BLANK_CONTROL ,OTG_BLANK_DATA_EN ,0 ,OTG_BLANK_DE_MODE ,0 );
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h +4 -0
@@ -65,6 +65,7 @@SRI (OTG_NOM_VERT_POSITION ,OTG , inst),\SRI (OTG_BLACK_COLOR ,OTG , inst),\SRI (OTG_CLOCK_CONTROL ,OTG , inst),\ +SRI (OTG_VERTICAL_INTERRUPT2_POSITION ,OTG , inst),\SRI (OPTC_INPUT_CLOCK_CONTROL ,ODM , inst),\SRI (OPTC_DATA_SOURCE_SELECT ,ODM , inst),\ SRI(OPTC_INPUT_GLOBAL_CONTROL, ODM, inst),\
@@ -120,6 +121,7 @@ struct dcn_tg_registers {uint32_t OTG_TEST_PATTERN_CONTROL ;uint32_t OTG_TEST_PATTERN_COLOR ;uint32_t OTG_CLOCK_CONTROL ; +uint32_t OTG_VERTICAL_INTERRUPT2_POSITION ;uint32_t OPTC_INPUT_CLOCK_CONTROL ;uint32_t OPTC_DATA_SOURCE_SELECT ;uint32_t OPTC_INPUT_GLOBAL_CONTROL ;
@@ -203,6 +205,7 @@ struct dcn_tg_registers {SF (OTG0_OTG_CLOCK_CONTROL ,OTG_CLOCK_EN , mask_sh),\SF (OTG0_OTG_CLOCK_CONTROL ,OTG_CLOCK_ON , mask_sh),\SF (OTG0_OTG_CLOCK_CONTROL ,OTG_CLOCK_GATE_DIS , mask_sh),\ +SF (OTG0_OTG_VERTICAL_INTERRUPT2_POSITION ,OTG_VERTICAL_INTERRUPT2_LINE_START , mask_sh),\SF (ODM0_OPTC_INPUT_CLOCK_CONTROL ,OPTC_INPUT_CLK_EN , mask_sh),\SF (ODM0_OPTC_INPUT_CLOCK_CONTROL ,OPTC_INPUT_CLK_ON , mask_sh),\ SF(ODM0_OPTC_INPUT_CLOCK_CONTROL, OPTC_INPUT_CLK_GATE_DIS, mask_sh),\
@@ -308,6 +311,7 @@ struct dcn_tg_registers {type OTG_CLOCK_EN ;\type OTG_CLOCK_ON ;\type OTG_CLOCK_GATE_DIS ;\ +type OTG_VERTICAL_INTERRUPT2_LINE_START ;\type OPTC_INPUT_CLK_EN ;\type OPTC_INPUT_CLK_ON ;\type OPTC_INPUT_CLK_GATE_DIS ;\
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 72/77 drm/amd/display: Disable OTG double buffer.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +0 -3
@@ -296,9 +296,6 @@ static void tgn10_unblank_crtc(struct timing_generator *tg) {struct dcn10_timing_generator *tgn10 =DCN10TG_FROM_TG (tg); -REG_UPDATE (OTG_DOUBLE_BUFFER_CONTROL , -OTG_BLANK_DATA_DOUBLE_BUFFER_EN ,1 ); -REG_UPDATE_2 (OTG_BLANK_CONTROL ,OTG_BLANK_DATA_EN ,0 ,OTG_BLANK_DE_MODE ,0 );
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 73/77 drm/amd/display: Set add_stream_ctx for CZ, Hawaii and others
In reply to a message not in the archive--- .../gpu/drm/amd/display/dc/dce100/dce100_resource.c | 19 +++++++++++++++++++ .../gpu/drm/amd/display/dc/dce100/dce100_resource.h | 5 +++++ .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 20 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 + 4 files changed, 45 insertions(+)
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +19 -0
@@ -713,6 +713,24 @@ enum dc_status dce100_validate_global(return DC_OK ; } +enum dc_status dce100_add_stream_to_ctx ( +struct dc *dc, +struct dc_state *new_ctx, +struct dc_stream_state *dc_stream) +{ +enum dc_status result =DC_ERROR_UNEXPECTED ; + + result =resource_map_pool_resources (dc, new_ctx, dc_stream); + +if (result ==DC_OK ) + result =resource_map_clock_resources (dc, new_ctx, dc_stream); + +if (result ==DC_OK ) + result =build_mapped_resource (dc, new_ctx, dc_stream); + +return result; +} + enum dc_status dce100_validate_guaranteed( struct dc *dc, struct dc_stream_state *dc_stream,
@@ -769,6 +787,7 @@ static const struct resource_funcs dce100_res_pool_funcs = { .validate_guaranteed = dce100_validate_guaranteed, .validate_bandwidth = dce100_validate_bandwidth, .validate_plane = dce100_validate_plane, + .add_stream_to_ctx = dce100_add_stream_to_ctx, .validate_global = dce100_validate_global };
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h +5 -0
@@ -18,4 +18,9 @@ struct resource_pool *dce100_create_resource_pool(enum dc_status dce100_validate_plane (const struct dc_plane_state *plane_state); +enum dc_status dce100_add_stream_to_ctx ( +struct dc *dc, +struct dc_state *new_ctx, +struct dc_stream_state *dc_stream); +#endif /* DCE100_RESOURCE_H_ */
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +20 -0
@@ -921,6 +921,25 @@ enum dc_status dce110_validate_global(return DC_OK ; } +static enum dc_status dce110_add_stream_to_ctx ( +struct dc *dc, +struct dc_state *new_ctx, +struct dc_stream_state *dc_stream) +{ +enum dc_status result =DC_ERROR_UNEXPECTED ; + + result =resource_map_pool_resources (dc, new_ctx, dc_stream); + +if (result ==DC_OK ) + result =resource_map_clock_resources (dc, new_ctx, dc_stream); + + +if (result ==DC_OK ) + result =build_mapped_resource (dc, new_ctx, dc_stream); + +return result; +} + static enum dc_status dce110_validate_guaranteed( struct dc *dc, struct dc_stream_state *dc_stream,
@@ -1030,6 +1049,7 @@ static const struct resource_funcs dce110_res_pool_funcs = { .validate_guaranteed = dce110_validate_guaranteed, .validate_bandwidth = dce110_validate_bandwidth, .acquire_idle_pipe_for_layer = dce110_acquire_underlay, + .add_stream_to_ctx = dce110_add_stream_to_ctx, .validate_global = dce110_validate_global };
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +1 -0
@@ -791,6 +791,7 @@ static const struct resource_funcs dce80_res_pool_funcs = { .validate_guaranteed = dce80_validate_guaranteed, .validate_bandwidth = dce80_validate_bandwidth, .validate_plane = dce100_validate_plane, + .add_stream_to_ctx = dce100_add_stream_to_ctx, .validate_global = dce80_validate_global };
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 74/77 drm/amd/display: Restore missing DCE8 xfm regs
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_transform.h +10 -0
@@ -94,6 +94,10 @@SRI (SCL_UPDATE ,SCL , id), \ SRI(SCL_F_SHARP_CONTROL, SCL, id) +#define XFM_COMMON_REG_LIST_DCE80 (id) \ + XFM_COMMON_REG_LIST_DCE_BASE(id), \ + SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id) +#define XFM_COMMON_REG_LIST_DCE100 (id) \ XFM_COMMON_REG_LIST_DCE_BASE(id), \ SRI(DCFE_MEM_PWR_CTRL, CRTC, id), \
@@ -185,6 +189,12 @@XFM_SF (SCL_UPDATE ,SCL_COEF_UPDATE_COMPLETE , mask_sh), \ XFM_SF(LB_DATA_FORMAT, ALPHA_EN, mask_sh) +#define XFM_COMMON_MASK_SH_LIST_DCE80 (mask_sh) \ + XFM_COMMON_MASK_SH_LIST_DCE_COMMON_BASE(mask_sh), \ + OPP_SF(DCFE_MEM_LIGHT_SLEEP_CNTL, REGAMMA_LUT_LIGHT_SLEEP_DIS, mask_sh),\ + OPP_SF(DCFE_MEM_LIGHT_SLEEP_CNTL, DCP_LUT_LIGHT_SLEEP_DIS, mask_sh),\ + OPP_SF(DCFE_MEM_LIGHT_SLEEP_CNTL, REGAMMA_LUT_MEM_PWR_STATE, mask_sh) +#define XFM_COMMON_MASK_SH_LIST_DCE110 (mask_sh) \ XFM_COMMON_MASK_SH_LIST_DCE_COMMON_BASE(mask_sh), \ XFM_SF(DCFE_MEM_PWR_CTRL, SCL_COEFF_MEM_PWR_DIS, mask_sh), \
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +3 -3
@@ -187,7 +187,7 @@ static const struct dce_ipp_mask ipp_mask = {#define transform_regs (id)\ [id] = {\ - XFM_COMMON_REG_LIST_DCE_BASE(id)\ + XFM_COMMON_REG_LIST_DCE80(id)\ }static const struct dce_transform_registers xfm_regs[] = {
@@ -200,11 +200,11 @@ static const struct dce_transform_registers xfm_regs[] = { };static const struct dce_transform_shift xfm_shift = { -XFM_COMMON_MASK_SH_LIST_DCE_COMMON_BASE (__SHIFT) +XFM_COMMON_MASK_SH_LIST_DCE80 (__SHIFT) };static const struct dce_transform_mask xfm_mask = { -XFM_COMMON_MASK_SH_LIST_DCE_COMMON_BASE (_MASK) +XFM_COMMON_MASK_SH_LIST_DCE80 (_MASK) };#define aux_regs (id)\
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 75/77 drm/amd/display: Don't spam log with failed validation
In reply to a message not in the archiveIn a lot of case we fail validation of timings for legitimate reasons. No need to print an error.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -5
@@ -2711,7 +2711,6 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,bool dc_validate_stream (struct dc *dc,struct dc_stream_state *stream) {struct dc *core_dc = dc; -struct dc_context *dc_ctx = core_dc->ctx;struct dc_link *link = stream->sink->link;struct timing_generator *tg = core_dc->res_pool->timing_generators[0 ];enum dc_status res =DC_OK ;
@@ -2733,10 +2732,6 @@ bool dc_validate_stream(struct dc *dc, struct dc_stream_state *stream) link, &stream->timing); -if (res !=DC_OK ) -DC_ERROR ("Failed validation for stream %p, err:%d, !\n" , - stream, res); -return res ==DC_OK ; }
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 76/77 drm/amd/display: delete dead code
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +3 -3
@@ -1312,8 +1312,9 @@ void dcn_bw_notify_pplib_of_wm_ranges(struct dc *dc) {struct pp_smu_funcs_rv *pp = dc->res_pool->pp_smu;struct pp_smu_wm_range_sets ranges = {0 }; -int max_fclk_khz, nom_fclk_khz, min_fclk_khz, max_dcfclk_khz, - nom_dcfclk_khz, mid_fclk_khz, min_dcfclk_khz, socclk_khz; +int max_fclk_khz, nom_fclk_khz, mid_fclk_khz, min_fclk_khz; +int max_dcfclk_khz, min_dcfclk_khz; +int socclk_khz;const int overdrive =5000000 ;/* 5 GHz to cover Overdrive */ unsigned factor = (ddr4_dram_factor_single_Channel * dc->dcn_soc->number_of_channels);
@@ -1326,7 +1327,6 @@ void dcn_bw_notify_pplib_of_wm_ranges(struct dc *dc) mid_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmid0p72 *1000000 / factor; min_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 *1000000 /32 ; max_dcfclk_khz = dc->dcn_soc->dcfclkv_max0p9 *1000 ; - nom_dcfclk_khz = dc->dcn_soc->dcfclkv_nom0p8 *1000 ; min_dcfclk_khz = dc->dcn_soc->dcfclkv_min0p65 *1000 ; socclk_khz = dc->dcn_soc->socclk *1000 ;kernel_fpu_end ();
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx