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

Commit 79524104 authored by Dave Airlie's avatar Dave Airlie
Browse files

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



drm-misc-next for 4.20:

UAPI Changes:
- None

Cross-subsystem Changes:
- None

Core Changes:
- Allow drivers to disable features with per-device granularity (Ville)
- Use EOPNOTSUPP when iface/feature is unsupported instead of
  EINVAL/errno soup (Chris)
- Simplify M/N DP quirk by using constant N to limit size of M/N (Shawn)
- add quirk for LG LP140WF6-SPM1 eDP panel (Shawn)

Driver Changes:
- i915/amdgpu: Disable DRIVER_ATOMIC for older/unsupported devices (Ville)
- sun4i: add support for R40 HDMI PHY (Icenowy)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Icenowy Zheng <icenowy@aosc.io>
Cc: Lee, Shawn C <shawn.c.lee@intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20180919200218.GA186644@art_vandelay
parents 2dc7bad7 e884818c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ Required properties:
  - compatible: value must be one of:
    * allwinner,sun8i-a83t-hdmi-phy
    * allwinner,sun8i-h3-hdmi-phy
    * allwinner,sun8i-r40-hdmi-phy
    * allwinner,sun50i-a64-hdmi-phy
  - reg: base address and size of memory-mapped region
  - clocks: phandles to the clocks feeding the HDMI PHY
@@ -116,9 +117,9 @@ Required properties:
  - resets: phandle to the reset controller driving the PHY
  - reset-names: must be "phy"

H3 and A64 HDMI PHY require additional clocks:
H3, A64 and R40 HDMI PHY require additional clocks:
  - pll-0: parent of phy clock
  - pll-1: second possible phy clock parent (A64 only)
  - pll-1: second possible phy clock parent (A64/R40 only)

TV Encoder
----------
+3 −1
Original line number Diff line number Diff line
@@ -61,8 +61,10 @@ static struct sg_table *map_udmabuf(struct dma_buf_attachment *at,
					GFP_KERNEL);
	if (ret < 0)
		goto err;
	if (!dma_map_sg(at->dev, sg->sgl, sg->nents, direction))
	if (!dma_map_sg(at->dev, sg->sgl, sg->nents, direction)) {
		ret = -EINVAL;
		goto err;
	}
	return sg;

err:
+4 −8
Original line number Diff line number Diff line
@@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
	if (ret)
		return ret;

	/* warn the user if they mix atomic and non-atomic capable GPUs */
	if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
		DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
	/* support atomic early so the atomic debugfs stuff gets created */
	if (supports_atomic)
		kms_driver.driver_features |= DRIVER_ATOMIC;

	dev = drm_dev_alloc(&kms_driver, &pdev->dev);
	if (IS_ERR(dev))
		return PTR_ERR(dev);

	if (!supports_atomic)
		dev->driver_features &= ~DRIVER_ATOMIC;

	ret = pci_enable_device(pdev);
	if (ret)
		goto err_free;
@@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,

static struct drm_driver kms_driver = {
	.driver_features =
	    DRIVER_USE_AGP |
	    DRIVER_USE_AGP | DRIVER_ATOMIC |
	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
	    DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,
	.load = amdgpu_driver_load_kms,
+1 −1
Original line number Diff line number Diff line
@@ -1251,7 +1251,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,

	/* disallow for drivers not supporting atomic: */
	if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
		return -EINVAL;
		return -EOPNOTSUPP;

	/* disallow for userspace that has not enabled atomic cap (even
	 * though this may be a bit overkill, since legacy userspace
+16 −16
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ int drm_legacy_addmap_ioctl(struct drm_device *dev, void *data,

	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
	    !drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	err = drm_addmap_core(dev, map->offset, map->size, map->type,
			      map->flags, &maplist);
@@ -444,7 +444,7 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,

	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
	    !drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	idx = map->offset;
	if (idx < 0)
@@ -596,7 +596,7 @@ int drm_legacy_rmmap_ioctl(struct drm_device *dev, void *data,

	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
	    !drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	mutex_lock(&dev->struct_mutex);
	list_for_each_entry(r_list, &dev->maplist, head) {
@@ -860,7 +860,7 @@ int drm_legacy_addbufs_pci(struct drm_device *dev,
	struct drm_buf **temp_buflist;

	if (!drm_core_check_feature(dev, DRIVER_PCI_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1064,7 +1064,7 @@ static int drm_legacy_addbufs_sg(struct drm_device *dev,
	struct drm_buf **temp_buflist;

	if (!drm_core_check_feature(dev, DRIVER_SG))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1221,10 +1221,10 @@ int drm_legacy_addbufs(struct drm_device *dev, void *data,
	int ret;

	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

#if IS_ENABLED(CONFIG_AGP)
	if (request->flags & _DRM_AGP_BUFFER)
@@ -1267,10 +1267,10 @@ int __drm_legacy_infobufs(struct drm_device *dev,
	int count;

	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1352,10 +1352,10 @@ int drm_legacy_markbufs(struct drm_device *dev, void *data,
	struct drm_buf_entry *entry;

	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1400,10 +1400,10 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data,
	struct drm_buf *buf;

	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1455,10 +1455,10 @@ int __drm_legacy_mapbufs(struct drm_device *dev, void *data, int *p,
	int i;

	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (!dma)
		return -EINVAL;
@@ -1545,7 +1545,7 @@ int drm_legacy_dma_ioctl(struct drm_device *dev, void *data,
		  struct drm_file *file_priv)
{
	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
		return -EINVAL;
		return -EOPNOTSUPP;

	if (dev->driver->dma_ioctl)
		return dev->driver->dma_ioctl(dev, data, file_priv);
Loading