summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-08-24 07:11:48 +1000
committerDave Airlie <airlied@redhat.com>2016-08-24 07:11:48 +1000
commitd804819605b461280ca176d982ee3204721c698b (patch)
treeb98d2ea943d337deb3c8d7683dc6e5b209dd2ea7
parentfc93ff608b15ae32cde3006b7af860b59cac20ec (diff)
parent28579f37467cd1a9130a6287cf8322986e0b56f9 (diff)
downloadlinux-d804819605b461280ca176d982ee3204721c698b.tar.gz
linux-d804819605b461280ca176d982ee3204721c698b.tar.bz2
linux-d804819605b461280ca176d982ee3204721c698b.zip
Merge tag 'topic/drm-misc-2016-08-23' of git://anongit.freedesktop.org/drm-intel into drm-next
A few bigger things: - start of splitting drm_crtc.c into more manageable and better documneted chunks - DRM_DEV_* logging (Sean) * tag 'topic/drm-misc-2016-08-23' of git://anongit.freedesktop.org/drm-intel: (46 commits) drm/fb-helper: Make docs for fb_set_suspend wrappers consistent drm/rockchip: Delete unnecessary assignment for the field "owner" drm/bridge: dw-hdmi: Delete unnecessary assignment for the field "owner" drm/rockchip: Don't continue trying to enable crtc on failure drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked() drm/fb-helper: Fix the dummy remove_conflicting_framebuffers drm/udl: Ensure channel is selected before using the device. drm: Avoid calling dev_printk(.dev = NULL) drm: avoid exposing kernel stack in compat_drm_getstats reservation: fix small comment typo drm: Don't implement empty prepare_fb()/cleanup_fb() virtio-gpu: Use memdup_user() rather than duplicating its implementation GPU-DRM-Savage: Use memdup_user() rather than duplicating drm: Allow drivers to modify plane_state in prepare_fb/cleanup_fb drm/rockchip: Use DRM_DEV_ERROR in vop drm: Introduce DRM_DEV_* log messages drm/edid: CEA mode 64 1080p100 vsync pulse width incorrect Revert "drm/hisilicon: Don't set drm_device->platformdev" dma-buf: fix kernel-doc warning and typos drm: Fix kerneldoc in drm_plane_helper.c ...
-rw-r--r--Documentation/gpu/drm-kms-helpers.rst211
-rw-r--r--Documentation/gpu/drm-kms.rst270
-rw-r--r--Documentation/gpu/drm-mm.rst58
-rw-r--r--Documentation/gpu/drm-uapi.rst3
-rw-r--r--Documentation/gpu/index.rst1
-rw-r--r--Documentation/gpu/vga-switcheroo.rst2
-rw-r--r--Documentation/gpu/vgaarbiter.rst (renamed from Documentation/vgaarbiter.txt)161
-rw-r--r--drivers/dma-buf/dma-buf.c23
-rw-r--r--drivers/dma-buf/fence-array.c6
-rw-r--r--drivers/dma-buf/reservation.c2
-rw-r--r--drivers/gpu/drm/Makefile5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v10_0.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v11_0.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v8_0.c6
-rw-r--r--drivers/gpu/drm/arc/arcpgu_crtc.c2
-rw-r--r--drivers/gpu/drm/armada/armada_drv.c2
-rw-r--r--drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c4
-rw-r--r--drivers/gpu/drm/bridge/dw-hdmi-ahb-audio.c1
-rw-r--r--drivers/gpu/drm/drm_atomic.c5
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c2
-rw-r--r--drivers/gpu/drm/drm_blend.c8
-rw-r--r--drivers/gpu/drm/drm_connector.c1123
-rw-r--r--drivers/gpu/drm/drm_crtc.c2000
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c56
-rw-r--r--drivers/gpu/drm/drm_crtc_helper_internal.h (renamed from include/drm/drm_dp_aux_dev.h)36
-rw-r--r--drivers/gpu/drm/drm_crtc_internal.h70
-rw-r--r--drivers/gpu/drm/drm_dp_aux_dev.c19
-rw-r--r--drivers/gpu/drm/drm_dp_helper.c3
-rw-r--r--drivers/gpu/drm/drm_drv.c30
-rw-r--r--drivers/gpu/drm/drm_edid.c25
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c70
-rw-r--r--drivers/gpu/drm/drm_fourcc.c19
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c831
-rw-r--r--drivers/gpu/drm/drm_ioc32.c1
-rw-r--r--drivers/gpu/drm/drm_irq.c8
-rw-r--r--drivers/gpu/drm/drm_kms_helper_common.c3
-rw-r--r--drivers/gpu/drm/drm_modes.c10
-rw-r--r--drivers/gpu/drm/drm_modeset_helper.c153
-rw-r--r--drivers/gpu/drm/drm_plane_helper.c68
-rw-r--r--drivers/gpu/drm/drm_simple_kms_helper.c2
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_drv.c5
-rw-r--r--drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c15
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_lvds.c8
-rw-r--r--drivers/gpu/drm/gma500/mdfld_dsi_output.c5
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_lvds.c9
-rw-r--r--drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c21
-rw-r--r--drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c2
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c11
-rw-r--r--drivers/gpu/drm/i915/i915_vgpu.c42
-rw-r--r--drivers/gpu/drm/i915/intel_atomic_plane.c6
-rw-r--r--drivers/gpu/drm/i915/intel_audio.c6
-rw-r--r--drivers/gpu/drm/i915/intel_display.c43
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
-rw-r--r--drivers/gpu/drm/i915/intel_guc_fwif.h5
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c11
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_fb.c4
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c4
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c4
-rw-r--r--drivers/gpu/drm/omapdrm/omap_plane.c4
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c12
-rw-r--r--drivers/gpu/drm/rockchip/analogix_dp-rockchip.c1
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop.c59
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_vop_reg.c1
-rw-r--r--drivers/gpu/drm/savage/savage_state.c12
-rw-r--r--drivers/gpu/drm/sti/sti_drv.c2
-rw-r--r--drivers/gpu/drm/tegra/dc.c17
-rw-r--r--drivers/gpu/drm/udl/udl_connector.c3
-rw-r--r--drivers/gpu/drm/udl/udl_main.c25
-rw-r--r--drivers/gpu/drm/udl/udl_modeset.c2
-rw-r--r--drivers/gpu/drm/vc4/vc4_plane.c2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_ioctl.c13
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c9
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c11
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c7
-rw-r--r--drivers/gpu/vga/vgaarb.c110
-rw-r--r--include/drm/drmP.h140
-rw-r--r--include/drm/drm_atomic_helper.h2
-rw-r--r--include/drm/drm_connector.h747
-rw-r--r--include/drm/drm_crtc.h792
-rw-r--r--include/drm/drm_crtc_helper.h6
-rw-r--r--include/drm/drm_fb_helper.h28
-rw-r--r--include/drm/drm_fourcc.h2
-rw-r--r--include/drm/drm_framebuffer.h250
-rw-r--r--include/drm/drm_gem.h4
-rw-r--r--include/drm/drm_modes.h18
-rw-r--r--include/drm/drm_modeset.h70
-rw-r--r--include/drm/drm_modeset_helper.h36
-rw-r--r--include/drm/drm_modeset_helper_vtables.h4
-rw-r--r--include/drm/drm_plane_helper.h4
-rw-r--r--include/linux/vgaarb.h128
90 files changed, 4180 insertions, 3857 deletions
diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index 0b302fedf1af..59fa3c11efab 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -2,38 +2,45 @@
Mode Setting Helper Functions
=============================
-The plane, CRTC, encoder and connector functions provided by the drivers
-implement the DRM API. They're called by the DRM core and ioctl handlers
-to handle device state changes and configuration request. As
-implementing those functions often requires logic not specific to
-drivers, mid-layer helper functions are available to avoid duplicating
-boilerplate code.
-
-The DRM core contains one mid-layer implementation. The mid-layer
-provides implementations of several plane, CRTC, encoder and connector
-functions (called from the top of the mid-layer) that pre-process
-requests and call lower-level functions provided by the driver (at the
-bottom of the mid-layer). For instance, the
-:c:func:`drm_crtc_helper_set_config()` function can be used to
-fill the :c:type:`struct drm_crtc_funcs <drm_crtc_funcs>`
-set_config field. When called, it will split the set_config operation
-in smaller, simpler operations and call the driver to handle them.
-
-To use the mid-layer, drivers call
-:c:func:`drm_crtc_helper_add()`,
-:c:func:`drm_encoder_helper_add()` and
-:c:func:`drm_connector_helper_add()` functions to install their
-mid-layer bottom operations handlers, and fill the :c:type:`struct
-drm_crtc_funcs <drm_crtc_funcs>`, :c:type:`struct
-drm_encoder_funcs <drm_encoder_funcs>` and :c:type:`struct
-drm_connector_funcs <drm_connector_funcs>` structures with
-pointers to the mid-layer top API functions. Installing the mid-layer
-bottom operation handlers is best done right after registering the
-corresponding KMS object.
-
-The mid-layer is not split between CRTC, encoder and connector
-operations. To use it, a driver must provide bottom functions for all of
-the three KMS entities.
+The DRM subsystem aims for a strong separation between core code and helper
+libraries. Core code takes care of general setup and teardown and decoding
+userspace requests to kernel internal objects. Everything else is handled by a
+large set of helper libraries, which can be combined freely to pick and choose
+for each driver what fits, and avoid shared code where special behaviour is
+needed.
+
+This distinction between core code and helpers is especially strong in the
+modesetting code, where there's a shared userspace ABI for all drivers. This is
+in contrast to the render side, where pretty much everything (with very few
+exceptions) can be considered optional helper code.
+
+There are a few areas these helpers can grouped into:
+
+* Helpers to implement modesetting. The important ones here are the atomic
+ helpers. Old drivers still often use the legacy CRTC helpers. They both share
+ the same set of common helper vtables. For really simple drivers (anything
+ that would have been a great fit in the deprecated fbdev subsystem) there's
+ also the simple display pipe helpers.
+
+* There's a big pile of helpers for handling outputs. First the generic bridge
+ helpers for handling encoder and transcoder IP blocks. Second the panel helpers
+ for handling panel-related information and logic. Plus then a big set of
+ helpers for the various sink standards (DisplayPort, HDMI, MIPI DSI). Finally
+ there's also generic helpers for handling output probing, and for dealing with
+ EDIDs.
+
+* The last group of helpers concerns itself with the frontend side of a display
+ pipeline: Planes, handling rectangles for visibility checking and scissoring,
+ flip queues and assorted bits.
+
+Modeset Helper Reference for Common Vtables
+===========================================
+
+.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
+ :internal:
+
+.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
+ :doc: overview
Atomic Modeset Helper Functions Reference
=========================================
@@ -62,33 +69,27 @@ Atomic State Reset and Initialization
.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
:export:
-Modeset Helper Reference for Common Vtables
-===========================================
-
-.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
- :internal:
-
-.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
- :doc: overview
-
Legacy CRTC/Modeset Helper Functions Reference
==============================================
.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
- :export:
+ :doc: overview
.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
- :doc: overview
+ :export:
-Output Probing Helper Functions Reference
-=========================================
+Simple KMS Helper Reference
+===========================
-.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
- :doc: output probing helper overview
+.. kernel-doc:: include/drm/drm_simple_kms_helper.h
+ :internal:
-.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
+.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
:export:
+.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
+ :doc: overview
+
fbdev Helper Functions Reference
================================
@@ -110,6 +111,36 @@ Framebuffer CMA Helper Functions Reference
.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
:export:
+Bridges
+=======
+
+Overview
+--------
+
+.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
+ :doc: overview
+
+Default bridge callback sequence
+--------------------------------
+
+.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
+ :doc: bridge callbacks
+
+.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
+ :export:
+
+Panel Helper Reference
+======================
+
+.. kernel-doc:: include/drm/drm_panel.h
+ :internal:
+
+.. kernel-doc:: drivers/gpu/drm/drm_panel.c
+ :export:
+
+.. kernel-doc:: drivers/gpu/drm/drm_panel.c
+ :doc: drm panel
+
Display Port Helper Functions Reference
=======================================
@@ -158,6 +189,15 @@ MIPI DSI Helper Functions Reference
.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
:export:
+Output Probing Helper Functions Reference
+=========================================
+
+.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
+ :doc: output probing helper overview
+
+.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
+ :export:
+
EDID Helper Functions Reference
===============================
@@ -176,18 +216,6 @@ Rectangle Utilities Reference
.. kernel-doc:: drivers/gpu/drm/drm_rect.c
:export:
-Flip-work Helper Reference
-==========================
-
-.. kernel-doc:: include/drm/drm_flip_work.h
- :doc: flip utils
-
-.. kernel-doc:: include/drm/drm_flip_work.h
- :internal:
-
-.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
- :export:
-
HDMI Infoframes Helper Reference
================================
@@ -202,59 +230,40 @@ libraries and hence is also included here.
.. kernel-doc:: drivers/video/hdmi.c
:export:
-Plane Helper Reference
-======================
-
-.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
- :export:
-
-.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
- :doc: overview
+Flip-work Helper Reference
+==========================
-Tile group
-----------
+.. kernel-doc:: include/drm/drm_flip_work.h
+ :doc: flip utils
-.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
- :doc: Tile group
+.. kernel-doc:: include/drm/drm_flip_work.h
+ :internal:
-Bridges
-=======
+.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
+ :export:
-Overview
---------
+Plane Helper Reference
+======================
-.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
+.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
:doc: overview
-Default bridge callback sequence
---------------------------------
-
-.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
- :doc: bridge callbacks
-
-.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
+.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
:export:
-Panel Helper Reference
-======================
-
-.. kernel-doc:: include/drm/drm_panel.h
- :internal:
+Tile group
+==========
-.. kernel-doc:: drivers/gpu/drm/drm_panel.c
- :export:
+# FIXME: This should probably be moved into a property documentation section
-.. kernel-doc:: drivers/gpu/drm/drm_panel.c
- :doc: drm panel
+.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
+ :doc: Tile group
-Simple KMS Helper Reference
-===========================
+Auxiliary Modeset Helpers
+=========================
-.. kernel-doc:: include/drm/drm_simple_kms_helper.h
- :internal:
+.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
+ :doc: aux kms helpers
-.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
+.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
:export:
-
-.. kernel-doc:: drivers/gp