Skip to content

Commit

Permalink
Merge branch 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/…
Browse files Browse the repository at this point in the history
…linux into drm-fixes

Just a few small fixes.

* 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux:
  Revert "drm/radeon: always apply pci shutdown callbacks"
  drm/amdgpu: fix unload driver issue for virtual display
  drm/amdgpu: check ring being ready before using
  • Loading branch information
airlied committed Jan 27, 2017
2 parents 99f300c + b9b487e commit 1fb2d35
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type,
}
break;
}

if (!(*out_ring && (*out_ring)->adev)) {
DRM_ERROR("Ring %d is not initialized on IP %d\n",
ring, ip_type);
return -EINVAL;
}

return 0;
}

Expand Down
5 changes: 1 addition & 4 deletions drivers/gpu/drm/amd/amdgpu/dce_virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,11 +627,8 @@ static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs =

static void dce_virtual_encoder_destroy(struct drm_encoder *encoder)
{
struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);

kfree(amdgpu_encoder->enc_priv);
drm_encoder_cleanup(encoder);
kfree(amdgpu_encoder);
kfree(encoder);
}

static const struct drm_encoder_funcs dce_virtual_encoder_funcs = {
Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,10 @@ static void
radeon_pci_shutdown(struct pci_dev *pdev)
{
/* if we are running in a VM, make sure the device
* torn down properly on reboot/shutdown.
* unfortunately we can't detect certain
* hypervisors so just do this all the time.
* torn down properly on reboot/shutdown
*/
radeon_pci_remove(pdev);
if (radeon_device_is_virtual())
radeon_pci_remove(pdev);
}

static int radeon_pmops_suspend(struct device *dev)
Expand Down

0 comments on commit 1fb2d35

Please sign in to comment.