[Intel-gfx] [PATCH 1/2] drm/i915: add fbc enable flag, but disable by default

Ben Widawsky ben at bwidawsk.net
Fri May 6 00:06:04 CEST 2011


On Thu, May 05, 2011 at 02:42:25PM -0700, Jesse Barnes wrote:
> FBC has too many corner cases that we don't currently deal with, so
> disable it by default so we can enable more important features like RC6,
> which conflicts in some configurations.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c  |    3 +++
>  drivers/gpu/drm/i915/i915_drv.c      |    5 ++++-
>  drivers/gpu/drm/i915/i915_drv.h      |    2 ++
>  drivers/gpu/drm/i915/intel_display.c |    5 +++++
>  4 files changed, 14 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 52d2306..f3240ee 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1059,6 +1059,9 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>  		case FBC_MULTIPLE_PIPES:
>  			seq_printf(m, "multiple pipes are enabled");
>  			break;
> +		case FBC_MANUAL_DISABLE:
> +			seq_printf(m, "manually disabled");
> +			break;
>  		default:
>  			seq_printf(m, "unknown reason");
>  		}
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index f72f9ff..34a4496 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -55,6 +55,9 @@ module_param_named(semaphores, i915_semaphores, int, 0600);
>  unsigned int i915_enable_rc6 = 0;
>  module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
>  
> +unsigned int i915_enable_fbc = 0;
> +module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
> +
>  unsigned int i915_lvds_downclock = 0;
>  module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
>  
> @@ -169,7 +172,7 @@ static const struct intel_device_info intel_ironlake_d_info = {
>  static const struct intel_device_info intel_ironlake_m_info = {
>  	.gen = 5, .is_mobile = 1,
>  	.need_gfx_hws = 1, .has_hotplug = 1,
> -	.has_fbc = 0, /* disabled due to buggy hardware */
> +	.has_fbc = 1,
>  	.has_bsd_ring = 1,
>  };
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 354e733..196af79 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -249,6 +249,7 @@ enum no_fbc_reason {
>  	FBC_BAD_PLANE, /* fbc not supported on plane */
>  	FBC_NOT_TILED, /* buffer not tiled */
>  	FBC_MULTIPLE_PIPES, /* more than one pipe active */
> +	FBC_MANUAL_DISABLE,
>  };
>  
>  enum intel_pch {
> @@ -988,6 +989,7 @@ extern unsigned int i915_lvds_downclock;
>  extern unsigned int i915_panel_use_ssc;
>  extern int i915_vbt_sdvo_panel_type;
>  extern unsigned int i915_enable_rc6;
> +extern unsigned int i915_enable_fbc;
>  
>  extern int i915_suspend(struct drm_device *dev, pm_message_t state);
>  extern int i915_resume(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f552f59..bd99216 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1731,6 +1731,11 @@ static void intel_update_fbc(struct drm_device *dev)
>  	intel_fb = to_intel_framebuffer(fb);
>  	obj = intel_fb->obj;
>  
> +	if (!i915_enable_fbc) {
> +		DRM_DEBUG_KMS("fbc disabled manually\n");
> +		dev_priv->no_fbc_reason = FBC_MANUAL_DISABLE;
> +		goto out_disable;
> +	}
>  	if (intel_fb->obj->base.size > dev_priv->cfb_size) {
>  		DRM_DEBUG_KMS("framebuffer too large, disabling "
>  			      "compression\n");

bikeshed: I don't know that manual disable is the correct term.

Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31742

> -- 
> 1.7.4.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list