linux-next: manual merge of the drm tree with the drm-fixes tree

Mark Brown posted 1 patch 2 months ago
There is a newer version of this series
linux-next: manual merge of the drm tree with the drm-fixes tree
Posted by Mark Brown 2 months ago
Hi all,

Today's linux-next merge of the drm tree got a conflict in:

  drivers/gpu/drm/amd/pm/amdgpu_dpm.c

between commits:

  bb493058c35c8 ("drm/amd/pm: fix pptable use-after-free")
  a65f5179d3f0c ("drm/amd/pm: hide pp_table sysfs on APUs")

from the drm-fixes tree and commit:

  b0ae60ea3f3f1 ("drm/amdgpu: Resolve VM through DRM PASID ownership")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/amd/pm/amdgpu_dpm.c
index e5e89294958a8,8f59ea12fe0ea..0000000000000
--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
@@@ -1183,13 -1183,6 +1183,16 @@@ int amdgpu_dpm_dispatch_task(struct amd
  	return ret;
  }
  
++<<<<<<< HEAD
 +static bool amdgpu_dpm_is_pp_table_allowed(struct amdgpu_device *adev)
 +{
 +	return !amdgpu_sriov_vf(adev) &&
 +	       !(adev->flags & AMD_IS_APU) &&
 +	       !adev->scpm_enabled;
 +}
 +
++=======
++>>>>>>> drm/drm-next
  int amdgpu_dpm_get_pp_table(struct amdgpu_device *adev, char *table,
  			    size_t size)
  {
@@@ -1200,8 -1193,7 +1203,8 @@@
  	if ((!table && size) || (table && !size))
  		return -EINVAL;
  
 -	if (amdgpu_sriov_vf(adev) || !pp_funcs->get_pp_table || adev->scpm_enabled)
 +	if (!amdgpu_dpm_is_pp_table_allowed(adev) ||
 +	    !pp_funcs->get_pp_table)
  		return -EOPNOTSUPP;
  
  	mutex_lock(&adev->pm.mutex);
@@@ -1725,8 -1717,7 +1728,8 @@@ int amdgpu_dpm_set_pp_table(struct amdg
  	if (!buf || !size)
  		return -EINVAL;
  
 -	if (amdgpu_sriov_vf(adev) || !pp_funcs->set_pp_table || adev->scpm_enabled)
 +	if (!amdgpu_dpm_is_pp_table_allowed(adev) ||
 +	    !pp_funcs->set_pp_table)
  		return -EOPNOTSUPP;
  
  	mutex_lock(&adev->pm.mutex);
@@@ -2133,10 -2124,3 +2136,3 @@@ ssize_t amdgpu_dpm_get_xcp_metrics(stru
  
  	return ret;
  }
- 
- const struct ras_smu_drv *amdgpu_dpm_get_ras_smu_driver(struct amdgpu_device *adev)
- {
- 	void *pp_handle = adev->powerplay.pp_handle;
- 
- 	return smu_get_ras_smu_driver(pp_handle);
- }