From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: airlied@redhat.com, mst@redhat.com,
Gerd Hoffmann <kraxel@redhat.com>,
David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v3 3/4] drm_vblank_get: don't WARN_ON in case vblanks are not initialized
Date: Fri, 22 May 2015 15:11:51 +0200 [thread overview]
Message-ID: <1432300312-24792-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1432300312-24792-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/drm_irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index af9662e..265793c 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1029,6 +1029,9 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
unsigned long irqflags;
int ret = 0;
+ if (!dev->num_crtcs)
+ return -EINVAL;
+
if (WARN_ON(crtc >= dev->num_crtcs))
return -EINVAL;
--
1.8.3.1
next prev parent reply other threads:[~2015-05-22 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1432300312-24792-1-git-send-email-kraxel@redhat.com>
2015-05-22 13:11 ` [PATCH v3 1/4] localversion: branch virtio-gpu Gerd Hoffmann
2015-05-22 13:21 ` Gerd Hoffmann
2015-05-22 13:11 ` [PATCH v3 2/4] break kconfig dependency loop Gerd Hoffmann
2015-05-22 13:11 ` Gerd Hoffmann [this message]
2015-05-22 13:11 ` [PATCH v3 4/4] Add virtio gpu driver Gerd Hoffmann
2015-06-02 8:33 ` Michael S. Tsirkin
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=1432300312-24792-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®