]> Git Repo - linux.git/commitdiff
Merge tag 'amd-drm-fixes-5.11-2020-12-16' of git://people.freedesktop.org/~agd5f...
authorDaniel Vetter <[email protected]>
Wed, 16 Dec 2020 22:25:51 +0000 (23:25 +0100)
committerDaniel Vetter <[email protected]>
Wed, 16 Dec 2020 22:25:51 +0000 (23:25 +0100)
amd-drm-fixes-5.11-2020-12-16:

amdgpu:
- Fix a eDP regression for DCE asics
- SMU fixes for sienna cichlid
- Misc W=1 fixes
- SDMA 5.2 reset fix
- Suspend/resume fix
- Misc display fixes
- Misc runtime PM fixes and cleanups
- Dimgrey Cavefish fixes
- printk cleanup
- Documentation warning fixes

amdkfd:
- Error logging fix
- Fix pipe offset calculation

radeon:
- printk cleanup

Signed-off-by: Daniel Vetter <[email protected]>
From: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1  2 
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index f9c81bc21ba4307414881c2f1925af09b55aff70,e119185210dea56d41a05d23718ae27d40eaae58..5993dd0fdd8e7d559fa5e6f730984ad7f3af7a4e
@@@ -1024,6 -1024,7 +1024,7 @@@ struct amdgpu_device 
        /* enable runtime pm on the device */
        bool                            runpm;
        bool                            in_runpm;
+       bool                            has_pr3;
  
        bool                            pm_sysfs_en;
        bool                            ucode_sysfs_en;
@@@ -1230,6 -1231,7 +1231,7 @@@ void amdgpu_device_program_register_seq
                                             const u32 *registers,
                                             const u32 array_size);
  
+ bool amdgpu_device_supports_atpx(struct drm_device *dev);
  bool amdgpu_device_supports_boco(struct drm_device *dev);
  bool amdgpu_device_supports_baco(struct drm_device *dev);
  bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
@@@ -1280,8 -1282,6 +1282,8 @@@ int amdgpu_enable_vblank_kms(struct drm
  void amdgpu_disable_vblank_kms(struct drm_crtc *crtc);
  long amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd,
                             unsigned long arg);
 +int amdgpu_info_ioctl(struct drm_device *dev, void *data,
 +                    struct drm_file *filp);
  
  /*
   * functions used by amdgpu_encoder.c
@@@ -1313,11 -1313,11 +1315,11 @@@ int amdgpu_acpi_pcie_notify_device_read
  
  void amdgpu_acpi_get_backlight_caps(struct amdgpu_device *adev,
                struct amdgpu_dm_backlight_caps *caps);
- bool amdgpu_acpi_is_s0ix_supported(void);
+ bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev);
  #else
  static inline int amdgpu_acpi_init(struct amdgpu_device *adev) { return 0; }
  static inline void amdgpu_acpi_fini(struct amdgpu_device *adev) { }
- static inline bool amdgpu_acpi_is_s0ix_supported(void) { return false; }
+ static inline bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev) { return false; }
  #endif
  
  int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
index 31506a1678c314a42bd099dea704ce781777b391,cac2724e7615a4a37360c6854ae3988ce0a8161b..72efd579ec5ee198ef2c100f38faefa5f60641e0
@@@ -1340,7 -1340,7 +1340,7 @@@ static int amdgpu_pmops_runtime_suspend
        }
  
        adev->in_runpm = true;
-       if (amdgpu_device_supports_boco(drm_dev))
+       if (amdgpu_device_supports_atpx(drm_dev))
                drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
        drm_kms_helper_poll_disable(drm_dev);
  
        if (ret)
                return ret;
  
-       if (amdgpu_device_supports_boco(drm_dev)) {
+       if (amdgpu_device_supports_atpx(drm_dev)) {
                /* Only need to handle PCI state in the driver for ATPX
                 * PCI core handles it for _PR3.
                 */
-               if (amdgpu_is_atpx_hybrid()) {
-                       pci_ignore_hotplug(pdev);
-               } else {
+               if (!amdgpu_is_atpx_hybrid()) {
                        amdgpu_device_cache_pci_state(pdev);
                        pci_disable_device(pdev);
                        pci_ignore_hotplug(pdev);
@@@ -1378,28 -1376,31 +1376,31 @@@ static int amdgpu_pmops_runtime_resume(
        if (!adev->runpm)
                return -EINVAL;
  
-       if (amdgpu_device_supports_boco(drm_dev)) {
+       if (amdgpu_device_supports_atpx(drm_dev)) {
                drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
  
                /* Only need to handle PCI state in the driver for ATPX
                 * PCI core handles it for _PR3.
                 */
-               if (amdgpu_is_atpx_hybrid()) {
-                       pci_set_master(pdev);
-               } else {
+               if (!amdgpu_is_atpx_hybrid()) {
                        pci_set_power_state(pdev, PCI_D0);
                        amdgpu_device_load_pci_state(pdev);
                        ret = pci_enable_device(pdev);
                        if (ret)
                                return ret;
-                       pci_set_master(pdev);
                }
+               pci_set_master(pdev);
+       } else if (amdgpu_device_supports_boco(drm_dev)) {
+               /* Only need to handle PCI state in the driver for ATPX
+                * PCI core handles it for _PR3.
+                */
+               pci_set_master(pdev);
        } else if (amdgpu_device_supports_baco(drm_dev)) {
                amdgpu_device_baco_exit(drm_dev);
        }
        ret = amdgpu_device_resume(drm_dev, false);
        drm_kms_helper_poll_enable(drm_dev);
-       if (amdgpu_device_supports_boco(drm_dev))
+       if (amdgpu_device_supports_atpx(drm_dev))
                drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
        adev->in_runpm = false;
        return 0;
@@@ -1533,6 -1534,8 +1534,6 @@@ int amdgpu_file_to_fpriv(struct file *f
        return 0;
  }
  
 -int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
 -
  const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
        DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
This page took 0.073387 seconds and 4 git commands to generate.