• Thomas Zimmermann's avatar
    drm/{i915, xe}: Implement fbdev emulation as in-kernel client · b55f3bba
    Thomas Zimmermann authored
    Replace all code that initializes or releases fbdev emulation
    throughout the driver. Instead initialize the fbdev client by a
    single call to intel_fbdev_setup() after i915 has registered its
    DRM device. Just like similar code in other drivers, i915 fbdev
    emulation now acts like a regular DRM client. Do the same for xe.
    
    The fbdev client setup consists of the initial preparation and the
    hot-plugging of the display. The latter creates the fbdev device
    and sets up the fbdev framebuffer. The setup performs display
    hot-plugging once. If no display can be detected, DRM probe helpers
    re-run the detection on each hotplug event.
    
    A call to drm_client_dev_unregister() releases all in-kernel clients
    automatically. No further action is required within i915. If the fbdev
    framebuffer has been fully set up, struct fb_ops.fb_destroy implements
    the release. For partially initialized emulation, the fbdev client
    reverts the initial setup. Do the same for xe and remove its call to
    intel_fbdev_fini().
    
    v8:
    - setup client in intel_display_driver_register (Jouni)
    - mention xe in commit message
    
    v7:
    - update xe driver
    - reword commit message
    
    v6:
    - use 'i915' for i915 device (Jouni)
    - remove unnecessary code for non-atomic mode setting (Jouni, Ville)
    - fix function name in commit message (Jouni)
    
    v3:
    -  as before, silently ignore devices without displays
    
    v2:
    -  let drm_client_register() handle initial hotplug
    -  fix driver name in error message (Jani)
    -  fix non-fbdev build (kernel test robot)
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Reviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
    Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240409081029.17843-7-tzimmermann@suse.deSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    b55f3bba
intel_display_driver.c 19.1 KB