drm/{i915,xe}: Implement fbdev client callbacks
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 9 Apr 2024 08:04:27 +0000 (10:04 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 25 Apr 2024 11:25:54 +0000 (14:25 +0300)
commit762f8c13b8ca4b861d28a529fa56b7960d71b892
treeda5db135afaceb55b0319d2c9ae0bf35847a88f5
parentf3a36cb5d97e49945b00f0a78ce6e6a4c5223806
drm/{i915,xe}: Implement fbdev client callbacks

Move code from ad-hoc fbdev callbacks into DRM client functions
and remove the old callbacks. The functions instruct the client
to poll for changed output or restore the display.

The DRM core calls both, the old callbacks and the new client
helpers, from the same places. The new functions perform the same
operation as before, so there's no change in functionality.

Fox xe, remove xe_display_last_close(), which restored the fbdev
display. As with i915, the DRM core's drm_lastclose() performs
this operation automatically.

v8:
- mention xe in commit message

v7:
- update xe driver

v6:
- return errors from client callbacks (Jouni)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409081029.17843-6-tzimmermann@suse.de
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_driver.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/i915/display/intel_fbdev.h
drivers/gpu/drm/i915/i915_driver.c
drivers/gpu/drm/xe/display/xe_display.c