Skip to contentSkip to conversation

drm/i915/bdw: Add FBC support

PATCH Superseded Ben Widawsky 3 participants 5 messages Feb 20, 2014 – Mar 5, 2014

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

PATCH 1/1 drm/i915/bdw: Add FBC support

This got lost when we shuffled around our internal branch and GEN7_FEATURES macro. There were no HW changes to support FBC, so we just need to set the flag.

---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index ebeefdd..f3b9902 100644
@@ -265,6 +265,7 @@ static const struct intel_device_info intel_broadwell_d_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.has_llc = 1,
 	.has_ddi = 1,
+	.has_fbc = 1,
 	GEN_DEFAULT_PIPEOFFSETS,
 };
 
@@ -274,6 +275,7 @@ static const struct intel_device_info intel_broadwell_m_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.has_llc = 1,
 	.has_ddi = 1,
+	.has_fbc = 1,
 	GEN_DEFAULT_PIPEOFFSETS,
 };
 
Signature · 1 line
1.9.0
#1 lore raw

PATCH v2 1/1 drm/i915/bdw: Add FBC support

This got lost when we shuffled around our internal branch and GEN7_FEATURES macro. There were no HW changes to support FBC, so we just need to set the flag.

v2: Don't allow FBC for any pipe but A on platforms with DDI. (Paulo)

---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index a18c27d..dc44048 100644
@@ -265,6 +265,7 @@ static const struct intel_device_info intel_broadwell_d_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.has_llc = 1,
 	.has_ddi = 1,
+	.has_fbc = 1,
 	GEN_DEFAULT_PIPEOFFSETS,
 };
 
@@ -274,6 +275,7 @@ static const struct intel_device_info intel_broadwell_m_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.has_llc = 1,
 	.has_ddi = 1,
+	.has_fbc = 1,
 	GEN_DEFAULT_PIPEOFFSETS,
 };
 
drivers/gpu/drm/i915/intel_pm.c +1 -1
index a03a12e..4f01b04 100644
@@ -540,7 +540,7 @@ void intel_update_fbc(struct drm_device *dev)
 			DRM_DEBUG_KMS("mode too large for compression, disabling\n");
 		goto out_disable;
 	}
-	if ((INTEL_INFO(dev)->gen < 4 || IS_HASWELL(dev)) &&
+	if ((INTEL_INFO(dev)->gen < 4 || HAS_DDI(dev)) &&
 	    intel_crtc->plane != PLANE_A) {
 		if (set_no_fbc_reason(dev_priv, FBC_BAD_PLANE))
 			DRM_DEBUG_KMS("plane not A, disabling compression\n");
Signature · 1 line
1.9.0
Reviewed-by on v2 1/1
#2 lore raw

2014-02-20 21:01 GMT-03:00 Ben Widawsky <[email protected]>:

Quoted 8 lines

This got lost when we shuffled around our internal branch and GEN7_FEATURES macro. There were no HW changes to support FBC, so we just need to set the flag.

v2: Don't allow FBC for any pipe but A on platforms with DDI. (Paulo)

Quoted 45 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +2 -0
index a18c27d..dc44048 100644
@@ -265,6 +265,7 @@ static const struct intel_device_info intel_broadwell_d_info = {
        .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
        .has_llc = 1,
        .has_ddi = 1,
+       .has_fbc = 1,
        GEN_DEFAULT_PIPEOFFSETS,
 };
 
@@ -274,6 +275,7 @@ static const struct intel_device_info intel_broadwell_m_info = {
        .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
        .has_llc = 1,
        .has_ddi = 1,
+       .has_fbc = 1,
        GEN_DEFAULT_PIPEOFFSETS,
 };
 
drivers/gpu/drm/i915/intel_pm.c +1 -2
index a03a12e..4f01b04 100644
@@ -540,7 +540,7 @@ void intel_update_fbc(struct drm_device *dev)
                        DRM_DEBUG_KMS("mode too large for compression, disabling\n");
                goto out_disable;
        }
-       if ((INTEL_INFO(dev)->gen < 4 || IS_HASWELL(dev)) &&
+       if ((INTEL_INFO(dev)->gen < 4 || HAS_DDI(dev)) &&
            intel_crtc->plane != PLANE_A) {
                if (set_no_fbc_reason(dev_priv, FBC_BAD_PLANE))
                        DRM_DEBUG_KMS("plane not A, disabling compression\n");
--

1.9.0

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

Signature · 1 line
Paulo Zanoni
#3 lore raw
Quoted 11 lines · Paulo Zanoni

2014-02-20 21:01 GMT-03:00 Ben Widawsky <[email protected]>:

Quoted 8 lines

This got lost when we shuffled around our internal branch and GEN7_FEATURES macro. There were no HW changes to support FBC, so we just need to set the flag.

v2: Don't allow FBC for any pipe but A on platforms with DDI. (Paulo)

Have you guys run the fbc igt testcase to make sure it actually works? In case it's broken I'll back it out again ...

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#4 lore raw
Quoted 11 lines · Daniel Vetter
Quoted 10 lines · Paulo Zanoni

2014-02-20 21:01 GMT-03:00 Ben Widawsky <[email protected]>:

Quoted 8 lines

This got lost when we shuffled around our internal branch and GEN7_FEATURES macro. There were no HW changes to support FBC, so we just need to set the flag.

v2: Don't allow FBC for any pipe but A on platforms with DDI. (Paulo)

Quoted 7 lines
Quoted 1 line

Have you guys run the fbc igt testcase to make sure it actually works? In case it's broken I'll back it out again ...

Queued for -next, thanks for the patch.
-Daniel

Daisy, I was led to believe you actually tested this. Is that correct?

Daniel, BTW, we have an unimplemented FBC bugfix (basically disable) on HSW that carries over to BDW. It was not implemented last time I checked anyway. I tried to implement it, but I don't know the code well enough. Feel free to sign me up for review if someone else does it.

Also, 4k displays have some issue with FBC. So we'll need to address that.

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center