[PATCH 25/26] drm/amd/display: fix compilation warning in dml2

Hamza Mahfooz hamza.mahfooz at amd.com
Wed Oct 18 17:53:40 UTC 2023


On 10/18/23 13:41, Roman.Li at amd.com wrote:
> From: Qingqing Zhuo <qingqing.zhuo at amd.com>
> 
> [Why]
> dml2_dc_resource_mgmt.c:792:3: error:
> enumeration value ‘dml_odm_mode_split_1to2’ not
> handled in switch [-Werror=switch]
>    792 |   switch (disp_cfg->hw.ODMMode[cfg_idx]) {
>        |   ^~~~~~
> 
> [How]
> Add default case for switch.
> 
> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira at amd.com>
> Reviewed-by: Jun Lei <jun.lei at amd.com>
> Acked-by: Roman Li <roman.li at amd.com>
> Signed-off-by: Qingqing Zhuo <qingqing.zhuo at amd.com>

If this was introduced by this series, you should squash
this patch into the problematic patch.

> ---
>   drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
> index 71fce58da44d..fc266c6e1398 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
> @@ -791,6 +791,8 @@ static unsigned int get_odm_factor(
>   			return 2;
>   		case dml_odm_mode_combine_4to1:
>   			return 4;
> +		default:
> +			break;
>   		}
>   	ASSERT(false);
>   	return 1;
-- 
Hamza



More information about the amd-gfx mailing list