Commit 0dfc7081 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2021-09-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next



drm-misc-next for $kernel-version:

UAPI Changes:

Cross-subsystem Changes:
  - dma-buf: Avoid a warning with some allocations, Remove
    DMA_FENCE_TRACE macros

Core Changes:
  - bridge: New helper to git rid of panels in drivers
  - fence: Improve dma_fence_add_callback documentation, Improve
    dma_fence_ops->wait documentation
  - ioctl: Unexport drm_ioctl_permit
  - lease: Documentation improvements
  - fourcc: Add new macro to determine the modifier vendor
  - quirks: Add the Steam Deck, Chuwi HiBook, Chuwi Hi10 Pro, Samsung
    Galaxy Book 10.6, KD Kurio Smart C15200 2-in-1, Lenovo Ideapad D330
  - resv: Improve the documentation
  - shmem-helpers: Allocate WC pages on x86, Switch to vmf_insert_pfn
  - sched: Fix for a timer being canceled too soon, Avoid null pointer
    derefence if the fence is null in drm_sched_fence_free, Convert
    drivers to rely on its dependency tracking
  - ttm: Switch to kerneldoc, new helper to clear all DMA mappings, pool
    shrinker optitimization, Remove ttm_tt_destroy_common, Fix for
    unbinding on multiple drivers

Driver Changes:
  - bochs: New PCI IDs
  - msm: Fence ordering impromevemnts
  - stm: Add layer alpha support, zpos
  - v3d: Fix for a Vulkan CTS failure
  - vc4: Conversion to the new bridge helpers
  - vgem: Use shmem helpers
  - virtio: Support mapping exported vram
  - zte: Remove obsolete driver

  - bridge: Probe improvements for it66121, enable DSI EOTP for anx7625,
    errors propagation improvements for anx7625

  - panels: 60fps mode for otm8009a, New driver for Samsung S6D27A1

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

# gpg: Signature made Thu 16 Sep 2021 17:30:50 AEST
# gpg:                using EDDSA key 5C1337A45ECA9AEB89060E9EE3EF0D6F671851C5
# gpg: Can't check signature: No public key
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210916073132.ptbbmjetm7v3ufq3@gilmour
parents e4e737bb e4f86819
Loading
Loading
Loading
Loading
+98 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/samsung,s6d27a1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S6D27A1 display panel

description: The S6D27A1 is a 480x800 DPI display panel from Samsung Mobile
  Displays (SMD). The panel must obey the rules for a SPI slave device
  as specified in spi/spi-controller.yaml

maintainers:
  - Markuss Broks <markuss.broks@gmail.com>

allOf:
  - $ref: panel-common.yaml#

properties:
  compatible:
    const: samsung,s6d27a1

  reg: true

  interrupts:
    description: provides an optional ESD (electrostatic discharge)
      interrupt that signals abnormalities in the display hardware.
      This can also be raised for other reasons like erroneous
      configuration.
    maxItems: 1

  reset-gpios: true

  vci-supply:
    description: regulator that supplies the VCI analog voltage
      usually around 3.0 V

  vccio-supply:
    description: regulator that supplies the VCCIO voltage usually
      around 1.8 V

  backlight: true

  spi-cpha: true

  spi-cpol: true

  spi-max-frequency:
    maximum: 1200000

  port: true

required:
  - compatible
  - reg
  - vci-supply
  - vccio-supply
  - spi-cpha
  - spi-cpol
  - port

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    spi {
        compatible = "spi-gpio";
        sck-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
        miso-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
        mosi-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
        cs-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
        num-chipselects = <1>;
        #address-cells = <1>;
        #size-cells = <0>;
        panel@0 {
            compatible = "samsung,s6d27a1";
            spi-max-frequency = <1200000>;
            spi-cpha;
            spi-cpol;
            reg = <0>;
            vci-supply = <&lcd_3v0_reg>;
            vccio-supply = <&lcd_1v8_reg>;
            reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
            interrupt-parent = <&gpio>;
            interrupts = <5 IRQ_TYPE_EDGE_RISING>;

            port {
                panel_in: endpoint {
                    remote-endpoint = <&display_out>;
                };
            };
        };
    };

...
+0 −6
Original line number Diff line number Diff line
@@ -176,12 +176,6 @@ DMA Fences Functions Reference
.. kernel-doc:: include/linux/dma-fence.h
   :internal:

Seqno Hardware Fences
~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: include/linux/seqno-fence.h
   :internal:

DMA Fence Array
~~~~~~~~~~~~~~~

+42 −42
Original line number Diff line number Diff line
@@ -28,56 +28,53 @@ UMA devices.
The Translation Table Manager (TTM)
===================================

TTM design background and information belongs here.
.. kernel-doc:: drivers/gpu/drm/ttm/ttm_module.c
   :doc: TTM

TTM initialization
------------------
.. kernel-doc:: include/drm/ttm/ttm_caching.h
   :internal:

    **Warning**
    This section is outdated.
TTM device object reference
---------------------------

Drivers wishing to support TTM must pass a filled :c:type:`ttm_bo_driver
<ttm_bo_driver>` structure to ttm_device_init, together with an
initialized global reference to the memory manager.  The ttm_bo_driver
structure contains several fields with function pointers for
initializing the TTM, allocating and freeing memory, waiting for command
completion and fence synchronization, and memory migration.
.. kernel-doc:: include/drm/ttm/ttm_device.h
   :internal:

The :c:type:`struct drm_global_reference <drm_global_reference>` is made
up of several fields:
.. kernel-doc:: drivers/gpu/drm/ttm/ttm_device.c
   :export:

.. code-block:: c
TTM resource placement reference
--------------------------------

              struct drm_global_reference {
                      enum ttm_global_types global_type;
                      size_t size;
                      void *object;
                      int (*init) (struct drm_global_reference *);
                      void (*release) (struct drm_global_reference *);
              };
.. kernel-doc:: include/drm/ttm/ttm_placement.h
   :internal:

TTM resource object reference
-----------------------------

There should be one global reference structure for your memory manager
as a whole, and there will be others for each object created by the
memory manager at runtime. Your global TTM should have a type of
TTM_GLOBAL_TTM_MEM. The size field for the global object should be
sizeof(struct ttm_mem_global), and the init and release hooks should
point at your driver-specific init and release routines, which probably
eventually call ttm_mem_global_init and ttm_mem_global_release,
respectively.
.. kernel-doc:: include/drm/ttm/ttm_resource.h
   :internal:

Once your global TTM accounting structure is set up and initialized by
calling ttm_global_item_ref() on it, you need to create a buffer
object TTM to provide a pool for buffer object allocation by clients and
the kernel itself. The type of this object should be
TTM_GLOBAL_TTM_BO, and its size should be sizeof(struct
ttm_bo_global). Again, driver-specific init and release functions may
be provided, likely eventually calling ttm_bo_global_ref_init() and
ttm_bo_global_ref_release(), respectively. Also, like the previous
object, ttm_global_item_ref() is used to create an initial reference
count for the TTM, which will call your initialization function.
.. kernel-doc:: drivers/gpu/drm/ttm/ttm_resource.c
   :export:

See the radeon_ttm.c file for an example of usage.
TTM TT object reference
-----------------------

.. kernel-doc:: include/drm/ttm/ttm_tt.h
   :internal:

.. kernel-doc:: drivers/gpu/drm/ttm/ttm_tt.c
   :export:

TTM page pool reference
-----------------------

.. kernel-doc:: include/drm/ttm/ttm_pool.h
   :internal:

.. kernel-doc:: drivers/gpu/drm/ttm/ttm_pool.c
   :export:

The Graphics Execution Manager (GEM)
====================================
@@ -504,3 +501,6 @@ Scheduler Function References

.. kernel-doc:: drivers/gpu/drm/scheduler/sched_main.c
   :export:

.. kernel-doc:: drivers/gpu/drm/scheduler/sched_entity.c
   :export:
+6 −0
Original line number Diff line number Diff line
@@ -6018,6 +6018,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc
F:	Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml
F:	drivers/gpu/drm/panel/panel-samsung-db7430.c
DRM DRIVER FOR SAMSUNG S6D27A1 PANELS
M:	Markuss Broks <markuss.broks@gmail.com>
S:	Maintained
F:	Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml
F:	driver/gpu/drm/panel/panel-samsung-s6d27a1.c
DRM DRIVER FOR SITRONIX ST7703 PANELS
M:	Guido Günther <agx@sigxcpu.org>
R:	Purism Kernel Team <kernel@puri.sm>
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
	 dma-resv.o seqno-fence.o
	 dma-resv.o
obj-$(CONFIG_DMABUF_HEAPS)	+= dma-heap.o
obj-$(CONFIG_DMABUF_HEAPS)	+= heaps/
obj-$(CONFIG_SYNC_FILE)		+= sync_file.o
Loading