drm/amd/display: Initialize get_bytes_per_element's default to 1
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:31:39 +0000 (02:31 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:31:39 +0000 (02:31 +0000)
From Alex Hung
c7630935d9a4986e8c0ed91658a781b7a77d73f7 in linux-6.6.y/6.6.55
4067f4fa0423a89fb19a30b57231b384d77d2610 in mainline linux

sys/dev/pci/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c
sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c

index 0fc9f3e..f603486 100644 (file)
@@ -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)
index 618f4b6..9f28e4d 100644 (file)
@@ -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)