Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e17c5a9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux

Pull drm updates from Dave Airlie:
 "Okay this is the big one, I was stalled on the fbdev pull req as I
  stupidly let fbdev guys merge a patch I required to fix a warning with
  some patches I had, they ended up merging the patch from the wrong
  place, but the warning should be fixed.  In future I'll just take the
  patch myself!

  Outside drm:

  There are some snd changes for the HDMI audio interactions on haswell,
  they've been acked for inclusion via my tree.  This relies on the
  wound/wait tree from Ingo which is already merged.

  Major changes:

  AMD finally released the dynamic power management code for all their
  GPUs from r600->present day, this is great, off by default for now but
  also a huge amount of code, in fact it is most of this pull request.

  Since it landed there has been a lot of community testing and Alex has
  sent a lot of fixes for any bugs found so far.  I suspect radeon might
  now be the biggest kernel driver ever :-P p.s.  radeon.dpm=1 to enable
  dynamic powermanagement for anyone.

  New drivers:

  Renesas r-car display unit.

  Other highlights:

   - core: GEM CMA prime support, use new w/w mutexs for TTM
     reservations, cursor hotspot, doc updates
   - dvo chips: chrontel 7010B support
   - i915: Haswell (fbc, ips, vecs, watermarks, audio powerwell),
     Valleyview (enabled by default, rc6), lots of pll reworking, 30bpp
     support (this time for sure)
   - nouveau: async buffer object deletion, context/register init
     updates, kernel vp2 engine support, GF117 support, GK110 accel
     support (with external nvidia ucode), context cleanups.
   - exynos: memory leak fixes, Add S3C64XX SoC series support, device
     tree updates, common clock framework support,
   - qxl: cursor hotspot support, multi-monitor support, suspend/resume
     support
   - mgag200: hw cursor support, g200 mode limiting
   - shmobile: prime support
   - tegra: fixes mostly

  I've been banging on this quite a lot due to the size of it, and it
  seems to okay on everything I've tested it on."

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (811 commits)
  drm/radeon/dpm: implement vblank_too_short callback for si
  drm/radeon/dpm: implement vblank_too_short callback for cayman
  drm/radeon/dpm: implement vblank_too_short callback for btc
  drm/radeon/dpm: implement vblank_too_short callback for evergreen
  drm/radeon/dpm: implement vblank_too_short callback for 7xx
  drm/radeon/dpm: add checks against vblank time
  drm/radeon/dpm: add helper to calculate vblank time
  drm/radeon: remove stray line in old pm code
  drm/radeon/dpm: fix display_gap programming on rv7xx
  drm/nvc0/gr: fix gpc firmware regression
  drm/nouveau: fix minor thinko causing bo moves to not be async on kepler
  drm/radeon/dpm: implement force performance level for TN
  drm/radeon/dpm: implement force performance level for ON/LN
  drm/radeon/dpm: implement force performance level for SI
  drm/radeon/dpm: implement force performance level for cayman
  drm/radeon/dpm: implement force performance levels for 7xx/eg/btc
  drm/radeon/dpm: add infrastructure to force performance levels
  drm/radeon: fix surface setup on r1xx
  drm/radeon: add support for 3d perf states on older asics
  drm/radeon: set default clocks for SI when DPM is disabled
  ...
parents 5f097cd2 774d8e34
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ X!Edrivers/base/interface.c
     </sect1>
     <sect1><title>Device Drivers DMA Management</title>
!Edrivers/base/dma-buf.c
!Edrivers/base/reservation.c
!Iinclude/linux/reservation.h
!Edrivers/base/dma-coherent.c
!Edrivers/base/dma-mapping.c
     </sect1>
+219 −52
Original line number Diff line number Diff line
@@ -186,11 +186,12 @@
          <varlistentry>
            <term>DRIVER_HAVE_IRQ</term><term>DRIVER_IRQ_SHARED</term>
            <listitem><para>
              DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler. The
              DRM core will automatically register an interrupt handler when the
              flag is set. DRIVER_IRQ_SHARED indicates whether the device &amp;
              handler support shared IRQs (note that this is required of PCI
              drivers).
              DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler
              managed by the DRM Core. The core will support simple IRQ handler
              installation when the flag is set. The installation process is
              described in <xref linkend="drm-irq-registration"/>.</para>
              <para>DRIVER_IRQ_SHARED indicates whether the device &amp; handler
              support shared IRQs (note that this is required of PCI  drivers).
            </para></listitem>
          </varlistentry>
          <varlistentry>
@@ -344,15 +345,18 @@ char *date;</synopsis>
          The DRM core tries to facilitate IRQ handler registration and
          unregistration by providing <function>drm_irq_install</function> and
          <function>drm_irq_uninstall</function> functions. Those functions only
          support a single interrupt per device.
          support a single interrupt per device, devices that use more than one
          IRQs need to be handled manually.
        </para>
  <!--!Fdrivers/char/drm/drm_irq.c drm_irq_install-->
        <sect4>
          <title>Managed IRQ Registration</title>
          <para>
          Both functions get the device IRQ by calling
          <function>drm_dev_to_irq</function>. This inline function will call a
          bus-specific operation to retrieve the IRQ number. For platform devices,
          <function>platform_get_irq</function>(..., 0) is used to retrieve the
          IRQ number.
            Both the <function>drm_irq_install</function> and
	    <function>drm_irq_uninstall</function> functions get the device IRQ by
	    calling <function>drm_dev_to_irq</function>. This inline function will
	    call a bus-specific operation to retrieve the IRQ number. For platform
	    devices, <function>platform_get_irq</function>(..., 0) is used to
	    retrieve the IRQ number.
          </para>
          <para>
            <function>drm_irq_install</function> starts by calling the
@@ -388,6 +392,24 @@ char *date;</synopsis>
            must disable all hardware interrupts. Finally the function frees the IRQ
            by calling <function>free_irq</function>.
          </para>
        </sect4>
        <sect4>
          <title>Manual IRQ Registration</title>
          <para>
            Drivers that require multiple interrupt handlers can't use the managed
            IRQ registration functions. In that case IRQs must be registered and
            unregistered manually (usually with the <function>request_irq</function>
            and <function>free_irq</function> functions, or their devm_* equivalent).
          </para>
          <para>
            When manually registering IRQs, drivers must not set the DRIVER_HAVE_IRQ
            driver feature flag, and must not provide the
	    <methodname>irq_handler</methodname> driver operation. They must set the
	    <structname>drm_device</structname> <structfield>irq_enabled</structfield>
	    field to 1 upon registration of the IRQs, and clear it to 0 after
	    unregistering the IRQs.
          </para>
        </sect4>
      </sect3>
      <sect3>
        <title>Memory Manager Initialization</title>
@@ -1213,6 +1235,15 @@ int max_width, max_height;</synopsis>
        <sect4>
          <title>Miscellaneous</title>
          <itemizedlist>
            <listitem>
              <synopsis>void (*set_property)(struct drm_crtc *crtc,
                     struct drm_property *property, uint64_t value);</synopsis>
              <para>
                Set the value of the given CRTC property to
                <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/>
                for more information about properties.
              </para>
            </listitem>
            <listitem>
              <synopsis>void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
                        uint32_t start, uint32_t size);</synopsis>
@@ -1363,6 +1394,15 @@ int max_width, max_height;</synopsis>
              <xref linkend="drm-kms-init"/>.
            </para>
          </listitem>
          <listitem>
            <synopsis>void (*set_property)(struct drm_plane *plane,
                     struct drm_property *property, uint64_t value);</synopsis>
            <para>
              Set the value of the given plane property to
              <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/>
              for more information about properties.
            </para>
          </listitem>
        </itemizedlist>
      </sect3>
    </sect2>
@@ -1571,6 +1611,15 @@ int max_width, max_height;</synopsis>
        <sect4>
          <title>Miscellaneous</title>
          <itemizedlist>
            <listitem>
              <synopsis>void (*set_property)(struct drm_connector *connector,
                     struct drm_property *property, uint64_t value);</synopsis>
              <para>
                Set the value of the given connector property to
                <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/>
                for more information about properties.
              </para>
            </listitem>
            <listitem>
              <synopsis>void (*destroy)(struct drm_connector *connector);</synopsis>
              <para>
@@ -1846,10 +1895,6 @@ void intel_crt_init(struct drm_device *dev)
          <synopsis>bool (*mode_fixup)(struct drm_encoder *encoder,
                       const struct drm_display_mode *mode,
                       struct drm_display_mode *adjusted_mode);</synopsis>
          <note><para>
            FIXME: The mode argument be const, but the i915 driver modifies
            mode-&gt;clock in <function>intel_dp_mode_fixup</function>.
          </para></note>
          <para>
            Let encoders adjust the requested mode or reject it completely. This
            operation returns true if the mode is accepted (possibly after being
@@ -2161,6 +2206,128 @@ void intel_crt_init(struct drm_device *dev)
      <title>EDID Helper Functions Reference</title>
!Edrivers/gpu/drm/drm_edid.c
    </sect2>
    <sect2>
      <title>Rectangle Utilities Reference</title>
!Pinclude/drm/drm_rect.h rect utils
!Iinclude/drm/drm_rect.h
!Edrivers/gpu/drm/drm_rect.c
    </sect2>
  </sect1>

  <!-- Internals: kms properties -->

  <sect1 id="drm-kms-properties">
    <title>KMS Properties</title>
    <para>
      Drivers may need to expose additional parameters to applications than
      those described in the previous sections. KMS supports attaching
      properties to CRTCs, connectors and planes and offers a userspace API to
      list, get and set the property values.
    </para>
    <para>
      Properties are identified by a name that uniquely defines the property
      purpose, and store an associated value. For all property types except blob
      properties the value is a 64-bit unsigned integer.
    </para>
    <para>
      KMS differentiates between properties and property instances. Drivers
      first create properties and then create and associate individual instances
      of those properties to objects. A property can be instantiated multiple
      times and associated with different objects. Values are stored in property
      instances, and all other property information are stored in the propery
      and shared between all instances of the property.
    </para>
    <para>
      Every property is created with a type that influences how the KMS core
      handles the property. Supported property types are
      <variablelist>
        <varlistentry>
          <term>DRM_MODE_PROP_RANGE</term>
          <listitem><para>Range properties report their minimum and maximum
            admissible values. The KMS core verifies that values set by
            application fit in that range.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>DRM_MODE_PROP_ENUM</term>
          <listitem><para>Enumerated properties take a numerical value that
            ranges from 0 to the number of enumerated values defined by the
            property minus one, and associate a free-formed string name to each
            value. Applications can retrieve the list of defined value-name pairs
            and use the numerical value to get and set property instance values.
            </para></listitem>
        </varlistentry>
        <varlistentry>
          <term>DRM_MODE_PROP_BITMASK</term>
          <listitem><para>Bitmask properties are enumeration properties that
            additionally restrict all enumerated values to the 0..63 range.
            Bitmask property instance values combine one or more of the
            enumerated bits defined by the property.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term>DRM_MODE_PROP_BLOB</term>
          <listitem><para>Blob properties store a binary blob without any format
            restriction. The binary blobs are created as KMS standalone objects,
            and blob property instance values store the ID of their associated
            blob object.</para>
	    <para>Blob properties are only used for the connector EDID property
	    and cannot be created by drivers.</para></listitem>
        </varlistentry>
      </variablelist>
    </para>
    <para>
      To create a property drivers call one of the following functions depending
      on the property type. All property creation functions take property flags
      and name, as well as type-specific arguments.
      <itemizedlist>
        <listitem>
          <synopsis>struct drm_property *drm_property_create_range(struct drm_device *dev, int flags,
                                               const char *name,
                                               uint64_t min, uint64_t max);</synopsis>
          <para>Create a range property with the given minimum and maximum
            values.</para>
        </listitem>
        <listitem>
          <synopsis>struct drm_property *drm_property_create_enum(struct drm_device *dev, int flags,
                                              const char *name,
                                              const struct drm_prop_enum_list *props,
                                              int num_values);</synopsis>
          <para>Create an enumerated property. The <parameter>props</parameter>
            argument points to an array of <parameter>num_values</parameter>
            value-name pairs.</para>
        </listitem>
        <listitem>
          <synopsis>struct drm_property *drm_property_create_bitmask(struct drm_device *dev,
                                                 int flags, const char *name,
                                                 const struct drm_prop_enum_list *props,
                                                 int num_values);</synopsis>
          <para>Create a bitmask property. The <parameter>props</parameter>
            argument points to an array of <parameter>num_values</parameter>
            value-name pairs.</para>
        </listitem>
      </itemizedlist>
    </para>
    <para>
      Properties can additionally be created as immutable, in which case they
      will be read-only for applications but can be modified by the driver. To
      create an immutable property drivers must set the DRM_MODE_PROP_IMMUTABLE
      flag at property creation time.
    </para>
    <para>
      When no array of value-name pairs is readily available at property
      creation time for enumerated or range properties, drivers can create
      the property using the <function>drm_property_create</function> function
      and manually add enumeration value-name pairs by calling the
      <function>drm_property_add_enum</function> function. Care must be taken to
      properly specify the property type through the <parameter>flags</parameter>
      argument.
    </para>
    <para>
      After creating properties drivers can attach property instances to CRTC,
      connector and plane objects by calling the
      <function>drm_object_attach_property</function>. The function takes a
      pointer to the target object, a pointer to the previously created property
      and an initial instance value.
    </para>
  </sect1>

  <!-- Internals: vertical blanking -->
+8 −0
Original line number Diff line number Diff line
@@ -10,6 +10,14 @@ Recommended properties:
   services interrupts for this device.
 - ti,hwmods: Name of the hwmod associated to the LCDC

Optional properties:
 - max-bandwidth: The maximum pixels per second that the memory
   interface / lcd controller combination can sustain
 - max-width: The maximum horizontal pixel width supported by
   the lcd controller.
 - max-pixelclock: The maximum pixel clock that can be supported
   by the lcd controller in KHz.

Example:

	fb: fb@4830e000 {
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ optional properties:
			- ignored     = ignored
 - interlaced (bool): boolean to enable interlaced mode
 - doublescan (bool): boolean to enable doublescan mode
 - doubleclk (bool): boolean to enable doubleclock mode

All the optional properties that are not bool follow the following logic:
    <1>: high active
+7 −6
Original line number Diff line number Diff line
Device-Tree bindings for drm hdmi driver

Required properties:
- compatible: value should be "samsung,exynos5-hdmi".
- compatible: value should be one among the following:
	1) "samsung,exynos5-hdmi" <DEPRECATED>
	2) "samsung,exynos4210-hdmi"
	3) "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped
	region.
- interrupts: interrupt number to the cpu.
- hpd-gpio: following information about the hotplug gpio pin.
	a) phandle of the gpio controller node.
	b) pin number within the gpio controller.
	c) pin function mode.
	d) optional flags and pull up/down.
	e) drive strength.
	c) optional flags and pull up/down.

Example:

	hdmi {
		compatible = "samsung,exynos5-hdmi";
		compatible = "samsung,exynos4212-hdmi";
		reg = <0x14530000 0x100000>;
		interrupts = <0 95 0>;
		hpd-gpio = <&gpx3 7 0xf 1 3>;
		hpd-gpio = <&gpx3 7 1>;
	};
Loading