DC Patches Jan 6, 2017
Subsystems (3)
cover DC Patches Jan 6, 2017
* warning fixes
* small cleanups
* minor fixes
Harry Wentland (4):
drm/amd/display: Remove unused function in gamma_calcs drm/amd/display: Fix misleading indentation bug in link_encoder drm/amd/display: Fix warnings in DC
drm/amd/display: Fix wrong index bug in set_avi_info_frame
Tony Cheng (2):
drm/amd/display: fix Infoframe byte 28-31 doesn't get written out to
register
drm/amd/display: remove HDMI deep color debug flag
Yongqiang Sun (2):
drm/amd/display: Check hdr support before setting. drm/amd/display: Don't fail validation for SIGNAL_TYPE_VIRTUAL
drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 39 ---------------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 17 ++++++---- drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 9 ++--- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 6 ---- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 31 +++++++++-------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1 - .../drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 2 -- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- 9 files changed, 34 insertions(+), 74 deletions(-)
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170107002230.19725-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 1/8 drm/amd/display: Remove unused function in gamma_calcs
--- drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 39 ---------------------- 1 file changed, 39 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c +0 -39
@@ -185,45 +185,6 @@ static bool setup_custom_float(return true; } -static bool convert_to_custom_float_format_ex ( -struct fixed31_32 value, -const struct custom_float_format *format, -struct custom_float_value *result) -{ -return build_custom_float ( - value, format, - &result->negative, &result->mantissa, &result->exponenta) && -setup_custom_float ( - format, result->negative, result->mantissa, result->exponenta, - &result->value); -} - -static bool round_custom_float_6_12 ( -struct hw_x_point *x) -{ -struct custom_float_format fmt; - -struct custom_float_value value; - - fmt.exponenta_bits =6 ; - fmt.mantissa_bits =12 ; - fmt.sign = true; - -if (!convert_to_custom_float_format_ex ( - x->x, &fmt, &value)) -return false; - - x->adjusted_x = x->x; - -if (value.mantissa) { -BREAK_TO_DEBUGGER (); - -return false; - } - -return true; -} - static bool build_hw_curve_configuration( const struct curve_config *curve_config, struct gamma_curve *gamma_curve,
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/8 drm/amd/display: Fix misleading indentation bug in link_encoder
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +2 -1
@@ -1017,11 +1017,12 @@ bool dce110_link_encoder_construct(/* Override features with DCE-specific values */ if (BP_RESULT_OK == bp_funcs->get_encoder_cap_info ( enc110->base.ctx->dc_bios, enc110->base.id, - &bp_cap_info)) + &bp_cap_info)) { enc110->base.features.flags.bits.IS_HBR2_CAPABLE = bp_cap_info.DP_HBR2_CAP; enc110->base.features.flags.bits.IS_HBR3_CAPABLE = bp_cap_info.DP_HBR3_EN; + }return true; }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/8 drm/amd/display: Fix warnings in DC
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++----- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 6 ------ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 1 - drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 2 -- 4 files changed, 4 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -5
@@ -1731,14 +1731,15 @@ static void set_hdr_static_info_packet(struct core_stream *stream, struct hw_info_packet *info_packet) { - uint16_t i; + uint16_t i = 0;enum signal_type signal = stream->signal; +struct dc_hdr_static_metadata hdr_metadata; +uint32_t data;if (!surface)return ; -struct dc_hdr_static_metadata hdr_metadata = - surface->public.hdr_static_ctx; + hdr_metadata = surface->public.hdr_static_ctx;if (dc_is_hdmi_signal (signal)) { info_packet->valid = true;
@@ -1757,8 +1758,6 @@ static void set_hdr_static_info_packet( i =2 ; } -uint32_t data; - data = hdr_metadata.is_hdr; info_packet->sb[i++] = data ?0x02 :0x00 ; info_packet->sb[i++] =0x00 ;
drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +0 -6
@@ -119,7 +119,6 @@ static void regamma_config_regions_and_segments( const struct pwl_params *params) {const struct gamma_curve *curve; -uint32_t value =0 ; { REG_SET_2(REGAMMA_CNTLA_START_CNTL, 0,
@@ -565,8 +564,6 @@ void dce110_opp_set_clamping(struct dce110_opp *opp110, const struct clamping_and_pixel_encoding_params *params) { - uint32_t clamp_cntl_value = 0; - REG_SET_2(FMT_CLAMP_CNTL, 0, FMT_CLAMP_DATA_EN, 0, FMT_CLAMP_COLOR_FORMAT, 0);
@@ -731,7 +728,6 @@ void dce110_opp_set_dyn_expansion(static void program_formatter_reset_dig_resync_fifo (struct output_pixel_processor *opp) {struct dce110_opp *opp110 =TO_DCE110_OPP (opp); -uint8_t counter =10 ;/* clear previous phase lock status*/ REG_UPDATE(FMT_CONTROL,
@@ -810,8 +806,6 @@ static bool configure_graphics_mode(enum graphics_csc_adjust_type csc_adjust_type, enum dc_color_space color_space) { - struct dc_context *ctx = opp110->base.ctx; - REG_SET(OUTPUT_CSC_CONTROL, 0, OUTPUT_CSC_GRPH_MODE, 0);
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -1
@@ -293,7 +293,6 @@ static bool dce110_set_output_transfer_func( {struct output_pixel_processor *opp = pipe_ctx->opp;const struct core_gamma *ramp =NULL ; -struct ipp_prescale_params prescale_params = {0 };struct pwl_params *regamma_params;bool result = false;
drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp_gamma.c +0 -2
@@ -72,8 +72,6 @@ bool dce110_ipp_set_degamma( {struct dce110_ipp *ipp110 =TO_DCE110_IPP (ipp); -uint32_t value =0 ; -uint32_t degamma_type = (mode == IPP_DEGAMMA_MODE_HW_sRGB) ?1 :0 ; ASSERT(mode == IPP_DEGAMMA_MODE_BYPASS ||
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/8 drm/amd/display: Fix wrong index bug in set_avi_info_frame
In reply to a message not in the archive--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -2
@@ -1490,9 +1490,10 @@ static void set_avi_info_frame( info_packet->hb2 = info_frame.avi_info_packet.info_packet_hdmi.packet_raw_data.hb2; -for (byte_index =0 ; byte_index <sizeof (info_packet->sb); byte_index++) +for (byte_index =0 ; byte_index <sizeof (info_frame.avi_info_packet. + info_packet_hdmi.packet_raw_data.sb); byte_index++) info_packet->sb[byte_index] = info_frame.avi_info_packet. - info_packet_hdmi.packet_raw_data.sb[byte_index]; + info_packet_hdmi.packet_raw_data.sb[byte_index]; info_packet->valid = true; }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/8 drm/amd/display: Check hdr support before setting.
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
In case of programing info frame to
some monitors don't support HDR, it will result in black screen or corruption when unplug monitor.
By checking hdr flag to avoid unnecessary setting for monitors don't support HDR.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ .../drm/amd/display/dc/dce/dce_stream_encoder.c | 27 +++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -0
@@ -1742,6 +1742,9 @@ static void set_hdr_static_info_packet( hdr_metadata = surface->public.hdr_static_ctx; +if (!hdr_metadata.is_hdr) +return ; +if (dc_is_hdmi_signal (signal)) { info_packet->valid = true;
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +16 -11
@@ -555,18 +555,23 @@ static void dce110_stream_encoder_update_dp_info_packets(struct dce110_stream_encoder *enc110 =DCE110STRENC_FROM_STRENC (enc);uint32_t value =REG_READ (DP_SEC_CNTL ); -dce110_update_generic_info_packet ( +if (info_frame->vsc.valid) +dce110_update_generic_info_packet ( + enc110, +0 ,/* packetIndex */ + &info_frame->vsc); + +if (info_frame->spd.valid) +dce110_update_generic_info_packet ( enc110, -0 ,/* packetIndex */ - &info_frame->vsc); -dce110_update_generic_info_packet ( - enc110, -2 ,/* packetIndex */ - &info_frame->spd); -dce110_update_generic_info_packet ( - enc110, -3 ,/* packetIndex */ - &info_frame->hdrsmd); +2 ,/* packetIndex */ + &info_frame->spd); + +if (info_frame->hdrsmd.valid) +dce110_update_generic_info_packet ( + enc110, +3 ,/* packetIndex */ + &info_frame->hdrsmd);/* enable/disable transmission of packet(s). * If enabled, packet transmission begins on the next frame
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/8 drm/amd/display: fix Infoframe byte 28-31 doesn't get written out to register
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +2 -2
@@ -137,8 +137,8 @@ static void dce110_update_generic_info_packet(REG_WRITE (AFMT_GENERIC_3 , *content++);REG_WRITE (AFMT_GENERIC_4 , *content++);REG_WRITE (AFMT_GENERIC_5 , *content++); -REG_WRITE (AFMT_GENERIC_6 , *content); -REG_WRITE (AFMT_GENERIC_7 ,0 ); +REG_WRITE (AFMT_GENERIC_6 , *content++); +REG_WRITE (AFMT_GENERIC_7 , *content); }if (!REG (AFMT_VBI_PACKET_CONTROL1 )) {
drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h +1 -1
@@ -19,7 +19,7 @@ struct encoder_info_packet {uint8_t hb1;uint8_t hb2;uint8_t hb3; -uint8_t sb[28 ]; +uint8_t sb[32 ]; };struct encoder_info_frame {
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/8 drm/amd/display: remove HDMI deep color debug flag
In reply to a message not in the archiveFrom: Tony Cheng <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 --- 2 files changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
@@ -149,7 +149,6 @@ struct dc_debug {bool disable_power_gate;bool disable_clock_gate;bool disable_dmcu; -bool disable_hdmi_deep_color;bool disable_color_module; };
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +0 -3
@@ -949,9 +949,6 @@ bool dce110_link_encoder_construct( enc110->base.transmitter = init_data->transmitter; -if (enc110->base.ctx->dc->debug.disable_hdmi_deep_color) - enc110->base.features.max_hdmi_deep_color =COLOR_DEPTH_888 ; -/* set the flag to indicate whether driver poll the I2C data pin * while doing the DP sink detect */
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/8 drm/amd/display: Don't fail validation for SIGNAL_TYPE_VIRTUAL
In reply to a message not in the archiveFrom: Yongqiang Sun <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +3 -0
@@ -1053,6 +1053,9 @@ bool dce110_link_encoder_validate_output_with_stream( is_valid =dce110_link_encoder_validate_dp_output ( enc110, &stream->public.timing);break ; +case SIGNAL_TYPE_VIRTUAL : + is_valid = true; +break ;default : is_valid = false;break ;
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx