Thread (21 messages) 21 messages, 3 authors, 2023-01-30

Re: [PATCH v3 01/10] drm/client: Test for connectors before sending hotplug event

From: Sam Ravnborg <hidden>
Date: 2023-01-27 17:33:17
Also in: amd-gfx, dri-devel, intel-gfx, linux-arm-msm, linux-samsung-soc, linux-tegra

On Fri, Jan 27, 2023 at 03:13:50PM +0100, Thomas Zimmermann wrote:
Hi

Am 25.01.23 um 21:52 schrieb Sam Ravnborg:
quoted
Hi Thomas,

On Wed, Jan 25, 2023 at 09:04:06PM +0100, Thomas Zimmermann wrote:
quoted
Test for connectors in the client code and remove a similar test
from the generic fbdev emulation. Do nothing if the test fails.
Not having connectors indicates a driver bug.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
  drivers/gpu/drm/drm_client.c        | 5 +++++
  drivers/gpu/drm/drm_fbdev_generic.c | 5 -----
  2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index 262ec64d4397..09ac191c202d 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -198,6 +198,11 @@ void drm_client_dev_hotplug(struct drm_device *dev)
  	if (!drm_core_check_feature(dev, DRIVER_MODESET))
  		return;
+	if (!dev->mode_config.num_connector) {
+		drm_dbg_kms(dev, "No connectors found, will not send hotplug events!\n");
+		return;
This deserves a more visible logging - if a driver fails here it would
be good to spot it in the normal kernel log.
drm_info or drm_notice?
But is that really noteworthy? AFAIK, this situation can legally happen. So
if it's expected, why should we print a message about it?
I was reading it as a driver error - as that's not the case current code
is fine.

	Sam

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help