From: jsg Date: Fri, 11 Oct 2024 02:31:39 +0000 (+0000) Subject: drm/amd/display: Initialize get_bytes_per_element's default to 1 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ea3915d0c5d961333a037d2939e5b743101ca0e3;p=openbsd drm/amd/display: Initialize get_bytes_per_element's default to 1 From Alex Hung c7630935d9a4986e8c0ed91658a781b7a77d73f7 in linux-6.6.y/6.6.55 4067f4fa0423a89fb19a30b57231b384d77d2610 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c b/sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c index 0fc9f3e3ffa..f603486af6e 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c @@ -78,7 +78,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib, static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma) { - unsigned int ret_val = 0; + unsigned int ret_val = 1; if (source_format == dm_444_16) { if (!is_chroma) diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c b/sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c index 618f4b682ab..9f28e4d3c66 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c @@ -53,7 +53,7 @@ static void calculate_ttu_cursor( static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma) { - unsigned int ret_val = 0; + unsigned int ret_val = 1; if (source_format == dm_444_16) { if (!is_chroma)