Commit 2f9d9041 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

drm/ast: Store CRTC memory request threshold in device quirks



Store each hardware's CRTC memory threshold in the specific instance
of struct ast_device_quirks. Removes the calls to IS_AST_GENn() from
ast_set_crtthd_reg().

The values stored in the registers appear to be plain limits. Hence
write them in the driver in decimal format instead of hexadecimal.

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-4-tzimmermann@suse.de
parent 703f4731
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ void ast_2000_detect_tx_chip(struct ast_device *ast, bool need_post)
}

static const struct ast_device_quirks ast_2000_device_quirks = {
	.crtc_mem_req_threshold_low = 31,
	.crtc_mem_req_threshold_high = 47,
};

struct drm_device *ast_2000_device_create(struct pci_dev *pdev,
+2 −0
Original line number Diff line number Diff line
@@ -433,6 +433,8 @@ static void ast_2100_detect_widescreen(struct ast_device *ast)
}

static const struct ast_device_quirks ast_2100_device_quirks = {
	.crtc_mem_req_threshold_low = 47,
	.crtc_mem_req_threshold_high = 63,
};

struct drm_device *ast_2100_device_create(struct pci_dev *pdev,
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ static void ast_2200_detect_widescreen(struct ast_device *ast)
}

static const struct ast_device_quirks ast_2200_device_quirks = {
	.crtc_mem_req_threshold_low = 47,
	.crtc_mem_req_threshold_high = 63,
};

struct drm_device *ast_2200_device_create(struct pci_dev *pdev,
+2 −0
Original line number Diff line number Diff line
@@ -1408,6 +1408,8 @@ static void ast_2300_detect_widescreen(struct ast_device *ast)
}

static const struct ast_device_quirks ast_2300_device_quirks = {
	.crtc_mem_req_threshold_low = 96,
	.crtc_mem_req_threshold_high = 120,
};

struct drm_device *ast_2300_device_create(struct pci_dev *pdev,
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ static void ast_2400_detect_widescreen(struct ast_device *ast)
}

static const struct ast_device_quirks ast_2400_device_quirks = {
	.crtc_mem_req_threshold_low = 96,
	.crtc_mem_req_threshold_high = 120,
};

struct drm_device *ast_2400_device_create(struct pci_dev *pdev,
Loading