]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/mgag200: Run DRM default client setup
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Sep 2024 07:12:54 +0000 (09:12 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 26 Sep 2024 07:31:28 +0000 (09:31 +0200)
Call drm_client_setup_with_fourcc() to run the kernel's default client
setup for DRM. Set fbdev_probe in struct drm_driver, so that the client
setup can start the common fbdev client.

v5:
- select DRM_CLIENT_SELECTION
v2:
- use drm_client_setup_with_fourcc()

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-57-tzimmermann@suse.de
drivers/gpu/drm/mgag200/Kconfig
drivers/gpu/drm/mgag200/mgag200_drv.c

index 3096944a8f0ab76ab8ac2e8b85c7123e05bf6419..412dcbea0e2daff1670b54ac406788187b1e1ace 100644 (file)
@@ -2,6 +2,7 @@
 config DRM_MGAG200
        tristate "Matrox G200"
        depends on DRM && PCI && MMU
+       select DRM_CLIENT_SELECTION
        select DRM_GEM_SHMEM_HELPER
        select DRM_KMS_HELPER
        select I2C
@@ -20,4 +21,4 @@ config DRM_MGAG200_DISABLE_WRITECOMBINE
          performances. This can interfere with real-time tasks; even if they
          are running on other CPU cores than the graphics output.
          Enable this option only if you run realtime tasks on a server with a
-         Matrox G200.
\ No newline at end of file
+         Matrox G200.
index 6623ee4e3277dfecefdc1fb94f0713aa50192e5c..29087e2398df089f59dfb3abb988bbc01d611d5d 100644 (file)
 
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_shmem.h>
 #include <drm/drm_file.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_ioctl.h>
 #include <drm/drm_managed.h>
 #include <drm/drm_module.h>
@@ -129,6 +131,7 @@ static const struct drm_driver mgag200_driver = {
        .minor = DRIVER_MINOR,
        .patchlevel = DRIVER_PATCHLEVEL,
        DRM_GEM_SHMEM_DRIVER_OPS,
+       DRM_FBDEV_SHMEM_DRIVER_OPS,
 };
 
 /*
@@ -314,7 +317,7 @@ mgag200_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         * FIXME: A 24-bit color depth does not work with 24 bpp on
         * G200ER. Force 32 bpp.
         */
-       drm_fbdev_shmem_setup(dev, 32);
+       drm_client_setup_with_fourcc(dev, DRM_FORMAT_XRGB8888);
 
        return 0;
 }