Commit 952a33dc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-2024-11-09' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes, usual leaders in amdgpu and xe, then a panel quirk, and
  some fixes to imagination and panthor drivers. Seems around the usual
  level for this time and don't know of any big problems.

  amdgpu:
   - Brightness fix
   - DC vbios parsing fix
   - ACPI fix
   - SMU 14.x fix
   - Power workload profile fix
   - GC partitioning fix
   - Debugfs fixes

  imagination:
   - Track PVR context per file
   - Break ref-counting cycle

  panel-orientation-quirks:
   - Fix matching Lenovo Yoga Tab 3 X90F

  panthor:
   - Lock VM array
   - Be strict about I/O mapping flags

  xe:
   - Fix ccs_mode setting for Xe2 and later
   - Synchronize ccs_mode setting with client creation
   - Apply scheduling WA for LNL in additional places as needed
   - Fix leak and lock handling in error paths of xe_exec ioctl
   - Fix GGTT allocation leak leading to eventual crash in SR-IOV
   - Move run_ticks update out of job handling to avoid synchronization
     with reader"

* tag 'drm-fixes-2024-11-09' of https://gitlab.freedesktop.org/drm/kernel: (23 commits)
  drm/panthor: Be stricter about IO mapping flags
  drm/panthor: Lock XArray when getting entries for the VM
  drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match less strict
  drm/xe: Stop accumulating LRC timestamp on job_free
  drm/xe/pf: Fix potential GGTT allocation leak
  drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL
  drm/xe: Fix possible exec queue leak in exec IOCTL
  drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
  drm/amdgpu: Adjust debugfs eviction and IB access permissions
  drm/amdgpu: Adjust debugfs register access permissions
  drm/amdgpu: Fix DPX valid mode check on GC 9.4.3
  drm/amd/pm: correct the workload setting
  drm/amd/pm: always pick the pptable from IFWI
  drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
  drm/amd/display: parse umc_info or vram_info based on ASIC
  drm/amd/display: Fix brightness level not retained over reboot
  drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout
  drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout
  drm/xe: Move LNL scheduling WA to xe_device.h
  drm/xe: Use the filelist from drm for ccs_mode change
  ...
parents 50643bbc 1a6bbc4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
				      &buffer);
	obj = (union acpi_object *)buffer.pointer;

	/* Fail if calling the method fails and ATIF is supported */
	if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
	/* Fail if calling the method fails */
	if (ACPI_FAILURE(status)) {
		DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
				 acpi_format_exception(status));
		kfree(obj);
+5 −5
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
	int r;
	uint32_t *data, x;

	if (size & 0x3 || *pos & 0x3)
	if (size > 4096 || size & 0x3 || *pos & 0x3)
		return -EINVAL;

	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
@@ -1648,7 +1648,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)

	for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) {
		ent = debugfs_create_file(debugfs_regs_names[i],
					  S_IFREG | 0444, root,
					  S_IFREG | 0400, root,
					  adev, debugfs_regs[i]);
		if (!i && !IS_ERR_OR_NULL(ent))
			i_size_write(ent->d_inode, adev->rmmio_size);
@@ -2100,11 +2100,11 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
	amdgpu_securedisplay_debugfs_init(adev);
	amdgpu_fw_attestation_debugfs_init(adev);

	debugfs_create_file("amdgpu_evict_vram", 0444, root, adev,
	debugfs_create_file("amdgpu_evict_vram", 0400, root, adev,
			    &amdgpu_evict_vram_fops);
	debugfs_create_file("amdgpu_evict_gtt", 0444, root, adev,
	debugfs_create_file("amdgpu_evict_gtt", 0400, root, adev,
			    &amdgpu_evict_gtt_fops);
	debugfs_create_file("amdgpu_test_ib", 0444, root, adev,
	debugfs_create_file("amdgpu_test_ib", 0400, root, adev,
			    &amdgpu_debugfs_test_ib_fops);
	debugfs_create_file("amdgpu_vm_info", 0444, root, adev,
			    &amdgpu_debugfs_vm_info_fops);
+1 −1
Original line number Diff line number Diff line
@@ -482,7 +482,7 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr,
	case AMDGPU_SPX_PARTITION_MODE:
		return adev->gmc.num_mem_partitions == 1 && num_xcc > 0;
	case AMDGPU_DPX_PARTITION_MODE:
		return adev->gmc.num_mem_partitions != 8 && (num_xcc % 4) == 0;
		return adev->gmc.num_mem_partitions <= 2 && (num_xcc % 4) == 0;
	case AMDGPU_TPX_PARTITION_MODE:
		return (adev->gmc.num_mem_partitions == 1 ||
			adev->gmc.num_mem_partitions == 3) &&
+15 −0
Original line number Diff line number Diff line
@@ -9429,6 +9429,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
	bool mode_set_reset_required = false;
	u32 i;
	struct dc_commit_streams_params params = {dc_state->streams, dc_state->stream_count};
	bool set_backlight_level = false;

	/* Disable writeback */
	for_each_old_connector_in_state(state, connector, old_con_state, i) {
@@ -9548,6 +9549,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
			acrtc->hw_mode = new_crtc_state->mode;
			crtc->hwmode = new_crtc_state->mode;
			mode_set_reset_required = true;
			set_backlight_level = true;
		} else if (modereset_required(new_crtc_state)) {
			drm_dbg_atomic(dev,
				       "Atomic commit: RESET. crtc id %d:[%p]\n",
@@ -9599,6 +9601,19 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
				acrtc->otg_inst = status->primary_otg_inst;
		}
	}

	/* During boot up and resume the DC layer will reset the panel brightness
	 * to fix a flicker issue.
	 * It will cause the dm->actual_brightness is not the current panel brightness
	 * level. (the dm->brightness is the correct panel level)
	 * So we set the backlight level with dm->brightness value after set mode
	 */
	if (set_backlight_level) {
		for (i = 0; i < dm->num_of_edps; i++) {
			if (dm->backlight_dev[i])
				amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]);
		}
	}
}

static void dm_set_writeback(struct amdgpu_display_manager *dm,
+3 −1
Original line number Diff line number Diff line
@@ -3127,7 +3127,9 @@ static enum bp_result bios_parser_get_vram_info(
	struct atom_data_revision revision;

	// vram info moved to umc_info for DCN4x
	if (info && DATA_TABLES(umc_info)) {
	if (dcb->ctx->dce_version >= DCN_VERSION_4_01 &&
		dcb->ctx->dce_version < DCN_VERSION_MAX &&
		info && DATA_TABLES(umc_info)) {
		header = GET_IMAGE(struct atom_common_table_header,
					DATA_TABLES(umc_info));

Loading