[Intel-gfx] [PATCH 08/15] drm/i915/dsb: Check DSB engine status.
Animesh Manna
animesh.manna at intel.com
Mon Jul 1 06:26:25 UTC 2019
As per bspec check for DSB status before programming any
of its register. Inline function added to check the dsb status.
Cc: Michel Thierry <michel.thierry at intel.com>
Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Animesh Manna <animesh.manna at intel.com>
---
drivers/gpu/drm/i915/intel_dsb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dsb.c b/drivers/gpu/drm/i915/intel_dsb.c
index aa5361c2d70e..9ad4fc8b9f1e 100644
--- a/drivers/gpu/drm/i915/intel_dsb.c
+++ b/drivers/gpu/drm/i915/intel_dsb.c
@@ -23,6 +23,15 @@
#define DSB_BYTE_EN (0xf << 20)
#define DSB_REG_VALUE_MASK 0xfffff
+static inline bool is_dsb_busy(struct intel_dsb *dsb)
+{
+ struct intel_crtc *crtc = dsb->crtc;
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+ enum pipe pipe = crtc->pipe;
+
+ return DSB_STATUS & I915_READ(DSB_CTRL(pipe, dsb->id));
+}
+
struct intel_dsb *
intel_dsb_get(struct intel_crtc *crtc)
{
--
2.21.0
More information about the Intel-gfx
mailing list