Commit 29851567 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-2022-07-12' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "I see you picked up one of the fbdev fixes, this is the other stuff
  that was queued up last week.

  A bit of a scattering of fixes, three for i915, one amdgpu, and a
  couple of panfrost, rockchip, panel and bridge ones.

  amdgpu:
   - Hibernation fix

  dma-buf:
   - fix use after free of fence

  i915:
   - Fix a possible refcount leak in DP MST connector (Hangyu)
   - Fix on loading guc on ADL-N (Daniele)
   - Fix vm use-after-free in vma destruction (Thomas)

  bridge:
   - fsl-ldb : 3 LVDS modesetting fixes

  rockchip:
   - iommu domain fix

  panfrost:
   - fix memory corruption
   - error path fix

  panel:
   - orientation quirk fix for Yoga tablet 2

  ssd130x:
   - fix pre-charge period setting"

* tag 'drm-fixes-2022-07-12' of git://anongit.freedesktop.org/drm/drm:
  drm/ssd130x: Fix pre-charge period setting
  dma-buf: Fix one use-after-free of fence
  drm/i915: Fix vm use-after-free in vma destruction
  drm/i915/guc: ADL-N should use the same GuC FW as ADL-S
  drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector()
  drm/amdgpu/display: disable prefer_shadow for generic fb helpers
  drm/amdgpu: keep fbdev buffers pinned during suspend
  drm/panfrost: Fix shrinker list corruption by madvise IOCTL
  drm/panfrost: Put mapping instead of shmem obj on panfrost_mmu_map_fault_addr() error
  drm/rockchip: Detach from ARM DMA domain in attach_device
  drm/bridge: fsl-ldb: Drop DE signal polarity inversion
  drm/bridge: fsl-ldb: Enable split mode for LVDS dual link
  drm/bridge: fsl-ldb: Fix mode clock rate validation
  drm/aperture: Run fbdev removal before internal helpers
  drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Tablet 2 830
parents 0d8ba24e 3590b44b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ void dma_resv_replace_fences(struct dma_resv *obj, uint64_t context,
		if (old->context != context)
			continue;

		dma_resv_list_set(list, i, replacement, usage);
		dma_resv_list_set(list, i, dma_fence_get(replacement), usage);
		dma_fence_put(old);
	}
}
+21 −4
Original line number Diff line number Diff line
@@ -1528,6 +1528,21 @@ bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc,
						  stime, etime, mode);
}

static bool
amdgpu_display_robj_is_fb(struct amdgpu_device *adev, struct amdgpu_bo *robj)
{
	struct drm_device *dev = adev_to_drm(adev);
	struct drm_fb_helper *fb_helper = dev->fb_helper;

	if (!fb_helper || !fb_helper->buffer)
		return false;

	if (gem_to_amdgpu_bo(fb_helper->buffer->gem) != robj)
		return false;

	return true;
}

int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
{
	struct drm_device *dev = adev_to_drm(adev);
@@ -1563,12 +1578,14 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
			continue;
		}
		robj = gem_to_amdgpu_bo(fb->obj[0]);
		if (!amdgpu_display_robj_is_fb(adev, robj)) {
			r = amdgpu_bo_reserve(robj, true);
			if (r == 0) {
				amdgpu_bo_unpin(robj);
				amdgpu_bo_unreserve(robj);
			}
		}
	}
	return 0;
}

+2 −1
Original line number Diff line number Diff line
@@ -496,7 +496,8 @@ static int amdgpu_vkms_sw_init(void *handle)
	adev_to_drm(adev)->mode_config.max_height = YRES_MAX;

	adev_to_drm(adev)->mode_config.preferred_depth = 24;
	adev_to_drm(adev)->mode_config.prefer_shadow = 1;
	/* disable prefer shadow for now due to hibernation issues */
	adev_to_drm(adev)->mode_config.prefer_shadow = 0;

	adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;

+2 −1
Original line number Diff line number Diff line
@@ -2796,7 +2796,8 @@ static int dce_v10_0_sw_init(void *handle)
	adev_to_drm(adev)->mode_config.max_height = 16384;

	adev_to_drm(adev)->mode_config.preferred_depth = 24;
	adev_to_drm(adev)->mode_config.prefer_shadow = 1;
	/* disable prefer shadow for now due to hibernation issues */
	adev_to_drm(adev)->mode_config.prefer_shadow = 0;

	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;

+2 −1
Original line number Diff line number Diff line
@@ -2914,7 +2914,8 @@ static int dce_v11_0_sw_init(void *handle)
	adev_to_drm(adev)->mode_config.max_height = 16384;

	adev_to_drm(adev)->mode_config.preferred_depth = 24;
	adev_to_drm(adev)->mode_config.prefer_shadow = 1;
	/* disable prefer shadow for now due to hibernation issues */
	adev_to_drm(adev)->mode_config.prefer_shadow = 0;

	adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;

Loading