linux-loongson/drivers/gpu/drm/amd/display/dc/bios
Timur Kristóf 1050747846 drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3
For later VBIOS versions, the fractional feedback divider is
calculated as the remainder of dividing the feedback divider by
a factor, which is set to 1000000. For reference, see:
- calculate_fb_and_fractional_fb_divider
- calc_pll_max_vco_construct

However, in case of old VBIOS versions that have
set_pixel_clock_v3, they only have 1 byte available for the
fractional feedback divider, and it's expected to be set to the
remainder from dividing the feedback divider by 10.
For reference see the legacy display code:
- amdgpu_pll_compute
- amdgpu_atombios_crtc_program_pll

This commit fixes set_pixel_clock_v3 by dividing the fractional
feedback divider passed to the function by 100000.

Fixes: 4562236b3b ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 027e7acc7e17802ebf28e1edb88a404836ad50d6)
Cc: stable@vger.kernel.org
2025-08-18 18:00:34 -04:00
..
dce60 drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
dce80 drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
dce110 drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
dce112 drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
bios_parser2.c drm/amd/display/dc: add support for oem i2c in atom_firmware_info_v3_1 2025-02-12 21:02:54 -05:00
bios_parser2.h
bios_parser_common.c drm/amd/display: Add support for USBC connector 2022-03-31 23:05:53 -04:00
bios_parser_common.h
bios_parser_helper.c drm/amd/display: Remove unused function bios_get_vga_enabled_displays 2024-09-26 17:06:17 -04:00
bios_parser_helper.h drm/amd/display: Remove unused function bios_get_vga_enabled_displays 2024-09-26 17:06:17 -04:00
bios_parser_interface.c
bios_parser_types_internal2.h drm/amd/display: Add dependant changes for DCN32/321 2022-06-03 16:43:38 -04:00
bios_parser_types_internal.h
bios_parser.c drm/amd/display: Don't print errors for nonexistent connectors 2025-08-18 18:00:20 -04:00
bios_parser.h
command_table2.c drm/amd/display: Add option to disable PHY SSC reduction on transmitter enable 2025-06-18 12:19:16 -04:00
command_table2.h drm/amd/display: Pass pwrseq inst for backlight and ABM 2023-12-06 15:22:33 -05:00
command_table_helper2.c drm/amd/display: fix dcn4x init failed 2025-02-25 11:45:11 -05:00
command_table_helper2.h
command_table_helper_struct.h
command_table_helper.c drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
command_table_helper.h drm/amd/display/dc: Refactor remove duplications 2025-02-27 15:52:32 -05:00
command_table.c drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3 2025-08-18 18:00:34 -04:00
command_table.h
Makefile