]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge tag 'drm-for-v4.10' of git://people.freedesktop.org/~airlied/linux into drm...
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Dec 2016 21:23:18 +0000 (22:23 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Dec 2016 21:23:18 +0000 (22:23 +0100)
Main pull request for drm for 4.10 kernel - resync drm-misc with full
4.10 state (2 new drivers) so that we can start pulling in all the
refactorings for 4.11!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
1  2 
MAINTAINERS
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_plane.c

diff --combined MAINTAINERS
index 3da51b0437fb6e59d033330345f9b20d690cebc9,1a7a773114aa26b274adab6a3106921c63fd5ab2..81eb7b3ce04da69e3715e51c059b4f431221ece0
@@@ -35,13 -35,13 +35,13 @@@ trivial patch so apply some common sens
  
        PLEASE check your patch with the automated style checker
        (scripts/checkpatch.pl) to catch trivial style violations.
 -      See Documentation/CodingStyle for guidance here.
 +      See Documentation/process/coding-style.rst for guidance here.
  
        PLEASE CC: the maintainers and mailing lists that are generated
        by scripts/get_maintainer.pl.  The results returned by the
        script will be best if you have git installed and are making
        your changes in a branch derived from Linus' latest git tree.
 -      See Documentation/SubmittingPatches for details.
 +      See Documentation/process/submitting-patches.rst for details.
  
        PLEASE try to include any credit lines you want added with the
        patch. It avoids people being missed off by mistake and makes
@@@ -54,7 -54,7 +54,7 @@@
        of the Linux Foundation certificate of contribution and should
        include a Signed-off-by: line.  The current version of this
        "Developer's Certificate of Origin" (DCO) is listed in the file
 -      Documentation/SubmittingPatches.
 +      Documentation/process/submitting-patches.rst.
  
  6.    Make sure you have the right to send any changes you make. If you
        do changes at work you may find your employer owns the patch
@@@ -2937,7 -2937,7 +2937,7 @@@ CAPELLA MICROSYSTEMS LIGHT SENSOR DRIVE
  M:    Kevin Tsai <ktsai@capellamicro.com>
  S:    Maintained
  F:    drivers/iio/light/cm*
 -F:    Documentation/devicetree/bindings/i2c/trivial-devices.txt
 +F:    Documentation/devicetree/bindings/i2c/trivial-admin-guide/devices.rst
  
  CAVIUM I2C DRIVER
  M:    Jan Glauber <jglauber@cavium.com>
@@@ -3085,7 -3085,7 +3085,7 @@@ M:      Harry Wei <harryxiyou@gmail.com
  L:    xiyoulinuxkernelgroup@googlegroups.com (subscribers-only)
  L:    linux-kernel@zh-kernel.org (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/zh_CN/
 +F:    Documentation/translations/zh_CN/
  
  CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
  M:    Peter Chen <Peter.Chen@nxp.com>
@@@ -3917,7 -3917,7 +3917,7 @@@ F:      drivers/dma-buf
  F:    include/linux/dma-buf*
  F:    include/linux/reservation.h
  F:    include/linux/*fence.h
 -F:    Documentation/dma-buf-sharing.txt
 +F:    Documentation/driver-api/dma-buf.rst
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  SYNC FILE FRAMEWORK
@@@ -4121,6 -4121,15 +4121,15 @@@ S:    Supporte
  F:    drivers/gpu/drm/sun4i/
  F:    Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
  
+ DRM DRIVERS FOR AMLOGIC SOCS
+ M:    Neil Armstrong <narmstrong@baylibre.com>
+ L:    dri-devel@lists.freedesktop.org
+ L:    linux-amlogic@lists.infradead.org
+ W:    http://linux-meson.com/
+ S:    Supported
+ F:    drivers/gpu/drm/meson/
+ F:    Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt
  DRM DRIVERS FOR EXYNOS
  M:    Inki Dae <inki.dae@samsung.com>
  M:    Joonyoung Shim <jy0922.shim@samsung.com>
@@@ -8319,6 -8328,12 +8328,12 @@@ T:    git git://linuxtv.org/mkrufky/tuners
  S:    Maintained
  F:    drivers/media/tuners/mxl5007t.*
  
+ MXSFB DRM DRIVER
+ M:    Marek Vasut <marex@denx.de>
+ S:    Supported
+ F:    drivers/gpu/drm/mxsfb/
+ F:    Documentation/devicetree/bindings/display/mxsfb-drm.txt
  MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
  M:    Hyong-Youb Kim <hykim@myri.com>
  L:    netdev@vger.kernel.org
@@@ -11510,7 -11525,7 +11525,7 @@@ STABLE BRANC
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    stable@vger.kernel.org
  S:    Supported
 -F:    Documentation/stable_kernel_rules.txt
 +F:    Documentation/process/stable-kernel-rules.rst
  
  STAGING SUBSYSTEM
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@@ -12952,7 -12967,7 +12967,7 @@@ M:   Greg Kroah-Hartman <gregkh@linuxfoun
  L:    devel@driverdev.osuosl.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
 -F:    Documentation/vme_api.txt
 +F:    Documentation/driver-api/vme.rst
  F:    drivers/staging/vme/
  F:    drivers/vme/
  F:    include/linux/vme*
@@@ -13176,7 -13191,7 +13191,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    include/linux/workqueue.h
  F:    kernel/workqueue.c
 -F:    Documentation/workqueue.txt
 +F:    Documentation/core-api/workqueue.rst
  
  X-POWERS MULTIFUNCTION PMIC DEVICE DRIVERS
  M:    Chen-Yu Tsai <wens@csie.org>
index 4ec61ac274776d7b885b1fc76252155a5e9197e6,a525751b4559e9f3cc99850d5aac6e5c3eb6f16c..4a7b3e98d5863791c2a4aeb21050004b7e0c84f1
@@@ -323,8 -323,9 +323,8 @@@ void drm_minor_release(struct drm_mino
   * historical baggage. Hence use the reference counting provided by
   * drm_dev_ref() and drm_dev_unref() only carefully.
   *
 - * Also note that embedding of &drm_device is currently not (yet) supported (but
 - * it would be easy to add). Drivers can store driver-private data in the
 - * dev_priv field of &drm_device.
 + * It is recommended that drivers embed struct &drm_device into their own device
 + * structure, which is supported through drm_dev_init().
   */
  
  /**
@@@ -461,11 -462,7 +461,11 @@@ static void drm_fs_inode_free(struct in
   * Note that for purely virtual devices @parent can be NULL.
   *
   * Drivers that do not want to allocate their own device struct
 - * embedding struct &drm_device can call drm_dev_alloc() instead.
 + * embedding struct &drm_device can call drm_dev_alloc() instead. For drivers
 + * that do embed struct &drm_device it must be placed first in the overall
 + * structure, and the overall structure must be allocated using kmalloc(): The
 + * drm core's release function unconditionally calls kfree() on the @dev pointer
 + * when the final reference is released.
   *
   * RETURNS:
   * 0 on success, or error code on failure.
@@@ -650,6 -647,62 +650,62 @@@ void drm_dev_unref(struct drm_device *d
  }
  EXPORT_SYMBOL(drm_dev_unref);
  
+ static int create_compat_control_link(struct drm_device *dev)
+ {
+       struct drm_minor *minor;
+       char *name;
+       int ret;
+       if (!drm_core_check_feature(dev, DRIVER_MODESET))
+               return 0;
+       minor = *drm_minor_get_slot(dev, DRM_MINOR_PRIMARY);
+       if (!minor)
+               return 0;
+       /*
+        * Some existing userspace out there uses the existing of the controlD*
+        * sysfs files to figure out whether it's a modeset driver. It only does
+        * readdir, hence a symlink is sufficient (and the least confusing
+        * option). Otherwise controlD* is entirely unused.
+        *
+        * Old controlD chardev have been allocated in the range
+        * 64-127.
+        */
+       name = kasprintf(GFP_KERNEL, "controlD%d", minor->index + 64);
+       if (!name)
+               return -ENOMEM;
+       ret = sysfs_create_link(minor->kdev->kobj.parent,
+                               &minor->kdev->kobj,
+                               name);
+       kfree(name);
+       return ret;
+ }
+ static void remove_compat_control_link(struct drm_device *dev)
+ {
+       struct drm_minor *minor;
+       char *name;
+       if (!drm_core_check_feature(dev, DRIVER_MODESET))
+               return;
+       minor = *drm_minor_get_slot(dev, DRM_MINOR_PRIMARY);
+       if (!minor)
+               return;
+       name = kasprintf(GFP_KERNEL, "controlD%d", minor->index);
+       if (!name)
+               return;
+       sysfs_remove_link(minor->kdev->kobj.parent, name);
+       kfree(name);
+ }
  /**
   * drm_dev_register - Register DRM device
   * @dev: Device to register
@@@ -688,6 -741,10 +744,10 @@@ int drm_dev_register(struct drm_device 
        if (ret)
                goto err_minors;
  
+       ret = create_compat_control_link(dev);
+       if (ret)
+               goto err_minors;
        if (dev->driver->load) {
                ret = dev->driver->load(dev, flags);
                if (ret)
        goto out_unlock;
  
  err_minors:
+       remove_compat_control_link(dev);
        drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
        drm_minor_unregister(dev, DRM_MINOR_RENDER);
        drm_minor_unregister(dev, DRM_MINOR_CONTROL);
@@@ -741,6 -799,7 +802,7 @@@ void drm_dev_unregister(struct drm_devi
        list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
                drm_legacy_rmmap(dev, r_list->map);
  
+       remove_compat_control_link(dev);
        drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
        drm_minor_unregister(dev, DRM_MINOR_RENDER);
        drm_minor_unregister(dev, DRM_MINOR_CONTROL);
index 4bfdada23196e31e912884da67b9651892fcb9e8,62b98f386fd1e7d6a4297d3bc49991b9e542bc12..c2dc8e6f80ff3c36e0d838c55618eb813291c154
@@@ -79,7 -79,7 +79,7 @@@ static unsigned int drm_num_planes(stru
   * Zero on success, error code on failure.
   */
  int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
-                            unsigned long possible_crtcs,
+                            uint32_t possible_crtcs,
                             const struct drm_plane_funcs *funcs,
                             const uint32_t *formats, unsigned int format_count,
                             enum drm_plane_type type,
@@@ -196,7 -196,7 +196,7 @@@ void drm_plane_unregister_all(struct dr
   * Zero on success, error code on failure.
   */
  int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
-                  unsigned long possible_crtcs,
+                  uint32_t possible_crtcs,
                   const struct drm_plane_funcs *funcs,
                   const uint32_t *formats, unsigned int format_count,
                   bool is_primary)
@@@ -392,16 -392,12 +392,16 @@@ int drm_mode_getplane(struct drm_devic
                return -ENOENT;
  
        drm_modeset_lock(&plane->mutex, NULL);
 -      if (plane->crtc)
 +      if (plane->state && plane->state->crtc)
 +              plane_resp->crtc_id = plane->state->crtc->base.id;
 +      else if (!plane->state && plane->crtc)
                plane_resp->crtc_id = plane->crtc->base.id;
        else
                plane_resp->crtc_id = 0;
  
 -      if (plane->fb)
 +      if (plane->state && plane->state->fb)
 +              plane_resp->fb_id = plane->state->fb->base.id;
 +      else if (!plane->state && plane->fb)
                plane_resp->fb_id = plane->fb->base.id;
        else
                plane_resp->fb_id = 0;