From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/8] drm/i915: FBC_CONTROL2 is gen4 only
Date: Thu, 28 Nov 2013 17:29:57 +0200 [thread overview]
Message-ID: <1385652602-8528-4-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1385652602-8528-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Gen2 and gen3 don't have the FBC_CONTROL2 register, so don't
touch it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 1dee34c..3d4a47c 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -97,7 +97,7 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int cfb_pitch;
int plane, i;
- u32 fbc_ctl, fbc_ctl2;
+ u32 fbc_ctl;
cfb_pitch = dev_priv->fbc.size / FBC_LL_SIZE;
if (fb->pitches[0] < cfb_pitch)
@@ -114,11 +114,15 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc,
for (i = 0; i < (FBC_LL_SIZE / 32) + 1; i++)
I915_WRITE(FBC_TAG + (i * 4), 0);
- /* Set it up... */
- fbc_ctl2 = FBC_CTL_FENCE_DBL | FBC_CTL_IDLE_IMM | FBC_CTL_CPU_FENCE;
- fbc_ctl2 |= plane;
- I915_WRITE(FBC_CONTROL2, fbc_ctl2);
- I915_WRITE(FBC_FENCE_OFF, crtc->y);
+ if (IS_GEN4(dev)) {
+ u32 fbc_ctl2;
+
+ /* Set it up... */
+ fbc_ctl2 = FBC_CTL_FENCE_DBL | FBC_CTL_IDLE_IMM | FBC_CTL_CPU_FENCE;
+ fbc_ctl2 |= plane;
+ I915_WRITE(FBC_CONTROL2, fbc_ctl2);
+ I915_WRITE(FBC_FENCE_OFF, crtc->y);
+ }
/* enable it... */
fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC;
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-28 15:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 15:29 [PATCH 0/8] FBC support for gen2/3 ville.syrjala
2013-11-28 15:29 ` [PATCH 1/8] drm/i915: Fix bogus FBC1 defines ville.syrjala
2013-11-29 13:59 ` Chris Wilson
2013-11-28 15:29 ` [PATCH 2/8] drm/i915: Gen2 FBC1 CFB pitch wants 32B units ville.syrjala
2013-12-12 12:54 ` Imre Deak
2013-11-28 15:29 ` ville.syrjala [this message]
2013-11-29 14:01 ` [PATCH 3/8] drm/i915: FBC_CONTROL2 is gen4 only Chris Wilson
2013-12-12 13:00 ` Imre Deak
2013-12-12 14:59 ` Daniel Vetter
2013-11-28 15:29 ` [PATCH 4/8] drm/i915: Fix FBC1 plane checks for gen2 ville.syrjala
2013-11-29 13:57 ` Chris Wilson
2013-11-28 15:29 ` [PATCH 5/8] drm/i915: Reorganize FBC function pointer initializaition ville.syrjala
2013-11-29 13:59 ` Chris Wilson
2013-11-28 15:30 ` [PATCH 6/8] drm/i915: Rework the FBC interval/stall stuff a bit ville.syrjala
2013-11-29 13:53 ` Chris Wilson
2013-12-12 14:04 ` Imre Deak
2013-12-12 15:03 ` Daniel Vetter
2013-12-12 15:27 ` [PATCH v2 " ville.syrjala
2013-12-12 16:45 ` Daniel Vetter
2013-11-28 15:30 ` [PATCH 7/8] drm/i915: Swap primary planes on gen2 for FBC ville.syrjala
2013-11-29 13:55 ` Chris Wilson
2013-12-03 21:35 ` Daniel Vetter
2013-11-28 15:30 ` [PATCH 8/8] drm/i915: Enable FBC for all mobile gen2 and gen3 platforms ville.syrjala
2013-11-29 13:56 ` Chris Wilson
2013-11-29 14:10 ` Daniel Vetter
2013-11-29 14:15 ` Chris Wilson
2013-11-29 14:39 ` Ville Syrjälä
2013-12-12 14:19 ` Imre Deak
2013-12-12 14:32 ` Ville Syrjälä
2013-12-12 14:38 ` Daniel Vetter
2013-12-12 15:04 ` Daniel Vetter
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=1385652602-8528-4-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.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