Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Introduce FBC DocBook.

No functional changes.

v2 (Paulo): Rebase.
v3: Accept Daniel's suggestions:
* remove unclear and duplicated explanation.
* remove marketing like doc and replace by a simple one.
* remove bdw_fbc_sw_flush documentation.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Rodrigo Vivi and committed by
Daniel Vetter
94b83957 c0beefd2

+40 -9
+5
Documentation/DocBook/drm.tmpl
··· 3926 3926 !Idrivers/gpu/drm/i915/intel_psr.c 3927 3927 </sect2> 3928 3928 <sect2> 3929 + <title>Frame Buffer Compression (FBC)</title> 3930 + !Pdrivers/gpu/drm/i915/intel_fbc.c Frame Buffer Compression (FBC) 3931 + !Idrivers/gpu/drm/i915/intel_fbc.c 3932 + </sect2> 3933 + <sect2> 3929 3934 <title>DPIO</title> 3930 3935 !Pdrivers/gpu/drm/i915/i915_reg.h DPIO 3931 3936 <table id="dpiox2">
+35 -9
drivers/gpu/drm/i915/intel_fbc.c
··· 21 21 * DEALINGS IN THE SOFTWARE. 22 22 */ 23 23 24 - #include "intel_drv.h" 25 - #include "i915_drv.h" 26 - 27 - /* FBC, or Frame Buffer Compression, is a technique employed to compress the 28 - * framebuffer contents in-memory, aiming at reducing the required bandwidth 29 - * during in-memory transfers and, therefore, reduce the power packet. 24 + /** 25 + * DOC: Frame Buffer Compression (FBC) 26 + * 27 + * FBC tries to save memory bandwidth (and so power consumption) by 28 + * compressing the amount of memory used by the display. It is total 29 + * transparent to user space and completely handled in the kernel. 30 30 * 31 31 * The benefits of FBC are mostly visible with solid backgrounds and 32 - * variation-less patterns. 32 + * variation-less patterns. It comes from keeping the memory footprint small 33 + * and having fewer memory pages opened and accessed for refreshing the display. 33 34 * 34 - * FBC-related functionality can be enabled by the means of the 35 - * i915.i915_fbc_enable parameter 35 + * i915 is responsible to reserve stolen memory for FBC and configure its 36 + * offset on proper registers. The hardware takes care of all 37 + * compress/decompress. However there are many known cases where we have to 38 + * forcibly disable it to allow proper screen updates. 36 39 */ 40 + 41 + #include "intel_drv.h" 42 + #include "i915_drv.h" 37 43 38 44 static void i8xx_fbc_disable(struct drm_device *dev) 39 45 { ··· 324 318 DRM_DEBUG_KMS("enabled fbc on plane %c\n", plane_name(intel_crtc->plane)); 325 319 } 326 320 321 + /** 322 + * intel_fbc_enabled - Is FBC enabled? 323 + * @dev: the drm_device 324 + * 325 + * This function is used to verify the current state of FBC. 326 + * FIXME: This should be tracked in the plane config eventually 327 + * instead of queried at runtime for most callers. 328 + */ 327 329 bool intel_fbc_enabled(struct drm_device *dev) 328 330 { 329 331 struct drm_i915_private *dev_priv = dev->dev_private; ··· 443 429 schedule_delayed_work(&work->work, msecs_to_jiffies(50)); 444 430 } 445 431 432 + /** 433 + * intel_fbc_disable - disable FBC 434 + * @dev: the drm_device 435 + * 436 + * This function disables FBC. 437 + */ 446 438 void intel_fbc_disable(struct drm_device *dev) 447 439 { 448 440 struct drm_i915_private *dev_priv = dev->dev_private; ··· 663 643 i915_gem_stolen_cleanup_compression(dev); 664 644 } 665 645 646 + /** 647 + * intel_fbc_init - Initialize FBC 648 + * @dev_priv: the i915 device 649 + * 650 + * This function might be called during PM init process. 651 + */ 666 652 void intel_fbc_init(struct drm_i915_private *dev_priv) 667 653 { 668 654 if (!HAS_FBC(dev_priv)) {