Loading
drm/amd/display: Silence type conversion warnings in dml2
[Why] Compiler build generates type conversion warnings throughout dc/dml2_0 where values are implicitly narrowed (e.g. int/uint32_t/uint64_t assigned to uint8_t, unsigned char, char, bool, or dml_bool_t), cluttering build output and masking genuine issues. [How] Add explicit casts at each narrowing assignment with ASSERT guards to catch out-of-range values in debug builds: - uint8_t: otg_inst, num_planes, pipe_idx, vblank_index fields - unsigned char: pipe_dlg_param.otg_inst from tg->inst - char: mcache num_pipes from num_dpps_required - bool/dml_bool_t: INTERLACE bitfield and fams2 enable flag use != 0 - uint64_t: widen min_hardware_refresh_in_uhz to hold div64_u64 result, then cast to unsigned long for min_refresh_uhz with ASSERT Reviewed-by:Austin Zheng <austin.zheng@amd.com> Signed-off-by:
Gaghik Khachatrian <gaghik.khachatrian@amd.com> Signed-off-by:
Chuanyu Tseng <chuanyu.tseng@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>