Skip to contentSkip to conversation

drm/fbdev-client: Skip DRM clients if modesetting is absent

PATCH Applied Thierry Reding 4 participants 4 messages Jun 13, 2025 – Jul 6, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/fbdev-client: Skip DRM clients if modesetting is absent

From: Thierry Reding <[email protected]>

Recent generations of Tegra have moved the display components outside of host1x, leading to a device that has no CRTCs attached and hence doesn't support any of the modesetting functionality. When this is detected, the driver clears the DRIVER_MODESET and DRIVER_ATOMIC flags for the device.

Unfortunately, this causes the following errors during boot:

    [      15.418958] ERR KERN drm drm: [drm] *ERROR* Failed to register client: -95
    [      15.425311] WARNING KERN drm drm: [drm] Failed to set up DRM client; error -95

These originate from the fbdev client checking for the presence of the DRIVER_MODESET flag and returning -EOPNOTSUPP. However, if a driver does not support DRIVER_MODESET this is entirely expected and the error isn't helpful.

Prevent this misleading error message by setting up the DRM clients only if modesetting is enabled.

Changes in v2:
- use DRIVER_MODESET check to avoid registering any clients

---
 drivers/gpu/drm/clients/drm_client_setup.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/clients/drm_client_setup.c +5 -0
index e17265039ca8..e460ad354de2 100644
@@ -2,6 +2,7 @@
 
 #include <drm/clients/drm_client_setup.h>
 #include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_print.h>
 
@@ -31,6 +32,10 @@ MODULE_PARM_DESC(active,
  */
 void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format)
 {
+	if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
+		drm_dbg(dev, "driver does not support mode-setting, skipping DRM clients\n");
+		return;
+	}
 
 #ifdef CONFIG_DRM_FBDEV_EMULATION
 	if (!strcmp(drm_client_default, "fbdev")) {
Signature · 1 line
2.49.0
maintainer Reviewed-by on v2 1/1
#1 lore raw

Am 13.06.25 um 14:28 schrieb Thierry Reding:

Quoted 17 lines

From: Thierry Reding <[email protected]>

Recent generations of Tegra have moved the display components outside of host1x, leading to a device that has no CRTCs attached and hence doesn't support any of the modesetting functionality. When this is detected, the driver clears the DRIVER_MODESET and DRIVER_ATOMIC flags for the device.

Unfortunately, this causes the following errors during boot:

     [      15.418958] ERR KERN drm drm: [drm] *ERROR* Failed to register client: -95
     [      15.425311] WARNING KERN drm drm: [drm] Failed to set up DRM client; error -95

These originate from the fbdev client checking for the presence of the DRIVER_MODESET flag and returning -EOPNOTSUPP. However, if a driver does not support DRIVER_MODESET this is entirely expected and the error isn't helpful.

Quoted 8 lines

Prevent this misleading error message by setting up the DRM clients only if modesetting is enabled.

Changes in v2:
- use DRIVER_MODESET check to avoid registering any clients

Quoted 27 lines
---
  drivers/gpu/drm/clients/drm_client_setup.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/clients/drm_client_setup.c +5 -0
index e17265039ca8..e460ad354de2 100644
@@ -2,6 +2,7 @@
 
  #include <drm/clients/drm_client_setup.h>
  #include <drm/drm_device.h>
+#include <drm/drm_drv.h>
  #include <drm/drm_fourcc.h>
  #include <drm/drm_print.h>
 
@@ -31,6 +32,10 @@ MODULE_PARM_DESC(active,
   */
  void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format)
  {
+	if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
+		drm_dbg(dev, "driver does not support mode-setting, skipping DRM clients\n");
+		return;
+	}
 
  #ifdef CONFIG_DRM_FBDEV_EMULATION
  	if (!strcmp(drm_client_default, "fbdev")) {
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
maintainer Acked-by Tested-by on v2 1/1
#2 lore raw
In reply to Thierry Reding
Quoted 42 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Recent generations of Tegra have moved the display components outside of host1x, leading to a device that has no CRTCs attached and hence doesn't support any of the modesetting functionality. When this is detected, the driver clears the DRIVER_MODESET and DRIVER_ATOMIC flags for the device.

Unfortunately, this causes the following errors during boot:

     [      15.418958] ERR KERN drm drm: [drm] *ERROR* Failed to register client: -95
     [      15.425311] WARNING KERN drm drm: [drm] Failed to set up DRM client; error -95

These originate from the fbdev client checking for the presence of the DRIVER_MODESET flag and returning -EOPNOTSUPP. However, if a driver does not support DRIVER_MODESET this is entirely expected and the error isn't helpful.

Prevent this misleading error message by setting up the DRM clients only if modesetting is enabled.

Changes in v2:
- use DRIVER_MODESET check to avoid registering any clients

---
  drivers/gpu/drm/clients/drm_client_setup.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/clients/drm_client_setup.c +1 -0
index e17265039ca8..e460ad354de2 100644
@@ -2,6 +2,7 @@
 
  #include <drm/clients/drm_client_setup.h>
  #include <drm/drm_device.h>
+#include <drm/drm_drv.h>
  #include <drm/drm_fourcc.h>
  #include <drm/drm_print.h>
 

drivers/gpu/drm/clients/drm_client_setup.c MODULE_PARM_DESC(active, · line 41

Quoted 10 lines
drivers/gpu/drm/clients/drm_client_setup.c +4 -0
@@ -31,6 +32,10 @@ MODULE_PARM_DESC(active,
   */
  void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format)
  {
+	if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
+		drm_dbg(dev, "driver does not support mode-setting, skipping DRM clients\n");
+		return;
+	}
 
  #ifdef CONFIG_DRM_FBDEV_EMULATION
  	if (!strcmp(drm_client_default, "fbdev")) {

Can we get this into -next?

Thanks!
Jon

Signature · 1 line
nvpublic
#3 lore raw
In reply to Thierry Reding
Quoted 8 lines · Thierry Reding

Recent generations of Tegra have moved the display components outside of host1x, leading to a device that has no CRTCs attached and hence doesn't support any of the modesetting functionality. When this is detected, the driver clears the DRIVER_MODESET and DRIVER_ATOMIC flags for the device.

Unfortunately, this causes the following errors during boot:

[...]

Applied to drm-misc-next, thanks!

[1/1] drm/fbdev-client: Skip DRM clients if modesetting is absent

      commit: cce91f29c088ba902dd2abfc9c3216ba9a2fb2fe

Best regards,

Signature · 2 lines
With best wishes
Dmitry