diff mbox series

[v5,41/80] drm/tidss: Run DRM default client setup

Message ID 20240924071734.98201-42-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Provide client setup helper and convert drivers | expand

Commit Message

Thomas Zimmermann Sept. 24, 2024, 7:12 a.m. UTC
Call drm_client_setup() 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.

The tidss driver specifies a preferred color mode of 32. As this
is the default if no format has been given, leave it out entirely.

v5:
- select DRM_CLIENT_SELECTION

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jyri Sarha <jyri.sarha@iki.fi>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
---
 drivers/gpu/drm/tidss/Kconfig     | 1 +
 drivers/gpu/drm/tidss/tidss_drv.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Tomi Valkeinen Sept. 26, 2024, 12:11 p.m. UTC | #1
On 24/09/2024 10:12, Thomas Zimmermann wrote:
> Call drm_client_setup() 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.
> 
> The tidss driver specifies a preferred color mode of 32. As this
> is the default if no format has been given, leave it out entirely.
> 
> v5:
> - select DRM_CLIENT_SELECTION
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Jyri Sarha <jyri.sarha@iki.fi>
> Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Acked-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>   drivers/gpu/drm/tidss/Kconfig     | 1 +
>   drivers/gpu/drm/tidss/tidss_drv.c | 4 +++-
>   2 files changed, 4 insertions(+), 1 deletion(-)

Tested on AM62 SK.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

  Tomi

> diff --git a/drivers/gpu/drm/tidss/Kconfig b/drivers/gpu/drm/tidss/Kconfig
> index 2385c56493b9..31ad582b7602 100644
> --- a/drivers/gpu/drm/tidss/Kconfig
> +++ b/drivers/gpu/drm/tidss/Kconfig
> @@ -2,6 +2,7 @@ config DRM_TIDSS
>   	tristate "DRM Support for TI Keystone"
>   	depends on DRM && OF
>   	depends on ARM || ARM64 || COMPILE_TEST
> +	select DRM_CLIENT_SELECTION
>   	select DRM_KMS_HELPER
>   	select DRM_DISPLAY_HELPER
>   	select DRM_BRIDGE_CONNECTOR
> diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
> index d15f836dca95..2428b9aaa003 100644
> --- a/drivers/gpu/drm/tidss/tidss_drv.c
> +++ b/drivers/gpu/drm/tidss/tidss_drv.c
> @@ -11,6 +11,7 @@
>   
>   #include <drm/drm_atomic.h>
>   #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_client_setup.h>
>   #include <drm/drm_crtc.h>
>   #include <drm/drm_drv.h>
>   #include <drm/drm_fbdev_dma.h>
> @@ -109,6 +110,7 @@ static const struct drm_driver tidss_driver = {
>   	.fops			= &tidss_fops,
>   	.release		= tidss_release,
>   	DRM_GEM_DMA_DRIVER_OPS_VMAP,
> +	DRM_FBDEV_DMA_DRIVER_OPS,
>   	.name			= "tidss",
>   	.desc			= "TI Keystone DSS",
>   	.date			= "20180215",
> @@ -186,7 +188,7 @@ static int tidss_probe(struct platform_device *pdev)
>   		goto err_irq_uninstall;
>   	}
>   
> -	drm_fbdev_dma_setup(ddev, 32);
> +	drm_client_setup(ddev, NULL);
>   
>   	dev_dbg(dev, "%s done\n", __func__);
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tidss/Kconfig b/drivers/gpu/drm/tidss/Kconfig
index 2385c56493b9..31ad582b7602 100644
--- a/drivers/gpu/drm/tidss/Kconfig
+++ b/drivers/gpu/drm/tidss/Kconfig
@@ -2,6 +2,7 @@  config DRM_TIDSS
 	tristate "DRM Support for TI Keystone"
 	depends on DRM && OF
 	depends on ARM || ARM64 || COMPILE_TEST
+	select DRM_CLIENT_SELECTION
 	select DRM_KMS_HELPER
 	select DRM_DISPLAY_HELPER
 	select DRM_BRIDGE_CONNECTOR
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index d15f836dca95..2428b9aaa003 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -11,6 +11,7 @@ 
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_dma.h>
@@ -109,6 +110,7 @@  static const struct drm_driver tidss_driver = {
 	.fops			= &tidss_fops,
 	.release		= tidss_release,
 	DRM_GEM_DMA_DRIVER_OPS_VMAP,
+	DRM_FBDEV_DMA_DRIVER_OPS,
 	.name			= "tidss",
 	.desc			= "TI Keystone DSS",
 	.date			= "20180215",
@@ -186,7 +188,7 @@  static int tidss_probe(struct platform_device *pdev)
 		goto err_irq_uninstall;
 	}
 
-	drm_fbdev_dma_setup(ddev, 32);
+	drm_client_setup(ddev, NULL);
 
 	dev_dbg(dev, "%s done\n", __func__);