All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weinan Li <weinan.z.li@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-gvt-dev@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915: ignore posting read when using vgpu
Date: Wed, 25 Jan 2017 14:04:55 +0800	[thread overview]
Message-ID: <1485324296-14995-1-git-send-email-weinan.z.li@intel.com> (raw)

No need to do posting read when vgpu actived.

Signed-off-by: Weinan Li <weinan.z.li@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 52d01be..8c9d81b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3830,8 +3830,11 @@ void vlv_set_phy_signal_level(struct intel_encoder *encoder,
 	} while (upper != old_upper && loop++ < 2);			\
 	(u64)upper << 32 | lower; })
 
-#define POSTING_READ(reg)	(void)I915_READ_NOTRACE(reg)
-#define POSTING_READ16(reg)	(void)I915_READ16_NOTRACE(reg)
+#define POSTING_READ(reg) ( \
+	intel_vgpu_active(dev_priv) ? (void)0 : (void)I915_READ_NOTRACE(reg))
+
+#define POSTING_READ16(reg) ( \
+	intel_vgpu_active(dev_priv) ? (void)0 : (void)I915_READ16_NOTRACE(reg))
 
 #define __raw_read(x, s) \
 static inline uint##x##_t __raw_i915_read##x(struct drm_i915_private *dev_priv, \
@@ -3888,7 +3891,8 @@ void vlv_set_phy_signal_level(struct intel_encoder *encoder,
 #define I915_READ_FW(reg__) __raw_i915_read32(dev_priv, (reg__))
 #define I915_WRITE_FW(reg__, val__) __raw_i915_write32(dev_priv, (reg__), (val__))
 #define I915_WRITE64_FW(reg__, val__) __raw_i915_write64(dev_priv, (reg__), (val__))
-#define POSTING_READ_FW(reg__) (void)I915_READ_FW(reg__)
+#define POSTING_READ_FW(reg__) ( \
+	intel_vgpu_active(dev_priv) ? (void)0 : (void)I915_READ_FW(reg__))
 
 /* "Broadcast RGB" property */
 #define INTEL_BROADCAST_RGB_AUTO 0
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-01-25  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  6:04 Weinan Li [this message]
2017-01-25  6:04 ` [PATCH 2/2] drm/i915: ignore forcewake get/put when using vgpu Weinan Li
2017-01-25  7:16   ` Chris Wilson
2017-01-25 12:37     ` Li, Weinan Z
2017-01-25  7:13 ` [PATCH 1/2] drm/i915: ignore posting read " Chris Wilson
2017-01-26  4:53   ` Li, Weinan Z
2017-01-25  7:24 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork

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=1485324296-14995-1-git-send-email-weinan.z.li@intel.com \
    --to=weinan.z.li@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@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 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.