amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 0/7] DC: don't overclock DCE 6-10 and other fixes
Date: Thu, 31 Jul 2025 11:43:45 +0200	[thread overview]
Message-ID: <20250731094352.29528-1-timur.kristof@gmail.com> (raw)

This series fixes various issues that I found while trying to
get old GPUs with DCE 6 to work well with DC.

The most important part of this series is tweaking how
the engine clock is set on DCE 6-10.

For DCE 6 the maximum according to max_clks_by_state is 600 Mhz,
but dce60_validate_bandwidth sets it to 681 MHz, and then
dce60_update_clocks further increases it by 15%, resulting in
a whopping 783 MHz, which is overall 30% more than what the
hardware was supposed to handle. My Tahiti GPU didn't even boot
with DC enabled with that clock setting.
There is a similar issue with DCE 8-10 too, additionally the
dce80_max_clks_by_state data seems to be incorrect, so I changed
the maximum to 625 MHz for DCE 8-10, which is what the legacy
code uses.

I tested these changes and made sure 4K 60Hz (10 bit) output
still works with them on the following GPUs:

* Tahiti (DCE 6)
* Oland (DCE 6.4)
* Hawaii (DCE 8)
* Tonga, Fiji (DCE 10)

I would appreciate if someone from AMD could confirm what the
maximum display engine clocks for these parts really are.

Other than that, the rest of the series deals with some
ligher problems:

There are patches to fill the display information on DCE 6-10
(previously only filled on DCE 11), such as the first CRTC and
its line time, as well as vblank time, display clock etc.
These are going to be needed for DPM.

It also removes some errors and warnings from the logs which
are caused by the VBIOS on old GPUs reporting some information
differently, namely some VBIOS seem to lack encoder capability
entries for some connectors, as well as the actual amount of
connectors on the GPU not matching the number of entries
reported by the VBIOS.
The DC code base already handles these cases well. They are
not actually errors, so we shouldn't spam the logs with them.

Finally, there is also a fix for set_pixel_clock_v3 which
works slightly differently than the other versions.

Timur Kristóf (7):
  drm/amd/display: Don't overclock DCE 6 by 15%
  drm/amd/display: Adjust DCE 8-10 clock, don't overclock by 15%
  drm/amd/display: Find first CRTC and its line time in
    dce110_fill_display_configs
  drm/amd/display: Fill display clock and vblank time in
    dce110_fill_display_configs
  drm/amd/display: Don't warn when missing DCE encoder caps
  drm/amd/display: Don't print errors for nonexistent connectors
  drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3

 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  5 +--
 .../drm/amd/display/dc/bios/command_table.c   |  2 +-
 .../display/dc/clk_mgr/dce100/dce_clk_mgr.c   | 14 +++----
 .../dc/clk_mgr/dce110/dce110_clk_mgr.c        | 40 +++++++++++--------
 .../display/dc/clk_mgr/dce60/dce60_clk_mgr.c  | 10 ++---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 15 ++++++-
 .../drm/amd/display/dc/dce/dce_link_encoder.c |  8 ++--
 7 files changed, 51 insertions(+), 43 deletions(-)

-- 
2.50.1


             reply	other threads:[~2025-07-31  9:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31  9:43 Timur Kristóf [this message]
2025-07-31  9:43 ` [PATCH 1/7] drm/amd/display: Don't overclock DCE 6 by 15% Timur Kristóf
2025-08-04 15:54   ` Alex Deucher
2025-08-12 22:11   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 2/7] drm/amd/display: Adjust DCE 8-10 clock, don't overclock " Timur Kristóf
2025-08-04 15:56   ` Alex Deucher
2025-08-04 16:35     ` Timur Kristóf
2025-08-04 16:57       ` Alex Deucher
2025-08-12 22:18   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 3/7] drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs Timur Kristóf
2025-08-04 15:57   ` Alex Deucher
2025-08-12 22:32   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 4/7] drm/amd/display: Fill display clock and vblank " Timur Kristóf
2025-08-04 15:58   ` Alex Deucher
2025-08-12 22:39   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 5/7] drm/amd/display: Don't warn when missing DCE encoder caps Timur Kristóf
2025-08-04 15:59   ` Alex Deucher
2025-08-12 22:47   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 6/7] drm/amd/display: Don't print errors for nonexistent connectors Timur Kristóf
2025-08-04 15:59   ` Alex Deucher
2025-08-12 22:59   ` Rodrigo Siqueira
2025-07-31  9:43 ` [PATCH 7/7] drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3 Timur Kristóf
2025-08-04 15:59   ` Alex Deucher
2025-08-12 23:46   ` Rodrigo Siqueira
2025-08-09 20:25 ` [PATCH 0/7] DC: don't overclock DCE 6-10 and other fixes Timur Kristóf
2025-08-18  3:01 ` Alex Hung
2025-08-18 14:44   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250731094352.29528-1-timur.kristof@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).