kernel_optimize_test/include/drm
Sean Paul 1452c25b0e drm: Add helpers to kick off self refresh mode in drivers
This patch adds a new drm helper library to help drivers implement
self refresh. Drivers choosing to use it will register crtcs and
will receive callbacks when it's time to enter or exit self refresh
mode.

In its current form, it has a timer which will trigger after a
driver-specified amount of inactivity. When the timer triggers, the
helpers will submit a new atomic commit to shut the refreshing pipe
off. On the next atomic commit, the drm core will revert the self
refresh state and bring everything back up to be actively driven.

From the driver's perspective, this works like a regular disable/enable
cycle. The driver need only check the 'self_refresh_active' state in
crtc_state. It should initiate self refresh mode on the panel and enter
an off or low-power state.

Changes in v2:
- s/psr/self_refresh/ (Daniel)
- integrated the psr exit into the commit that wakes it up (Jose/Daniel)
- made the psr state per-crtc (Jose/Daniel)
Changes in v3:
- Remove the self_refresh_(active|changed) from connector state (Daniel)
- Simplify loop in drm_self_refresh_helper_alter_state (Daniel)
- Improve self_refresh_aware comment (Daniel)
- s/self_refresh_state/self_refresh_data/ (Daniel)
Changes in v4:
- Move docbook location below panel (Daniel)
- Improve docbook with references and more detailed explanation (Daniel)
- Instead of register/unregister, use init/cleanup (Daniel)
Changes in v5:
- Resolved conflict in drm_atomic_helper.c #include block
- Resolved conflict in rst with HDCP helper docs
Changes in v6:
- Fix include ordering, clean up forward declarations (Sam)

Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-2-sean@poorly.run
Link to v2: https://patchwork.freedesktop.org/patch/msgid/20190326204509.96515-1-sean@poorly.run
Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-6-sean@poorly.run
Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-6-sean@poorly.run
Link to v5: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-6-sean@poorly.run

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jose Souza <jose.souza@intel.com>
Cc: Zain Wang <wzz@rock-chips.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190612145026.191846-1-sean@poorly.run
2019-06-13 14:31:10 -04:00
..
bridge drm/bridge/synopsys: dsi: add power on/off optional phy ops 2019-06-12 09:09:18 +02:00
i2c
tinydrm drm: move tinydrm format conversion helpers to new drm_format_helper.c 2019-04-08 06:59:26 +02:00
ttm drm pull request for 5.2 2019-05-08 21:35:19 -07:00
amd_asic_type.h
ati_pcigart.h
drm_agpsupport.h
drm_atomic_helper.h drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() 2019-06-08 16:46:37 +02:00
drm_atomic_state_helper.h drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state. 2019-04-24 11:51:30 +02:00
drm_atomic_uapi.h
drm_atomic.h drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_audio_component.h Prep patches + headers for the mei-hdcp/i915 component interfaces 2019-02-20 11:53:48 +02:00
drm_auth.h drm: make drm/drm_auth.h self contained 2019-05-27 18:05:44 +02:00
drm_blend.h
drm_bridge.h drm: Add atomic variants for bridge enable/disable 2019-06-13 13:00:29 -04:00
drm_cache.h drm: change func to better detect wether swiotlb is needed 2019-02-20 13:29:29 +01:00
drm_client.h drm/fb-helper: Move out modeset config code 2019-06-11 14:48:19 +02:00
drm_color_mgmt.h drm: Constify drm_color_lut_check() 2019-01-29 23:26:12 +02:00
drm_connector.h drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_crtc_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_crtc.h drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_damage_helper.h drm/damage-helper: Add drm_atomic_helper_damage_merged() 2019-01-17 10:56:54 +01:00
drm_debugfs_crc.h
drm_debugfs.h drm: drm_debugfs.h self-contained 2019-06-10 22:30:24 +02:00
drm_device.h drm: Integrate VRAM MM into struct drm_device 2019-05-15 16:17:06 +02:00
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm: Rename struct edp_vsc_psr to struct dp_sdp 2019-05-23 09:49:32 +03:00
drm_dp_mst_helper.h Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
drm_drv.h drm: introduce a capability flag for syncobj timeline support 2019-05-02 12:36:47 +10:00
drm_dsc.h drm/dsc: Split DSC PPS and SDP header initialisations 2019-03-05 13:24:34 -05:00
drm_edid.h drm/edid: Clean up DRM_EDID_DIGITAL_* flags 2019-06-06 16:05:03 +03:00
drm_encoder_slave.h drm: remove include of drmP.h from drm_encoder_slave.h 2019-01-09 22:35:35 +01:00
drm_encoder.h
drm_fb_cma_helper.h drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
drm_fb_helper.h drm/fb-helper: Prepare to move out modeset config code 2019-06-11 14:47:17 +02:00
drm_file.h drm/legacy: remove some legacy lock struct members 2019-04-24 12:36:32 +10:00
drm_fixed.h
drm_flip_work.h
drm_format_helper.h drm: switch drm_fb_xrgb8888_to_rgb888_dstclip to accept __iomem dst 2019-04-10 21:11:12 +02:00
drm_fourcc.h drm/fourcc: Fix the parameters name in the documentation 2019-05-21 16:58:05 +02:00
drm_framebuffer.h drm/fb: document dirty helper better 2019-06-11 18:02:48 +02:00
drm_gem_cma_helper.h drm: remove drmP.h from drm_gem_cma_helper.h 2019-01-09 22:54:08 +01:00
drm_gem_framebuffer_helper.h drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() 2019-01-17 10:56:45 +01:00
drm_gem_shmem_helper.h drm: Add library for shmem backed GEM objects 2019-03-14 12:06:44 -07:00
drm_gem_vram_helper.h drm: Remove functions with kmap-object argument from GEM VRAM helpers 2019-06-13 13:37:36 +02:00
drm_gem.h drm: Add helpers for setting up an array of dma_fence dependencies. 2019-04-16 15:32:20 -07:00
drm_hashtab.h
drm_hdcp.h drm/hdcp: gathering hdcp related code into drm_hdcp.c 2019-05-09 09:44:41 +02:00
drm_ioctl.h
drm_irq.h
drm_lease.h
drm_legacy.h drm: make drm/drm_legacy.h self-contained 2019-05-27 18:06:15 +02:00
drm_mipi_dsi.h
drm_mm.h
drm_mode_config.h drm: Fix docbook warnings in hdr metadata helper structures 2019-06-04 14:03:53 +02:00
drm_mode_object.h
drm_modes.h drm/modes: Add DRM_SIMPLE_MODE() 2019-02-21 12:13:42 +01:00
drm_modeset_helper_vtables.h drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state 2019-06-13 14:30:07 -04:00
drm_modeset_helper.h drm: remove drmP.h from drm_modeset_helper.h 2019-02-07 21:48:34 +01:00
drm_modeset_lock.h drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_of.h
drm_os_linux.h
drm_panel.h
drm_pci.h
drm_pciids.h
drm_plane_helper.h
drm_plane.h drm/docs: More links for implicit/explicit fencing. 2019-06-03 17:11:33 +02:00
drm_prime.h drm/prime: Add drm_gem_prime_mmap() 2018-11-20 14:54:53 +01:00
drm_print.h drm: fix build errors with drm_print.h 2019-06-10 22:58:53 +02:00
drm_probe_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_property.h
drm_rect.h drm: Nuke drm_calc_{h,v}scale_relaxed() 2019-02-07 13:14:06 +02:00
drm_scdc_helper.h
drm_self_refresh_helper.h drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_simple_kms_helper.h
drm_syncobj.h drm/syncobj: add new drm_syncobj_add_point interface v4 2019-04-01 12:05:53 +02:00
drm_sysfs.h
drm_util.h drm: fix drm_can_sleep() comment 2019-01-21 10:30:12 +01:00
drm_utils.h drm: export drm_timeout_abs_to_jiffies 2019-03-07 12:00:30 -06:00
drm_vblank.h drm/vblank: Allow dynamic per-crtc max_vblank_count 2019-01-14 21:23:55 +02:00
drm_vma_manager.h drm: increase drm mmap_range size to 1TB 2019-04-24 16:20:23 -05:00
drm_vram_mm_helper.h drm: Integrate VRAM MM into struct drm_device 2019-05-15 16:17:06 +02:00
drm_writeback.h drm: writeback: Add job prepare and cleanup operations 2019-03-18 17:24:38 +02:00
drmP.h drm next pull request for 5.1 2019-03-08 08:23:15 -08:00
gpu_scheduler.h drm/scheduler: Add flag to hint the release of guilty job. 2019-05-02 15:50:55 -05:00
i915_component.h drm/i915: MEI interface definition 2019-02-15 18:56:35 +01:00
i915_drm.h drm/i915: enum port definition is moved into i915_drm.h 2019-02-15 18:56:35 +01:00
i915_mei_hdcp_interface.h drm/i915: header for i915 - MEI_HDCP interface 2019-02-15 18:56:35 +01:00
i915_pciids.h drm/i915/icl: More workaround for port F detection due to broken VBTs 2019-05-14 13:46:59 +03:00
intel_lpe_audio.h
intel-gtt.h drm: include kernel.h and agp_backend.h from intel-gtt.h 2019-01-02 11:37:47 +02:00
spsc_queue.h