Skip to content

drm/ast: Disable HW cursor when switching modes

Thomas Zimmermann dri-devel stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/ast: Do full modeset if the primary plane's format changesdrivers/gpu/drm/ast/ast_mode.c+16 -73 replies
2/3drm/ast: Store image size in HW cursor infodrivers/gpu/drm/ast/ast_cursor.c drivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+17 -113 replies
3/3drm/ast: Disable cursor while switching display modesdrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+54 -11 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchDaniel Vetter
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] drm/ast: Disable HW cursor when switching modes

Since converting the ast driver to atomic modesettting, modesetting occationally locks up the graphics hardware and turns the display permanently dark. This happens once or twice per 10 modeswitches. Investigation shows that the ast hardware presumably requires the HW cursor to be disabled while the modeswitch takes place.

This patchset fixes the problem by disabling the HW cursor before programming the CRTC mode. After changing the mode, the HW cursor gets re-enabled if it was enabled before.

Patches #1 and #2 simplify the modesetting and cursor code in preparation of the actual fix. Patch #3 adds the workaround. The CRTC's atomic_begin() helper disables an active HW cursor and atomic_flush() re-enables it. The process is transparent for userspace and the rest of the DRM code. For mere pageflip operations, nothing changes.

Tested on AST2100 HW. The issue is not 100% reproducible, but does not show up after applying the patchset. I think the problem has been fixed.

Thomas Zimmermann (3):
drm/ast: Do full modeset if the primary plane's format changes drm/ast: Store image size in HW cursor info
drm/ast: Disable cursor while switching display modes

 drivers/gpu/drm/ast/ast_cursor.c | 13 ++++-
 drivers/gpu/drm/ast/ast_drv.h    |  9 +++-
 drivers/gpu/drm/ast/ast_mode.c   | 82 ++++++++++++++++++++++++++------
 3 files changed, 86 insertions(+), 18 deletions(-)

--
2.27.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel