mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
drm/ast: Store HSync adjustment in device quirks
Add the add4 flag to struct ast_device_quirks and set it on AST2600. Replaces a call to IS_AST_GEN7() in ast_set_crtc_reg(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>> Link: https://lore.kernel.org/r/20251007150343.273718-6-tzimmermann@suse.de
This commit is contained in:
parent
d251db1f31
commit
b245bc23ff
|
|
@ -63,6 +63,7 @@ static const struct ast_device_quirks ast_2600_device_quirks = {
|
|||
.crtc_mem_req_threshold_low = 160,
|
||||
.crtc_mem_req_threshold_high = 224,
|
||||
.crtc_hsync_precatch_needed = true,
|
||||
.crtc_hsync_add4_needed = true,
|
||||
};
|
||||
|
||||
struct drm_device *ast_2600_device_create(struct pci_dev *pdev,
|
||||
|
|
|
|||
|
|
@ -176,6 +176,12 @@ struct ast_device_quirks {
|
|||
* by AST2500PreCatchCRT in VBIOS mode flags.
|
||||
*/
|
||||
bool crtc_hsync_precatch_needed;
|
||||
|
||||
/*
|
||||
* Workaround for modes with HSync Time that is not a multiple
|
||||
* of 8 (e.g., 1920x1080@60Hz, HSync +44 pixels).
|
||||
*/
|
||||
bool crtc_hsync_add4_needed;
|
||||
};
|
||||
|
||||
struct ast_device {
|
||||
|
|
|
|||
|
|
@ -288,8 +288,7 @@ static void ast_set_crtc_reg(struct ast_device *ast, struct drm_display_mode *mo
|
|||
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xAC, 0x00, jregAC);
|
||||
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xAD, 0x00, jregAD);
|
||||
|
||||
// Workaround for HSync Time non octave pixels (1920x1080@60Hz HSync 44 pixels);
|
||||
if (IS_AST_GEN7(ast) && (mode->crtc_vdisplay == 1080))
|
||||
if (ast->quirks->crtc_hsync_add4_needed && mode->crtc_vdisplay == 1080)
|
||||
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xFC, 0xFD, 0x02);
|
||||
else
|
||||
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xFC, 0xFD, 0x00);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user