From: Tejun Heo <htejun@gmail.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
walt <w41ter@gmail.com>,
linux-kernel@vger.kernel.org,
Suresh Siddha <suresh.b.siddha@intel.com>,
David Airlie <airlied@linux.ie>,
DRI <dri-devel@lists.freedesktop.org>
Subject: [PATCH] drm: fix fallouts from slow-work -> wq conversion
Date: Mon, 09 Aug 2010 12:20:11 +0200 [thread overview]
Message-ID: <4C5FD65B.8080800@gmail.com> (raw)
In-Reply-To: <20100809101406.GA1633@arch.tripp.de>
>From 9a919c46dfa48a9c1f465174609b90253eb8ffc1 Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Mon, 9 Aug 2010 12:01:27 +0200
Commit 991ea75c (drm: use workqueue instead of slow-work), which made
drm to use wq instead of slow-work, didn't account for the return
value difference between delayed_slow_work_enqueue() and
queue_delayed_work(). The former returns 0 on success and -errno on
failures while the latter never fails and only uses the return value
to indicate whether the work was already pending or not.
This misconversion triggered spurious error messages. Remove the now
unnecessary return value check and error message.
Markus: caught another incorrect conversion in drm_kms_helper_poll_enable()
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
---
Oops, you're right. So, this should do it.
Thank you.
drivers/gpu/drm/drm_crtc_helper.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 4598130..b9e4dbf 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -839,7 +839,6 @@ static void output_poll_execute(struct work_struct *work)
struct drm_connector *connector;
enum drm_connector_status old_status, status;
bool repoll = false, changed = false;
- int ret;
mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
@@ -874,11 +873,8 @@ static void output_poll_execute(struct work_struct *work)
dev->mode_config.funcs->output_poll_changed(dev);
}
- if (repoll) {
- ret = queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD);
- if (ret)
- DRM_ERROR("delayed enqueue failed %d\n", ret);
- }
+ if (repoll)
+ queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD);
}
void drm_kms_helper_poll_disable(struct drm_device *dev)
@@ -893,18 +889,14 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
{
bool poll = false;
struct drm_connector *connector;
- int ret;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->polled)
poll = true;
}
- if (poll) {
- ret = queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
- if (ret)
- DRM_ERROR("delayed enqueue failed %d\n", ret);
- }
+ if (poll)
+ queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
}
EXPORT_SYMBOL(drm_kms_helper_poll_enable);
--
1.7.1
next prev parent reply other threads:[~2010-08-09 10:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-08 20:17 [BISECTED] Today's Linus.git hangs during boot: can't find the floppy controller walt
2010-08-09 6:37 ` Markus Trippelsdorf
2010-08-09 8:30 ` Heiko Carstens
2010-08-09 8:34 ` Heiko Carstens
2010-08-09 9:04 ` Tejun Heo
2010-08-09 9:36 ` [PATCH wq#for-linus] workqueue: workqueue_cpu_callback() should be cpu_notifier not hotcpu_notifier Tejun Heo
2010-08-09 9:46 ` Markus Trippelsdorf
2010-08-09 9:49 ` Tejun Heo
2010-08-09 9:56 ` Markus Trippelsdorf
2010-08-09 10:00 ` [PATCH wq#for-linus] drm: fix a fallout from slow-work -> wq conversion Tejun Heo
2010-08-09 10:14 ` Markus Trippelsdorf
2010-08-09 10:20 ` Tejun Heo [this message]
2010-08-09 14:00 ` [PATCH] drm: fix fallouts " walt
2018-06-19 20:32 ` Dave Airlie
2018-06-19 20:32 ` Dave Airlie
2010-08-09 13:56 ` [PATCH wq#for-linus] workqueue: workqueue_cpu_callback() should be cpu_notifier not hotcpu_notifier walt
2010-08-09 17:07 ` Suresh Siddha
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=4C5FD65B.8080800@gmail.com \
--to=htejun@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=suresh.b.siddha@intel.com \
--cc=w41ter@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.