Skip to contentSkip to conversation

Enable FBC on IVB architecture.

PATCH In review Eugeni Dodonov 4 participants 5 messages Oct 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable FBC on IVB architecture.

This is mostly similar to Ironlake, with some register changes and additional tricks.

Jesse mentioned that it would make more sense to move those bits into ivb-specific functions instead of making this work within ironlake ones, so I added the corresponding functions and setup their pointers accordingly.

---
 drivers/gpu/drm/i915/i915_drv.c      |    3 +-
 drivers/gpu/drm/i915/i915_reg.h      |   13 +++++
 drivers/gpu/drm/i915/intel_display.c |   85 ++++++++++++++++++++++++++++++++-
 3 files changed, 97 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -1
index f07e425..66ab204 100644
@@ -226,6 +226,7 @@ static const struct intel_device_info intel_sandybridge_m_info = {
 static const struct intel_device_info intel_ivybridge_d_info = {
 	.is_ivybridge = 1, .gen = 7,
 	.need_gfx_hws = 1, .has_hotplug = 1,
+	.has_fbc = 1,	/* Attempt at enabling FBC on IvyBridge mobile */
 	.has_bsd_ring = 1,
 	.has_blt_ring = 1,
 };
@@ -233,7 +234,7 @@ static const struct intel_device_info intel_ivybridge_d_info = {
 static const struct intel_device_info intel_ivybridge_m_info = {
 	.is_ivybridge = 1, .gen = 7, .is_mobile = 1,
 	.need_gfx_hws = 1, .has_hotplug = 1,
-	.has_fbc = 0,	/* FBC is not enabled on Ivybridge mobile yet */
+	.has_fbc = 1,	/* Attempt at enabling FBC on IvyBridge mobile */
 	.has_bsd_ring = 1,
 	.has_blt_ring = 1,
 };
drivers/gpu/drm/i915/i915_reg.h +13 -0
index 542453f..c1a97a6 100644
@@ -627,6 +627,8 @@
 #define ILK_DISPLAY_CHICKEN1	0x42000
 #define   ILK_FBCQ_DIS		(1<<22)
 #define   ILK_PABSTRETCH_DIS 	(1<<21)
+#define   IVB_DPR_VS_FBCQ_DIS   (1<<22)
+
 
 
 /*
@@ -638,6 +640,17 @@
 #define   SNB_CPU_FENCE_ENABLE	(1<<29)
 #define DPFC_CPU_FENCE_OFFSET	0x100104
 
+/*
+ * Framebuffer compression for IVB
+ *
+ * Mostly similar to ILK with some changes
+ */
+
+/* Controlled via ILK_DPFC_CONTROL */
+#define IVB_FBC_CTL_PLANEA  (0<<29)
+#define IVB_FBC_CTL_PLANEB  (1<<29)
+#define IVB_FBC_CTL_PLANEC  (2<<29)
+#define IVB_FBC_CPU_FENCE_ENABLE    (1<<28)
 
 /*
  * GPIO regs
drivers/gpu/drm/i915/intel_display.c +82 -3

97 lines not on this page · raw message

Signature · 1 line
1.7.6.4
#1 lore raw
Quoted 8 lines · Eugeni Dodonov

This is mostly similar to Ironlake, with some register changes and additional tricks.

Jesse mentioned that it would make more sense to move those bits into ivb-specific functions instead of making this work within ironlake ones, so I added the corresponding functions and setup their pointers accordingly.

Please disregard this, sent too quickly, a cleaner patch is on the way.

Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 3 lines · Eugeni Dodonov
Quoted 2 lines

This is mostly similar to Ironlake, with some register changes and additional tricks.

way.

Have you managed to verify that this actually does anything yet? The only way we've managed in the past is to stick a watt meter on a machine and watch it go down when FBC kicks in...

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 3 lines · Keith Packard

Have you managed to verify that this actually does anything yet? The only way we've managed in the past is to stick a watt meter on a machine and watch it go down when FBC kicks in...

Or up as the case may be. ;-)
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw
Quoted 8 lines · Chris Wilson
Quoted 3 lines · Keith Packard

Have you managed to verify that this actually does anything yet? The only way we've managed in the past is to stick a watt meter on a machine and watch it go down when FBC kicks in...

Or up as the case may be. ;-)

I am on optimist, I have faith that it will go down :).

Keith - I wasn't able to verify if it actually kicks in, we are out of powermeters here yet. But it haven't caused any breakage, so if someone with power-related equipment could give it a try, it would be nice. In the very worst case, you'll get some dmesg messages which can give some consolation and maybe a placebo effect :).

Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx