Commit 7ba4d867 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-2020-10-30-1' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "A busier rc2 than normal, have larger sets of fixes for amdgpu +
  nouveau, along with some i915, docs, core, panel, sun4i, v3d, vc4
  fixes.

  Nothing spooky though or pumpkin related.

  docs:
   - kernel doc fixes

  core:
   - fix shmem helpers dma-buf mmap bug

  amdgpu:
   - Add new navi1x PCI ID
   - GPUVM reserved area fixes
   - Misc display fixes
   - Fix bad interactions between display code and CONFIG_KGDB
   - Fixes for SMU manual fan control and i2c

  nouveau:
   - endian regression fix for old gpus
   - buffer object refcount fix
   - uapi start/end alignment fix
   - display notifier fix
   - display clock checking fixes

  i915:
   - Fix max memory region size calculation
   - Restore ILK-M RPS support, restoring performance
   - Reject 90/270 degreerotated initial fbs

  panel:
   - mantix reset fixes

  sun4i:
   - scalar fix

  vc4:
   - hdmi audio fixes

  v3d:
   - fix double free"

* tag 'drm-fixes-2020-10-30-1' of git://anongit.freedesktop.org/drm/drm: (42 commits)
  drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
  drm/nouveau/kms/nv50-: Get rid of bogus nouveau_conn_mode_valid()
  drm/nouveau/device: fix changing endianess code to work on older GPUs
  drm/nouveau/gem: fix "refcount_t: underflow; use-after-free"
  drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps
  drm/nouveau/nouveau: fix the start/end range for migration
  drm/i915: Reject 90/270 degree rotated initial fbs
  drm/i915: Restore ILK-M RPS support
  drm/i915/region: fix max size calculation
  drm/vc4: Rework the structure conversion functions
  drm/vc4: hdmi: Add a name to the codec DAI component
  drm/shme-helpers: Fix dma_buf_mmap forwarding bug
  drm/vc4: hdmi: Avoid sleeping in atomic context
  drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x
  drm/amd/pm: fix the wrong fan speed in fan1_input
  drm/amdgpu/swsmu: drop smu i2c bus on navi1x
  drm/vc4: drv: Add error handding for bind
  drm: drm_print.h: fix kernel-doc markups
  drm: kernel-doc: drm_dp_helper.h: fix a typo
  drm: kernel-doc: add description for a new function parameter
  ...
parents 07e08873 7babd126
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ properties:

  reset-gpios: true

  'mantix,tp-rstn-gpios':
    description: second reset line that triggers DSI config load

  backlight: true

required:
@@ -63,6 +66,7 @@ examples:
            avee-supply = <&reg_avee>;
            vddi-supply = <&reg_1v8_p>;
            reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
            mantix,tp-rstn-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
            backlight = <&backlight>;
        };
    };
+1 −0
Original line number Diff line number Diff line
@@ -1066,6 +1066,7 @@ static const struct pci_device_id pciidlist[] = {
	{0x1002, 0x7319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
	{0x1002, 0x731A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
	{0x1002, 0x731B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
	{0x1002, 0x731E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
	{0x1002, 0x731F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10},
	/* Navi14 */
	{0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},
+10 −0
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
	struct ww_acquire_ctx ticket;
	struct list_head list, duplicates;
	uint64_t va_flags;
	uint64_t vm_size;
	int r = 0;

	if (args->va_address < AMDGPU_VA_RESERVED_SIZE) {
@@ -616,6 +617,15 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,

	args->va_address &= AMDGPU_GMC_HOLE_MASK;

	vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
	vm_size -= AMDGPU_VA_RESERVED_SIZE;
	if (args->va_address + args->map_size > vm_size) {
		dev_dbg(&dev->pdev->dev,
			"va_address 0x%llx is in top reserved area 0x%llx\n",
			args->va_address + args->map_size, vm_size);
		return -EINVAL;
	}

	if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) {
		dev_dbg(&dev->pdev->dev, "invalid flags combination 0x%08X\n",
			args->flags);
+2 −2
Original line number Diff line number Diff line
@@ -112,8 +112,8 @@ struct amdgpu_bo_list_entry;
#define AMDGPU_MMHUB_0				1
#define AMDGPU_MMHUB_1				2

/* hardcode that limit for now */
#define AMDGPU_VA_RESERVED_SIZE			(1ULL << 20)
/* Reserve 2MB at top/bottom of address space for kernel use */
#define AMDGPU_VA_RESERVED_SIZE			(2ULL << 20)

/* max vmids dedicated for process */
#define AMDGPU_VM_MAX_RESERVED_VMID	1
+12 −2
Original line number Diff line number Diff line
@@ -455,6 +455,14 @@ void nv_set_virt_ops(struct amdgpu_device *adev)
	adev->virt.ops = &xgpu_nv_virt_ops;
}

static bool nv_is_blockchain_sku(struct pci_dev *pdev)
{
	if (pdev->device == 0x731E &&
	    (pdev->revision == 0xC6 || pdev->revision == 0xC7))
		return true;
	return false;
}

int nv_set_ip_blocks(struct amdgpu_device *adev)
{
	int r;
@@ -483,7 +491,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
#if defined(CONFIG_DRM_AMD_DC)
		else if (amdgpu_device_has_dc_support(adev))
		else if (amdgpu_device_has_dc_support(adev) &&
			 !nv_is_blockchain_sku(adev->pdev))
			amdgpu_device_ip_block_add(adev, &dm_ip_block);
#endif
		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
@@ -491,6 +500,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
		    !amdgpu_sriov_vf(adev))
			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
		if (!nv_is_blockchain_sku(adev->pdev))
			amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block);
		amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block);
		if (adev->enable_mes)
Loading