From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: tiwai@suse.de
Subject: [PATCH 2/4] drm: allow open of dynamic off devices.
Date: Mon, 5 Aug 2013 12:56:02 +1000 [thread overview]
Message-ID: <1375671364-1088-3-git-send-email-airlied@gmail.com> (raw)
In-Reply-To: <1375671364-1088-1-git-send-email-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/drm_fops.c | 2 +-
include/drm/drmP.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 3a24385..d5429ee 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -257,7 +257,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
return -EBUSY; /* No exclusive opens */
if (!drm_cpu_valid())
return -EINVAL;
- if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
+ if (dev->switch_power_state != DRM_SWITCH_POWER_ON && dev->switch_power_state != DRM_SWITCH_POWER_DYNAMIC_OFF)
return -EINVAL;
DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor_id);
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 12083dc..7f8acaf 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1223,6 +1223,7 @@ struct drm_device {
#define DRM_SWITCH_POWER_ON 0
#define DRM_SWITCH_POWER_OFF 1
#define DRM_SWITCH_POWER_CHANGING 2
+#define DRM_SWITCH_POWER_DYNAMIC_OFF 3
static __inline__ int drm_core_check_feature(struct drm_device *dev,
int feature)
--
1.8.2.1
next prev parent reply other threads:[~2013-08-05 2:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 2:56 optimus dynamic power patches Dave Airlie
2013-08-05 2:56 ` [PATCH 1/4] gpu/vga_switcheroo: add driver control power feature. (v3) Dave Airlie
2013-08-05 2:56 ` Dave Airlie [this message]
2013-08-05 2:56 ` [PATCH 3/4] nouveau: add runtime PM support (v0.9) Dave Airlie
2013-08-05 2:56 ` [PATCH 4/4] snd/hda: add runtime suspend/resume on optimus support (v3) Dave Airlie
2013-08-06 7:14 ` Takashi Iwai
2013-08-19 4:50 ` Dave Airlie
-- strict thread matches above, loose matches on Subject: below --
2013-07-29 6:06 nouveau optimus dynamic power off Dave Airlie
2013-07-29 6:06 ` [PATCH 2/4] drm: allow open of dynamic off devices Dave Airlie
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=1375671364-1088-3-git-send-email-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=tiwai@suse.de \
/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).