DC Patches Jan 31, 2018
Subsystems (3)
cover DC Patches Jan 31, 2018
* Fix non-native modes on DVI
* Whole bunch of Raven fixes all over
* Cleanup for CRC stuff
Charlene Liu (5):
drm/amd/display: BL setting save/restore drm/amd/display: wait for T9 after backlight off mainlink blank. drm/amd/display: add eDP 1.2+ polling for T7 drm/amd/display: resume from S3 bypass power down HW block. drm/amd/display: enable #PME code path for RV.
Eric Bernstein (1):
drm/amd/display: Expose is_rgb_cspace function in hw_sequencer
Eric Yang (3):
drm/amd/display: fix cursor related Pstate hang drm/amd/display: remove unused function prototypes drm/amd/display: turn off cursor when disconnect plane
Harry Wentland (1):
drm/amd/display: Adding missing TMZ sh/mask entries for DCN1
SURFACE_CONTROL
Jerry (Fangzhi) Zuo (1):
drm/amd/display: Fixed non-native modes not lighting up
John Barberiz (2):
drm/amd/display: Bypass gamma set if not standard type drm/amd/display: Fixed if statement parameters to add a delay on
disconnect
Ken Chalmers (1):
drm/amd/display: WBSCL filter init calculation fixes
Krunoslav Kovac (1):
drm/amd/display: Optimize regamma calculations
Leo (Sunpeng) Li (1):
drm/amd/display: Fix multiple definitions of handle_crc_irq
Martin Tsai (1):
drm/amd/display: Remove return when no EDID read.
Mikita Lipski (1):
drm/amd/display: Set irq state only on existing crtcs
Nikola Cornij (1):
drm/amd/display: Remove couple of unused OPTC registers
Roman Li (1):
drm/amd/display: fix boot-up on vega10
Tony Cheng (3):
drm/amd/display: dal 3.1.30
drm/amd/display: dal 3.1.31
drm/amd/display: dal 3.1.32
Yongqiang Sun (4):
drm/amd/display: Check hubp in pipe_ctx not in res_pool. drm/amd/display: Null check for gamma correction. drm/amd/display: Add return value for detect dp. drm/amd/display: Add primary tmz_c and meta tmz tmz_c.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 6 +- drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 ++ drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 7 ++ .../drm/amd/display/dc/bios/bios_parser_helper.c | 8 ++ .../drm/amd/display/dc/bios/bios_parser_helper.h | 1 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 26 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 24 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 25 +++- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 68 +--------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 3 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 + drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 9 ++ .../drm/amd/display/dc/dce/dce_stream_encoder.c | 6 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 137 +++++++++++++-------- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 6 - .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 39 +++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 22 +++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 10 ++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 54 +++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 8 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 2 +- .../drm/amd/display/dc/inc/hw/timing_generator.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 + drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 2 + drivers/gpu/drm/amd/display/include/fixed31_32.h | 3 + .../drm/amd/include/asic_reg/dcn/dcn_1_0_sh_mask.h | 14 +++ 34 files changed, 325 insertions(+), 184 deletions(-)
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180131155926.11161-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 1/27 drm/amd/display: Adding missing TMZ sh/mask entries for DCN1 SURFACE_CONTROL
--- drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_1_0_sh_mask.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_1_0_sh_mask.h +14 -0
@@ -9364,17 +9364,31 @@#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_TMZ__SHIFT 0x0#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_EN__SHIFT 0x1#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_IND_64B_BLK__SHIFT 0x2 +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_TMZ_C__SHIFT 0x4#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_IND_64B_BLK_C__SHIFT 0x5 +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_TMZ__SHIFT 0x8#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_EN__SHIFT 0x9#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_IND_64B_BLK__SHIFT 0xa +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_TMZ_C__SHIFT 0xc#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_IND_64B_BLK_C__SHIFT 0xd +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_META_SURFACE_TMZ__SHIFT 0x10 +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_META_SURFACE_TMZ_C__SHIFT 0x14 +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_META_SURFACE_TMZ__SHIFT 0x18 +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_META_SURFACE_TMZ_C__SHIFT 0x1c#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_TMZ_MASK 0x00000001L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_EN_MASK 0x00000002L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_IND_64B_BLK_MASK 0x00000004L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_TMZ_C_MASK 0x00000010L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_SURFACE_DCC_IND_64B_BLK_C_MASK 0x00000020L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_TMZ_MASK 0x00000100L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_EN_MASK 0x00000200L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_IND_64B_BLK_MASK 0x00000400L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_TMZ_C_MASK 0x00001000L#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_SURFACE_DCC_IND_64B_BLK_C_MASK 0x00002000L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_META_SURFACE_TMZ_MASK 0x00010000L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__PRIMARY_META_SURFACE_TMZ_C_MASK 0x00100000L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_META_SURFACE_TMZ_MASK 0x01000000L +#define HUBPREQ0_DCSURF_SURFACE_CONTROL__SECONDARY_META_SURFACE_TMZ_C_MASK 0x10000000L//HUBPREQ0_DCSURF_FLIP_CONTROL #define HUBPREQ0_DCSURF_FLIP_CONTROL__SURFACE_UPDATE_LOCK__SHIFT 0x0#define HUBPREQ0_DCSURF_FLIP_CONTROL__SURFACE_FLIP_TYPE__SHIFT 0x1
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/27 drm/amd/display: BL setting save/restore
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +9 -0
@@ -323,6 +323,15 @@ static bool dce_abm_immediate_disable(struct abm *abm)/* notifyDMCUMsg */ REG_UPDATE (MASTER_COMM_CNTL_REG ,MASTER_COMM_INTERRUPT ,1 ); + abm->stored_backlight_registers.BL_PWM_CNTL = +REG_READ (BL_PWM_CNTL ); + abm->stored_backlight_registers.BL_PWM_CNTL2 = +REG_READ (BL_PWM_CNTL2 ); + abm->stored_backlight_registers.BL_PWM_PERIOD_CNTL = +REG_READ (BL_PWM_PERIOD_CNTL ); + +REG_GET (LVTMA_PWRSEQ_REF_DIV ,BL_PWM_REF_DIV , + &abm->stored_backlight_registers.LVTMA_PWRSEQ_REF_DIV_BL_PWM_REF_DIV);return true; }
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/27 drm/amd/display: Remove return when no EDID read.
In reply to a message not in the archiveFrom: Martin Tsai <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 -2
@@ -678,8 +678,6 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)case EDID_NO_RESPONSE :dm_logger_write (link->ctx->logger,LOG_ERROR ,"No EDID read.\n" ); -return false; -default :break ; }
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/27 drm/amd/display: Fixed non-native modes not lighting up
In reply to a message not in the archiveFrom: "Jerry (Fangzhi) Zuo" <[email protected]>
There is no need to call drm_mode_set_crtcinfo() again once crtc timing is decided. Otherwise non-native/unsupported timing might get overwritten.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -1
@@ -2447,7 +2447,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, dm_state ? (dm_state->scaling != RMX_OFF) : false); } -drm_mode_set_crtcinfo (&mode,0 ); +if (!dm_state) +drm_mode_set_crtcinfo (&mode,0 ); +fill_stream_properties_from_drm_display_mode (stream, &mode, &aconnector->base);update_stream_scaling_settings (&mode, dm_state, stream);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/27 drm/amd/display: Fix multiple definitions of handle_crc_irq
In reply to a message not in the archiveFrom: "Leo (Sunpeng) Li" <[email protected]>
If CONFIG_DEBUG_FS is disabled, then CRC should also be disabled. Therefore, amdgpu_dm_crtc_handle_crc_irq was redefined as a no-op function within amdgpu_dm.h.
However, since amdgpu_dm.h is included in multiple files, this caused conflicts when linking during compile. Therefore, Use a macro to define the function as a no-op instead.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -266,7 +266,7 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name,void amdgpu_dm_crtc_handle_crc_irq (struct drm_crtc *crtc);#else #define amdgpu_dm_crtc_set_crc_source NULL -void amdgpu_dm_crtc_handle_crc_irq (struct drm_crtc *crtc) {} +#define amdgpu_dm_crtc_handle_crc_irq (x)#endif extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/27 drm/amd/display: wait for T9 after backlight off mainlink blank.
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 +-- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +1 -2
@@ -102,7 +102,7 @@ void dp_enable_link_phy(dp_receiver_power_ctrl (link, true); } -static bool edp_receiver_ready_T9 (struct dc_link *link) +bool edp_receiver_ready_T9 (struct dc_link *link) {unsigned int tries =0 ;unsigned char sinkstatus =0 ;
@@ -130,7 +130,6 @@ void dp_disable_link_phy(struct dc_link *link, enum signal_type signal)dp_receiver_power_ctrl (link, false);if (signal ==SIGNAL_TYPE_EDP ) { -edp_receiver_ready_T9 (link); link->link_enc->funcs->disable_output (link->link_enc, signal); link->dc->hwss.edp_power_control (link, false); }else
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -0
@@ -928,6 +928,8 @@ void hwss_edp_backlight_control(*/ /* dc_service_sleep_in_milliseconds(50); */ link_transmitter_control (ctx->dc_bios, &cntl); +/*edp 1.2*/ +edp_receiver_ready_T9 (link); }void dce110_disable_stream (struct pipe_ctx *pipe_ctx,int option)
drivers/gpu/drm/amd/display/dc/inc/link_hwss.h +1 -0
@@ -51,6 +51,7 @@ void dp_enable_link_phy( const struct dc_link_settings *link_settings);void dp_receiver_power_ctrl (struct dc_link *link,bool on); +bool edp_receiver_ready_T9 (struct dc_link *link);void dp_disable_link_phy (struct dc_link *link,enum signal_type signal);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/27 drm/amd/display: Bypass gamma set if not standard type
In reply to a message not in the archiveFrom: John Barberiz <[email protected]>
If non-standard gamma type detected set identity matrix flag so that we can bypass the gamma mode.
--- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +2 -0
@@ -436,6 +436,8 @@ struct dc_gamma {/* private to DC core */ struct dc_context *ctx; + +bool is_identity; };/* Used by both ipp amd opp functions*/
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -1
@@ -900,7 +900,9 @@ static bool dcn10_set_input_transfer_func(struct pipe_ctx *pipe_ctx,if (plane_state->in_transfer_func) tf = plane_state->in_transfer_func; -if (plane_state->gamma_correction &&dce_use_lut (plane_state->format)) +if (plane_state->gamma_correction->is_identity) + dpp_base->funcs->dpp_set_degamma (dpp_base,IPP_DEGAMMA_MODE_BYPASS ); +else if (plane_state->gamma_correction &&dce_use_lut (plane_state->format)) dpp_base->funcs->dpp_program_input_lut (dpp_base, plane_state->gamma_correction);if (tf ==NULL )
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/27 drm/amd/display: dal 3.1.30
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -38,7 +38,7 @@#include "inc/compressor.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.1.29" +#define DC_VER "3.1.30"#define MAX_SURFACES 3#define MAX_STREAMS 6
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/27 drm/amd/display: Check hubp in pipe_ctx not in res_pool.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
When disable plane, check power gate flag in hubp with pipe_ctx, not with res_pool.
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -1
@@ -656,7 +656,7 @@ static void plane_atomic_disable(struct dc *dc, struct pipe_ctx *pipe_ctx)static void dcn10_disable_plane (struct dc *dc,struct pipe_ctx *pipe_ctx) { -if (dc->res_pool->hubps[pipe_ctx->pipe_idx]->power_gated) +if (!pipe_ctx->plane_res.hubp || pipe_ctx->plane_res.hubp->power_gated)return ;plane_atomic_disable (dc, pipe_ctx);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/27 drm/amd/display: Null check for gamma correction.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -1
@@ -900,7 +900,8 @@ static bool dcn10_set_input_transfer_func(struct pipe_ctx *pipe_ctx,if (plane_state->in_transfer_func) tf = plane_state->in_transfer_func; -if (plane_state->gamma_correction->is_identity) +if (plane_state->gamma_correction && + plane_state->gamma_correction->is_identity) dpp_base->funcs->dpp_set_degamma (dpp_base,IPP_DEGAMMA_MODE_BYPASS );else if (plane_state->gamma_correction &&dce_use_lut (plane_state->format)) dpp_base->funcs->dpp_program_input_lut (dpp_base, plane_state->gamma_correction);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/27 drm/amd/display: Set irq state only on existing crtcs
In reply to a message not in the archiveFrom: Mikita Lipski <[email protected]>
Because AMDGPU_CRTC_IRQ_VLINE1 = 6, it expected 6 more crtcs to be
programed with disabled irq state in amdgpu_irq_disable_all. That caused errors and accessed the wrong memory location.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c +2 -4
@@ -607,10 +607,8 @@ static const struct amdgpu_irq_src_funcs dm_hpd_irq_funcs = {void amdgpu_dm_set_irq_funcs (struct amdgpu_device *adev) { -if (adev->mode_info.num_crtc >0 ) - adev->crtc_irq.num_types =AMDGPU_CRTC_IRQ_VLINE1 + adev->mode_info.num_crtc; -else - adev->crtc_irq.num_types =0 ; + + adev->crtc_irq.num_types = adev->mode_info.num_crtc; adev->crtc_irq.funcs = &dm_crtc_irq_funcs; adev->pageflip_irq.num_types = adev->mode_info.num_crtc;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/27 drm/amd/display: fix cursor related Pstate hang
In reply to a message not in the archiveFrom: Eric Yang <[email protected]>
Move cursor programming to inside the OTG_MASTER_UPDATE_LOCK
If graphics plane go from 1 pipe to hsplit, the cursor updates after mpc programming and unlock. Which means there is a window of time where cursor is enabled on the wrong pipe if it's on the right side of the screen (i.e. case where cursor need to move from pipe 0 to pipe 3 post split). This will cause pstate hang.
Solution is to program the cursor while still locked.
--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 68 ++-------------------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 40 +++++++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 45 +++++++++++++- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 + 4 files changed, 90 insertions(+), 66 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +4 -64
@@ -193,6 +193,7 @@ bool dc_stream_set_cursor_attributes( core_dc = stream->ctx->dc; res_ctx = &core_dc->current_state->res_ctx; + stream->cursor_attributes = *attributes;for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
@@ -203,34 +204,8 @@ bool dc_stream_set_cursor_attributes(continue ; -if (pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes !=NULL ) - pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes ( - pipe_ctx->plane_res.ipp, attributes); - -if (pipe_ctx->plane_res.hubp !=NULL && - pipe_ctx->plane_res.hubp->funcs->set_cursor_attributes !=NULL ) - pipe_ctx->plane_res.hubp->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.hubp, attributes); - -if (pipe_ctx->plane_res.mi !=NULL && - pipe_ctx->plane_res.mi->funcs->set_cursor_attributes !=NULL ) - pipe_ctx->plane_res.mi->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.mi, attributes); - - -if (pipe_ctx->plane_res.xfm !=NULL && - pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes !=NULL ) - pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.xfm, attributes); - -if (pipe_ctx->plane_res.dpp !=NULL && - pipe_ctx->plane_res.dpp->funcs->set_cursor_attributes !=NULL ) - pipe_ctx->plane_res.dpp->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.dpp, attributes->color_format); + core_dc->hwss.set_cursor_attribute (pipe_ctx); } - - stream->cursor_attributes = *attributes; -return true; }
@@ -254,21 +229,10 @@ bool dc_stream_set_cursor_position( core_dc = stream->ctx->dc; res_ctx = &core_dc->current_state->res_ctx; + stream->cursor_position = *position;for (i =0 ; i <MAX_PIPES ; i++) {struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; -struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp; -struct mem_input *mi = pipe_ctx->plane_res.mi; -struct hubp *hubp = pipe_ctx->plane_res.hubp; -struct dpp *dpp = pipe_ctx->plane_res.dpp; -struct dc_cursor_position pos_cpy = *position; -struct dc_cursor_mi_param param = { - .pixel_clk_khz = stream->timing.pix_clk_khz, - .ref_clk_khz = core_dc->res_pool->ref_clock_inKhz, - .viewport_x_start = pipe_ctx->plane_res.scl_data.viewport.x, - .viewport_width = pipe_ctx->plane_res.scl_data.viewport.width, - .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz - }; if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.mi && !pipe_ctx->plane_res.hubp) ||
@@ -276,33 +240,9 @@ bool dc_stream_set_cursor_position( (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp)) continue; -if (pipe_ctx->plane_state->address.type - ==PLN_ADDR_TYPE_VIDEO_PROGRESSIVE ) - pos_cpy.enable = false; - -if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) - pos_cpy.enable = false; - - -if (ipp !=NULL && ipp->funcs->ipp_cursor_set_position !=NULL ) - ipp->funcs->ipp_cursor_set_position (ipp, &pos_cpy, ¶m); - -if (mi !=NULL && mi->funcs->set_cursor_position !=NULL ) - mi->funcs->set_cursor_position (mi, &pos_cpy, ¶m); - -if (!hubp) -continue ; - -if (hubp->funcs->set_cursor_position !=NULL ) - hubp->funcs->set_cursor_position (hubp, &pos_cpy, ¶m); - -if (dpp !=NULL && dpp->funcs->set_cursor_position !=NULL ) - dpp->funcs->set_cursor_position (dpp, &pos_cpy, ¶m, hubp->curs_attr.width); - + core_dc->hwss.set_cursor_position (pipe_ctx); } - stream->cursor_position = *position; -return true; }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +40 -0
@@ -2908,6 +2908,44 @@ static void program_csc_matrix(struct pipe_ctx *pipe_ctx, } } +void dce110_set_cursor_position (struct pipe_ctx *pipe_ctx) +{ +struct dc_cursor_position pos_cpy = pipe_ctx->stream->cursor_position; +struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp; +struct mem_input *mi = pipe_ctx->plane_res.mi; +struct dc_cursor_mi_param param = { + .pixel_clk_khz = pipe_ctx->stream->timing.pix_clk_khz, + .ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clock_inKhz, + .viewport_x_start = pipe_ctx->plane_res.scl_data.viewport.x, + .viewport_width = pipe_ctx->plane_res.scl_data.viewport.width, + .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz + }; + +if (pipe_ctx->plane_state->address.type + ==PLN_ADDR_TYPE_VIDEO_PROGRESSIVE ) + pos_cpy.enable = false; + +if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) + pos_cpy.enable = false; + + ipp->funcs->ipp_cursor_set_position (ipp, &pos_cpy, ¶m); + mi->funcs->set_cursor_position (mi, &pos_cpy, ¶m); +} + +void dce110_set_cursor_attribute (struct pipe_ctx *pipe_ctx) +{ +struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes; + + pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes ( + pipe_ctx->plane_res.ipp, attributes); + + pipe_ctx->plane_res.mi->funcs->set_cursor_attributes ( + pipe_ctx->plane_res.mi, attributes); + + pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes ( + pipe_ctx->plane_res.xfm, attributes); +} +static void ready_shared_resources (struct dc *dc,struct dc_state *context) {}static void optimize_shared_resources (struct dc *dc) {}
@@ -2951,6 +2989,8 @@ static const struct hw_sequencer_funcs dce110_funcs = { .edp_backlight_control = hwss_edp_backlight_control, .edp_power_control = hwss_edp_power_control, .edp_wait_for_hpd_ready = hwss_edp_wait_for_hpd_ready, + .set_cursor_position = dce110_set_cursor_position, + .set_cursor_attribute = dce110_set_cursor_attribute };void dce110_hw_sequencer_construct (struct dc *dc)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +43 -2
74 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +3 -0
@@ -199,6 +199,9 @@ struct hw_sequencer_funcs { bool enable);void (*edp_wait_for_hpd_ready)(struct dc_link *link,bool power_up); +void (*set_cursor_position)(struct pipe_ctx *pipe); +void (*set_cursor_attribute)(struct pipe_ctx *pipe); + }; void color_space_to_black_color(
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/27 drm/amd/display: remove unused function prototypes
In reply to a message not in the archiveFrom: Eric Yang <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -2
@@ -1517,7 +1517,7 @@ static uint32_t compute_pstate_blackout_duration(return total_dest_line_time_ns; } -void dce110_set_displaymarks ( +static void dce110_set_displaymarks (const struct dc *dc,struct dc_state *context) {
@@ -2299,7 +2299,7 @@ static void update_plane_addr(const struct dc *dc, plane_state->status.requested_address = plane_state->address; } -void dce110_update_pending_status (struct pipe_ctx *pipe_ctx) +static void dce110_update_pending_status (struct pipe_ctx *pipe_ctx) {struct dc_plane_state *plane_state = pipe_ctx->plane_state;
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +0 -6
@@ -39,11 +39,7 @@ enum dc_status dce110_apply_ctx_to_hw(struct dc *dc, struct dc_state *context); -void dce110_set_display_clock (struct dc_state *context); -void dce110_set_displaymarks ( -const struct dc *dc, -struct dc_state *context);void dce110_enable_stream (struct pipe_ctx *pipe_ctx);
@@ -60,8 +56,6 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context);void dce110_power_down (struct dc *dc); -void dce110_update_pending_status (struct pipe_ctx *pipe_ctx); -void dce110_fill_display_configs (const struct dc_state *context,struct dm_pp_display_configuration *pp_display_cfg);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/27 drm/amd/display: WBSCL filter init calculation fixes
In reply to a message not in the archiveFrom: Ken Chalmers <[email protected]>
* Previous code did some calculations with a mix of normal integers and integers aligned as U2.24 fixed-point values.
* There were bugs in the conversion of the final result into the S4.19 values required for the registers.
--- drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 +++++++++ drivers/gpu/drm/amd/display/include/fixed31_32.h | 3 +++ 2 files changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +9 -0
@@ -593,3 +593,12 @@ uint32_t dal_fixed31_32_clamp_u0d10( {return clamp_ux_dy (arg.value,0 ,10 ,1 ); } + +int32_t dal_fixed31_32_s4d19 ( +struct fixed31_32 arg) +{ +if (arg.value <0 ) +return -(int32_t )ux_dy (dal_fixed31_32_abs (arg).value,4 ,19 ); +else +return ux_dy (arg.value,4 ,19 ); +}
drivers/gpu/drm/amd/display/include/fixed31_32.h +3 -0
@@ -470,4 +470,7 @@ uint32_t dal_fixed31_32_clamp_u0d14(uint32_t dal_fixed31_32_clamp_u0d10 (struct fixed31_32 arg); +int32_t dal_fixed31_32_s4d19 ( +struct fixed31_32 arg); +#endif
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/27 drm/amd/display: Expose is_rgb_cspace function in hw_sequencer
In reply to a message not in the archiveFrom: Eric Bernstein <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -1
@@ -1430,7 +1430,7 @@ static bool is_pipe_tree_visible(struct pipe_ctx *pipe_ctx)return false; } -static bool is_rgb_cspace (enum dc_color_space output_color_space) +bool is_rgb_cspace (enum dc_color_space output_color_space) {switch (output_color_space) {case COLOR_SPACE_SRGB :
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +1 -0
@@ -35,5 +35,6 @@ extern void fill_display_configs(const struct dc_state *context, struct dm_pp_display_configuration *pp_display_cfg); +bool is_rgb_cspace (enum dc_color_space output_color_space);#endif /* __DC_HWSS_DCN10_H__ */
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +0 -1
@@ -201,7 +201,6 @@ struct hw_sequencer_funcs {void (*set_cursor_position)(struct pipe_ctx *pipe);void (*set_cursor_attribute)(struct pipe_ctx *pipe); - }; void color_space_to_black_color(
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/27 drm/amd/display: turn off cursor when disconnect plane
In reply to a message not in the archiveFrom: Eric Yang <[email protected]>
As a precaution to prevent cases where cursor is enabled on a pipe that is disabled, always turn off cursor when disconnecting plane.
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +3 -0
@@ -73,6 +73,9 @@ static void hubp1_disconnect(struct hubp *hubp)REG_UPDATE (DCHUBP_CNTL ,HUBP_TTU_DISABLE ,1 ); + +REG_UPDATE (CURSOR_CONTROL , +CURSOR_ENABLE ,0 ); }static void hubp1_set_hubp_blank_en (struct hubp *hubp,bool blank)
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/27 drm/amd/display: Remove couple of unused OPTC registers
In reply to a message not in the archiveFrom: Nikola Cornij <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 8 ++++---- drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h +4 -4
@@ -131,7 +131,6 @@ struct dcn_optc_registers {uint32_t OTG_GSL_WINDOW_X ;uint32_t OTG_GSL_WINDOW_Y ;uint32_t OTG_VUPDATE_KEEPOUT ; -uint32_t OTG_DSC_START_POSITION ; };#define TG_COMMON_MASK_SH_LIST_DCN (mask_sh)\
@@ -241,7 +240,7 @@ struct dcn_optc_registers {SF (OTG0_OTG_TEST_PATTERN_COLOR ,OTG_TEST_PATTERN_DATA , mask_sh),\ SF(ODM0_OPTC_DATA_SOURCE_SELECT, OPTC_SRC_SEL, mask_sh) -#define TG_REG_FIELD_LIST (type) \ +#define TG_REG_FIELD_LIST_DCN1_0 (type) \ type VSTARTUP_START;\ type VUPDATE_OFFSET;\ type VUPDATE_WIDTH;\
@@ -352,10 +351,11 @@ struct dcn_optc_registers {type OTG_MASTER_UPDATE_LOCK_GSL_EN ;\type MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_START_OFFSET ;\type MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_END_OFFSET ;\ -type OTG_DSC_START_POSITION_X ;\ -type OTG_DSC_START_POSITION_LINE_NUM ;\type OTG_MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_EN ; +#define TG_REG_FIELD_LIST (type) \ + TG_REG_FIELD_LIST_DCN1_0(type) +struct dcn_optc_shift {TG_REG_FIELD_LIST (uint8_t )
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h +1 -0
@@ -217,6 +217,7 @@ struct timing_generator_funcs {*/ bool (*get_crc)(struct timing_generator *tg, uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb); + };#endif
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/27 drm/amd/display: fix boot-up on vega10
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Fixing null-deref on Vega10 due to regression after 'fix cursor related Pstate hang' change. Added null checks in setting cursor position.
--- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +12 -7
@@ -2928,22 +2928,27 @@ void dce110_set_cursor_position(struct pipe_ctx *pipe_ctx)if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) pos_cpy.enable = false; - ipp->funcs->ipp_cursor_set_position (ipp, &pos_cpy, ¶m); - mi->funcs->set_cursor_position (mi, &pos_cpy, ¶m); +if (ipp->funcs->ipp_cursor_set_position) + ipp->funcs->ipp_cursor_set_position (ipp, &pos_cpy, ¶m); +if (mi->funcs->set_cursor_position) + mi->funcs->set_cursor_position (mi, &pos_cpy, ¶m); }void dce110_set_cursor_attribute (struct pipe_ctx *pipe_ctx) {struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes; - pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes ( +if (pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes) + pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes ( pipe_ctx->plane_res.ipp, attributes); - pipe_ctx->plane_res.mi->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.mi, attributes); +if (pipe_ctx->plane_res.mi->funcs->set_cursor_attributes) + pipe_ctx->plane_res.mi->funcs->set_cursor_attributes ( + pipe_ctx->plane_res.mi, attributes); - pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes ( - pipe_ctx->plane_res.xfm, attributes); +if (pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes) + pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes ( + pipe_ctx->plane_res.xfm, attributes); }static void ready_shared_resources (struct dc *dc,struct dc_state *context) {}
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/27 drm/amd/display: Add return value for detect dp.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
System soft hang when hotplug specific 4K DP panel due to link caps read error and incorrect link setting parmas to enable dp.
Add status check for DPCD read and add return value for detect dp, in case of false, return from caller, avoid further false operation.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 +++++++++----- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 24 ++++++++++++++++-------- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- 3 files changed, 26 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +9 -5
@@ -465,7 +465,7 @@ static void link_disconnect_sink(struct dc_link *link) link->dpcd_sink_count =0 ; } -static void detect_dp( +static bool detect_dp( struct dc_link *link, struct display_sink_capability *sink_caps, bool *converter_disable_audio,
@@ -479,7 +479,8 @@ static void detect_dp(if (sink_caps->transaction_type ==DDC_TRANSACTION_TYPE_I2C_OVER_AUX ) { sink_caps->signal =SIGNAL_TYPE_DISPLAY_PORT ; -detect_dp_sink_caps (link); +if (!detect_dp_sink_caps (link)) +return false;if (is_mst_supported (link)) { sink_caps->signal =SIGNAL_TYPE_DISPLAY_PORT_MST ;
@@ -530,7 +531,7 @@ static void detect_dp(* active dongle unplug processing for short irq */ link_disconnect_sink (link); -return ; +return true; }if (link->dpcd_caps.dongle_type !=DISPLAY_DONGLE_DP_HDMI_CONVERTER )
@@ -542,6 +543,8 @@ static void detect_dp( sink_caps, audio_support); } + +return true; }bool dc_link_detect (struct dc_link *link,enum dc_detect_reason reason)
@@ -605,11 +608,12 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) }case SIGNAL_TYPE_DISPLAY_PORT : { -detect_dp ( +if (!detect_dp ( link, &sink_caps, &converter_disable_audio, - aud_support, reason); + aud_support, reason)) +return false;/* Active dongle downstream unplug */ if (link->type == dc_connection_active_dongle
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +16 -8
@@ -2235,13 +2235,14 @@ static void dp_wa_power_up_0010FA(struct dc_link *link, uint8_t *dpcd_data, link->wa_flags.dp_keep_receiver_powered = false; } -static void retrieve_link_cap (struct dc_link *link) +static bool retrieve_link_cap (struct dc_link *link) {uint8_t dpcd_data[DP_TRAINING_AUX_RD_INTERVAL -DP_DPCD_REV +1 ];union down_stream_port_count down_strm_port_count;union edp_configuration_cap edp_config_cap;union dp_downstream_port_present ds_port = {0 }; +enum dc_status status =DC_ERROR_UNEXPECTED ;memset (dpcd_data,'\0' ,sizeof (dpcd_data)); memset(&down_strm_port_count,
@@ -2249,11 +2250,16 @@ static void retrieve_link_cap(struct dc_link *link)memset (&edp_config_cap,'\0' ,sizeof (union edp_configuration_cap )); -core_link_read_dpcd ( - link, -DP_DPCD_REV , - dpcd_data, -sizeof (dpcd_data)); + status =core_link_read_dpcd ( + link, +DP_DPCD_REV , + dpcd_data, +sizeof (dpcd_data)); + +if (status !=DC_OK ) { +dm_error ("%s: Read dpcd data failed.\n" , __func__); +return false; + } {union training_aux_rd_interval aux_rd_interval;
@@ -2315,11 +2321,13 @@ static void retrieve_link_cap(struct dc_link *link)/* Connectivity log: detection */ CONN_DATA_DETECT (link, dpcd_data,sizeof (dpcd_data),"Rx Caps: " ); + +return true; } -void detect_dp_sink_caps (struct dc_link *link) +bool detect_dp_sink_caps (struct dc_link *link) { -retrieve_link_cap (link); +return retrieve_link_cap (link);/* dc init_hw has power encoder using default * signal for connector. For native DP, no
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +1 -1
@@ -53,7 +53,7 @@ bool perform_link_training_with_retries(bool is_mst_supported (struct dc_link *link); -void detect_dp_sink_caps (struct dc_link *link); +bool detect_dp_sink_caps (struct dc_link *link);void detect_edp_sink_caps (struct dc_link *link);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/27 drm/amd/display: Fixed if statement parameters to add a delay on disconnect
In reply to a message not in the archiveFrom: John Barberiz <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -2
@@ -699,8 +699,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) }/* Add delay for certain monitors */ -if (sink->edid_caps.panel_patch.disconnect_delay >0 && -SIGNAL_TYPE_HDMI_TYPE_A ) +if (sink->edid_caps.panel_patch.disconnect_delay >0 + && sink->sink_signal ==SIGNAL_TYPE_HDMI_TYPE_A )program_hpd_filter (link, sink->edid_caps.panel_patch.disconnect_delay);else program_hpd_filter (link,DEFAULT_DELAY_DISCONNECT );
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/27 drm/amd/display: dal 3.1.31
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -38,7 +38,7 @@#include "inc/compressor.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.1.30" +#define DC_VER "3.1.31"#define MAX_SURFACES 3#define MAX_STREAMS 6
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/27 drm/amd/display: add eDP 1.2+ polling for T7
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 22 ++++++++++++++++++++++ .../drm/amd/display/dc/dce/dce_stream_encoder.c | 6 +++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 1 + 4 files changed, 33 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +22 -0
@@ -123,6 +123,28 @@ bool edp_receiver_ready_T9(struct dc_link *link) }while (++tries <50 );return result; } +bool edp_receiver_ready_T7 (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 (result ==DC_OK && edpRev <DP_EDP_12 ) +return true; +/* start from eDP version 1.2, SINK_STAUS indicate the sink is ready.*/ +do { + sinkstatus =0 ; + result =core_link_read_dpcd (link,DP_SINK_STATUS , &sinkstatus,sizeof (sinkstatus)); +if (sinkstatus ==1 ) +break ; +if (result !=DC_OK ) +break ; +udelay (25 );//MAx T7 is 50ms + }while (++tries <300 ); +return result; +}void dp_disable_link_phy (struct dc_link *link,enum signal_type signal) {
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +5 -1
@@ -920,6 +920,7 @@ static void dce110_stream_encoder_dp_blank( {struct dce110_stream_encoder *enc110 =DCE110STRENC_FROM_STRENC (enc);uint32_t retries =0 ; +uint32_t reg1 =0 ;uint32_t max_retries =DP_BLANK_MAX_RETRY *10 ;/* Note: For CZ, we are changing driver default to disable
@@ -928,7 +929,10 @@ static void dce110_stream_encoder_dp_blank(* handful of panels that cannot handle disable stream at * HBLANK and will result in a white line flash across the * screen on stream disable. */ - +REG_GET (DP_VID_STREAM_CNTL ,DP_VID_STREAM_ENABLE , ®1); +if ((reg1 &0x1 ) ==0 ) +/*stream not enabled*/ +return ;/* Specify the video stream disable point * (2 = start of the next vertical blank) */ REG_UPDATE (DP_VID_STREAM_CNTL ,DP_VID_STREAM_DIS_DEFER ,2 );
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +5 -4
@@ -927,9 +927,13 @@ void hwss_edp_backlight_control(* Enable it in the future if necessary. */ /* dc_service_sleep_in_milliseconds(50); */ +/*edp 1.2*/ +if (cntl.action ==TRANSMITTER_CONTROL_BACKLIGHT_ON ) +edp_receiver_ready_T7 (link);link_transmitter_control (ctx->dc_bios, &cntl);/*edp 1.2*/ -edp_receiver_ready_T9 (link); +if (cntl.action ==TRANSMITTER_CONTROL_BACKLIGHT_OFF ) +edp_receiver_ready_T9 (link); }void dce110_disable_stream (struct pipe_ctx *pipe_ctx,int option)
@@ -976,9 +980,6 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx, int option)*/ } -/* blank at encoder level */ -if (dc_is_dp_signal (pipe_ctx->stream->signal)) - 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,
drivers/gpu/drm/amd/display/dc/inc/link_hwss.h +1 -0
@@ -52,6 +52,7 @@ void dp_enable_link_phy(void dp_receiver_power_ctrl (struct dc_link *link,bool on);bool edp_receiver_ready_T9 (struct dc_link *link); +bool edp_receiver_ready_T7 (struct dc_link *link);void dp_disable_link_phy (struct dc_link *link,enum signal_type signal);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/27 drm/amd/display: resume from S3 bypass power down HW block.
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/bios/bios_parser2.c | 7 +++++++ .../drm/amd/display/dc/bios/bios_parser_helper.c | 8 ++++++++ .../drm/amd/display/dc/bios/bios_parser_helper.h | 1 + drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 3 +++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 23 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + 7 files changed, 33 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +1 -0
@@ -3803,6 +3803,7 @@ static const struct dc_vbios_funcs vbios_funcs = {/* bios scratch register communication */ .is_accelerated_mode = bios_is_accelerated_mode, + .get_vga_enabled_displays = bios_get_vga_enabled_displays, .set_scratch_critical_state = bios_parser_set_scratch_critical_state,
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +7 -0
@@ -1280,6 +1280,12 @@ static bool bios_parser_is_accelerated_mode(return bios_is_accelerated_mode (dcb); } +static uint32_t bios_parser_get_vga_enabled_displays ( +struct dc_bios *bios) +{ +return bios_get_vga_enabled_displays (bios); +} +/** * bios_parser_set_scratch_critical_state
@@ -1800,6 +1806,7 @@ static const struct dc_vbios_funcs vbios_funcs = { .is_accelerated_mode = bios_parser_is_accelerated_mode, + .get_vga_enabled_displays = bios_parser_get_vga_enabled_displays, .set_scratch_critical_state = bios_parser_set_scratch_critical_state,
drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c +8 -0
@@ -78,5 +78,13 @@ void bios_set_scratch_critical_state(REG_UPDATE (BIOS_SCRATCH_6 ,S6_CRITICAL_STATE , critial_state); } +uint32_t bios_get_vga_enabled_displays ( +struct dc_bios *bios) +{ +uint32_t active_disp =1 ; +if (bios->regs->BIOS_SCRATCH_3)/*follow up with other asic, todo*/ + active_disp =REG_READ (BIOS_SCRATCH_3 ) &0XFFFF ; +return active_disp; +}
drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h +1 -0
@@ -34,6 +34,7 @@ uint8_t *bios_get_image(struct dc_bios *bp, uint32_t offset,bool bios_is_accelerated_mode (struct dc_bios *bios);void bios_set_scratch_acc_mode_change (struct dc_bios *bios);void bios_set_scratch_critical_state (struct dc_bios *bios,bool state); +uint32_t bios_get_vga_enabled_displays (struct dc_bios *bios);#define GET_IMAGE (type, offset) ((type *) bios_get_image(&bp->base, offset, sizeof(type)))
drivers/gpu/drm/amd/display/dc/dc_bios_types.h +3 -0
@@ -111,6 +111,8 @@ struct dc_vbios_funcs { struct dc_bios *bios);bool (*is_accelerated_mode)(struct dc_bios *bios); +uint32_t (*get_vga_enabled_displays)( +struct dc_bios *bios);void (*get_bios_event_info)(struct dc_bios *bios,struct bios_event_info *info);
@@ -199,6 +201,7 @@ struct dc_vbios_funcs { };struct bios_registers { +uint32_t BIOS_SCRATCH_3;uint32_t BIOS_SCRATCH_6; };
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +12 -11
@@ -1484,20 +1484,21 @@ static struct dc_link *get_link_for_edp_not_in_use(*/ void dce110_enable_accelerated_mode (struct dc *dc,struct dc_state *context) { +struct dc_bios *dcb = dc->ctx->dc_bios;struct dc_link *edp_link_to_turnoff =get_link_for_edp_not_in_use (dc, context);struct dc_link *edp_link =get_link_for_edp (dc); - -if (edp_link) -/*we need turn off backlight before DP_blank and encoder powered down*/ - dc->hwss.edp_backlight_control (edp_link, false); - -power_down_all_hw_blocks (dc); -disable_vga_and_power_gate_all_controllers (dc); - -if (edp_link_to_turnoff) - dc->hwss.edp_power_control (edp_link_to_turnoff, false); - +if (dcb->funcs->get_vga_enabled_displays (dc->ctx->dc_bios) !=0 ) { +if (edp_link_to_turnoff) { +/*we need turn off backlight before DP_blank and encoder powered down, todo add optimization*/ + dc->hwss.edp_backlight_control (edp_link, false); + } +/*resume from S3, no vbios posting, no need to power down again*/ +power_down_all_hw_blocks (dc); +disable_vga_and_power_gate_all_controllers (dc); +if (edp_link_to_turnoff) + dc->hwss.edp_power_control (edp_link_to_turnoff, false); + }bios_set_scratch_acc_mode_change (dc->ctx->dc_bios); }
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +1 -0
@@ -366,6 +366,7 @@ static const struct dcn_optc_mask tg_mask = {static const struct bios_registers bios_regs = { +NBIO_SR (BIOS_SCRATCH_3 ),NBIO_SR (BIOS_SCRATCH_6 ) };
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/27 drm/amd/display: Optimize regamma calculations
In reply to a message not in the archiveFrom: Krunoslav Kovac <[email protected]>
There are several optimizations:
1) Use predefined SRGB, don't calculate. This is the most common case.
2) Precompute HW X points at boot since they're fixed in ColModule
3) Precompute PQ - it never changes and is very CPU intensive in fixed pt.
4) Reduce number of points in ColModule to 512 (32x16) from 1024. This also requires reducing some regions for legacy DCEs to 16 pts at most.
Performance
1) is super-fast, build_output_tf is 1-2us, down from 25000-30000. Programming also fast since only one reg write.
2)+3) gives build_output_tf for PQ in ~100us range, down from ~80000-110000
2) + 4) results in slightly over 50% improvement. It gives an idea of the savings when we can't use SRGB or PQ table (e.g. sdr white level > 80).
There's also a bit of refactoring: renaming some stuff that was misleading and removing a lot of magic numbers that novices might not be able to understand where they come from and what they mean.
--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 56 ++++++++++------------ .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 39 ++++++++------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 2 +- 4 files changed, 47 insertions(+), 52 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +24 -32
@@ -407,6 +407,10 @@ static bool convert_to_custom_float(struct pwl_result_data *rgb_resulted,return true; } +#define MAX_LOW_POINT 11 +#define NUMBER_REGIONS 16 +#define NUMBER_SW_SEGMENTS 16 +static bool dce110_translate_regamma_to_hw_format (const struct dc_transfer_func *output_tf,struct pwl_params *regamma_params)
@@ -421,8 +425,8 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,struct fixed31_32 y1_min;struct fixed31_32 y3_max; -int32_t segment_start, segment_end; -uint32_t i, j, k, seg_distr[16 ], increment, start_index, hw_points; +int32_t region_start, region_end; +uint32_t i, j, k, seg_distr[NUMBER_REGIONS ], increment, start_index, hw_points;if (output_tf ==NULL || regamma_params ==NULL || output_tf->type ==TF_TYPE_BYPASS )return false;
@@ -437,34 +441,20 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,/* 16 segments * segments are from 2^-11 to 2^5 */ - segment_start =-11 ; - segment_end =5 ; - - seg_distr[0 ] =2 ; - seg_distr[1 ] =2 ; - seg_distr[2 ] =2 ; - seg_distr[3 ] =2 ; - seg_distr[4 ] =2 ; - seg_distr[5 ] =2 ; - seg_distr[6 ] =3 ; - seg_distr[7 ] =4 ; - seg_distr[8 ] =4 ; - seg_distr[9 ] =4 ; - seg_distr[10 ] =4 ; - seg_distr[11 ] =5 ; - seg_distr[12 ] =5 ; - seg_distr[13 ] =5 ; - seg_distr[14 ] =5 ; - seg_distr[15 ] =5 ; + region_start = -MAX_LOW_POINT ; + region_end =NUMBER_REGIONS -MAX_LOW_POINT ; + +for (i =0 ; i <NUMBER_REGIONS ; i++) + seg_distr[i] =4 ; }else {/* 10 segments * segment is from 2^-10 to 2^0 */ - segment_start =-10 ; - segment_end =0 ; + region_start =-10 ; + region_end =0 ; - seg_distr[0 ] =3 ; + seg_distr[0 ] =4 ; seg_distr[1 ] =4 ; seg_distr[2 ] =4 ; seg_distr[3 ] =4 ;
@@ -472,8 +462,8 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf, seg_distr[5 ] =4 ; seg_distr[6 ] =4 ; seg_distr[7 ] =4 ; - seg_distr[8 ] =5 ; - seg_distr[9 ] =5 ; + seg_distr[8 ] =4 ; + seg_distr[9 ] =4 ; seg_distr[10 ] =-1 ; seg_distr[11 ] =-1 ; seg_distr[12 ] =-1 ;
@@ -488,10 +478,12 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf, } j =0 ; -for (k =0 ; k < (segment_end - segment_start); k++) { +for (k =0 ; k < (region_end - region_start); k++) { increment =32 / (1 << seg_distr[k]); - start_index = (segment_start + k +25 ) *32 ; -for (i = start_index; i < start_index +32 ; i += increment) { + start_index = (region_start + k +MAX_LOW_POINT ) * +NUMBER_SW_SEGMENTS ; +for (i = start_index; i < start_index +NUMBER_SW_SEGMENTS ; + i += increment) {if (j == hw_points -1 )break ; rgb_resulted[j].red = output_tf->tf_pts.red[i];
@@ -502,15 +494,15 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf, }/* last point */ - start_index = (segment_end +25 ) *32 ; + start_index = (region_end +MAX_LOW_POINT ) *NUMBER_SW_SEGMENTS ; rgb_resulted[hw_points -1 ].red = output_tf->tf_pts.red[start_index]; rgb_resulted[hw_points -1 ].green = output_tf->tf_pts.green[start_index]; rgb_resulted[hw_points -1 ].blue = output_tf->tf_pts.blue[start_index]; arr_points[0 ].x =dal_fixed31_32_pow (dal_fixed31_32_from_int (2 ), -dal_fixed31_32_from_int (segment_start)); +dal_fixed31_32_from_int (region_start)); arr_points[1 ].x =dal_fixed31_32_pow (dal_fixed31_32_from_int (2 ), -dal_fixed31_32_from_int (segment_end)); +dal_fixed31_32_from_int (region_end)); y_r = rgb_resulted[0 ].red; y_g = rgb_resulted[0 ].green;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +21 -18
@@ -232,10 +232,11 @@ bool cm_helper_convert_to_custom_float(return true; } - +/* driver uses 32 regions or less, but DCN HW has 34, extra 2 are set to 0 */ #define MAX_REGIONS_NUMBER 34#define MAX_LOW_POINT 25 -#define NUMBER_SEGMENTS 32 +#define NUMBER_REGIONS 32 +#define NUMBER_SW_SEGMENTS 16 bool cm_helper_translate_curve_to_hw_format( const struct dc_transfer_func *output_tf,
@@ -251,7 +252,7 @@ bool cm_helper_translate_curve_to_hw_format(struct fixed31_32 y1_min;struct fixed31_32 y3_max; -int32_t segment_start, segment_end; +int32_t region_start, region_end;int32_t i;uint32_t j, k, seg_distr[MAX_REGIONS_NUMBER ], increment, start_index, hw_points;
@@ -271,11 +272,11 @@ bool cm_helper_translate_curve_to_hw_format(/* 32 segments * segments are from 2^-25 to 2^7 */ -for (i =0 ; i <32 ; i++) +for (i =0 ; i <NUMBER_REGIONS ; i++) seg_distr[i] =3 ; - segment_start =-25 ; - segment_end =7 ; + region_start = -MAX_LOW_POINT ; + region_end =NUMBER_REGIONS -MAX_LOW_POINT ; }else {/* 10 segments * segment is from 2^-10 to 2^0
@@ -289,14 +290,14 @@ bool cm_helper_translate_curve_to_hw_format( seg_distr[5 ] =4 ; seg_distr[6 ] =4 ; seg_distr[7 ] =4 ; - seg_distr[8 ] =5 ; - seg_distr[9 ] =5 ; + seg_distr[8 ] =4 ; + seg_distr[9 ] =4 ; - segment_start =-10 ; - segment_end =0 ; + region_start =-10 ; + region_end =0 ; } -for (i = segment_end - segment_start; i <MAX_REGIONS_NUMBER ; i++) +for (i = region_end - region_start; i <MAX_REGIONS_NUMBER ; i++) seg_distr[i] =-1 ;for (k =0 ; k <MAX_REGIONS_NUMBER ; k++) {
@@ -305,10 +306,12 @@ bool cm_helper_translate_curve_to_hw_format( } j =0 ; -for (k =0 ; k < (segment_end - segment_start); k++) { - increment =NUMBER_SEGMENTS / (1 << seg_distr[k]); - start_index = (segment_start + k +MAX_LOW_POINT ) *NUMBER_SEGMENTS ; -for (i = start_index; i < start_index +NUMBER_SEGMENTS ; i += increment) { +for (k =0 ; k < (region_end - region_start); k++) { + increment =NUMBER_SW_SEGMENTS / (1 << seg_distr[k]); + start_index = (region_start + k +MAX_LOW_POINT ) * +NUMBER_SW_SEGMENTS ; +for (i = start_index; i < start_index +NUMBER_SW_SEGMENTS ; + i += increment) {if (j == hw_points -1 )break ; rgb_resulted[j].red = output_tf->tf_pts.red[i];
@@ -319,15 +322,15 @@ bool cm_helper_translate_curve_to_hw_format( }/* last point */ - start_index = (segment_end +MAX_LOW_POINT ) *NUMBER_SEGMENTS ; + start_index = (region_end +MAX_LOW_POINT ) *NUMBER_SW_SEGMENTS ; rgb_resulted[hw_points -1 ].red = output_tf->tf_pts.red[start_index]; rgb_resulted[hw_points -1 ].green = output_tf->tf_pts.green[start_index]; rgb_resulted[hw_points -1 ].blue = output_tf->tf_pts.blue[start_index]; arr_points[0 ].x =dal_fixed31_32_pow (dal_fixed31_32_from_int (2 ), -dal_fixed31_32_from_int (segment_start)); +dal_fixed31_32_from_int (region_start)); arr_points[1 ].x =dal_fixed31_32_pow (dal_fixed31_32_from_int (2 ), -dal_fixed31_32_from_int (segment_end)); +dal_fixed31_32_from_int (region_end)); y_r = rgb_resulted[0 ].red; y_g = rgb_resulted[0 ].green;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +1 -1
@@ -196,7 +196,7 @@ static void dpp1_cm_set_regamma_pwl(case OPP_REGAMMA_SRGB : re_mode =1 ;break ; -case OPP_REGAMMA_3_6 : +case OPP_REGAMMA_XVYCC : re_mode =2 ;break ;case OPP_REGAMMA_USER :
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +1 -1
@@ -136,7 +136,7 @@ struct out_csc_color_matrix {enum opp_regamma {OPP_REGAMMA_BYPASS =0 ,OPP_REGAMMA_SRGB , -OPP_REGAMMA_3_6 , +OPP_REGAMMA_XVYCC ,OPP_REGAMMA_USER };
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/27 drm/amd/display: dal 3.1.32
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -38,7 +38,7 @@#include "inc/compressor.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.1.31" +#define DC_VER "3.1.32"#define MAX_SURFACES 3#define MAX_STREAMS 6
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/27 drm/amd/display: enable #PME code path for RV.
In reply to a message not in the archiveFrom: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +3 -3
@@ -1805,12 +1805,12 @@ static enum dc_status enable_link(if (core_dc->current_state->res_ctx.pipe_ctx[i].stream_res.audio !=NULL ) num_audio++; } -if (num_audio ==1 && pp_smu !=NULL && pp_smu->set_pme_wa_enable !=NULL ) -/*this is the first audio. apply the PME w/a in order to wake AZ from D3*/ - pp_smu->set_pme_wa_enable (&pp_smu->pp_smu); pipe_ctx->stream_res.audio->funcs->az_enable (pipe_ctx->stream_res.audio); +if (num_audio ==1 && pp_smu !=NULL && pp_smu->set_pme_wa_enable !=NULL ) +/*this is the first audio. apply the PME w/a in order to wake AZ from D3*/ + pp_smu->set_pme_wa_enable (&pp_smu->pp_smu);/* un-mute audio */ /* TODO: audio should be per stream rather than per link */ pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control(
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/27 drm/amd/display: Add primary tmz_c and meta tmz tmz_c.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 19 +++++++++++++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 10 ++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +13 -6
@@ -299,8 +299,9 @@ bool hubp1_program_surface_flip_and_addr(if (address->grph.addr.quad_part ==0 )break ; -REG_UPDATE (DCSURF_SURFACE_CONTROL , -PRIMARY_SURFACE_TMZ , address->tmz_surface); +REG_UPDATE_2 (DCSURF_SURFACE_CONTROL , +PRIMARY_SURFACE_TMZ , address->tmz_surface, +PRIMARY_META_SURFACE_TMZ , address->tmz_surface);if (address->grph.meta_addr.quad_part !=0 ) { REG_SET(DCSURF_PRIMARY_META_SURFACE_ADDRESS_HIGH, 0,
@@ -325,8 +326,11 @@ bool hubp1_program_surface_flip_and_addr( || address->video_progressive.chroma_addr.quad_part == 0)break ; -REG_UPDATE (DCSURF_SURFACE_CONTROL , -PRIMARY_SURFACE_TMZ , address->tmz_surface); +REG_UPDATE_4 (DCSURF_SURFACE_CONTROL , +PRIMARY_SURFACE_TMZ , address->tmz_surface, +PRIMARY_SURFACE_TMZ_C , address->tmz_surface, +PRIMARY_META_SURFACE_TMZ , address->tmz_surface, +PRIMARY_META_SURFACE_TMZ_C , address->tmz_surface);if (address->video_progressive.luma_meta_addr.quad_part !=0 ) { REG_SET(DCSURF_PRIMARY_META_SURFACE_ADDRESS_HIGH_C, 0,
@@ -368,8 +372,11 @@ bool hubp1_program_surface_flip_and_addr(if (address->grph_stereo.right_addr.quad_part ==0 )break ; -REG_UPDATE (DCSURF_SURFACE_CONTROL , -PRIMARY_SURFACE_TMZ , address->tmz_surface); +REG_UPDATE_4 (DCSURF_SURFACE_CONTROL , +PRIMARY_SURFACE_TMZ , address->tmz_surface, +PRIMARY_SURFACE_TMZ_C , address->tmz_surface, +PRIMARY_META_SURFACE_TMZ , address->tmz_surface, +PRIMARY_META_SURFACE_TMZ_C , address->tmz_surface);if (address->grph_stereo.right_meta_addr.quad_part !=0 ) {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h +10 -0
@@ -296,6 +296,9 @@HUBP_SF (HUBPREQ0_DCSURF_SURFACE_EARLIEST_INUSE_C ,SURFACE_EARLIEST_INUSE_ADDRESS_C , mask_sh),\HUBP_SF (HUBPREQ0_DCSURF_SURFACE_EARLIEST_INUSE_HIGH_C ,SURFACE_EARLIEST_INUSE_ADDRESS_HIGH_C , mask_sh),\HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_SURFACE_TMZ , mask_sh),\ +HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_SURFACE_TMZ_C , mask_sh),\ +HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_META_SURFACE_TMZ , mask_sh),\ +HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_META_SURFACE_TMZ_C , mask_sh),\HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_SURFACE_DCC_EN , mask_sh),\HUBP_SF (HUBPREQ0_DCSURF_SURFACE_CONTROL ,PRIMARY_SURFACE_DCC_IND_64B_BLK , mask_sh),\ HUBP_SF(HUBPRET0_HUBPRET_CONTROL, DET_BUF_PLANE1_BASE_ADDRESS, mask_sh),\
@@ -457,6 +460,13 @@type SURFACE_EARLIEST_INUSE_ADDRESS_C ;\type SURFACE_EARLIEST_INUSE_ADDRESS_HIGH_C ;\type PRIMARY_SURFACE_TMZ ;\ +type PRIMARY_SURFACE_TMZ_C ;\ +type SECONDARY_SURFACE_TMZ ;\ +type SECONDARY_SURFACE_TMZ_C ;\ +type PRIMARY_META_SURFACE_TMZ ;\ +type PRIMARY_META_SURFACE_TMZ_C ;\ +type SECONDARY_META_SURFACE_TMZ ;\ +type SECONDARY_META_SURFACE_TMZ_C ;\type PRIMARY_SURFACE_DCC_EN ;\type PRIMARY_SURFACE_DCC_IND_64B_BLK ;\type DET_BUF_PLANE1_BASE_ADDRESS ;\
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx