From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@gmail.com, daniel@ffwll.ch,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
javierm@redhat.com
Cc: linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-tegra@vger.kernel.org, freedreno@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/10] drm/client: Test for connectors before sending hotplug event
Date: Mon, 23 Jan 2023 11:05:50 +0100 [thread overview]
Message-ID: <20230123100559.12351-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20230123100559.12351-1-tzimmermann@suse.de>
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>
---
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;
+ }
+
mutex_lock(&dev->clientlist_mutex);
list_for_each_entry(client, &dev->clientlist, list) {
if (!client->funcs || !client->funcs->hotplug)
diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index 0a4c160e0e58..3d455a2e3fb5 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -389,11 +389,6 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
if (dev->fb_helper)
return drm_fb_helper_hotplug_event(dev->fb_helper);
- if (!dev->mode_config.num_connector) {
- drm_dbg_kms(dev, "No connectors found, will not create framebuffer!\n");
- return 0;
- }
-
drm_fb_helper_prepare(dev, fb_helper, &drm_fb_helper_generic_funcs);
ret = drm_fb_helper_init(dev, fb_helper);
--
2.39.0
next prev parent reply other threads:[~2023-01-23 10:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 10:05 [PATCH 00/10] drm/fb-helper: Various cleanups Thomas Zimmermann
2023-01-23 10:05 ` Thomas Zimmermann [this message]
2023-01-23 10:05 ` [PATCH 02/10] drm/client: Add hotplug_failed flag Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 03/10] drm/fb-helper: Introduce drm_fb_helper_unprepare() Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 04/10] drm/fbdev-generic: Initialize fb-helper structure in generic setup Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 05/10] drm/fb-helper: Remove preferred_bpp parameter from fbdev internals Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 06/10] drm/fb-helper: Initialize fb-helper's preferred BPP in prepare function Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 07/10] drm/fbdev-generic: Minimize hotplug error handling Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 08/10] drm/fbdev-generic: Minimize client unregistering Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 09/10] drm/fbdev-generic: Inline clean-up helpers into drm_fbdev_fb_destroy() Thomas Zimmermann
2023-01-23 10:05 ` [PATCH 10/10] drm/fbdev-generic: Rename struct fb_info 'fbi' to 'info' Thomas Zimmermann
2023-01-23 20:50 ` Sam Ravnborg
2023-01-24 11:27 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123100559.12351-2-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).