Commit 4b3374d7 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

drm/ast: Store DRAM clock table in struct ast_device



Init the new field dclk_table in struct ast_device to the per-gen
table of DRAM clock parameters. Use the field during modesetting.

The table is static, so a setup is only required once. Removes the
call to IS_AST_GEN() from the atomic commit's code path.

Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20251007150343.273718-2-tzimmermann@suse.de
parent b076ed30
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ struct drm_device *ast_2000_device_create(struct pci_dev *pdev,

	ast_device_init(ast, chip, config_mode, regs, ioregs);

	ast->dclk_table = ast_2000_dclk_table;

	ast_2000_detect_tx_chip(ast, need_post);

	if (need_post) {
+2 −0
Original line number Diff line number Diff line
@@ -451,6 +451,8 @@ struct drm_device *ast_2100_device_create(struct pci_dev *pdev,

	ast_device_init(ast, chip, config_mode, regs, ioregs);

	ast->dclk_table = ast_2000_dclk_table;

	ast_2000_detect_tx_chip(ast, need_post);

	if (need_post) {
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ struct drm_device *ast_2200_device_create(struct pci_dev *pdev,

	ast_device_init(ast, chip, config_mode, regs, ioregs);

	ast->dclk_table = ast_2000_dclk_table;

	ast_2000_detect_tx_chip(ast, need_post);

	if (need_post) {
+2 −0
Original line number Diff line number Diff line
@@ -1426,6 +1426,8 @@ struct drm_device *ast_2300_device_create(struct pci_dev *pdev,

	ast_device_init(ast, chip, config_mode, regs, ioregs);

	ast->dclk_table = ast_2000_dclk_table;

	ast_2300_detect_tx_chip(ast);

	if (need_post) {
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ struct drm_device *ast_2400_device_create(struct pci_dev *pdev,

	ast_device_init(ast, chip, config_mode, regs, ioregs);

	ast->dclk_table = ast_2000_dclk_table;

	ast_2300_detect_tx_chip(ast);

	if (need_post) {
Loading