dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/ast: Disable HW cursor when switching modes
@ 2020-07-27  7:37 Thomas Zimmermann
  2020-07-27  7:37 ` [PATCH 1/3] drm/ast: Do full modeset if the primary plane's format changes Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Thomas Zimmermann @ 2020-07-27  7:37 UTC (permalink / raw)
  To: airlied, daniel, sam, kraxel, emil.l.velikov; +Cc: Thomas Zimmermann, dri-devel

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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-27 18:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-27  7:37 [PATCH 0/3] drm/ast: Disable HW cursor when switching modes Thomas Zimmermann
2020-07-27  7:37 ` [PATCH 1/3] drm/ast: Do full modeset if the primary plane's format changes Thomas Zimmermann
2020-07-27 10:40   ` daniel
2020-07-27 11:24     ` Thomas Zimmermann
2020-07-27 18:31       ` Daniel Vetter
2020-07-27  7:37 ` [PATCH 2/3] drm/ast: Store image size in HW cursor info Thomas Zimmermann
2020-07-27 10:42   ` daniel
2020-07-27 11:37     ` Thomas Zimmermann
2020-07-27 18:32       ` Daniel Vetter
2020-07-27  7:37 ` [PATCH 3/3] drm/ast: Disable cursor while switching display modes Thomas Zimmermann
2020-07-27 10:46   ` daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox