From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 12/13] drm/i915: Adding global I915_PARAM for PSR ACTIVE.
Date: Wed, 12 Jun 2013 17:55:53 -0300 [thread overview]
Message-ID: <1371070554-1947-12-git-send-email-rodrigo.vivi@gmail.com> (raw)
In-Reply-To: <1371070554-1947-1-git-send-email-rodrigo.vivi@gmail.com>
This global value allows userspace know when PSR is enabled and active,
i.e. in SRD entry state.
This will allow userspace emit more busy_ioctl when doing directly copy_area
operations through scanout allowing forced psr exit.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
drivers/gpu/drm/i915/i915_dma.c | 3 +++
include/uapi/drm/i915_drm.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index fd8898c..d21b9a0 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1001,6 +1001,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_EXEC_HANDLE_LUT:
value = 1;
break;
+ case I915_PARAM_PSR_ACTIVE:
+ value = I915_READ(EDP_PSR_STATUS_CTL) & EDP_PSR_STATUS_STATE_SRDENT;
+ break;
default:
DRM_DEBUG("Unknown parameter %d\n", param->param);
return -EINVAL;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 923ed7f..191a7fc 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -310,6 +310,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_PINNED_BATCHES 24
#define I915_PARAM_HAS_EXEC_NO_RELOC 25
#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26
+#define I915_PARAM_PSR_ACTIVE 27
typedef struct drm_i915_getparam {
int param;
--
1.7.11.7
next prev parent reply other threads:[~2013-06-12 20:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 20:55 [PATCH 01/13] drm: Added SDP and VSC structures for handling PSR for eDP Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 02/13] drm/i915: Read the EDP DPCD and PSR Capability Rodrigo Vivi
2013-06-14 16:42 ` Paulo Zanoni
2013-06-25 1:58 ` [PATCH] " Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 03/13] drm/i915: VBT Parsing for the PSR Feature Block for HSW Rodrigo Vivi
2013-06-13 13:41 ` Chris Wilson
2013-06-14 17:02 ` Paulo Zanoni
2013-06-12 20:55 ` [PATCH 04/13] drm/i915: split aux_clock_divider logic in a separated function for reuse Rodrigo Vivi
2013-06-14 17:18 ` Paulo Zanoni
2013-06-12 20:55 ` [PATCH 05/13] drm/i915: Enable/Disable PSR Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 06/13] drm/i915: Added debugfs support for PSR Status Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 07/13] drm/i915: Match all PSR mode entry conditions before enabling it Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 08/13] drm/i915: Hook PSR functionality Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 09/13] drm/i915: add update function to disable/enable-back PSR Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 10/13] drm/intel: add enable_psr module option Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 11/13] drm/i915: PSR: Make a clear separation between Sink (Panel) and Source (HW) enabling Rodrigo Vivi
2013-06-13 13:01 ` Daniel Vetter
2013-06-12 20:55 ` Rodrigo Vivi [this message]
2013-06-12 20:55 ` [PATCH 13/13] drm/i915: force psr exit when busy Rodrigo Vivi
2013-06-14 16:21 ` [PATCH 01/13] drm: Added SDP and VSC structures for handling PSR for eDP Paulo Zanoni
2013-06-25 1:56 ` [PATCH] " Rodrigo Vivi
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=1371070554-1947-12-git-send-email-rodrigo.vivi@gmail.com \
--to=rodrigo.vivi@gmail.com \
--cc=intel-gfx@lists.freedesktop.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).